Jump to content

iLegendx98

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by iLegendx98

  1. Ahaha..... Right. Well that was in fact the issue. It works fine now! I feel like such an idiot! Thanks everyone for the help
  2. I have added these three methods to my tile entity class : @Override public Packet getDescriptionPacket() { NBTTagCompound tag = new NBTTagCompound(); writeToNBT(tag); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, tag); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); } public void markForUpdate() { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } This still doesn't work and I now crash when ever I place my blast furnace down. This is the crash report: I am so confused!!!
  3. Even after I run the machine, it doesn't save the inventory contents upon reloging. I also tested moving out of the loaded area (tp 1000 blocks away) and then going back, but this also didnt save. You could be right about #markDirty(). How would I fix this? Im not sure.
  4. As the title explains, I have a machine (Blast Furnace) that takes three inputs and two outputs. I can put items in these input slots but when I reload the game the items are gone. I assume this is an issue with NBT data on the block, although I cant see what the issue is. TileBlastFurnace.class Thanks for any help
  5. Ok, I fixed it. A lot of stuff was missing form the build folder and was named incorrectly. I fixed it by changing the names and directories.
  6. No, I dont think thats the case. Everything referring to the package is spelled with a lower case. In the crash report it points towards line 394 in my main class, RunicScrolls.java. This is the item registry for the shard. itemEnergizedShardSpeed = new ItemEnergizedShardSpeed().setUnlocalizedName("itemEnergizedShardSpeed").setCreativeTab(scrollTab).setTextureName(modid + ":" + "itemEnergizedShardSpeed"); GameRegistry.registerItem(itemEnergizedShardSpeed, "itemEnergizedShardSpeed"); This is the full main class: http://pastebin.com/xmMnyzd1 This is also everything inside the class for ItemEnergizedShardSpeed; package items; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class ItemEnergizedShardSpeed extends Item { public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { par3List.add("Made in an Endite Reactor"); } } This is a download for this crashing version of my mod : http://www.fileswap.com/dl/X3nVhTLQA5/modid-1.0.jar.html I cant see anything wrong with it.
  7. I have been developing my mod over the past few weeks for forge build 1180 for 1.7.10. In eclipse everything works perfectly but when I build the mod and load it with forge (build 1180) it crashes! This is the crash report: At line 20 and 50 it says that it is caused by java.lang.NoClassDefFoundError: items/ItemEnergizedShardSpeed and java.lang.ClassNotFoundException: items.ItemEnergizedShardSpeed. Im not sure what this means but the classe ItemEnergizedShardSpeed is in the items package. Im not sure what the issue is. Thanks in advance
  8. The client proxy is definately being called at some point otherwise the block wouldn't have a model. I just removed the line ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEnditeReactor.class, render); from the registerRenderThings() method and the block didn't render. I then added some print lines to the registerRenderThings() method in the client proxy and the preInit method in my main. As shown by the console, the proxy is being called first. [13:34:05] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [13:34:05] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [13:34:05] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 ClientProxy preInit [13:34:05] [Client thread/INFO] [FML]: Applying holder lookups [13:34:05] [Client thread/INFO] [FML]: Holder lookups applied I moved the initialization to the init method in my main. IT WORKED!!! Thank you so much! I can finally release version 2.2 of my mod. Thanks! :) :) :)
  9. Thanks for the response. I looked and the shouldUseRenderHelper method isnt being called at all. In my main class, RunicScrolls.java, I have blockEnditeReactor registered like so: blockEnditeReactor = new BlockEnditeReactor(false).setBlockName("blockEnditeReactor").setCreativeTab(scrollTab).setHardness(5.0F).setResistance(6000000.0F); This is how I have registered my other blocks, excluding the false. This is only because the block has an active state and an unactive state. This is a Boolean in the constructor, so false is necessary. How would I register the IItemRenderer? I dont think im not sure if I have done this and that could be the issue.
  10. I have made a block using techne that I would like to have modeled in my inventory/hand as well as the world. For some reason, I cant get it to work. It just displays as an Item with a missing texture. Here is all the code that is related to the block. Note: The block is a machine as well so there is a lot of code unrelated to the render. The block is named enditeReactor. BlockEnditeReactor RenderEnditeReactor RenderItemEnditeReactor TileEntityEnditeReactor ClientProxy ModelBlockEnditeReactor If any other classes are necessary, I can paste them here. Thanks
  11. Thank you so much! This is my updated block class and it works perfectly! Thanks!
  12. The title kind of describes the issue. I have a machine that has a custom block model. For some reason, when I place it, it will not face the player. Im pretty sure ive just missed something but I cant seem to figure it out. Any help would be greatly appreciated. BlockEnditeReactor ModelBlockEnditeReactor RenderEnditeReactor TileEntityEnditeReactor I think thats everything needed. If you need any other classes, i can post them
  13. Is there a way to do this without using an event? I haven't learnt how to use them yet. If there isn't a method or anything, then I could learn it
  14. I am making a mod in which I have some tools. Without over-complicating things, I don't want them enchantable because I have a different upgrading mechanic and enchanting would ruin this. I have made it so that these tools cant be enchanted in an enchanting table by setting the enchantablility in the tool material to 0. Players can still use books in an anvil though. How can I remove this anvil enchanting on my tools only? I have tried this but it doesn't work : @Override public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { return false; }
  15. Thanks! Urg, feel like an idiot now It works now so yay! Thanks again!
  16. Hi, I am trying to make a tool that is upgradable. This is done by sneak + right clicking with it to open a GUI and putting an item in there. I have done all of this. In the inventory class, I have it detect what item is in this one slot container and write some nbt data to the tool based on which one of the 7 "orbs" can be placed in. This is done in this method in the Inventory class: The above works fine and in the tool class I have an "addInformation" method that detects what NBT data is stored on the tool and writed a tool tip saying: (Example) Upgrade: Heat Orb. This also works fine. but when do the same for an onUpdate method, it crashes. This is the whole tool class here: It crashes when I go into my creative tab and put the tool in my hand. This is the crash report: So my question is... Whats the issue and how could I resolve it so I can still use the tool as intended? If you need anymore code, i can paste it here for you. -Thanks
  17. Ok, I was missing a lot of methods in my classes. I re-wrote a lot of the code and I have got it working. Thanks for the help everyone
  18. Would you be able to show me the code for your GUI and container class please? I think that there is an issue in the GUI class and I am lost with the container class. This would also be great if anyone else that has made something like this could show me their code too. I am completely lost.
  19. I applied the changes you said and it did something. It recognizes that I right click on the tool but then crashes! I have no red underlines in the code to signify an error, but I assume the code I made is wrong. I have pasted in my gui and container classes in the main thread. The gui class is probably wrong as I just copied my gui class for my machines (block) but editing a few methods and names. Here is the crash report : I am usually good at reading crash reports but I am lost on this one. My main class is way to large to paste in but I already had my Gui handler registered like you said. public void init(FMLInitializationEvent e) { NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); //300 lines of recipes }
  20. Ok, so I have a pickaxe that I want to open an Inventory for when it is right clicked. Now I am fairly new to making GUI/containers and need help as any tutorials are outdated. I have successfully made a machine that functions as a furnace does except with custom recipes. I imagine a tool inventory would be similar, except I don't think a tool is considered a tile entity. This makes it things complicated when it comes to the GUI Handler. GuiHandler.java (Note: The Endite Reactor is my machine that is already working) ToolAdaptedPick.java (This is the tool) EDIT: GuiAdaptedPick.java (This is the Gui Class) ContainerAdaptedPick.java (This is still a WIP) So to clarify, I am not getting errors with code or anything, I'm just lost on how to start with the tool as it isn't a tile entity. Some guidance would be much appreciated as well as maybe some example code. I already know the basics of java so don't bother just telling me "You need to learn java!!!" That is not helpful. NOTE: This is for minecraft version 1.7.10. If you want anymore of my code, just tell me and I will put it in.
  21. Ive done what you said and it still isnt working. I could maybe be missing something in my main. Is there any thing that has to go in there in relation to the render. I have the block registry in there and stuff to do with the proxies. I havent had to register anything like render classes, maybe thats it? I have updated my post with my current code after modifying it.
  22. Would you be able to be more specific, maybe some example code. I am really new to this and a lot of what I have tried dosn't work.
  23. So I cant seem to get my 3D block model to display whilst holding a block. Ive followed a lot of 1.7.2 guides (couldnt find any 1.7.10 ones) and it dosnt seem to work. I have a 2d image to display in the hand but not the render for the block. Im not too good at explaining. So to cut to the chase, I want my block called an Endite reactor to display in my hand as the 3d model it has when placed in the game. Here is my code: Client Proxy: Block Class : Model Class: Item Render: Render Class: Tile Entity: There are no errors in eclipse and the block works fine. I just cant get it to display in my hand. I have probably just made some stupid mistake but im not seeing it. This is also my first time doing 3d modelling so im new to it. Here is an image to to show what is happening. Thanks for helping -iLegendx98
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.