Fix BeltInventory.eject different behavior in orientations

This commit is contained in:
Snownee 2020-11-11 11:54:04 +08:00
parent 466739bcf5
commit 6cc6973bc8

View file

@ -392,7 +392,7 @@ public class BeltInventory {
float movementSpeed = Math.max(Math.abs(belt.getBeltMovementSpeed()), 1 / 8f); float movementSpeed = Math.max(Math.abs(belt.getBeltMovementSpeed()), 1 / 8f);
Vec3d outMotion = new Vec3d(belt.getBeltChainDirection()).scale(movementSpeed) Vec3d outMotion = new Vec3d(belt.getBeltChainDirection()).scale(movementSpeed)
.add(0, 1 / 8f, 0); .add(0, 1 / 8f, 0);
outPos.add(outMotion.normalize()); outPos = outPos.add(outMotion.normalize().scale(0.001));
ItemEntity entity = new ItemEntity(belt.getWorld(), outPos.x, outPos.y + 6 / 16f, outPos.z, ejected); ItemEntity entity = new ItemEntity(belt.getWorld(), outPos.x, outPos.y + 6 / 16f, outPos.z, ejected);
entity.setMotion(outMotion); entity.setMotion(outMotion);
entity.setDefaultPickupDelay(); entity.setDefaultPickupDelay();