Skip to content

Commit

Permalink
Fix lack of client sync when crafting via dropping item in
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Sep 15, 2020
1 parent 85cca2f commit 2ffda8b
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -499,8 +499,9 @@ public int onEntityCollide(Entity entity, int level, BlockState currentState) {
return level;
}

// run recipe
boolean success = handleRecipe(entityItem.getItem(), entityItem::setItem, stack -> {
// run recipe.
// We need to copy when setting the item, to force it to update.
boolean success = handleRecipe(entityItem.getItem(), stack -> entityItem.setItem(stack.copy()), stack -> {
ItemEntity newItem = new ItemEntity(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, stack);
newItem.getPersistentData().putBoolean(CauldronTileEntity.TAG_CAULDRON_CRAFTED, true);
newItem.setDefaultPickupDelay();
Expand Down

0 comments on commit 2ffda8b

Please sign in to comment.