Pseudo-code, put it inside your armor class:
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack){
if (// check if armor is there){
// allow flight here
} else {
// disable flight
}
}
Something like this should work:
public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player){
if (!player.worldObj.isRemote){
player.worldObj.setBlockToAir(x, y, z);
// spawn item here
}
itemstack.damageItem(1, player);
return false;
}
I'm using this, which seems to work:
public static org.apache.logging.log4j.Logger logger;
@EventHandler
public void preInit(FMLPreInitializationEvent event){
logger = event.getModLog();
logger.info("Something");
}
One of these two:
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(result, recipe));
CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(result, recipe));
Correct me if I'm wrong, but can't you do:
Items.item.setTextureName("mod:other_texture");
Where "item" is the vanilla item, "mod" is your folder for textures, and "other_texture" is for your other texture.
Hi there! I know it's possible to add tools and armors to the anvil repair system by doing this:
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
return ingotSomething == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
}
But I made it so that all my swords are put into one class like so:
public static Item copperSword = new ItemModSword...
public static Item steelSword = new ItemModSword...
Which means the getIsRepairable will only allow one item to use for repairing. My question is, is there a way to use more than one item for repairing depending on what tool I put in the anvil, without making new classes?
Tried with recommended and latest.
If I open the file I downloaded, cmd opens a split second and says: Could not find or load main class
If I extract it and run the .java, nothing happens.
Using Java 64Bit. Help please, new to the 1.6 installation.
Sorry if I'm not allowed to double post, but I think I fixed my problem.
1. I deleted minecraft.jar.
2. I force updated.
3. And everything seems fixed, no more crashing at all.