2023-10-21 23:35:00 +01:00
|
|
|
package com.colen.postea;
|
2023-10-21 23:10:28 +01:00
|
|
|
|
2023-10-28 20:00:24 +01:00
|
|
|
import appeng.block.networking.BlockController;
|
|
|
|
|
import appeng.core.Api;
|
|
|
|
|
import com.colen.postea.API.BlockReplacementManager;
|
|
|
|
|
import com.colen.postea.API.TileEntityReplacementManager;
|
|
|
|
|
import com.colen.postea.API.TileTransformer;
|
2023-10-21 23:10:28 +01:00
|
|
|
import cpw.mods.fml.common.Mod;
|
2023-10-24 01:44:51 +01:00
|
|
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
2023-10-23 14:02:09 +01:00
|
|
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
2023-10-28 20:00:24 +01:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
|
import gregtech.api.GregTech_API;
|
2023-10-24 01:05:53 +01:00
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
2023-10-28 20:00:24 +01:00
|
|
|
import net.minecraft.tileentity.TileEntityChest;
|
2023-10-24 01:05:53 +01:00
|
|
|
|
|
|
|
|
import java.util.function.Function;
|
2023-10-21 23:10:28 +01:00
|
|
|
|
|
|
|
|
@Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, acceptedMinecraftVersions = "[1.7.10]")
|
|
|
|
|
@SuppressWarnings("unused")
|
|
|
|
|
public class Postea {
|
|
|
|
|
|
2023-10-23 14:02:09 +01:00
|
|
|
@Mod.EventHandler
|
|
|
|
|
public void preInit(FMLPreInitializationEvent event) {
|
2023-10-24 01:05:53 +01:00
|
|
|
//ItemStackReplacementManager.addItemReplacement(Item.getItemFromBlock(Blocks.grass), 0, Item.getItemFromBlock(Blocks.coal_ore), 10);
|
2023-10-28 20:00:24 +01:00
|
|
|
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);
|
2023-10-24 01:05:53 +01:00
|
|
|
|
|
|
|
|
// Define the transformation function
|
|
|
|
|
Function<NBTTagCompound, NBTTagCompound> myTransformer = (tag) -> {
|
|
|
|
|
return tag;
|
|
|
|
|
};
|
|
|
|
|
|
2023-10-28 20:00:24 +01:00
|
|
|
TileEntityReplacementManager.tileEntityReplacement("GT_TileEntity_Ores", new TileTransformer(TileEntityChest.class, myTransformer));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Mod.EventHandler
|
|
|
|
|
public void postInit(FMLPostInitializationEvent event) {
|
|
|
|
|
BlockReplacementManager.addBlockReplacement(GregTech_API.sBlockOres1, 0, Blocks.chest, 0);
|
2023-10-24 01:44:51 +01:00
|
|
|
}
|
2023-10-21 23:10:28 +01:00
|
|
|
}
|