Jump to content

TechMage_DE

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by TechMage_DE

  1. Hello 18107, I had the same problem as you, while porting some of my code to a newer Forge version. I did some researching in the Forge source code to see how they handle the recipe loading. I found out they create a new FileSystem inside of the Mod's .jar file and use this to load the assets. I've wrote a little helper method for my Mod that allows me to load and process custom assets: AssetsLoaderHelper Nice Greetings TechMage
  2. Take a look at the first line in your method: return super.onItemRightClick(worldIn, playerIn, handIn); This is a return statement, which means that the method is ended here and all statements after can't be reached (Exactly what your IDE is telling you) You have to remove this statement and add your return statement at the end of the method. There you want to return a new ActionResult using ActionResult#newResult Nice Greetings TechMage
  3. Hello Cerandior, What exactly is your IDE complaining about? This is what you should have to do (At least for 1.12) -> Override Item#onItemRightClick this will give you access to the World -> Use World#isRemote to check if you are on Server Side -> Create a new Instance of ZombieEntity -> Call ZombieEntity#setPosition -> Call World#spawnEntity(Entity) Nice Greetings TechMage
  4. Hey Autodidax, I just cloned your GitHub repository in my local testing environment to check if my assumption about your error is correct ... And is it ? Your problem is just a simple Server / Client - desync: Your TileEntitySpinningWheel.update is only running on the Server -> TileEntitySpinningWheel.SwitchAnimationState gets only called on the Server as well. The solution would be to send a packet to all clients when ever the state is changed -> This packet will then change the state on the client as well. If you need any information about packet handling, take a look at the forge documentation: SimpleImpl You can also take a look at my testing packet if you want to: PacketSpinningWheelSwitchState Nice Greetings TechMage
  5. Here is your problem: You are storing the energy in the Instance of the Item ... In Minecraft Items are designed to be Singletons, which means, for each Item there only exists one Instance at all time. If you set the energy in the Instance of one of your CapacityCards, it will be set for every card, because they share the same Instance. To store data only on one card, without affecting the others you want to store it on the ItemStack's NBT. In you CapacityCard#setEnergyCapacity you have to write the energy to the stacks NBT data instead of the local variable When ever you want to read the current energy you have to read it from the stacks NBT data Nice Greetings TechMage
  6. When you create your BlockPos to set the BlockState at, you accidentally use XYY as your coordinates instead of XYZ Nice Greetings TechMage
×
×
  • Create New...

Important Information

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