update threads to 1.15.1

This commit is contained in:
gnembon committed 2019-12-25 03:33:25 -04:00
1 parent b09982e02c
commit 0b296cc05c
3 files changed
+5 -5

No files matched your search

@@ -972,7 +972,7 @@ public class CarpetExpression
return (c_, t_) -> Value.FALSE; return (c_, t_) -> Value.FALSE;
BlockState finalSourceBlockState = sourceBlockState; BlockState finalSourceBlockState = sourceBlockState;
BlockPos targetPos = targetLocator.block.getPos(); BlockPos targetPos = targetLocator.block.getPos();
cc.s.getMinecraftServer().executeSync( () -> cc.s.getMinecraftServer().submitAndJoin( () ->
{ {
CarpetSettings.impendingFillSkipUpdates = !CarpetSettings.fillUpdates; CarpetSettings.impendingFillSkipUpdates = !CarpetSettings.fillUpdates;
Clearable.clear(world.getBlockEntity(targetPos)); Clearable.clear(world.getBlockEntity(targetPos));
@@ -3089,7 +3089,7 @@ public class CarpetExpression
throw new InternalExpressionException("'plop' needs extra argument indicating what to plop"); throw new InternalExpressionException("'plop' needs extra argument indicating what to plop");
String what = lv.get(locator.offset).evalValue(c).getString(); String what = lv.get(locator.offset).evalValue(c).getString();
Value [] result = new Value[]{Value.NULL}; Value [] result = new Value[]{Value.NULL};
((CarpetContext)c).s.getMinecraftServer().executeSync( () -> ((CarpetContext)c).s.getMinecraftServer().submitAndJoin( () ->
{ {
Boolean res = FeatureGenerator.spawn(what, ((CarpetContext) c).s.getWorld(), locator.block.getPos()); Boolean res = FeatureGenerator.spawn(what, ((CarpetContext) c).s.getWorld(), locator.block.getPos());
@@ -764,7 +764,7 @@ public class EntityValue extends Value
if (!(e instanceof LivingEntity)) return; if (!(e instanceof LivingEntity)) return;
LivingEntity le = (LivingEntity)e; LivingEntity le = (LivingEntity)e;
if (v == null) if (v == null)
le.clearPotionEffects(); le.clearStatusEffects();
else if (v instanceof ListValue) else if (v instanceof ListValue)
{ {
List<Value> lv = ((ListValue) v).getItems(); List<Value> lv = ((ListValue) v).getItems();
@@ -786,7 +786,7 @@ public class EntityValue extends Value
boolean showIcon = true; boolean showIcon = true;
if (lv.size() > 4) if (lv.size() > 4)
showIcon = lv.get(4).getBoolean(); showIcon = lv.get(4).getBoolean();
le.addPotionEffect(new StatusEffectInstance(effect, duration, amplifier, showParticles, showIcon)); le.addStatusEffect(new StatusEffectInstance(effect, duration, amplifier, showParticles, showIcon));
return; return;
} }
} }
@@ -139,7 +139,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
if (blockEntity instanceof Inventory) { if (blockEntity instanceof Inventory) {
inventory = (Inventory)blockEntity; inventory = (Inventory)blockEntity;
if (inventory instanceof ChestBlockEntity && block instanceof ChestBlock) { if (inventory instanceof ChestBlockEntity && block instanceof ChestBlock) {
inventory = ChestBlock.getInventory(blockState, world, blockPos, true); inventory = ChestBlock.getInventory((ChestBlock)block, blockState, world, blockPos, true);
} }
} }
} }