Jump to content

sudwood

Members
  • Posts

    31
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

sudwood's Achievements

Tree Puncher

Tree Puncher (2/8)

6

Reputation

  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:
×
×
  • Create New...

Important Information

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