Skip to content

Commit ea6c8a9

Browse files
committed
fix: dropped item now spawn at center of the block
1 parent 3fd8a79 commit ea6c8a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/dev/galacticraft/machinelib/api/block/MachineBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public void appendHoverText(ItemStack stack, TooltipContext context, List<Compon
247247
List<ItemEntity> entities = new ArrayList<>();
248248
for (ItemResourceSlot slot : inv.getSlots()) {
249249
if (!slot.isEmpty()) {
250-
entities.add(new ItemEntity(level, pos.getX(), pos.getY() + 1, pos.getZ(), ItemStackUtil.create(slot)));
250+
entities.add(new ItemEntity(level, pos.getX() + 0.5d, pos.getY() + 0.5d, pos.getZ() + 0.5d, ItemStackUtil.create(slot)));
251251
slot.set(null, DataComponentPatch.EMPTY, 0);
252252
}
253253
}

0 commit comments

Comments
 (0)