45a great reg split
This commit is contained in:
1 parent
48c804fcaa
commit
cda6994cae
28 files changed
+164
-153
No files matched your search
@@ -42,10 +42,11 @@ import com.mojang.bridge.game.PackType;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.core.Rotations;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtIo;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
@@ -136,12 +137,12 @@ public class Auxiliary {
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
if (lv.size() == 0)
|
||||
{
|
||||
return ListValue.wrap(Registry.SOUND_EVENT.keySet().stream().map(ValueConversions::of));
|
||||
return ListValue.wrap(BuiltInRegistries.SOUND_EVENT.keySet().stream().map(ValueConversions::of));
|
||||
}
|
||||
String rawString = lv.get(0).getString();
|
||||
ResourceLocation soundName = InputValidator.identifierOf(rawString);
|
||||
Vector3Argument locator = Vector3Argument.findIn(lv, 1);
|
||||
if (Registry.SOUND_EVENT.get(soundName) == null)
|
||||
if (BuiltInRegistries.SOUND_EVENT.get(soundName) == null)
|
||||
throw new ThrowStatement(rawString, Throwables.UNKNOWN_SOUND);
|
||||
float volume = 1.0F;
|
||||
float pitch = 1.0F;
|
||||
@@ -175,7 +176,7 @@ public class Auxiliary {
|
||||
expression.addContextFunction("particle", -1, (c, t, lv) ->
|
||||
{
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
if (lv.size() == 0) return ListValue.wrap(Registry.PARTICLE_TYPE.keySet().stream().map(ValueConversions::of));
|
||||
if (lv.size() == 0) return ListValue.wrap(BuiltInRegistries.PARTICLE_TYPE.keySet().stream().map(ValueConversions::of));
|
||||
MinecraftServer ms = cc.s.getServer();
|
||||
ServerLevel world = cc.s.getLevel();
|
||||
Vector3Argument locator = Vector3Argument.findIn(lv, 1);
|
||||
@@ -755,16 +756,16 @@ public class Auxiliary {
|
||||
ListValue.wrap(FeatureGenerator.featureMap.keySet().stream().sorted().map(StringValue::of).collect(Collectors.toList()))
|
||||
);
|
||||
plopData.put(StringValue.of("features"),
|
||||
ListValue.wrap(Registry.FEATURE.keySet().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
ListValue.wrap(BuiltInRegistries.FEATURE.keySet().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
);
|
||||
plopData.put(StringValue.of("configured_features"),
|
||||
ListValue.wrap(registryManager.registryOrThrow(Registry.CONFIGURED_FEATURE_REGISTRY).keySet().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
ListValue.wrap(registryManager.registryOrThrow(Registries.CONFIGURED_FEATURE).keySet().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
);
|
||||
plopData.put(StringValue.of("structure_types"),
|
||||
ListValue.wrap(Registry.STRUCTURE_TYPES.keySet().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
ListValue.wrap(BuiltInRegistries.STRUCTURE_TYPE.keySet().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
);
|
||||
plopData.put(StringValue.of("structures"),
|
||||
ListValue.wrap(registryManager.registryOrThrow(Registry.STRUCTURE_REGISTRY).keySet().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
ListValue.wrap(registryManager.registryOrThrow(Registries.STRUCTURE).keySet().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
);
|
||||
return MapValue.wrap(plopData);
|
||||
}
|
||||
@@ -960,7 +961,7 @@ public class Auxiliary {
|
||||
ResourceLocation statName;
|
||||
category = InputValidator.identifierOf(lv.get(1).getString());
|
||||
statName = InputValidator.identifierOf(lv.get(2).getString());
|
||||
StatType<?> type = Registry.STAT_TYPE.get(category);
|
||||
StatType<?> type = BuiltInRegistries.STAT_TYPE.get(category);
|
||||
if (type == null) return Value.NULL;
|
||||
Stat<?> stat = getStat(type, statName);
|
||||
if (stat == null) return Value.NULL;
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.UUID;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
@@ -101,7 +101,7 @@ public class Entities {
|
||||
try
|
||||
{
|
||||
entityId = ResourceLocation.read(new StringReader(entityString));
|
||||
EntityType<? extends Entity> type = Registry.ENTITY_TYPE.getOptional(entityId).orElse(null);
|
||||
EntityType<? extends Entity> type = BuiltInRegistries.ENTITY_TYPE.getOptional(entityId).orElse(null);
|
||||
if (type == null || !type.canSummon())
|
||||
return Value.NULL;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ import java.util.stream.Collectors;
|
||||
import net.minecraft.commands.arguments.item.ItemInput;
|
||||
import net.minecraft.core.HolderSet;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket;
|
||||
@@ -65,11 +67,11 @@ public class Inventories {
|
||||
expression.addContextFunction("item_list", -1, (c, t, lv) ->
|
||||
{
|
||||
if (lv.size() == 0)
|
||||
return ListValue.wrap(Registry.ITEM.keySet().stream().map(ValueConversions::of).collect(Collectors.toList()));
|
||||
return ListValue.wrap(BuiltInRegistries.ITEM.keySet().stream().map(ValueConversions::of).collect(Collectors.toList()));
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
Registry<Item> items = cc.s.getServer().registryAccess().registryOrThrow(Registry.ITEM_REGISTRY);
|
||||
Registry<Item> items = cc.s.getServer().registryAccess().registryOrThrow(Registries.ITEM);
|
||||
String tag = lv.get(0).getString();
|
||||
Optional<HolderSet.Named<Item>> itemTag = items.getTag(TagKey.create(Registry.ITEM_REGISTRY, InputValidator.identifierOf(tag)));
|
||||
Optional<HolderSet.Named<Item>> itemTag = items.getTag(TagKey.create(Registries.ITEM, InputValidator.identifierOf(tag)));
|
||||
if (itemTag.isEmpty()) return Value.NULL;
|
||||
return ListValue.wrap(itemTag.get().stream().map(b -> ValueConversions.of(items.getKey(b.value()))).collect(Collectors.toList()));
|
||||
/*
|
||||
@@ -85,7 +87,7 @@ public class Inventories {
|
||||
{
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
|
||||
Registry<Item> blocks = cc.s.getServer().registryAccess().registryOrThrow(Registry.ITEM_REGISTRY);
|
||||
Registry<Item> blocks = cc.s.getServer().registryAccess().registryOrThrow(Registries.ITEM);
|
||||
if (lv.size() == 0)
|
||||
return ListValue.wrap(blocks.getTagNames().map(ValueConversions::of).collect(Collectors.toList()));
|
||||
Item item = NBTSerializableValue.parseItem(lv.get(0).getString(), cc.s.registryAccess()).getItem();
|
||||
@@ -94,7 +96,7 @@ public class Inventories {
|
||||
return ListValue.wrap( blocks.getTags().filter(e -> e.getSecond().stream().anyMatch(h -> (h.value() == item))).map(e -> ValueConversions.of(e.getFirst())).collect(Collectors.toList()));
|
||||
}
|
||||
String tag = lv.get(1).getString();
|
||||
Optional<HolderSet.Named<Item>> tagSet = blocks.getTag(TagKey.create(Registry.ITEM_REGISTRY, InputValidator.identifierOf(tag)));
|
||||
Optional<HolderSet.Named<Item>> tagSet = blocks.getTag(TagKey.create(Registries.ITEM, InputValidator.identifierOf(tag)));
|
||||
if (tagSet.isEmpty()) return Value.NULL;
|
||||
|
||||
//return BooleanValue.of(tagSet.get().contains(item.builtInRegistryHolder()));
|
||||
@@ -123,7 +125,7 @@ public class Inventories {
|
||||
if (lv.size() > 1)
|
||||
{
|
||||
String recipeType = lv.get(1).getString();
|
||||
type = Registry.RECIPE_TYPE.get(InputValidator.identifierOf(recipeType));
|
||||
type = BuiltInRegistries.RECIPE_TYPE.get(InputValidator.identifierOf(recipeType));
|
||||
}
|
||||
List<Recipe<?>> recipes;
|
||||
recipes = ((RecipeManagerInterface) cc.s.getServer().getRecipeManager()).getAllMatching(type, InputValidator.identifierOf(recipeName));
|
||||
@@ -197,9 +199,9 @@ public class Inventories {
|
||||
String itemStr = v.getString();
|
||||
Item item;
|
||||
ResourceLocation id = InputValidator.identifierOf(itemStr);
|
||||
item = Registry.ITEM.getOptional(id).orElseThrow(() -> new ThrowStatement(itemStr, Throwables.UNKNOWN_ITEM));
|
||||
item = BuiltInRegistries.ITEM.getOptional(id).orElseThrow(() -> new ThrowStatement(itemStr, Throwables.UNKNOWN_ITEM));
|
||||
if (!item.hasCraftingRemainingItem()) return Value.NULL;
|
||||
return new StringValue(NBTSerializableValue.nameFromRegistryId(Registry.ITEM.getKey(item.getCraftingRemainingItem())));
|
||||
return new StringValue(NBTSerializableValue.nameFromRegistryId(BuiltInRegistries.ITEM.getKey(item.getCraftingRemainingItem())));
|
||||
});
|
||||
|
||||
expression.addContextFunction("inventory_size", -1, (c, t, lv) ->
|
||||
|
||||
@@ -44,6 +44,8 @@ import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderSet;
|
||||
import net.minecraft.core.QuartPos;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.level.chunk.PalettedContainer;
|
||||
@@ -295,7 +297,7 @@ public class WorldAccess {
|
||||
if (poi == null)
|
||||
return Value.NULL;
|
||||
return ListValue.of(
|
||||
ValueConversions.of(Registry.POINT_OF_INTEREST_TYPE.getKey(poi.getPoiType().value())),
|
||||
ValueConversions.of(BuiltInRegistries.POINT_OF_INTEREST_TYPE.getKey(poi.getPoiType().value())),
|
||||
new NumericValue(poiType.maxTickets() - ((PoiRecord_scarpetMixin)poi).getFreeTickets())
|
||||
);
|
||||
}
|
||||
@@ -309,7 +311,7 @@ public class WorldAccess {
|
||||
String poiType = lv.get(locator.offset+1).getString().toLowerCase(Locale.ROOT);
|
||||
if (!"any".equals(poiType))
|
||||
{
|
||||
PoiType type = Registry.POINT_OF_INTEREST_TYPE.getOptional(InputValidator.identifierOf(poiType))
|
||||
PoiType type = BuiltInRegistries.POINT_OF_INTEREST_TYPE.getOptional(InputValidator.identifierOf(poiType))
|
||||
.orElseThrow(() -> new ThrowStatement(poiType, Throwables.UNKNOWN_POI));
|
||||
condition = (tt) -> tt.value() == type;
|
||||
}
|
||||
@@ -335,7 +337,7 @@ public class WorldAccess {
|
||||
store.getInRange(condition, pos, radius, status);
|
||||
return ListValue.wrap(pois.sorted(Comparator.comparingDouble(p -> p.getPos().distSqr(pos))).map(p ->
|
||||
ListValue.of(
|
||||
ValueConversions.of(Registry.POINT_OF_INTEREST_TYPE.getKey(p.getPoiType().value())),
|
||||
ValueConversions.of(BuiltInRegistries.POINT_OF_INTEREST_TYPE.getKey(p.getPoiType().value())),
|
||||
new NumericValue(p.getPoiType().value().maxTickets() - ((PoiRecord_scarpetMixin)p).getFreeTickets()),
|
||||
ValueConversions.of(p.getPos())
|
||||
)
|
||||
@@ -360,9 +362,9 @@ public class WorldAccess {
|
||||
}
|
||||
String poiTypeString = poi.getString().toLowerCase(Locale.ROOT);
|
||||
ResourceLocation resource = InputValidator.identifierOf(poiTypeString);
|
||||
PoiType type = Registry.POINT_OF_INTEREST_TYPE.getOptional(resource)
|
||||
PoiType type = BuiltInRegistries.POINT_OF_INTEREST_TYPE.getOptional(resource)
|
||||
.orElseThrow(() -> new ThrowStatement(poiTypeString, Throwables.UNKNOWN_POI));
|
||||
Holder<PoiType> holder = Registry.POINT_OF_INTEREST_TYPE.getHolderOrThrow(ResourceKey.create(Registry.POINT_OF_INTEREST_TYPE_REGISTRY, resource));
|
||||
Holder<PoiType> holder = BuiltInRegistries.POINT_OF_INTEREST_TYPE.getHolderOrThrow(ResourceKey.create(Registries.POINT_OF_INTEREST_TYPE, resource));
|
||||
|
||||
int occupancy = 0;
|
||||
if (locator.offset + 1 < lv.size())
|
||||
@@ -820,7 +822,7 @@ public class WorldAccess {
|
||||
{
|
||||
playerBreak = true;
|
||||
String itemString = val.getString();
|
||||
item = Registry.ITEM.getOptional(InputValidator.identifierOf(itemString))
|
||||
item = BuiltInRegistries.ITEM.getOptional(InputValidator.identifierOf(itemString))
|
||||
.orElseThrow(() -> new ThrowStatement(itemString, Throwables.UNKNOWN_ITEM));
|
||||
}
|
||||
}
|
||||
@@ -969,7 +971,7 @@ public class WorldAccess {
|
||||
attacker = (LivingEntity) attackingEntity;
|
||||
}
|
||||
else throw new InternalExpressionException("Attacking entity needs to be a living thing, "+
|
||||
ValueConversions.of(Registry.ENTITY_TYPE.getKey(attackingEntity.getType())).getString() +" ain't it.");
|
||||
ValueConversions.of(BuiltInRegistries.ENTITY_TYPE.getKey(attackingEntity.getType())).getString() +" ain't it.");
|
||||
|
||||
}
|
||||
else
|
||||
@@ -1129,12 +1131,12 @@ public class WorldAccess {
|
||||
expression.addContextFunction("block_list", -1, (c, t, lv) ->
|
||||
{
|
||||
if (lv.size() == 0)
|
||||
return ListValue.wrap(Registry.BLOCK.keySet().stream().map(ValueConversions::of).collect(Collectors.toList()));
|
||||
return ListValue.wrap(BuiltInRegistries.BLOCK.keySet().stream().map(ValueConversions::of).collect(Collectors.toList()));
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
ResourceLocation tag = InputValidator.identifierOf(lv.get(0).getString());
|
||||
|
||||
Registry<Block> blocks = cc.s.getServer().registryAccess().registryOrThrow(Registry.BLOCK_REGISTRY);
|
||||
Optional<HolderSet.Named<Block>> tagset = blocks.getTag(TagKey.create(Registry.BLOCK_REGISTRY, tag));
|
||||
Registry<Block> blocks = cc.s.getServer().registryAccess().registryOrThrow(Registries.BLOCK);
|
||||
Optional<HolderSet.Named<Block>> tagset = blocks.getTag(TagKey.create(Registries.BLOCK, tag));
|
||||
if (tagset.isEmpty()) return Value.NULL;
|
||||
return ListValue.wrap(tagset.get().stream().map(b -> ValueConversions.of(blocks.getKey(b.value()))).collect(Collectors.toList()));
|
||||
});
|
||||
@@ -1142,7 +1144,7 @@ public class WorldAccess {
|
||||
expression.addContextFunction("block_tags", -1, (c, t, lv) ->
|
||||
{
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
Registry<Block> blocks = cc.s.getServer().registryAccess().registryOrThrow(Registry.BLOCK_REGISTRY);
|
||||
Registry<Block> blocks = cc.s.getServer().registryAccess().registryOrThrow(Registries.BLOCK);
|
||||
if (lv.size() == 0)
|
||||
return ListValue.wrap(blocks.getTagNames().map(ValueConversions::of).collect(Collectors.toList()));
|
||||
BlockArgument blockLocator = BlockArgument.findIn(cc, lv, 0, true);
|
||||
@@ -1152,7 +1154,7 @@ public class WorldAccess {
|
||||
return ListValue.wrap( blocks.getTags().filter(e -> e.getSecond().stream().anyMatch(h -> (h.value() == target))).map(e -> ValueConversions.of(e.getFirst())).collect(Collectors.toList()));
|
||||
}
|
||||
String tag = lv.get(blockLocator.offset).getString();
|
||||
Optional<HolderSet.Named<Block>> tagSet = blocks.getTag(TagKey.create(Registry.BLOCK_REGISTRY, InputValidator.identifierOf(tag)));
|
||||
Optional<HolderSet.Named<Block>> tagSet = blocks.getTag(TagKey.create(Registries.BLOCK, InputValidator.identifierOf(tag)));
|
||||
if (tagSet.isEmpty()) return Value.NULL;
|
||||
return BooleanValue.of(blockLocator.block.getBlockState().is(tagSet.get()));
|
||||
|
||||
@@ -1178,7 +1180,7 @@ public class WorldAccess {
|
||||
CarpetContext cc = (CarpetContext) c;
|
||||
ServerLevel world = cc.s.getLevel();
|
||||
if (lv.size() == 0)
|
||||
return ListValue.wrap(world.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY).keySet().stream().map(ValueConversions::of));
|
||||
return ListValue.wrap(world.registryAccess().registryOrThrow(Registries.BIOME).keySet().stream().map(ValueConversions::of));
|
||||
|
||||
Biome biome;
|
||||
BiomeSource biomeSource = world.getChunkSource().getGenerator().getBiomeSource();
|
||||
@@ -1213,7 +1215,7 @@ public class WorldAccess {
|
||||
Climate.quantizeCoord(numberGetOrThrow(weirdness))
|
||||
);
|
||||
biome = mnbs.getNoiseBiome(point).value();
|
||||
ResourceLocation biomeId = cc.s.getServer().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY).getKey(biome);
|
||||
ResourceLocation biomeId = cc.s.getServer().registryAccess().registryOrThrow(Registries.BIOME).getKey(biome);
|
||||
return new StringValue(NBTSerializableValue.nameFromRegistryId(biomeId));
|
||||
}
|
||||
|
||||
@@ -1221,7 +1223,7 @@ public class WorldAccess {
|
||||
|
||||
if (locator.replacement != null)
|
||||
{
|
||||
biome = world.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY).get(InputValidator.identifierOf(locator.replacement));
|
||||
biome = world.registryAccess().registryOrThrow(Registries.BIOME).get(InputValidator.identifierOf(locator.replacement));
|
||||
if (biome == null) throw new ThrowStatement(locator.replacement, Throwables.UNKNOWN_BIOME);
|
||||
}
|
||||
else
|
||||
@@ -1232,7 +1234,7 @@ public class WorldAccess {
|
||||
// in locatebiome
|
||||
if (locator.offset == lv.size())
|
||||
{
|
||||
ResourceLocation biomeId = cc.s.getServer().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY).getKey(biome);
|
||||
ResourceLocation biomeId = cc.s.getServer().registryAccess().registryOrThrow(Registries.BIOME).getKey(biome);
|
||||
return new StringValue(NBTSerializableValue.nameFromRegistryId(biomeId));
|
||||
}
|
||||
String biomeFeature = lv.get(locator.offset).getString();
|
||||
@@ -1250,7 +1252,7 @@ public class WorldAccess {
|
||||
throw new InternalExpressionException("'set_biome' needs a biome name as an argument");
|
||||
String biomeName = lv.get(locator.offset+0).getString();
|
||||
// from locatebiome command code
|
||||
Holder<Biome> biome = cc.s.getServer().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY).getHolder(ResourceKey.create(Registry.BIOME_REGISTRY, InputValidator.identifierOf(biomeName)))
|
||||
Holder<Biome> biome = cc.s.getServer().registryAccess().registryOrThrow(Registries.BIOME).getHolder(ResourceKey.create(Registries.BIOME, InputValidator.identifierOf(biomeName)))
|
||||
.orElseThrow(() -> new ThrowStatement(biomeName, Throwables.UNKNOWN_BIOME));
|
||||
|
||||
|
||||
@@ -1294,7 +1296,7 @@ public class WorldAccess {
|
||||
ServerLevel world = cc.s.getLevel();
|
||||
BlockPos pos = locator.block.getPos();
|
||||
Map<Structure, LongSet> references = world.getChunk(pos.getX() >> 4, pos.getZ() >> 4, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences();
|
||||
Registry<Structure> reg = cc.s.getServer().registryAccess().registryOrThrow(Registry.STRUCTURE_REGISTRY);
|
||||
Registry<Structure> reg = cc.s.getServer().registryAccess().registryOrThrow(Registries.STRUCTURE);
|
||||
if (lv.size() == locator.offset)
|
||||
return ListValue.wrap(references.entrySet().stream().
|
||||
filter(e -> e.getValue()!= null && !e.getValue().isEmpty()).
|
||||
@@ -1325,7 +1327,7 @@ public class WorldAccess {
|
||||
final List<Structure> structure = new ArrayList<>();
|
||||
boolean needSize = false;
|
||||
boolean singleOutput = false;
|
||||
Registry<Structure> reg = cc.s.getServer().registryAccess().registryOrThrow(Registry.STRUCTURE_REGISTRY);
|
||||
Registry<Structure> reg = cc.s.getServer().registryAccess().registryOrThrow(Registries.STRUCTURE);
|
||||
if (lv.size() > locator.offset)
|
||||
{
|
||||
Value requested = lv.get(locator.offset+0);
|
||||
@@ -1341,7 +1343,7 @@ public class WorldAccess {
|
||||
}
|
||||
else
|
||||
{
|
||||
StructureType<?> sss = Registry.STRUCTURE_TYPES.get(id);
|
||||
StructureType<?> sss = BuiltInRegistries.STRUCTURE_TYPE.get(id);
|
||||
reg.entrySet().stream().filter(e -> e.getValue().type() ==sss).forEach(e -> structure.add(e.getValue()));
|
||||
}
|
||||
if (structure.isEmpty())
|
||||
@@ -1399,7 +1401,7 @@ public class WorldAccess {
|
||||
ServerLevel world = cc.s.getLevel();
|
||||
BlockPos pos = locator.block.getPos();
|
||||
Map<Structure, StructureStart> structures = world.getChunk(pos.getX() >> 4, pos.getZ() >> 4, ChunkStatus.STRUCTURE_STARTS).getAllStarts();
|
||||
Registry<Structure> reg = cc.s.getServer().registryAccess().registryOrThrow(Registry.STRUCTURE_REGISTRY);
|
||||
Registry<Structure> reg = cc.s.getServer().registryAccess().registryOrThrow(Registries.STRUCTURE);
|
||||
if (lv.size() == locator.offset)
|
||||
{
|
||||
Map<Value, Value> structureList = new HashMap<>();
|
||||
|
||||
Reference in new issue
Block a user