-
How to tell when a piece of armor is unequipped?
Ah, I forgot that. Whoops.
-
How to tell when a piece of armor is unequipped?
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 } }
-
[1.7.2]How can I make my tool drop different item after breaking a block?
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; }
-
[1.7.2] how do I now use the logger
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"); }
-
Using the ore dictionary in Recipes?
One of these two: CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(result, recipe)); CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(result, recipe));
-
[1.6.4]How to get world.isRemote = false ?
Learn Java. It's: if (!world.isRemote()){ }
-
[1.7.2] [Re-Solved] How can i change the texture of a vanilla item?
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.
-
IllegalAccessError
http://pastebin.com/WHufRkfV Can anyone help? Game crashes whenever I try to make a new world.
-
Repairing tools in an anvil?
Yup, that's what I meant! What should I put in the switch()?
-
Repairing tools in an anvil?
That works, but then the copper sword can be repaired with a steel ingot and a copper ingot. Same thing with a steel sword.
-
Repairing tools in an anvil?
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?
-
Installer problem
Nevermind! All fixed! Sorry about that.
-
Installer problem
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.
-
gulliver mod dont work and its a modloader mod
Also, Littleblocks mod isn't compatible with Gullliver mod. They said so on the mod's page.
-
Crash on latest Forge version
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.
IPS spam blocked by CleanTalk.