@@ -79,8 +79,8 @@ public static void register(@NotNull CommandDispatcher<CommandSourceStack> dispa
79
79
.executes (ctx -> {
80
80
ResourceLocation id = ResourceLocationArgument .getId (ctx , "id" );
81
81
RegistryOps <Tag > ops = RegistryOps .create (NbtOps .INSTANCE , ctx .getSource ().registryAccess ());
82
- ChunkGenerator generator = ChunkGenerator .CODEC .decode (ops , CompoundTagArgument .getCompoundTag (ctx , "chunk_generator" )).get (). orThrow ().getFirst ();
83
- DimensionType type = DimensionType .DIRECT_CODEC .decode (ops , CompoundTagArgument .getCompoundTag (ctx , "dimension_type" )).get (). orThrow ().getFirst ();
82
+ ChunkGenerator generator = ChunkGenerator .CODEC .decode (ops , CompoundTagArgument .getCompoundTag (ctx , "chunk_generator" )).getOrThrow ().getFirst ();
83
+ DimensionType type = DimensionType .DIRECT_CODEC .decode (ops , CompoundTagArgument .getCompoundTag (ctx , "dimension_type" )).getOrThrow ().getFirst ();
84
84
DynamicDimensionRegistry from = DynamicDimensionRegistry .from (ctx .getSource ().getServer ());
85
85
if (from .anyDimensionExists (id )) {
86
86
throw CANNOT_CREATE .create ();
@@ -111,8 +111,8 @@ public static void register(@NotNull CommandDispatcher<CommandSourceStack> dispa
111
111
.executes (ctx -> {
112
112
ResourceLocation id = ResourceLocationArgument .getId (ctx , "id" );
113
113
RegistryOps <Tag > ops = RegistryOps .create (NbtOps .INSTANCE , ctx .getSource ().registryAccess ());
114
- ChunkGenerator generator = ChunkGenerator .CODEC .decode (ops , CompoundTagArgument .getCompoundTag (ctx , "chunk_generator" )).get (). orThrow ().getFirst ();
115
- DimensionType type = DimensionType .DIRECT_CODEC .decode (ops , CompoundTagArgument .getCompoundTag (ctx , "dimension_type" )).get (). orThrow ().getFirst ();
114
+ ChunkGenerator generator = ChunkGenerator .CODEC .decode (ops , CompoundTagArgument .getCompoundTag (ctx , "chunk_generator" )).getOrThrow ().getFirst ();
115
+ DimensionType type = DimensionType .DIRECT_CODEC .decode (ops , CompoundTagArgument .getCompoundTag (ctx , "dimension_type" )).getOrThrow ().getFirst ();
116
116
DynamicDimensionRegistry from = DynamicDimensionRegistry .from (ctx .getSource ().getServer ());
117
117
if (from .anyDimensionExists (id )) {
118
118
throw CANNOT_CREATE .create ();
0 commit comments