add namespace of original item/ block to autogen item/block id
This commit is contained in:
CreepyCre 2021-04-25 15:31:40 +02:00
parent 714cae5bd0
commit f47931d00d
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ public class DimensionalDoorBlockRegistrar {
} }
private void register(Identifier identifier, Block original, BiFunction<AbstractBlock.Settings, Block, ? extends Block> constructor) { private void register(Identifier identifier, Block original, BiFunction<AbstractBlock.Settings, Block, ? extends Block> constructor) {
Identifier gennedId = new Identifier("dimdoors", PREFIX + identifier.getPath()); Identifier gennedId = new Identifier("dimdoors", PREFIX + identifier.getNamespace() + "_" + identifier.getPath());
Block dimBlock = Registry.register(registry, gennedId, constructor.apply(FabricBlockSettings.copy(original), original)); Block dimBlock = Registry.register(registry, gennedId, constructor.apply(FabricBlockSettings.copy(original), original));
ModBlockEntityTypes.ENTRANCE_RIFT.addBlock(dimBlock); ModBlockEntityTypes.ENTRANCE_RIFT.addBlock(dimBlock);
mappedDoorBlocks.put(gennedId, identifier); mappedDoorBlocks.put(gennedId, identifier);

View file

@ -112,7 +112,7 @@ public class DimensionalDoorItemRegistrar {
} }
private void register(Identifier identifier, Item original, BlockItem dimItem) { private void register(Identifier identifier, Item original, BlockItem dimItem) {
Identifier gennedId = new Identifier("dimdoors", PREFIX + identifier.getPath()); Identifier gennedId = new Identifier("dimdoors", PREFIX + identifier.getNamespace() + "_" + identifier.getPath());
if (!DoorData.PARENT_ITEMS.contains(original)) { if (!DoorData.PARENT_ITEMS.contains(original)) {
Registry.register(registry, gennedId, dimItem); Registry.register(registry, gennedId, dimItem);
} }