World usage working

This commit is contained in:
Connor Colenso committed 2023-10-30 20:02:08 +00:00
1 parent 4baacc0cfd
commit 40b70bfec3
5 files changed
+42 -33

No files matched your search

@@ -1,6 +1,7 @@
package com.colen.postea.API;
import akka.japi.Pair;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
@@ -22,7 +23,7 @@ public class BlockReplacementManager {
@SuppressWarnings("unused")
public static Pair<Integer, Integer> getBlockReplacement(int blockID, int metadataIn) {
Block block = Block.getBlockById(blockID);
String blockName = block.getUnlocalizedName();
String blockName = GameRegistry.findUniqueIdentifierFor(block).toString();
Function<BlockKey, Pair<Integer, Integer>> transformer = blockReplacementMap.getOrDefault(new BlockKey(blockName, metadataIn), null);