Hey! The swapping of 1 and 0 works like a charm! Excellent!
Now I have the "fuel" at the top, and the all-important, static dirt block at the bottom. Looks a hell of a lot nicer.
Thank you!
Hey, I love your tuts SO much, i was wondering if you can tell me though how to get the Limestonebow to be more like vanilla bow where it looks like your holding the bow not and item. also do you know how to stop the item from animating in the hotbar?
I Will not explain much for now, i jus want to get all of the new tutorials up, then explain them all. so this will just be a copy & paste tutorial for now, just replace things as usual.
Mod_Fixeruperrer
//Coded/Tutorial by GoldenClawStudio Representatives Hawkz and 3vil_Squirrel
package net.minecraft.src;
import java.util.Random;
public class mod_Fixeruperrer extends BaseMod{
public mod_Fixeruperrer()
{
//TODO List
addNames();
setTextures();
registerBlocks();
addRecipes();
addSmelting();
}
public void addNames()
{
//***
//* This adds the name for your Item/Block then the in game name.
//***
ModLoader.addName(LimestoneBow, "Limestone Bow");
}
public void setTextures()
{
//***
//* This adds the Textures for you Item's/Block's
//***
LimestoneBow.iconIndex = ModLoader.addOverride("/gui/items.png", "/Fixeruperrer/LimestoneBow.png");
}
public void registerBlocks()
{
//***
//* This will register the block. (This Has to be added if you're making a block no items go here)
//***
}
public void addRecipes()
{
//***
//* Be Creative! This part will be how you craft your Item's/Block's
//***
ModLoader.addRecipe(new ItemStack(LimestoneBow, 1), new Object[] {
"ab ", "a b", "ab ", Character.valueOf('a'), Block.dirt, Character.valueOf('b'), Item.stick
});
}
public void addSmelting()
{
//***
//* This part is where we add our Smelting Recipes.
//***
}
//***
//* This is where we Register our Items/Blocks for the part below.
//***
public static Item LimestoneBow;
public static int LimestoneBow1 = ModLoader.addOverride("/gui/items.png", "/Fixeruperrer/LimestoneBow1.png");
public static int LimestoneBow2 = ModLoader.addOverride("/gui/items.png", "/Fixeruperrer/LimestoneBow2.png");
public static int LimestoneBow3 = ModLoader.addOverride("/gui/items.png", "/Fixeruperrer/LimestoneBow3.png");
public static int LimestoneBow4 = ModLoader.addOverride("/gui/items.png", "/Fixeruperrer/LimestoneBow4.png");
static
{
//***
//* This is where the fun begins with some food and blocks.
//***
LimestoneBow = (new ItemLimestoneBow(1001)).setItemName("LimestoneBow");
}
public String getVersion()
{
//***
//* This is where we name our mod.
//***
return "Fixer Uper'er - 1.2.5";
}
public void load()
{
//***
//* This is where Some NPC Stuff will go.
//***
}
}
ItemLimestoneBow
package net.minecraft.src;
import java.util.Random;
public class ItemLimestoneBow extends Item
{
public ItemLimestoneBow(int par1)
{
super(par1);
maxStackSize = 1;
setMaxDamage(384);
}
public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag)
{
EntityPlayer entityplayer = (EntityPlayer)entity;
ItemStack itemstack1 = entityplayer.inventory.getCurrentItem();
if(entityplayer.isUsingItem() && itemstack1.itemID == mod_Fixeruperrer.LimestoneBow.shiftedIndex)
{
int k = itemstack.getMaxItemUseDuration() - entityplayer.getItemInUseCount();
if (k >= 18) {
iconIndex = mod_Fixeruperrer.LimestoneBow4;} else if(k > 13) {
iconIndex = mod_Fixeruperrer.LimestoneBow3;} else if(k > 0) {
iconIndex = mod_Fixeruperrer.LimestoneBow2;}
} else {
iconIndex = mod_Fixeruperrer.LimestoneBow1;}
}
/**
* called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount
*/
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
{
boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;
if (flag || par3EntityPlayer.inventory.hasItem(Item.arrow.shiftedIndex))
{
int i = getMaxItemUseDuration(par1ItemStack) - par4;
float f = (float)i / 20F;
f = (f * f + f * 2.0F) / 3F;
if ((double)f < 0.10000000000000001D)
{
return;
}
if (f > 1.0F)
{
f = 1.0F;
}
EntityArrow entityarrow = new EntityArrow(par2World, par3EntityPlayer, f * 2.0F);
if (f == 1.0F)
{
entityarrow.arrowCritical = true;
}
int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack);
if (j > 0)
{
entityarrow.setDamage(entityarrow.getDamage() + (double)j * 0.5D + 0.5D);
}
int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack);
if (k > 0)
{
entityarrow.func_46023_b(k);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0)
{
entityarrow.setFire(100);
}
par1ItemStack.damageItem(1, par3EntityPlayer);
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
if (!flag)
{
par3EntityPlayer.inventory.consumeInventoryItem(Item.arrow.shiftedIndex);
}
else
{
entityarrow.doesArrowBelongToPlayer = false;
}
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(entityarrow);
}
}
}
public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
return par1ItemStack;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.bow;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(Item.arrow.shiftedIndex))
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
}
return par1ItemStack;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return 1;
}
}
ItemTutorialNo# 2 - Fertilizer
I Will not explain much for now, i jus want to get all of the new tutorials up, then explain them all. so this will just be a copy & paste tutorial for now, just replace things as usual.
Mod_Fixeruperrer
//Coded/Tutorial by GoldenClawStudio Representatives Hawkz and 3vil_Squirrel
package net.minecraft.src;
import java.util.Random;
public class mod_Fixeruperrer extends BaseMod{
public mod_Fixeruperrer()
{
//TODO List
addNames();
setTextures();
registerBlocks();
addRecipes();
addSmelting();
}
public void addNames()
{
//***
//* This adds the name for your Item/Block then the in game name.
//***
ModLoader.addName(LimestoneF, "Limestone Fertilizer");
}
public void setTextures()
{
//***
//* This adds the Textures for you Item's/Block's
//***
LimestoneF.iconIndex = ModLoader.addOverride("/gui/items.png", "/Fixeruperrer/LimestoneF.png");
}
public void registerBlocks()
{
//***
//* This will register the block. (This Has to be added if you're making a block no items go here)
//***
}
public void addRecipes()
{
//***
//* Be Creative! This part will be how you craft your Item's/Block's
//***
ModLoader.addRecipe(new ItemStack(LimestoneF, 1), new Object[] {
"aa", Character.valueOf('a'), Block.dirt
});
}
public void addSmelting()
{
//***
//* This part is where we add our Smelting Recipes.
//***
}
//***
//* This is where we Register our Items/Blocks for the part below.
//***
public static Item LimestoneBow;
static
{
//***
//* This is where the fun begins with some food and blocks.
//***
LimestoneF = (new ItemLimestoneF(1002)).setItemName("LimestoneF");
}
public String getVersion()
{
//***
//* This is where we name our mod.
//***
return "Fixer Uper'er - 1.2.5";
}
public void load()
{
//***
//* This is where Some NPC Stuff will go.
//***
}
}
Ok I found out that it is the bow. I copy this code exactly (I change the limestone stuff and that to my own but it doesn't work. The bow will not even shoot regular arrows) Please help!
How about adding something like a car or plane? And with a new crafting table, how about how to have multiple output slots?
I really like the idea of the plane and the crafting table! The crafting table would be very useful to me because I thought many times about a crafting recipes that gives two different items/blocks. But a car? How would it work? I mean, how would you pass the blocks that are on your path? A car able to jump like in Mario Kart?
It is for version 1.2.5, and yes i will get started on the arrows tutorial, i already have an explosive arrow working
These arrows will be setup differently though, and i am going to re-write all the mod_ because im coding differently now. Thankyouhh
ALSO: i will upload some screen shots of my furnace thing, i am currently making a Tweak mod, it will add in furnaces, cloning machines, crafting tables, Etc. i might make a whole toolset for the stuff aswell.
Im currently making my own RSPS, so i dont have full dedication to MC i need your help to decide on what to add in
Is it possible if you can make a dimension codding tutorial?
Yeah i can, but i'm currently working on the Mob Animation tutorial, Gun tutorial, Arrow Tutorial and the Enchanted Armour + Weapons tutorial...
After i have those done i might make it, but i'm planning on NOT USING ANY API's Im trying to make the whole Tutorial with just Modloader, AudioMod (If Required), Techne (Custom Mobs), and a Brain (Not Completely Required)
I might later on Add in a Forge section, but not at the moment.
Yeah i can, but i'm currently working on the Mob Animation tutorial, Gun tutorial, Arrow Tutorial and the Enchanted Armour + Weapons tutorial...
After i have those done i might make it, but i'm planning on NOT USING ANY API's Im trying to make the whole Tutorial with just Modloader, AudioMod (If Required), Techne (Custom Mobs), and a Brain (Not Completely Required)
I might later on Add in a Forge section, but not at the moment.
Yeah i can, but i'm currently working on the Mob Animation tutorial, Gun tutorial, Arrow Tutorial and the Enchanted Armour + Weapons tutorial...
After i have those done i might make it, but i'm planning on NOT USING ANY API's Im trying to make the whole Tutorial with just Modloader, AudioMod (If Required), Techne (Custom Mobs), and a Brain (Not Completely Required)
I might later on Add in a Forge section, but not at the moment.
haha sounds good cant wait for your arrow and enchantment tutorial
I cant seem to get the arrows to texture properly at the moment, so ive been releasing some code from the mod im working on, about entitys, i also now kinda have a rough understanding about animating, so ill upload an animating tutorial aswell
Thanks! ;D
No problem!, i'm glad i could help! ;D
anyone have any ideas for tutorials?
ill start having a play around with some code, and i shall update it soon! ;D
Be sure to check out my texture pack: Easy Ores!
And When I say Guis, u know, adding stuf lik photos an input slots
Oh an new furnaces that can make stuff normal furn cant and vice versa.
Kinda lik wat u did 4 d dimention
Thad b epik
Thanks in advance
-EarthCrafterMan
Kill two stones with one bird whenever possible
Ok I found out that it is the bow. I copy this code exactly (I change the limestone stuff and that to my own but it doesn't work. The bow will not even shoot regular arrows) Please help!
How about a custom music disc? I've been trying to make on but it doesn't work (doesn't play the song).
I really like the idea of the plane and the crafting table! The crafting table would be very useful to me because I thought many times about a crafting recipes that gives two different items/blocks. But a car? How would it work? I mean, how would you pass the blocks that are on your path? A car able to jump like in Mario Kart?
It really is not that hard unless you want to do something awesome like a fire sword.
entityarrow.func_46023_b(k);
that happened with me too
These arrows will be setup differently though, and i am going to re-write all the mod_ because im coding differently now. Thankyouhh
ALSO: i will upload some screen shots of my furnace thing, i am currently making a Tweak mod, it will add in furnaces, cloning machines, crafting tables, Etc. i might make a whole toolset for the stuff aswell.
Im currently making my own RSPS, so i dont have full dedication to MC i need your help to decide on what to add in
Yeah i can, but i'm currently working on the Mob Animation tutorial, Gun tutorial, Arrow Tutorial and the Enchanted Armour + Weapons tutorial...
After i have those done i might make it, but i'm planning on NOT USING ANY API's Im trying to make the whole Tutorial with just Modloader, AudioMod (If Required), Techne (Custom Mobs), and a Brain (Not Completely Required)
I might later on Add in a Forge section, but not at the moment.
haha sounds good cant wait for your arrow and enchantment tutorial
Yeah haha, im just fixing up the last texture error, and the arrow tutorial should be up!
I cant seem to get the arrows to texture properly at the moment, so ive been releasing some code from the mod im working on, about entitys, i also now kinda have a rough understanding about animating, so ill upload an animating tutorial aswell
All I can find in google is outdated ones