added more types, entities

This commit is contained in:
gnembon committed 2020-11-04 13:48:36 -04:00
1 parent faf4d7b7db
commit ce8529d084
5 files changed
+108 -48

No files matched your search

@@ -591,7 +591,7 @@ public class Auxiliary {
expression.addLazyFunction("current_dimension", 0, (c, t, lv) -> {
ServerCommandSource s = ((CarpetContext)c).s;
Value retval = ValueConversions.dimName(s.getWorld());
Value retval = ValueConversions.of(s.getWorld());
return (cc, tt) -> retval;
});
@@ -1088,7 +1088,7 @@ public class WorldAccess {
StructureStart<?> start = FeatureGenerator.shouldStructureStartAt(world, pos, structure, needSize);
if (start == null) return LazyValue.NULL;
if (!needSize) return LazyValue.TRUE;
Value ret = ValueConversions.fromStructure(start);
Value ret = ValueConversions.of(start);
return (_c, _t) -> ret;
}
Map<Value, Value> ret = new HashMap<>();
@@ -1098,7 +1098,7 @@ public class WorldAccess {
if (start == null) continue;
Value key = new StringValue(NBTSerializableValue.nameFromRegistryId(Registry.STRUCTURE_FEATURE.getId(str)));
ret.put(key, (!needSize)?Value.NULL: ValueConversions.fromStructure(start));
ret.put(key, (!needSize)?Value.NULL: ValueConversions.of(start));
}
Value retMap = MapValue.wrap(ret);
return (_c, _t) -> retMap;
@@ -1130,7 +1130,7 @@ public class WorldAccess {
}
String structureName = lv.get(locator.offset).evalValue(c).getString().toLowerCase(Locale.ROOT);
StructureStart start = structures.get(Registry.STRUCTURE_FEATURE.get(new Identifier(structureName)));
Value ret = ValueConversions.fromStructure(start);
Value ret = ValueConversions.of(start);
return (_c, _t) -> ret;
});