mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-12 16:37:38 +00:00
21 lines
692 B
Java
21 lines
692 B
Java
package com.colen.postea.API;
|
|||
|
|
|
||
|
|
import net.minecraft.block.Block;
|
||
|
|
|
||
|
|
import java.util.HashMap;
|
||
|
|
import java.util.Map;
|
||
|
|
|
||
|
|
public class BlockReplacementManager {
|
||
|
|
|
||
|
|
private static final Map<BlockKey, BlockKey> replacementMap = new HashMap<>();
|
||
|
|
|
||
|
|
@SuppressWarnings("unused")
|
||
|
|
public static void addBlockReplacement(Block blockIn, int metadataIn, Block blockOut, int metadataOut) {
|
||
|
|
replacementMap.put(new BlockKey(blockIn, metadataIn), new BlockKey(blockOut, metadataOut));
|
||
|
|
}
|
||
|
|
|
||
|
|
@SuppressWarnings("unused")
|
||
|
|
public static BlockKey getBlockReplacement(Block blockIn, int metadataIn) {
|
||
|
|
return replacementMap.getOrDefault(new BlockKey(blockIn, metadataIn), null);
|
||
|
|
}
|
||
|
|
}
|