Jump to content

J3ramy

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by J3ramy

  1. Hey guys, I'm working on a new project where I have to create custom minecarts. The cart shouldn't move when pushed by an entity. So, I did this: The custom cart will be initialized and I can place it on a rail. But the override doesn't work. Further, I want to set the max speed of the cart, which is hard coded in the AbstractMinecartEntity. Can I change it? This is the rest of my code: TestCart Register Cart
  2. Thanks MFModws! I didn't remember the brewing stand. It works. For people who are interested: I just changed my item model to this { "parent": "minecraft:item/generated", "textures": { "layer0": "modid:item/imagename" } }
  3. Hey guys, I wanna change the item texture of my custom block model. I haven't found anything regarding to that. Right now it looks like that: Image My JSON-Files look like that: Blockstate { "variants": { "": {"model": "edom:block/firealarm"} } } Block model Item Model { "parent": "edom:block/firealarm" } Texture firealarm.png Thanks for your help!
  4. Okay, it seems to work right know. I don't understand it completely but still thank you very much!
  5. Okay thanks, I think I figured out. Now, the water level indicator in the screen class only gets updated when I open the container obviously because I set the water level in the constructor of the container class. I want to achieve that the value gets updated when I put a water bucket in the slot, so actually in the tile entity item handler. Is that possible or do I always have to reopen the container? Container constructor Screen class
  6. I have to call it where? Sorry, but the syncing is new to me and I don't really understand it. Because if I have to call it, I have to save the value somewhere right? Or is this done automatically in the tile entity or container class?
  7. Oh sorry I didn't know that. I just added the method but I don't know if it's right. May you have a look:
  8. Either I'm just blind or there is no addDataSlot in AbstractFurnaceContainer ^^
  9. Hey guys, I ran in another problem now. I am trying to sync the water level between server and client. Client because I want to use it in the Screen class. But the water level is always 0 in the Screen class. I've read that I need to override getUpdateTag() and handleUpdateTag(). But I don't now what to override. I googled a lot but I'm not figuring out how that should work. Tile entity Screen
  10. Oh nice. Thanks for that hint. I only knew that static means that you don't need an instance of a class but it also means that the value of the static variable is the same in every instance. It seems to work for now
  11. Thanks for the answer! I changed it to the following but it hasn't solved the problem:
  12. Hey guys, I have a problem with my custom block model tile entity. I wanna create a fire hose block that stores the waterlevel in NBT. Players have to refill it with a water bucket within the screen container. My problem is that the water level gets saved in the NBT data but if I create another instance of the block, it has the same value as the previous block. My assumption is that the blocks always use the same instance of the first generated tile entity. I tried to get the tile entity via the world and the position but it doesn't work either. I attached my code. I hope one of you guys can help me! Screen Image Image Block class Tile entity Container Screen
×
×
  • Create New...

Important Information

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