2019-07-11 09:03:08 +02:00
|
|
|
package com.simibubi.create;
|
|
|
|
|
2019-07-11 19:55:11 +02:00
|
|
|
import org.apache.logging.log4j.LogManager;
|
2019-07-11 09:03:08 +02:00
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
|
2019-07-23 12:54:53 +02:00
|
|
|
import com.simibubi.create.modules.schematics.ServerSchematicLoader;
|
2019-07-11 09:03:08 +02:00
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.ItemGroup;
|
2019-07-28 10:08:49 +02:00
|
|
|
import net.minecraft.item.crafting.IRecipeSerializer;
|
2019-07-11 09:03:08 +02:00
|
|
|
import net.minecraftforge.event.RegistryEvent;
|
|
|
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|
|
|
import net.minecraftforge.fml.common.Mod;
|
|
|
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
|
|
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
|
|
|
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
|
|
|
|
2019-09-03 08:34:02 +02:00
|
|
|
@EventBusSubscriber(bus = Bus.MOD)
|
2019-07-11 09:03:08 +02:00
|
|
|
@Mod(Create.ID)
|
|
|
|
public class Create {
|
|
|
|
|
|
|
|
public static final String ID = "create";
|
|
|
|
public static final String NAME = "Create";
|
2019-08-06 19:00:51 +02:00
|
|
|
public static final String VERSION = "0.0.5";
|
2019-07-11 09:03:08 +02:00
|
|
|
|
2019-07-11 19:55:11 +02:00
|
|
|
public static Logger logger = LogManager.getLogger();
|
2019-07-11 09:03:08 +02:00
|
|
|
public static ItemGroup creativeTab = new CreateItemGroup();
|
2019-09-03 08:34:02 +02:00
|
|
|
public static ServerSchematicLoader schematicReceiver;
|
2019-07-28 10:08:49 +02:00
|
|
|
|
2019-09-03 08:34:02 +02:00
|
|
|
@SubscribeEvent
|
|
|
|
public static void init(final FMLCommonSetupEvent event) {
|
|
|
|
schematicReceiver = new ServerSchematicLoader();
|
2019-07-19 17:50:23 +02:00
|
|
|
AllPackets.registerPackets();
|
2019-07-11 19:55:11 +02:00
|
|
|
}
|
2019-07-28 10:08:49 +02:00
|
|
|
|
2019-07-17 14:36:51 +02:00
|
|
|
@SubscribeEvent
|
2019-09-03 08:34:02 +02:00
|
|
|
public static void registerItems(RegistryEvent.Register<Item> event) {
|
|
|
|
AllItems.registerItems(event.getRegistry());
|
|
|
|
AllBlocks.registerItemBlocks(event.getRegistry());
|
2019-07-17 14:36:51 +02:00
|
|
|
}
|
2019-07-28 10:08:49 +02:00
|
|
|
|
2019-07-17 14:36:51 +02:00
|
|
|
@SubscribeEvent
|
2019-09-03 08:34:02 +02:00
|
|
|
public static void registerBlocks(RegistryEvent.Register<Block> event) {
|
|
|
|
AllBlocks.registerBlocks(event.getRegistry());
|
2019-07-17 14:36:51 +02:00
|
|
|
}
|
2019-07-28 10:08:49 +02:00
|
|
|
|
2019-07-11 19:55:11 +02:00
|
|
|
@SubscribeEvent
|
2019-09-03 08:34:02 +02:00
|
|
|
public static void registerRecipes(RegistryEvent.Register<IRecipeSerializer<?>> event) {
|
|
|
|
AllRecipes.register(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void tick() {
|
|
|
|
schematicReceiver.tick();
|
2019-07-11 09:03:08 +02:00
|
|
|
}
|
|
|
|
|
2019-09-03 08:34:02 +02:00
|
|
|
public static void shutdown() {
|
|
|
|
schematicReceiver.shutdown();
|
2019-07-11 09:03:08 +02:00
|
|
|
}
|
2019-09-03 08:34:02 +02:00
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
}
|