1.14.3 pre 1
This commit is contained in:
1 parent
b5454a8285
commit
5faa8754fb
12 files changed
+19
-39
No files matched your search
@@ -249,7 +249,7 @@ public class CarpetEventServer
|
||||
((c, t) -> new EntityValue(player)),
|
||||
((c, t) -> ListValue.of(
|
||||
new StringValue(Registry.ITEM.getId(itemstack.getItem()).getPath()),
|
||||
new NumericValue(itemstack.getAmount()),
|
||||
new NumericValue(itemstack.getCount()),
|
||||
new StringValue(itemstack.toTag(new CompoundTag()).toString())
|
||||
)),
|
||||
((c, t) -> new StringValue(enumhand == Hand.MAIN_HAND ? "mainhand" : "offhand"))
|
||||
@@ -278,7 +278,7 @@ public class CarpetEventServer
|
||||
((c, t) -> new EntityValue(player)),
|
||||
((c, t) -> ListValue.of(
|
||||
new StringValue(Registry.ITEM.getId(itemstack.getItem()).getPath()),
|
||||
new NumericValue(itemstack.getAmount()),
|
||||
new NumericValue(itemstack.getCount()),
|
||||
new StringValue(itemstack.toTag(new CompoundTag()).toString())
|
||||
)),
|
||||
((c, t) -> new StringValue(enumhand == Hand.MAIN_HAND ? "mainhand" : "offhand")),
|
||||
|
||||
@@ -770,7 +770,7 @@ public class CarpetExpression
|
||||
BlockEntity be = world.getBlockEntity(where);
|
||||
world.clearBlockState(where, false);
|
||||
ItemStack itemstack2 = player.getMainHandStack();
|
||||
itemstack2.onBlockBroken(player.world, state, where, player);
|
||||
itemstack2.postMine(player.world, state, where, player);
|
||||
ItemStack itemstack1 = itemstack2.isEmpty() ? ItemStack.EMPTY : itemstack2.copy();
|
||||
state.getBlock().afterBreak(world, player, where,state, be, itemstack1);
|
||||
world.playLevelEvent(null, 2001, where, Block.getRawIdFromState(state));
|
||||
|
||||
@@ -178,8 +178,8 @@ public class EntityValue extends Value
|
||||
put("width", (e, a) -> new NumericValue(e.getSize(EntityPose.STANDING).width));
|
||||
put("eye_height", (e, a) -> new NumericValue(e.getEyeHeight(EntityPose.STANDING)));
|
||||
put("age", (e, a) -> new NumericValue(e.age));
|
||||
put("item", (e, a) -> (e instanceof ItemEntity)?new StringValue(((ItemEntity) e).getStack().getDisplayName().getString()):Value.NULL);
|
||||
put("count", (e, a) -> (e instanceof ItemEntity)?new NumericValue(((ItemEntity) e).getStack().getAmount()):Value.NULL);
|
||||
put("item", (e, a) -> (e instanceof ItemEntity)?new StringValue(((ItemEntity) e).getStack().getCustomName().getString()):Value.NULL);
|
||||
put("count", (e, a) -> (e instanceof ItemEntity)?new NumericValue(((ItemEntity) e).getStack().getCount()):Value.NULL);
|
||||
// ItemEntity -> despawn timer via ssGetAge
|
||||
put("is_baby", (e, a) -> (e instanceof LivingEntity)?new NumericValue(((LivingEntity) e).isBaby()):Value.NULL);
|
||||
put("target", (e, a) -> {
|
||||
@@ -279,7 +279,7 @@ public class EntityValue extends Value
|
||||
{
|
||||
return ListValue.of(
|
||||
new StringValue(Registry.ITEM.getId(itemstack.getItem()).getPath()),
|
||||
new NumericValue(itemstack.getAmount()),
|
||||
new NumericValue(itemstack.getCount()),
|
||||
new StringValue(itemstack.toTag(new CompoundTag()).toString())
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user