Horrible quick port of gui handling, tiles still need fixing first tho

This commit is contained in:
modmuss50 2019-02-24 00:13:27 +00:00
parent db3a6f2c7e
commit 4d32e6e292
3 changed files with 204 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import net.minecraft.block.Block;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityType;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -20,6 +21,7 @@ import techreborn.config.ConfigTechReborn;
import techreborn.init.TRArmorMaterial;
import techreborn.init.TRContent;
import techreborn.init.TRContent.*;
import techreborn.init.TRTileEntities;
import techreborn.init.TRToolTeir;
import techreborn.itemblocks.ItemBlockRubberSapling;
import techreborn.items.DynamicCell;
@ -50,6 +52,7 @@ import techreborn.items.tool.vanilla.ItemTRSword;
import techreborn.utils.InitUtils;
import java.util.Arrays;
import java.util.function.Consumer;
/**
* @author drcrazy
@ -194,6 +197,11 @@ public class RegistryEventHandler {
TechReborn.LOGGER.debug("TechReborns Items Loaded");
}
@SubscribeEvent
public static void registerTiles(RegistryEvent.Register<TileEntityType<?>> event) {
TRTileEntities.TYPES.forEach(tileEntityType -> event.getRegistry().register(tileEntityType));
}
// @SubscribeEvent(priority = EventPriority.LOW)//LOW is used as we want it to load as late as possible, but before crafttweaker
// public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {