Jump to content

RiNickolous

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by RiNickolous

  1. UPDATE: I fixed my issue. All that was required was making sure that world.isRemote was false before updating the "lid" angle.
  2. Alright, I replaced the lidAngle, which directly controls the angle of the entity's "lid" with a DataParameter. I also added a DataParameter for the "open" status of the entity, which checks if a player is actively using the entity's inventory. The result: The animation now works in single player. The animation also partially works in multiplayer. It works for the player who is interacting with the entity. The entity's "lid" opens, and remains open. However, for other players, the animation will play, stutter slightly, then the "lid" will close again. When the player interacting with the entity exits the inventory, the "lid" closing animation plays for other players, as if the lid was open. A demonstration of this happening: https://gfycat.com/MemorableFrenchAntarcticgiantpetrel Updated relevant function EntityChester.onLivingUpdate:
  3. I have an entity which should, when its inventory is opened, perform an animation. The entity has a variable numPlayersUsing, and should perform an animation just like the Vanilla Minecraft chest using this variable. Change in this variable seems to not be passed to the model, and so the rotation of the model's "lid" is not updated. Here are the relevant functions: In the entity's class:
  4. Wow, it all works! Thank you so much for being so patient with me. I really appreciate the help. All NBT data is now stored correctly, and functions relevant to them now respond correctly.
  5. I don't know what is going on. EnumChesterType: In EntityChester: crash-log:
  6. I'm sorry, I still don't think I quite understand. I'm not at all familiar with Enums. Where does this go? How do I make use of this? Looking at the EntitySheep code has left me quite confused.
  7. Okay, as it turns out, I have no idea what I'm doing. My most recent crashlog:
  8. I'm not very experienced with Java, but I think I did this correctly. EnumChesterType.class I think I did this as well? This is all very foreign to me. In EntityChester: This is what confuses me. Could you elaborate on this part, please? For reference: My CapabilityProvider class: My Capability class: and the Inventory itself:
  9. I have an entity with a custom NBT value "type". This is a String, and can be equal to "normal" or "shadow". Several aspects of this entity rely on the NBT value "type", and I want them to be updated when the value is changed. I want to change the model of the entity (or rather, just the texture which is rendered on the entity's model). The entity also has an inventory capability, allowing it to store items. The size of this inventory, along with the corresponding elements of the inventory GUI, should change with the NBT value. My problem is that I don't know how to do this. When I set the "type" variable to static within the entity's class, all of this works as I want. However, all entities are affected, as expected with a static variable. When I remove the static modifier from "type", none of the aforementioned things happen. My full source code is available here(GitHub link). The following are the relevant parts of the files to do with this issue: My entity's class: The entity's render class: The capability provider class:
×
×
  • Create New...

Important Information

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