-
Raizunne changed their profile photo
-
[1.9] [SOLVED] Check for nearby Entities
With the world object you can use getEntitiesWithinAABB
-
[1.9] NBT dynamic textures
So I have 7 heads and and 6 bodies, this means that I will have to make 42~ item variants of each head with each body?
-
[1.9] NBT dynamic textures
I've been out of modding and skipped 1.8, my 1.7.10 mod had textures that changed depending on the NBT of the item. Can someone point me to the right direction as to how to add this in 1.9? I had something like this: http://i.imgur.com/UrvlkJ4.png Thanks!
-
Crashing when getting ItemStack from OreDictionary
Yup that did it. Thank you again!
-
Crashing when getting ItemStack from OreDictionary
Well that works, but now that I have my dependencies as dependencies = "after:ThermalExpansion;after:EnderIO" Thermal Expansion crashes with something that has nothing to do with my mod. http://pastebin.com/WiSGBW1u Is it because Im not using a deobf version of EnderIO? Removed Thermal Expansion and everything works great.
-
Crashing when getting ItemStack from OreDictionary
ingotPhasedGold is a alloy from EnderIO, here's the class for the alloy. Here's the base class for the alloys. https://github.com/CrazyPants/EnderIO/blob/master/src/main/java/crazypants/enderio/material/Alloy.java On another class it adds the ore to the dictionary by using the oredictIngotName from that class. In this case the oredictIngotName is PhasedGold, so it ends up being ingotPhasedgold.
-
Crashing when getting ItemStack from OreDictionary
Located in my RedstonicRecipes.java in my init function. Here's what's there: public staitic void init(){ if(Loader.isModLoaded("EnderIO")){ ItemStack ingotPhasedGold = OreDictionary.getOres("ingotPhasedGold").get(0); EIOHelper.addAlloySmelterRecipe("Vibrantium", 16000, ingotPhasedGold, ingotPhasedGold, ingotPhasedGold, Util.toStack(Items.potato)); } } Then I call the RedstonicRecipes.init() in my preInit.
-
Crashing when getting ItemStack from OreDictionary
Yes it crashes in that line. Also if I use the "ingotPhasedGold" in a ShapedOreRecipe it works great. Just when I try getting the ores into an ItemStack
-
Crashing when getting ItemStack from OreDictionary
Here's what I'm trying to do. ItemStack ingotPhasedGold = OreDictionary.getOres("ingotPhasedGold").get(0); //Arguments - name, energy, slot1, slot2, slot3, output EIOHelper.addAlloySmelterRecipe("Potatotato", 16000, ingotPhasedGold, ingotPhasedGold, ingotPhasedGold, Util.toStack(Items.potato));
-
Crashing when getting ItemStack from OreDictionary
So I'm trying to get the Vibrant Alloy from EnderIO to an ItemStack to use it in the recipe for a machine. I've tryed getting it from the GameRegistry, no luck just fire. Now I'm trying to get it from the OreDictionary, still no luck. Here's my code: ItemStack ingotPhasedGold = OreDictionary.getOres("ingotPhasedGold").get(0); If I try that and add the ingotPhasedGold to a recipe or to the machine recipe, I crash. It says that there's no index with "0" but when I try outputing it to the console I get a "1xitem.itemAlloy@2" with I guess it means that the index DOES exist. So I just get a crash when using the OreDictionary with a recipe or when adding it to a machine recipe. What am I doing wrong?
-
[1.7.10]Remove enchantments from an ItemStack
I'mt trying to remove an enchantment from an item, is there a way that I can do this? I've tried using: itemstack.stackTagCompound.getIntArray("ench", null) itemstack.stackTagCompound.getTag("ench", null) But all of these gave me a crash with the item disappering... is there a function to remove the enchantment?
-
[1.7.10][Solved] Sending information from GUI to TileEntity
Yup, I did miss the default constructor, I must've deleted it when cleaning code Thank you!
-
[1.7.10][Solved] Sending information from GUI to TileEntity
Hi! Im trying to send information (Clicking a button to change the value of a integer in the tileEntity) from the GUI to the TileEntity. I know I have to do some packets, and there's where the problem is. I have a IMessage and an IMessageHandler, but when I try pressing the button I get "A fatal error has occured, this connection is terminated". Here's the code for the IMessage and the IMessageHandler. public class PacketDrill implements IMessage{ private int x; private int y; private int z; private int mode; public PacketDrill(TileEntityDrillModifier te){ x = te.xCoord; y = te.yCoord; z = te.zCoord; mode = te.getMode(); } @Override public void fromBytes(ByteBuf buf) { x = buf.readInt(); y = buf.readInt(); z = buf.readInt(); mode = buf.readInt(); } @Override public void toBytes(ByteBuf buf) { buf.writeInt(x); buf.writeInt(y); buf.writeInt(z); buf.writeInt(mode); } public static class Handler implements IMessageHandler<PacketDrill, IMessage>{ @Override public IMessage onMessage(PacketDrill message, MessageContext ctx) { TileEntity tile = ctx.getServerHandler().playerEntity.worldObj.getTileEntity(message.x, message.y, message.z); if(tile instanceof TileEntityDrillModifier){ TileEntityDrillModifier modifier = (TileEntityDrillModifier)tile; modifier.setMode(message.mode); ctx.getServerHandler().playerEntity.worldObj.markBlockForUpdate(message.x, message.y, message.z); } return null; } } } After that I register it in the preInit: Miscellany.network.registerMessage(PacketDrill.Handler.class, PacketDrill.class, 0, Side.SERVER); And finally here's the code of me using it in the GUI: @Override protected void actionPerformed(GuiButton button) { super.actionPerformed(button); switch(button.id){ case 0: if(tile.getMode()==0){ tile.setMode(1); }else{ tile.setMode(0); } Miscellany.network.sendToServer(new PacketDrill(this.tile)); } } What am I doing wrong? First time trying to do packets in GUI so this may be a small error, thanks!
-
[1.7.10][SOLVED] Cant access EnergyStorage in a IEnergyHandler from GUI
Yup, that did it! Thanks again for the help!
-
[1.7.10][SOLVED] Cant access EnergyStorage in a IEnergyHandler from GUI
Here ya go - http://pastebin.com/dpaM659y
IPS spam blocked by CleanTalk.