-
Posts
151 -
Joined
-
Last visited
Everything posted by Eastonium
-
Sorry I haven't replied for a day. I've been working on getting a basic furnace working, and I just got that done, so I'll finally get to incorporate this stuff you're telling me about. I will need metadata for my recipes.. lots of it. I'm guessing I won't be able to test the recipes with multiple stuff unless i have slots in the container to put them in so yes, i'll need help with that. Thanks soo much. you've been a wonderful help.
-
thanks so much for that. it really makes sense. so do I put this all in my tile entity file? and yes. there will be lots of recipes.
-
I can walk you through it. Here are the things you will need to understand: Arrays ItemStacks IInventory and Slot Operations (set and get) Which of those is currently causing you trouble? Arrays, and IInventory and Slot Operations. I'm not good at those stuffs. ItemStacks I think I understand well enough.
-
Thank you for your help, but for the moment, I'm not at the experience level to be able to code my own furnace. I was hoping to just modify a furnace instead of writing it all myself. Basically I don't really have a clue how to use what you have suggested.
-
Hi, I'm trying to make a furnace, but with three inputs, and one output. Basically a shapeless crafting recipe for 1-3 items, but it has to be smeleted to get an output. I used to have a custom furnace of my own back in 1.8.1B, but i can't decompile it. Does anyone know how I would start on something like this? (I've tried combining crafting bench and furnace code, but it doesn't work... at all...)
-
Armor Rendering Effect Not appearing (isItemEnchanted????)
Eastonium replied to Eastonium's topic in Modder Support
Look agian, I do. -
Yes, I'm putting in a request. I'm the author of the Mo' Drinks mod the WIP Kirby mod and Co-Author of the NuiCraft Bionicle Mod. Could I have modder status?
-
Hi, I'm trying to make a piece of armor that appears enchanted when you wear it, without having an enchantment. There is a method in ItemStack called isItemEnchanted, but i'm not sure if I can use that to be able to get desired results. I already have hasEffect applied to the Item, but it doesn't effect the rendering on the player while worn. Please help! package Bionicle; import java.util.List; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockDispenser; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.dispenser.IBehaviorDispenseItem; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.IArmorTextureProvider; public class ItemMask extends ItemArmor implements IArmorTextureProvider { public static final String[] textureName = new String[] {"Gold", "Red", "Green", "Brown", "Blue", "White", "Black"}; @SideOnly(Side.CLIENT) private Icon[] field_94594_d; //Always set to 0 for Masks public final int armorType; public final int damageReduceAmount; /** * Used on RenderPlayer to select the correspondent armor to be rendered on the player: 0 is cloth, 1 is chain, 2 is * iron, 3 is diamond and 4 is gold. */ public final int renderIndex; private final EnumArmorMaterial material; @SideOnly(Side.CLIENT) private Icon field_94605_cw; @SideOnly(Side.CLIENT) private Icon field_94604_cx; public ItemMask(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4, boolean par5) { super(par1, par2EnumArmorMaterial, par3, par4); this.material = par2EnumArmorMaterial; this.armorType = par4; this.renderIndex = par3; this.hasSubtypes = par5; this.damageReduceAmount = 0; this.maxStackSize = 1; this.setMaxDamage(0); this.setCreativeTab(CreativeTabs.tabCombat); } public String getArmorTextureFile(ItemStack par1) { if(this.hasSubtypes) { return "/mods/Click_Bionicle/armor/" + this.getUnlocalizedName().substring(5) + "_" + par1.getItemDamage() + ".png"; } return "/mods/Click_Bionicle/armor/fire_1.png"; } @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack par1ItemStack) { return !(par1ItemStack.getItemDamage() > 0); } @SideOnly(Side.CLIENT) /** * Gets an icon index based on an item's damage value */ public Icon getIconFromDamage(int par1) { int j = MathHelper.clamp_int(par1, 0, 6); return this.field_94594_d[j]; } @SideOnly(Side.CLIENT) public void updateIcons(IconRegister par1IconRegister) { if(this.hasSubtypes) { this.field_94594_d = new Icon[7]; for (int i = 0; i < 7; ++i) { this.field_94594_d[i] = par1IconRegister.registerIcon(Bionicle.modid + ":" + this.getUnlocalizedName().substring(5) + textureName[i]); } } if(!this.hasSubtypes) { this.field_94594_d = new Icon[1]; for (int i = 0; i < 1; ++i) { this.field_94594_d[i] = par1IconRegister.registerIcon(Bionicle.modid + ":" + this.getUnlocalizedName().substring(5)); } } } /** * Return whether this item is repairable in an anvil. */ public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return true; } @SideOnly(Side.CLIENT) /** * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) */ public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { if(this.hasSubtypes) { for (int j = 0; j < 7; ++j) { par3List.add(new ItemStack(par1, 1, j)); } } else { par3List.add(new ItemStack(par1, 1, 0)); } } /** * 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) { int i = EntityLiving.getArmorPosition(par1ItemStack) - 1; ItemStack itemstack1 = par3EntityPlayer.getCurrentArmor(i); if (itemstack1 == null) { par3EntityPlayer.setCurrentItemOrArmor(i + 1, par1ItemStack.copy()); //Forge: Vanilla bug fix associated with fixed setCurrentItemOrArmor indexs for players. par1ItemStack.stackSize = 0; } return par1ItemStack; } /** * Asks if the helmet equipped has metadata, and then what mask it is an negates fall damage */ public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack stack) { ItemStack helmet = player.getCurrentItemOrArmor(4); if(this.hasSubtypes) { if(helmet.getItem() == Bionicle.maskMiru || !(helmet.getItemDamage() > 0)) { player.fallDistance = 0; } } } }
-
Solved it. I had to do this: public String getArmorTextureFile(ItemStack par1) { if(this.hasSubtypes) { return "/mods/Click_Bionicle/armor/hau_" + par1.getItemDamage() + ".png"; } return "/mods/Click_Bionicle/armor/fire_1.png"; } I just had to use the handy dandy ItemStack thing, and get the Item's damage from that. Wayyy over thought this one.
-
Cant get my textures to work please help if you can!
Eastonium replied to whaling123's topic in Modder Support
another thing that might help, use "getUnlocalizedName().substring()5" instead of "getUnlocalizedName2()" -
Anyone have any other suggestions? Making a new rendering file won't work, because it directly connects to the player entity.
-
Hi, So I'm working on a mod, and in it I have been able to program metadata for armor, but I can't get it to render different textures for when you're wearing the helmet. Everything works except that. The files I have organized such that the metadata lines up with the texture numbers. ("hau_0","hau_1","hau_2"... ect.) Note: there are 7 metadata items. Here's my Armor File: package Bionicle; import java.util.List; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockDispenser; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.dispenser.IBehaviorDispenseItem; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.IArmorTextureProvider; public class ItemMask extends ItemArmor implements IArmorTextureProvider { public static final String[] textureName = new String[] {"Gold", "Red", "Green", "Brown", "Blue", "White", "Black"}; @SideOnly(Side.CLIENT) private Icon[] field_94594_d; //Always set to 0 for Masks public final int armorType; public final int damageReduceAmount; /** * Used on RenderPlayer to select the correspondent armor to be rendered on the player: 0 is cloth, 1 is chain, 2 is * iron, 3 is diamond and 4 is gold. */ public final int renderIndex; private final EnumArmorMaterial material; @SideOnly(Side.CLIENT) private Icon field_94605_cw; @SideOnly(Side.CLIENT) private Icon field_94604_cx; public ItemMask(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4, boolean par5) { super(par1, par2EnumArmorMaterial, par3, par4); this.material = par2EnumArmorMaterial; //TODO make EnumArmorMaterial for Bionicle and add Protodermis with different levels of Noble,Great,and Legendary this.armorType = par4; this.renderIndex = par3; this.hasSubtypes = par5; this.damageReduceAmount = 0; this.maxStackSize = 1; this.setMaxDamage(0); this.setCreativeTab(CreativeTabs.tabCombat); } public String getArmorTextureFile(ItemStack par1) { if(this.hasSubtypes) { for (int i = 0; i < 7; ++i) { return "/mods/Click_Bionicle/armor/hau_" + i + ".png"; } } return "/mods/Click_Bionicle/armor/fire_1.png"; } @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack par1ItemStack) { return !(par1ItemStack.getItemDamage() > 0); } @SideOnly(Side.CLIENT) /** * Gets an icon index based on an item's damage value */ public Icon getIconFromDamage(int par1) { int j = MathHelper.clamp_int(par1, 0, 6); return this.field_94594_d[j]; } @SideOnly(Side.CLIENT) public void updateIcons(IconRegister par1IconRegister) { if(this.hasSubtypes) { this.field_94594_d = new Icon[7]; for (int i = 0; i < 7; ++i) { this.field_94594_d[i] = par1IconRegister.registerIcon(Bionicle.modid + ":" + this.getUnlocalizedName().substring(5) + textureName[i]); } } if(!this.hasSubtypes) { this.field_94594_d = new Icon[1]; for (int i = 0; i < 1; ++i) { this.field_94594_d[i] = par1IconRegister.registerIcon(Bionicle.modid + ":" + this.getUnlocalizedName().substring(5)); } } } /** * Return whether this item is repairable in an anvil. */ public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return true; } @SideOnly(Side.CLIENT) /** * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) */ public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { if(this.hasSubtypes) { for (int j = 0; j < 7; ++j) { par3List.add(new ItemStack(par1, 1, j)); } } else { par3List.add(new ItemStack(par1, 1, 0)); } } /** * 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) { int i = EntityLiving.getArmorPosition(par1ItemStack) - 1; ItemStack itemstack1 = par3EntityPlayer.getCurrentArmor(i); if (itemstack1 == null) { par3EntityPlayer.setCurrentItemOrArmor(i + 1, par1ItemStack.copy()); //Forge: Vanilla bug fix associated with fixed setCurrentItemOrArmor indexs for players. par1ItemStack.stackSize = 0; } return par1ItemStack; } /** * Asks if the helmet equipped has metadata, and then what mask it is an negates fall damage */ public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack stack) { ItemStack helmet = player.getCurrentItemOrArmor(4); if(this.hasSubtypes) { if(helmet.getItem() == Bionicle.maskMiru || !(helmet.getItemDamage() > 0)) { player.fallDistance = 0; } } } } Hope you can help!!!
-
I know there is a way to do this. Look into this mod, when wearing certain armor you get special effects. http://www.minecraftforum.net/topic/515037-125-titans-revived-v121-no-more-crashing/ you could combine this is the potion effects of the beacon to possibly create the desired effect.
-
[1.3.2] - [1.4.2] Removing experience points from a player.
Eastonium replied to shadoskill's topic in Modder Support
You could try to create a negative type of XP instead of just changing to negative numbers. It would probably take a lot more work however. -
I don't know. You could suggest it though!
-
[Solved] Custom Renderingmodel for LivingEntity
Eastonium replied to Drofzz's topic in Modder Support
Could I see your code? I'm trying to make a new mob with a different model and can't seem to get it to work. -
A good idea is to use MagicLauncher. Put all the mods you want to add in the "mods" folder under your ".minecraft" directory. If you don't want one of those mods added, in the magic launcher setup in the lower area, just uncheck the box next to the mod you don't want added. One other thing. You need to have forge "Added" such that it is the top area of the setup. Just click the add button and select the forge zip file to do this.
-
java.land.NoClassDefFoundError (Block file) HELP!
Eastonium replied to Eastonium's topic in Modder Support
Could you please explain better? I tried to do what you said and i just resulted in me having to re-create MCP. -
Ello, I have been updating a mod of mine recently, and it's almost done, however when I recompile the mod, reobufscate it and try to run in in minecraft, it fails with the following error: 2012-10-28 22:19:17 [iNFO] [sTDERR] Exception in thread "Minecraft main thread" java.lang.NoClassDefFoundError: moDrinks/common/BlockPlant 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.Class.forName0(Native Method) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.Class.forName(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:341) 2012-10-28 22:19:17 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2012-10-28 22:19:17 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124) 2012-10-28 22:19:17 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2012-10-28 22:19:17 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) 2012-10-28 22:19:17 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.loadMods(Loader.java:458) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:144) 2012-10-28 22:19:17 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.a(Minecraft.java:405) 2012-10-28 22:19:17 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:737) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.Thread.run(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] Caused by: java.lang.ClassNotFoundException: moDrinks.common.BlockPlant 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.ClassLoader.loadClass(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.ClassLoader.loadClass(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] ... 28 more 2012-10-28 22:19:17 [iNFO] [sTDERR] Caused by: java.lang.NoClassDefFoundError: net/minecraftforge/common/IPlantable 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.ClassLoader.defineClass1(Native Method) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.ClassLoader.defineClass(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.ClassLoader.defineClass(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:119) 2012-10-28 22:19:17 [iNFO] [sTDERR] ... 30 more 2012-10-28 22:19:17 [iNFO] [sTDERR] Caused by: java.lang.ClassNotFoundException: net.minecraftforge.common.IPlantable 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.ClassLoader.loadClass(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at java.lang.ClassLoader.loadClass(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] ... 34 more 2012-10-28 22:19:17 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException 2012-10-28 22:19:17 [iNFO] [sTDERR] at org.objectweb.asm.ClassReader.<init>(Unknown Source) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:27) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:167) 2012-10-28 22:19:17 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:118) 2012-10-28 22:19:17 [iNFO] [sTDERR] ... 36 more Here is my Code for the BlockPlant file: package moDrinks.common; import java.util.Random; import net.minecraft.src.Block; import net.minecraft.src.BlockFlower; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Material; import net.minecraft.src.World; import net.minecraftforge.common.IPlantable; public class BlockPlant extends BlockFlower implements IPlantable { //Main protected BlockPlant(int par1, int par2, Material par3Material) { super(par1 + 256, par2, par3Material); this.blockIndexInTexture = par2; this.setTickRandomly(true); float var4 = 0.4F; this.setBlockBounds(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 2.5F, 0.5F + var4); this.setCreativeTab(CreativeTabs.tabDecorations); } protected BlockPlant(int par1, int par2) { this(par1, par2, Material.plants); } //Can be on protected boolean canThisPlantGrowOnThisBlockID(int par1) { return par1 == Block.grass.blockID || par1 == Block.dirt.blockID; } public String getTextureFile() { return "/Eastonium/MoDrinksBlocks.png"; } } Please let me know if you can help!
-
How do I make thing not generate in Flat Worlds?
Eastonium replied to Eastonium's topic in Suggestions
Then how do I use that to make it not generate in flat worlds? I'd already been trying that for DAYS now and couldn't get it. And since this topic has changed from suggestions to help, shouldn't it be moved? -
I'm not sure if this has been brought up before, but here it goes: I have been modding with Forge for a while, and I've come across the problem (specifically with generating plants) of not wanting things to generate in FLAT worlds, but have them generate in DEFAULT or LARGE BIOMES worlds. I've tried using the variables in the "Word, WorldProvider, WorldType, and WorldInfo" classes but can't seem to get it to work or if it even ever will work. A hook in one of those files would be great. (kinda like the World.provider.dimensionID hook) Thanks in advace! Eastonium