Jump to content

Calous

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Calous

  1. I am also using a few Multiblock Structures, my most complicated ones work with Slave-Master TileEntities in the Blocks, with the Master getting notified if any Slave gets broken. The more easy ones (like 3x3x3) just check within that boundary if the Blocks still exist, when one of them is replaced by air (broken) it resets the entire leftover Structure to the starting point and then deletes the TE. I don't know if thats the best approach but it works well for me
  2. I've read through the docs but it's still kinda hazy for me, wouldn't it require a fair amount of workaround to add a capability to such an important part of vanilla code?
  3. Ok thanks everything is working perfectly now
  4. Ok I got it to work pretty decently, but I can't see my Item when it "switches" because it constantly plays the animation of taking out an item I think, is there any way to stop this? The Compass for example doesn't do this.
  5. Ok so I had to read a little bit about Capabilities but I think I got it right this time: TileEntity: But now my item has no Texture at all anymore (before that I could at least see the layer0), it tells me I have a normal location exception even though I didn't change anything in any .json since the first post. And it tells me this is caused by a MalformedJsonException so I guess I did something wrong in my .json.
  6. So better to copy it, edit it and then replace it? Wait how do I use the IItemHandler here correctly, I haven't even been using IInventory I used InventoryPlayer to reach the Players Inventory.
  7. Alright will try that, why is it better not to mess with itemstacks in inventories? Can weird stuff happen?
  8. Ah that clears up things thanks!
  9. I mean send it some input to know that it changed and has to rerender or something in that manner.
  10. It's not everything of the class but the relevant stuff, everything gets called here when the TE updates:
  11. These are my Itemclass and .json: Item class: Item.json: The NBT values are written into the item by a TileEntity but my Item doesn't seem to update it's Texture. It's not really working for me yet, I'm kinda confused...
  12. When using ModelLoader.setCustomModelResourceLocation it requires a Meta value, but if I want to create an item like the clock or compass with a huge amount of Textures for one item, how would I do it? I've been reading through the compass and clock item classes but can't seem to get a grip of it. Is minecraft doing something else than using this.addPropertyOverride(new ResourceLocation("time"), new IItemPropertyGetter() to change the texture of the item based on a variable? I am calculating the variable based on an nbttag of the item that is to change textures of that helps. Do i need to update the item constantly for it to change textures?
  13. I have an Item with varying Textures like the compass or the clock, and I want it to change it's texture if the player gets within a certain horizontal distance (lets say 50 blocks) of a certain block. Now please correct me if I am wrong but I think the best way to do this is by letting the Block (or better said the TileEntity of it), while it is loaded constantly check any players in that distance and then their inventory, for that item. If it finds that item, it sends a data packet to set a boolean in that item to true, to change texture. Now how would I begin to send this data to the itemstack, would nbttags be what I want? But if I understand nbttags correctly, I can only have a very limited amount of them, I'll be reading about nbttags more while trying to solve this, but any help would be very appreciated. Also how would i even change the nbt tag of the itemstack in the players inventoy? Thanks in advance!
  14. Hi, I have a Battery-type Block in which I store some data, when the Block is destroyed, it should save the data into the dropped Itemstack so that it can later be placed again to have the same values. I know I have to work with NBTtags but I have no clue how exactly. A hint into the right direction would be very appreciated Thanks a bunch!
  15. If these blocks should be procedurally generated throughout the world then most likely not a list. Thanks for your help I'm gonna look into it and post results here
  16. Would it be intelligent to use these as a template if I want to implement a way to track specific mod blocks (in a specific radius maybe)? Sort of like a compass tracks the spawn (except that the information about the spawn is in the player)?
  17. World.findNearestStructure is called when using the locate command and when a Villager creates a treasuremap. But it seems it always returns null anyway, so how do the locate command and EntityVillager get a BlockPos out of this function? This is the function in question for those that can't be bothered to look it up: @Nullable public BlockPos findNearestStructure(String p_190528_1_, BlockPos p_190528_2_, boolean p_190528_3_) { return null; } Just trying to wrap my head around it.
  18. I have been trying to get my TESR to render for quite some time without any success, I get an empty cube without Textures at all times. My Block: My TileEntity (pretty much empty for now): My TESR: I am already happy if anything renders at all, since then I can at least see what is happening. But it seems my render function is never called. When I try to make the console give a System.out.println it never shows up. What could be the problem here? Edit: My block and TileEntity are registered correctly, since I have done some other TileEntities and Blocks already.
×
×
  • Create New...

Important Information

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