mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-20 04:09:43 +00:00
Block replacement working, but only on reload, not initial generation.
This commit is contained in:
1 parent
0673c15af9
commit
a3d9aac95e
8 files changed
+135
-7
No files matched your search
@@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user