Reformat
This commit is contained in:
		| @@ -14,7 +14,6 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; | |||||||
| import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | ||||||
| import net.minecraftforge.fml.common.network.NetworkRegistry; | import net.minecraftforge.fml.common.network.NetworkRegistry; | ||||||
| import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; | import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; | ||||||
| import refinedstorage.integration.IntegrationCraftingTweaks; |  | ||||||
| import refinedstorage.proxy.CommonProxy; | import refinedstorage.proxy.CommonProxy; | ||||||
|  |  | ||||||
| @Mod(modid = RefinedStorage.ID, version = RefinedStorage.VERSION, dependencies = RefinedStorage.DEPENDENCIES) | @Mod(modid = RefinedStorage.ID, version = RefinedStorage.VERSION, dependencies = RefinedStorage.DEPENDENCIES) | ||||||
| @@ -150,8 +149,6 @@ public final class RefinedStorage { | |||||||
|         translucentCables = config.getBoolean("translucentCables", "misc", false, "For resource pack makers that want a translucent cable"); |         translucentCables = config.getBoolean("translucentCables", "misc", false, "For resource pack makers that want a translucent cable"); | ||||||
|  |  | ||||||
|         config.save(); |         config.save(); | ||||||
|  |  | ||||||
|         IntegrationCraftingTweaks.register(); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @EventHandler |     @EventHandler | ||||||
|   | |||||||
| @@ -1,31 +0,0 @@ | |||||||
| package refinedstorage.integration; |  | ||||||
|  |  | ||||||
| import com.google.common.base.Function; |  | ||||||
| import net.minecraft.nbt.NBTTagCompound; |  | ||||||
| import net.minecraftforge.fml.common.Loader; |  | ||||||
| import net.minecraftforge.fml.common.event.FMLInterModComms; |  | ||||||
| import refinedstorage.block.EnumGridType; |  | ||||||
| import refinedstorage.container.ContainerGrid; |  | ||||||
|  |  | ||||||
| public class IntegrationCraftingTweaks { |  | ||||||
|  |  | ||||||
| 	public static final String MOD_ID = "craftingtweaks"; |  | ||||||
|  |  | ||||||
| 	public static void register() { |  | ||||||
| 		if(Loader.isModLoaded(MOD_ID)) { |  | ||||||
| 			NBTTagCompound tagCompound = new NBTTagCompound(); |  | ||||||
| 			tagCompound.setString("ContainerClass", ContainerGrid.class.getName()); |  | ||||||
| 			tagCompound.setString("ContainerCallback", ContainerCallback.class.getName()); |  | ||||||
| 			tagCompound.setInteger("GridSlotNumber", 36); |  | ||||||
| 			tagCompound.setString("AlignToGrid", "left"); |  | ||||||
| 			FMLInterModComms.sendMessage(MOD_ID, "RegisterProviderV2", tagCompound); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public static class ContainerCallback implements Function<ContainerGrid, Boolean> { |  | ||||||
| 		@Override |  | ||||||
| 		public Boolean apply(ContainerGrid containerGrid) { |  | ||||||
| 			return containerGrid.getGrid().getType() == EnumGridType.CRAFTING; |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
| @@ -0,0 +1,34 @@ | |||||||
|  | package refinedstorage.integration.craftingtweaks; | ||||||
|  |  | ||||||
|  | import com.google.common.base.Function; | ||||||
|  | import net.minecraft.nbt.NBTTagCompound; | ||||||
|  | import net.minecraftforge.fml.common.Loader; | ||||||
|  | import net.minecraftforge.fml.common.event.FMLInterModComms; | ||||||
|  | import refinedstorage.block.EnumGridType; | ||||||
|  | import refinedstorage.container.ContainerGrid; | ||||||
|  |  | ||||||
|  | public final class IntegrationCraftingTweaks { | ||||||
|  |     private static final String ID = "craftingtweaks"; | ||||||
|  |  | ||||||
|  |     public static boolean isLoaded() { | ||||||
|  |         return Loader.isModLoaded(ID); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public static void register() { | ||||||
|  |         NBTTagCompound tag = new NBTTagCompound(); | ||||||
|  |  | ||||||
|  |         tag.setString("ContainerClass", ContainerGrid.class.getName()); | ||||||
|  |         tag.setString("ContainerCallback", ContainerCallback.class.getName()); | ||||||
|  |         tag.setInteger("GridSlotNumber", 36); | ||||||
|  |         tag.setString("AlignToGrid", "left"); | ||||||
|  |  | ||||||
|  |         FMLInterModComms.sendMessage(ID, "RegisterProviderV2", tag); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public static class ContainerCallback implements Function<ContainerGrid, Boolean> { | ||||||
|  |         @Override | ||||||
|  |         public Boolean apply(ContainerGrid containerGrid) { | ||||||
|  |             return containerGrid.getGrid().getType() == EnumGridType.CRAFTING; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -22,6 +22,7 @@ import refinedstorage.apiimpl.solderer.*; | |||||||
| import refinedstorage.apiimpl.storage.item.ItemStorageNBT; | import refinedstorage.apiimpl.storage.item.ItemStorageNBT; | ||||||
| import refinedstorage.block.*; | import refinedstorage.block.*; | ||||||
| import refinedstorage.gui.GuiHandler; | import refinedstorage.gui.GuiHandler; | ||||||
|  | import refinedstorage.integration.craftingtweaks.IntegrationCraftingTweaks; | ||||||
| import refinedstorage.item.*; | import refinedstorage.item.*; | ||||||
| import refinedstorage.network.*; | import refinedstorage.network.*; | ||||||
| import refinedstorage.tile.*; | import refinedstorage.tile.*; | ||||||
| @@ -37,6 +38,10 @@ public class CommonProxy { | |||||||
|     protected List<BlockCable> cableTypes = new ArrayList<>(); |     protected List<BlockCable> cableTypes = new ArrayList<>(); | ||||||
|  |  | ||||||
|     public void preInit(FMLPreInitializationEvent e) { |     public void preInit(FMLPreInitializationEvent e) { | ||||||
|  |         if (IntegrationCraftingTweaks.isLoaded()) { | ||||||
|  |             IntegrationCraftingTweaks.register(); | ||||||
|  |         } | ||||||
|  |  | ||||||
|         RefinedStorageAPI.SOLDERER_REGISTRY = new SoldererRegistry(); |         RefinedStorageAPI.SOLDERER_REGISTRY = new SoldererRegistry(); | ||||||
|  |  | ||||||
|         int id = 0; |         int id = 0; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Raoul Van den Berge
					Raoul Van den Berge