@AutoLoad public class ReplacementTool extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
protected static void |
doubleCheck(net.minecraft.util.registry.RegistryNamespaced<net.minecraft.util.ResourceLocation,?> registry,
java.lang.Object replacement,
java.lang.Object vanilla) |
static net.minecraft.item.Item |
originalItem(net.minecraft.item.Item item)
Gets the orginal/vanilla item for the specified one.
|
static net.minecraft.block.Block |
orignalBlock(net.minecraft.block.Block block)
Gets the original/vanilla block for the specified one.
|
<T> void |
replaceIn(java.util.List<T> list,
java.lang.Object vanilla,
java.lang.Object replacement) |
static void |
replaceVanillaBlock(int id,
java.lang.String registryName,
java.lang.String fieldName,
java.lang.String srgFieldName,
net.minecraft.block.Block replacement,
net.minecraft.block.Block vanilla)
Replaces vanilla block with another one.
|
static void |
replaceVanillaItem(int id,
java.lang.String registryName,
java.lang.String fieldName,
java.lang.String srgFieldName,
net.minecraft.item.Item replacement,
net.minecraft.item.Item vanilla)
Replaces vanilla item with another one.
|
protected static void doubleCheck(net.minecraft.util.registry.RegistryNamespaced<net.minecraft.util.ResourceLocation,?> registry,
java.lang.Object replacement,
java.lang.Object vanilla)
public <T> void replaceIn(java.util.List<T> list,
java.lang.Object vanilla,
java.lang.Object replacement)
throws java.lang.ReflectiveOperationException
java.lang.ReflectiveOperationExceptionpublic static void replaceVanillaBlock(int id,
java.lang.String registryName,
java.lang.String fieldName,
java.lang.String srgFieldName,
net.minecraft.block.Block replacement,
net.minecraft.block.Block vanilla)
id - the idregistryName - the registry namefieldName - the field name in Blocks class.srgFieldName - the srg field name in Blocks class.replacement - the blockvanilla - the vanillapublic static void replaceVanillaItem(int id,
java.lang.String registryName,
java.lang.String fieldName,
java.lang.String srgFieldName,
net.minecraft.item.Item replacement,
net.minecraft.item.Item vanilla)
id - the idregistryName - the registry namefieldName - the field name in Items class.srgFieldName - the srg field name in Items class.replacement - the replacementvanilla - the vanillapublic static net.minecraft.block.Block orignalBlock(net.minecraft.block.Block block)
block - the blockpublic static net.minecraft.item.Item originalItem(net.minecraft.item.Item item)
item - the item