Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/20/23 in all areas

  1. you need to slow down. you can't just write two screens worth of mess and ask why it doesn't work. make a short event that does minimal modification of the item. then - only then when a minimal event works fine, write a real thing. you wrote up there "event.setCanceled(true);" - are you sure you want that? are you sure you know what it does? you wrote " event.getInventory().setItem(1,output); " why would you do that? test that in a minimal event without all that mess, you'll see that it doesn't do what you expected.
    1 point
  2. it is also possible that all the values that you change change on the server, but remain the same on the client, especially if you use capability, this is relevant for you... If this case is possible, then you have two options... option 1: duplicate your server code for the client side... option 2: write a sync system that will send batches of changes each time it changes... Now I suspect that you simply do not synchronize data with the server
    1 point
  3. Hello, please upload the project to github, and give a link I'm going to do the same in my mod, and I'll try to help you Also try to use the trigger when the item is crafted in the item procedures public class TestItem extends Item { public TestItem() { super(new Item.Properties().tab(CreativeModeTab.TAB_MISC).stacksTo(64).rarity(Rarity.COMMON)); } @Override public void onCraftedBy(ItemStack itemstack, Level world, Player entity) { super.onCraftedBy(itemstack, world, entity); customcode.execute(world, entity.getX(), entity.getY(), entity.getZ()); } } I also suspect that the event when an item is crafted, from player events, is being listened to in the crafting grid of the player's inventory window, but I could be wrong Also try to display the values you need through tooltips
    1 point
×
×
  • Create New...

Important Information

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