mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-17 02:55:09 +00:00
Kinda there for tile entities, need to change actual block
This commit is contained in:
1 parent
f80424f91d
commit
ce84d5a3e5
10 files changed
+173
-5
No files matched your search
@@ -2,10 +2,19 @@ package com.colen.postea;
|
||||
|
||||
import com.colen.postea.API.BlockReplacementManager;
|
||||
import com.colen.postea.API.ItemStackReplacementManager;
|
||||
import com.colen.postea.API.TileEntityReplacementManager;
|
||||
import com.colen.postea.API.TileTransformer;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import gregtech.api.GregTech_API;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, acceptedMinecraftVersions = "[1.7.10]")
|
||||
@SuppressWarnings("unused")
|
||||
@@ -13,7 +22,17 @@ public class Postea {
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
ItemStackReplacementManager.addItemReplacement(Item.getItemFromBlock(Blocks.grass), 0, Item.getItemFromBlock(Blocks.coal_ore), 10);
|
||||
BlockReplacementManager.addBlockReplacement(Blocks.bedrock, 0, Blocks.wool, 2);
|
||||
//ItemStackReplacementManager.addItemReplacement(Item.getItemFromBlock(Blocks.grass), 0, Item.getItemFromBlock(Blocks.coal_ore), 10);
|
||||
BlockReplacementManager.addBlockReplacement(GregTech_API.sBlockOres1, 6, Blocks.emerald_ore, 0);
|
||||
BlockReplacementManager.addBlockReplacement(GregTech_API.sBlockOres1, 16022, Blocks.nether_brick, 0);
|
||||
BlockReplacementManager.addBlockReplacement(GregTech_API.sBlockOres1, 1018, Blocks.end_stone, 0);
|
||||
|
||||
// Define the transformation function
|
||||
Function<NBTTagCompound, NBTTagCompound> myTransformer = (tag) -> {
|
||||
return tag;
|
||||
};
|
||||
|
||||
TileEntityReplacementManager.addItemReplacement("BlockController", new TileTransformer(TileEntityChest.class, myTransformer));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user