This commit is contained in:
gnembon committed 2020-06-01 03:25:09 -03:00
1 parent d5cb99d7f9
commit f97ca9e9bd
4 files changed
+2 -15

No files matched your search

@@ -2697,7 +2697,7 @@ public class CarpetExpression
for (int i=2; i < lv.size(); i++) paramList.add(lv.get(i).evalValue(c));
params = ShapeDispatcher.parseParams(paramList);
}
params.putIfAbsent("dim", new StringValue(cc.s.getWorld().method_27983().toString()));
params.putIfAbsent("dim", new StringValue(cc.s.getWorld().method_27983().getValue().toString()));
params.putIfAbsent("duration", duration);
ShapeDispatcher.ExpiringShape shape = ShapeDispatcher.create(cc, shapeType, params);
@@ -426,14 +426,6 @@ public class ShapeDispatcher
public static class DimensionParam extends StringParam
{
@Override
public Value validate(CarpetContext cc, Value value)
{
String dimStr = value.getString();
Optional<DimensionType> dimOp = Registry.DIMENSION_TYPE.getOrEmpty(new Identifier(dimStr));
if (!dimOp.isPresent()) throw new InternalExpressionException("Unknown dimension "+dimStr);
return value;
}
@Override
public boolean appliesTo(ExpiringShape shape) { return true; }
@Override
@@ -103,7 +103,7 @@ public class ShapesRenderer
else
{
RenderedShape<?> rshape = shapeFactory.apply(client, shape);
DimensionType dim = Registry.DIMENSION_TYPE.get(new Identifier(tag.getString("dim")));
RegistryKey<World> dim = RegistryKey.of(Registry.DIMENSION, new Identifier(tag.getString("dim")));
int key = rshape.key();
synchronized (shapes)
{