mirror of
https://github.com/TicTicBoooom-Mods/MasterfulMachinery.git
synced 2026-03-18 21:40:34 +01:00
fixing false flag crash report from other mods source crashes
added new method of adding port types from other mods
This commit is contained in:
@@ -21,7 +21,7 @@ apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'org.spongepowered.mixin'
|
||||
|
||||
version = '1.16.5-0.1.50-B' + getVersionNumber()
|
||||
version = '1.16.5-0.1.52-B' + getVersionNumber()
|
||||
group = 'com.ticticboooom.mods.mm' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'MasterfulMachinery'
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8.
|
||||
|
||||
@@ -11,8 +11,6 @@ import com.ticticboooom.mods.mm.client.screen.ControllerBlockContainerScreen;
|
||||
import com.ticticboooom.mods.mm.client.screen.PortBlockContainerScreen;
|
||||
import com.ticticboooom.mods.mm.client.screen.StructureGenBlockContainerScreen;
|
||||
import com.ticticboooom.mods.mm.client.ter.StructureGenTileEntityRenderer;
|
||||
import com.ticticboooom.mods.mm.event.MMPortEventHandler;
|
||||
import com.ticticboooom.mods.mm.event.MMPortRegistrationEvent;
|
||||
import com.ticticboooom.mods.mm.datagen.MMPackFinder;
|
||||
import com.ticticboooom.mods.mm.datagen.DataGeneratorFactory;
|
||||
import com.ticticboooom.mods.mm.datagen.PackType;
|
||||
@@ -25,6 +23,7 @@ import com.ticticboooom.mods.mm.registration.MMLoader;
|
||||
import com.ticticboooom.mods.mm.registration.MMPorts;
|
||||
import com.ticticboooom.mods.mm.registration.MMSetup;
|
||||
import com.ticticboooom.mods.mm.registration.RecipeTypes;
|
||||
import lombok.SneakyThrows;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScreenManager;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
@@ -37,6 +36,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
import net.minecraftforge.fml.ModLoader;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
@@ -59,8 +59,10 @@ public class MM {
|
||||
private static boolean hasGenerated = false;
|
||||
private static MM instance;
|
||||
|
||||
@SneakyThrows
|
||||
public MM() {
|
||||
instance = this;
|
||||
MMPorts.init();
|
||||
DataGeneratorFactory.init();
|
||||
PacketHandler.init();
|
||||
registerDataGen();
|
||||
@@ -99,6 +101,9 @@ public class MM {
|
||||
public static void generate() {
|
||||
if (!hasGenerated) {
|
||||
try {
|
||||
if (!ModLoader.isLoadingStateValid()){
|
||||
return;
|
||||
}
|
||||
instance.generator.run();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -35,6 +35,9 @@ public class MMLangProvider extends LanguageProvider {
|
||||
}
|
||||
|
||||
}
|
||||
if (!MMSetup.BLUEPRINT.isPresent()){
|
||||
return;
|
||||
}
|
||||
this.add(MMSetup.BLUEPRINT.get(), "Blueprint");
|
||||
this.add(MMSetup.STRUCTURE_DEVICE.get(), "Structure Scanner");
|
||||
this.add(MMSetup.PROJECTOR_BLOCK.get(), "Structure Projector");
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
package com.ticticboooom.mods.mm.event;
|
||||
|
||||
import com.ticticboooom.mods.mm.MM;
|
||||
import com.ticticboooom.mods.mm.registration.MMLoader;
|
||||
import com.ticticboooom.mods.mm.registration.MMPorts;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLConstructModEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MM.ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class ConstructEventHandler {
|
||||
@SubscribeEvent
|
||||
public static void onConstruct(FMLConstructModEvent event) {
|
||||
FMLJavaModLoadingContext.get().getModEventBus().post(new MMPortRegistrationEvent(MMPorts.PORTS));
|
||||
MMLoader.load();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.ticticboooom.mods.mm.event;
|
||||
|
||||
import com.ticticboooom.mods.mm.MM;
|
||||
import com.ticticboooom.mods.mm.registration.MMPorts;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = MM.ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class MMPortEventHandler {
|
||||
@SubscribeEvent
|
||||
public static void onMMPorts(MMPortRegistrationEvent event) {
|
||||
MMPorts.init();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.ticticboooom.mods.mm.event;
|
||||
|
||||
import com.ticticboooom.mods.mm.ports.MasterfulPortType;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraftforge.fml.event.lifecycle.IModBusEvent;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class MMPortRegistrationEvent extends Event implements IModBusEvent {
|
||||
@Getter
|
||||
private Map<ResourceLocation, MasterfulPortType> portsMap;
|
||||
|
||||
public MMPortRegistrationEvent(Map<ResourceLocation, MasterfulPortType> portsMap) {
|
||||
|
||||
this.portsMap = portsMap;
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
#Tue Jul 13 16:42:54 BST 2021
|
||||
VERSION_CODE=639
|
||||
#Sat Jul 17 00:12:57 BST 2021
|
||||
VERSION_CODE=658
|
||||
|
||||
Reference in New Issue
Block a user