Nuke is back

This commit is contained in:
drcrazy 2019-02-26 14:28:08 +03:00
parent ba220246f0
commit a979ff747f
3 changed files with 18 additions and 3 deletions

View file

@ -99,9 +99,6 @@ public class TechReborn {
ClientboundPackets.init();
ServerboundPackets.init();
// Entitys
//EntityRegistry.registerModEntity(new ResourceLocation("techreborn", "nuke"), EntityNukePrimed.class, "nuke", 0, INSTANCE, 160, 5, true);
proxy.preInit();
// Registers Chest Loot
@ -137,6 +134,7 @@ public class TechReborn {
}
Torus.genSizeMap(TileFusionControlComputer.maxCoilSize);
LOGGER.info("Setup done!");
}

View file

@ -4,10 +4,12 @@
package techreborn.events;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityType;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -18,6 +20,7 @@ import reborncore.common.util.BucketHandler;
import techreborn.TechReborn;
import techreborn.blocks.*;
import techreborn.config.ConfigTechReborn;
import techreborn.entities.EntityNukePrimed;
import techreborn.init.TRArmorMaterial;
import techreborn.init.TRContent;
import techreborn.init.TRContent.*;
@ -202,6 +205,15 @@ public class RegistryEventHandler {
TRTileEntities.TYPES.forEach(tileEntityType -> event.getRegistry().register(tileEntityType));
}
@SubscribeEvent
public static void registerEntityTypes(RegistryEvent.Register<EntityType<?>> event) {
TRContent.ENTITY_NUKE = EntityType.Builder.create(EntityNukePrimed.class, EntityNukePrimed::new).build("nuke");
TRContent.ENTITY_NUKE.setRegistryName(new ResourceLocation(TechReborn.MOD_ID, "nuke"));
event.getRegistry().register(TRContent.ENTITY_NUKE);
}
// @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) {
// //Register ModRecipes

View file

@ -1,6 +1,8 @@
package techreborn.init;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IItemProvider;
@ -24,6 +26,7 @@ import techreborn.blocks.transformers.BlockHVTransformer;
import techreborn.blocks.transformers.BlockLVTransformer;
import techreborn.blocks.transformers.BlockMVTransformer;
import techreborn.config.ConfigTechReborn;
import techreborn.entities.EntityNukePrimed;
import techreborn.items.DynamicCell;
import techreborn.items.ItemUpgrade;
import techreborn.utils.InitUtils;
@ -672,4 +675,6 @@ public class TRContent {
return item;
}
}
public static EntityType<EntityNukePrimed> ENTITY_NUKE;
}