boi, 20w10a

This commit is contained in:
gnembon committed 2020-03-04 17:43:26 -04:00
1 parent 6b36ac642b
commit f7a2b8202b
20 files changed
+76 -68

No files matched your search

@@ -2084,8 +2084,8 @@ public class CarpetExpression
}
else
{
Vec3d point = new Vec3d(inventoryLocator.position);
item = new ItemEntity(cc.s.getWorld(), point.x+0.5, point.y+0.5, point.z+0.5, droppedStack);
Vec3d point = Vec3d.method_24953(inventoryLocator.position); //pos+0.5v
item = new ItemEntity(cc.s.getWorld(), point.x, point.y, point.z, droppedStack);
item.setToDefaultPickupDelay();
cc.s.getWorld().spawnEntity(item);
}
@@ -2540,7 +2540,7 @@ public class CarpetExpression
return LazyValue.NULL;
} else {
if (!hasTag && entity_1 instanceof MobEntity) {
((MobEntity)entity_1).initialize(serverWorld, serverWorld.getLocalDifficulty(entity_1.getBlockPos()), SpawnType.COMMAND, null, null);
((MobEntity)entity_1).initialize(serverWorld, serverWorld.getLocalDifficulty(entity_1.getSenseCenterPos()), SpawnType.COMMAND, null, null);
}
Value res = new EntityValue(entity_1);
return (_c, _t) -> res;
@@ -83,7 +83,8 @@ public class BlockValue extends Value
Value v1 = params.get(0 + offset).evalValue(c);
if (v1 instanceof BlockValue)
{
return (new VectorLocator(new Vec3d(((BlockValue) v1).getPos()).add(0.5,0.5,0.5), 1+offset)).fromBlock();
// pos + 0.5v
return (new VectorLocator(Vec3d.method_24953(((BlockValue) v1).getPos()), 1+offset)).fromBlock();
}
if (v1 instanceof ListValue)
{
@@ -436,7 +437,7 @@ public class BlockValue extends Value
SpecificDirection dir = SpecificDirection.DIRECTION_MAP.get(direction);
if (dir == null)
throw new InternalExpressionException("unknown block placement direction: "+direction);
BlockHitResult hitres = new BlockHitResult(new Vec3d(pos).add(dir.hitOffset), dir.facing, pos, false);
BlockHitResult hitres = new BlockHitResult(Vec3d.method_24954(pos).add(dir.hitOffset), dir.facing, pos, false);
return new PlacementContext(world, dir.facing, sneakPlace, itemStack, hitres);
}
private PlacementContext(World world_1, Direction direction_1, boolean sneakPlace, ItemStack itemStack_1, BlockHitResult hitres) {
@@ -177,7 +177,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
if (inv == null)
return null;
return new InventoryLocator(e, e.getBlockPos(), inv, offset + 1);
return new InventoryLocator(e, e.getSenseCenterPos(), inv, offset + 1);
}
else if (v1 instanceof BlockValue)
{
@@ -210,7 +210,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
}
PlayerEntity e = (PlayerEntity)((EntityValue) v2).getEntity();
inv = e.getEnderChestInventory();
return new InventoryLocator(e, e.getBlockPos(), inv, offset + 2, true);
return new InventoryLocator(e, e.getSenseCenterPos(), inv, offset + 2, true);
}
BlockPos pos = new BlockPos(
NumericValue.asNumber(v1).getDouble(),