| 18 | import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; |
| 19 | |
| 20 | @Mod.EventBusSubscriber(modid = TutorialV3.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) |
| 21 | public class ModSetup { |
| 22 | |
| 23 | public static final String TAB_NAME = "tutorialv3"; |
| 24 | |
| 25 | public static final CreativeModeTab ITEM_GROUP = new CreativeModeTab(TAB_NAME) { |
| 26 | @Override |
| 27 | public ItemStack makeIcon() { |
| 28 | return new ItemStack(Items.DIAMOND); |
| 29 | } |
| 30 | }; |
| 31 | |
| 32 | public static void setup() { |
| 33 | IEventBus bus = MinecraftForge.EVENT_BUS; |
| 34 | bus.addListener(Ores::onBiomeLoadingEvent); |
| 35 | bus.addGenericListener(Entity.class, ManaEvents::onAttachCapabilitiesPlayer); |
| 36 | bus.addListener(ManaEvents::onPlayerCloned); |
| 37 | bus.addListener(ManaEvents::onRegisterCapabilities); |
| 38 | bus.addListener(ManaEvents::onWorldTick); |
| 39 | } |
| 40 | |
| 41 | public static void init(FMLCommonSetupEvent event) { |
| 42 | event.enqueueWork(() -> { |
| 43 | Ores.registerConfiguredFeatures(); |
| 44 | Dimensions.register(); |
| 45 | }); |
| 46 | Messages.register(); |
| 47 | } |
| 48 | |
| 49 | @SubscribeEvent |
| 50 | public static void onAttributeCreate(EntityAttributeCreationEvent event) { |
| 51 | event.put(Registration.THIEF.get(), ThiefEntity.prepareAttributes().build()); |
| 52 | } |
| 53 | } |
nothing calls this directly
no outgoing calls
no test coverage detected