Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by sudwood

  1. Thank you for all the help. The current github repository is http://cencial.sudwood.com
  2. Well its not saving still, but I no longer get any save errors in the console so maybe that did something? if(!compound.getCompoundTag("inventory").equals(null)) inventory.deserializeNBT((NBTTagCompound) compound.getCompoundTag("inventory"));
  3. Thank you for the detailed response. I fixed some of what you mentioned, however I do not understand any of: IHasModel is stupid. All items need models, no exception, and nothing about model registration requires access to private/protected data of the block/item. Register your models in the ModelRegistryEvent directly. And yes, this is just another variant of IHasModel, you just have a class instead of an interface. or Don't ever use static initializers. Instantinate your things in the appropriate RegistryEvent directly. and none of that has fixed the not saving problem. I have set the compound.getTag to compound.getCompoundTag in the readNBT function of the tileEntity https://github.com/Sudwood/Cencial/blob/master/java/com/sudwood/cencial/tileentities/TileEntityBasicPlinth.java#L43 and that did not fix the problem. I appreciate the help.
  4. Hello I have been working on a mod for 1.12 and have manged to get the block all set except for the part where it saves. The ItemStackHandler calls an error when reading from NBT and my custom capabilities are not saving at all. The custom capabilities are working because when the coal is consumed the essence list is updated and displayed on the client. Error: Here are the code links: https://github.com/Sudwood/Cencial/blob/master/java/com/sudwood/cencial/tileentities/TileEntityBasicPlinth.java https://github.com/Sudwood/Cencial/blob/master/java/com/sudwood/cencial/proxy/CommonProxy.java https://github.com/Sudwood/Cencial/blob/master/java/com/sudwood/cencial/capability/CapabilityHandler.java https://github.com/Sudwood/Cencial/blob/master/java/com/sudwood/cencial/essence/EssenceHolderProvider.java https://github.com/Sudwood/Cencial/blob/master/java/com/sudwood/cencial/essence/EssenceHolderStorage.java https://github.com/Sudwood/Cencial/blob/master/java/com/sudwood/cencial/essence/EssenceHolder.java Thanks for any help!
  5. The problem you are having is that it is rendering the entire new biped model when your armor is equipped to fix it you need to tell the model to not render those pieces. Here is my implementation https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/items/ItemArmorRebreather.java#L109
  6. You were indeed correct! That shows me to check all the code after completely changing the logic of a block. Thank you very much!
  7. Here is my (probably poor) implementation of a jetpack like item. First in the preInit of your main mod file you need to register all packets so that the forge network code will recognize them. https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/AdvancedUtilities.java#L158 In order to check if a key is pressed I use a ForgeModLoader Event handler which is registered in the main mod file https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/AdvancedUtilities.java#L168 https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/AUFMLEventHandler.java The event handler checks if a key is pressed and if it is sends a packet to the server with information from the extended player as I save whether the jetpack should be on in the player data itself https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/ExtendedPlayer.java https://github.com/coolAlias/Forge_Tutorials/blob/master/IExtendedEntityPropertiesTutorial.java The packet is then sent to the sever where it saves the extended player data about the jetpack https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/packets/PacketJetpack.java Then in a player tick event in the ForgeModLoader Event Handler I check if the jetpack is equiped and the player property props.isJetpack is true Then if the jetpack has power and all that and is okay for use I make sure to set allow flight on the server to be on as it will kick players that use it if it is false Finally I apply the added velocity to the player and consume energy from the jetpack https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/AUFMLEventHandler.java#L107 Finally in a client tick event in the ForgeModLoader Event Handler I check if the jump key is not pressed and if so send another packetJetpack to the server to tell it to stop boosting the player https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/AUFMLEventHandler.java#L74 Hope this helps feel free to look through any of my mod's code if you need help on anything else. If more explanation is needed (I am bad at explaining) then feel free to ask for more help.
  8. Yeah I changed that line to return 64 and it still crashes at getstackinslot for some reason despite inventory being defined at the time. http://pastebin.com/MVVhikPQ
  9. If you do need some help understanding it feel free to ask. I will reply as soon as I am able to
  10. Hey there in my mod I have a basic one chunk chunk loader and a complex quarry chunk loader that loads the block the quarry is in and the block it is currently digging in order to prevent massive updates when returning to the area. Here are the parts, if you need more help feel free to ask. Chunk loading callback registered in postinit in main mod class : @EventHandler public void postInit(FMLPostInitializationEvent event) { ForgeChunkManager.setForcedChunkLoadingCallback(instance, new AdvancedUtilitiesChunkLoadCallback()); https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/AdvancedUtilitiesChunkLoadCallback.java Tileentity Chunk loader : https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/tileentity/TileEntityChunkLoader.java Tile Entity quarry: https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/tileentity/TileEntitySteamQuarry.java
  11. Hello, I am currently working on a crate ie. barrel type thing and am getting a crash when trying to take an item out of the gui. Other logic in the is item valid or can insert may be broken but these are unfinished and should not be causing problems with manually taking an item out of the inventory. Crash: http://pastebin.com/Js2stBqQ Tile entity: https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/tileentity/TileEntityWoodenCrate.java Container : https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/container/ContainerWoodenCrate.java Gui: https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/client/gui/GuiWoodenCrate.java Any help would be appreciated. If more information is needed feel free to ask for it.
  12. This line right here is your problem : if(Keyboard.isKeyDown(57)){ player.motionY += 0.1; player.fallDistance = 0.0F; Also this line in the ninja suit: Minecraft mc=Minecraft.getMinecraft(); if(mc.gameSettings.keyBindJump.isPressed()){ player.motionY += 0.5; Any and all things to do with the keyboard have to be checked client side, the result of which then has to be sent to the sever using a packet handling system. If client side code is called on the server ie checking if a keyboard key is being pressed it will constantly crash you. Not only that but Minecraft.getMinecraft() only returns the client minecraft instance and not the server one and should never be used in anything that is not rendering gui's or things of the like. I recommend checking out these tutorials and implementing them in your mod. http://www.minecraftforge.net/forum/index.php/topic,20135.0.html http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-x-1-8-customizing-packet-handling-with Hope this helps
  13. I feel really stupid now! Thank you for the help. I forgot that it bound the font texture for rendering text.
  14. This is probably not the most efficient way to do it, but I have managed to get my models to rotate depending on the placed direction. Block code : https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/blocks/BlockSteamMachine.java#L151-190 Render code: https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/client/renders/RenderSteamSmeltry.java Hope that helps!
  15. Hello there, I am currently working on a hud to show the remaining power in items/armor in bar form. It is supposed to render the second bar over the first one scaled to the amount of power left : It Renders : Code:
  16. Advanced Utilities Alpha 0.506 Welcome to advanced utilities the mod design to bring advancements to your minecraft world! This mod adds nine new ores and many new items and blocks. The complete searchable list of features can be found on my website: bit.ly/advancedutils Now updated for 1.7.10! The Bronze Age is almost complete and is currently in the bug fixing stage! New features are put on hold while I attempt to clean up all the bugs I can find, but I can not find them all so I need your help! Please report any and all bugs to my github issue tracker: bit.ly/advutilsbugs Once the Bronze Age is bug free I will be moving into the electrical age with all new kinds of powerful items and machines. Hope you all enjoy! Please leave comments, and suggestions below. Download : http://bit.ly/advutilsdownloadA511
  17. Add this to your gui class, it is how you display tooltips in a gui. @Override public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); int var5 = (this.width - this.xSize) / 2; int var6 = (this.height - this.ySize) / 2; if(par1 >= LEFT_X_VALUE+var5 && par2 >= TOP_Y_VALUE+var6 && par1 <= RIGHT_X_VALUE+var5 && par2 <= BOTTOM_Y_VALUE+var6) // these values form a box where it will render { String[] text = {"YOUR_TEXT_HERE"}; List temp = Arrays.asList(text); drawHoveringText(temp, par1, par2, fontRendererObj); // makes all that nice default tool tip box from vanilla minecraft } }
  18. Hey, Your problem is that you are initializing your inventory slots to your fuel list which is what is giving you your error. Change: private ItemStack[] slots=getFuels(); to private ItemStack[] slots= new ItemStack[iNVENTORY_SIZE]; Not only that but your ItemStack[] for your fuels list is initialized to two item stacks and not the entire fuel list. Change: private ItemStack[] fuel=new ItemStack[]{new ItemStack(Items.ender_pearl), new ItemStack(Items.ender_eye)}; to private ItemStack[] fuel=getFuels(); Along with that in your Container you have the top slot in your gui mapped to slot 0 and the bottom one mapped to slot 1, not sure if this is a bug but that is how it is.
  19. Hello, recently I've been looking into how to make a tank to contain liquids, my search through the forge code led me to the IFluidHandler interface. Are there any good tutorials for how to go about implementing it? Thanks for any help!
  20. I'm currently kind of busy and unfortunately can't stay around to help, but here is a link to the tile entity of my generator for my custom energy network. https://github.com/Sudwood/Mystic-Additions/blob/master/com/sudwood/mysticadditions/tileentity/TileEntityMysticRedGenerator.java hope this helps a little, I tried to explain what does what in the comments.
  21. Ahh thanks! I just swapped them out and nothing changed with the bug so I don't think that is it. Also figured out that the player cannot move when in survival and with the world not rendering. When on the ground with f3 up the players position doesn't change. However if the player jumps then movement along the x/z is possible.
  22. All tile entities require more resources then just plain blocks, however a tile entity that does not tick ie: just storing the state in the tile entity and having the block determine what to display based on that is much better then one that ticks ie: a furnace.
  23. No, none of the entities spawn in the overworld at all and the render ids are initialized to RenderingRegistry.getNextAvailableRenderId();
  24. To answer your first question, yes my textures do indeed work if I am in creative mode. As to your second Here is the link to my github: https://github.com/Sudwood/Mystic-Additions all rendering code is in the client folder. For those who don't want to go to another link: Overlay code: Common Proxy: As this bug happens even when no items from my mod are in the game either in world or in my inventory, and when I haven't even opened the inventory yet I'm not going to post the tile entity special renders. If any other information is needed please feel free to ask for it. Thanks for all the help!
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.