Posted August 4, 20196 yr I was trying to retrieve what item does the TileEntity current has (in a ItemStackHandler) in a TileEntityRenderer. It simply returns no items each time I want to access it. My TileEntity code: https://github.com/LeoCTH/TryingOut/blob/master/src/main/java/com/leocth/tryingout/blocks/energy/ChargingStationTE.java My TESR: https://github.com/LeoCTH/TryingOut/blob/master/src/main/java/com/leocth/tryingout/client/render/tile/RenderChargingStation.java My Main Class: https://github.com/LeoCTH/TryingOut/blob/master/src/main/java/com/leocth/tryingout/TryingOut.java P.S. It's been a long time since my last post. I might have upset somebody on this forum while having a dispute, so my apologies ;P Edited August 4, 20196 yr by LeoCTH oops
August 4, 20196 yr 44 minutes ago, LeoCTH said: I was trying to retrieve what item does the TileEntity current has (in a ItemStackHandler) in a TileEntityRenderer. It simply returns no items each time I want to access it. You must sync the items in the ItemStackHandler to the client with a custom packet. And do this only whenever the contents change. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 4, 20196 yr Author Okay, how? I did look for methods related to packet related stuff and overrode it, but it still didn't work somehow :p
August 4, 20196 yr 3 minutes ago, LeoCTH said: Okay, how? I did look for methods related to packet related stuff and overrode it, but it still didn't work somehow ? 6 minutes ago, Animefan8888 said: with a custom packet Documentation here. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 4, 20196 yr Author Oh thanks, I forgot to check there ;P (oh btw at the start I didn't think that a 1.13.x documentation would help, and plus it sooooo different for what actually happens in 1.14.x lol)
August 4, 20196 yr Author Problem solved!!! Thank you! Just realized I don't need a custom packet tho, I can just use SUpdateTileEntityPacket and pass the NBT data on the packet when the player changes the item lol (don't criticize how I did it, just did a quick check, Botania used almost the same way xd)
August 4, 20196 yr 9 hours ago, LeoCTH said: (don't criticize how I did it, just did a quick check, Botania used almost the same way xd) But critiques are helpful. It might be more network efficient if you make your own custom packet that only sends when the specific Item slot changes. But it's not my mod. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.