45a great reg split

This commit is contained in:
gnembon committed 2022-11-10 20:51:10 +01:00
1 parent 48c804fcaa
commit cda6994cae
28 files changed
+164 -153

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ import carpet.utils.Messenger;
import carpet.utils.SpawnChunks;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.ServerInterface;
@@ -1005,7 +1005,7 @@ public class CarpetSettings
@Override
public String validate(CommandSourceStack source, CarpetRule<String> currentRule, String newValue, String string) {
Optional<Block> ignoredBlock = Registry.BLOCK.getOptional(ResourceLocation.tryParse(newValue));
Optional<Block> ignoredBlock = BuiltInRegistries.BLOCK.getOptional(ResourceLocation.tryParse(newValue));
if (!ignoredBlock.isPresent()) {
Messenger.m(source, "r Unknown block '" + newValue + "'.");
return null;