mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Merge pull request #4390 from thommy101/dependency-updates
Dependency updates
This commit is contained in:
commit
d369963b40
202 files changed
+139
-13614
No files matched your search
@@ -152,9 +152,6 @@ import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import rebelkeithy.mods.metallurgy.api.IOreInfo;
|
||||
import rebelkeithy.mods.metallurgy.api.MetallurgyAPI;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
/**
|
||||
@@ -1124,70 +1121,6 @@ public class Mekanism
|
||||
OreDictionary.registerOre("itemBioFuel", new ItemStack(MekanismItems.BioFuel));
|
||||
}
|
||||
|
||||
/**
|
||||
* Integrates the mod with other mods -- registering items and blocks with the Forge Ore Dictionary
|
||||
* and adding machine recipes with other items' corresponding resources.
|
||||
*/
|
||||
public void addIntegratedItems()
|
||||
{
|
||||
if(hooks.MetallurgyCoreLoaded)
|
||||
{
|
||||
try {
|
||||
String[] setNames = {"base", "precious", "nether", "fantasy", "ender", "utility"};
|
||||
|
||||
for(String setName : setNames )
|
||||
{
|
||||
for(IOreInfo oreInfo : MetallurgyAPI.getMetalSet(setName).getOreList().values())
|
||||
{
|
||||
switch(oreInfo.getType())
|
||||
{
|
||||
case ALLOY:
|
||||
{
|
||||
if(oreInfo.getIngot() != null && oreInfo.getDust() != null)
|
||||
{
|
||||
RecipeHandler.addCrusherRecipe(MekanismUtils.size(oreInfo.getIngot(), 1), MekanismUtils.size(oreInfo.getDust(), 1));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case DROP:
|
||||
{
|
||||
ItemStack ore = oreInfo.getOre();
|
||||
ItemStack drop = oreInfo.getDrop();
|
||||
|
||||
if(drop != null && ore != null)
|
||||
{
|
||||
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(drop, 12));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
ItemStack ore = oreInfo.getOre();
|
||||
ItemStack dust = oreInfo.getDust();
|
||||
ItemStack ingot = oreInfo.getIngot();
|
||||
|
||||
if(ore != null && dust != null)
|
||||
{
|
||||
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(dust, 2));
|
||||
RecipeHandler.addCombinerRecipe(MekanismUtils.size(dust, 8), MekanismUtils.size(ore, 1));
|
||||
}
|
||||
|
||||
if(ingot != null && dust != null)
|
||||
{
|
||||
RecipeHandler.addCrusherRecipe(MekanismUtils.size(ingot, 1), MekanismUtils.size(dust, 1));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds and registers all entities and tile entities.
|
||||
*/
|
||||
@@ -1426,8 +1359,6 @@ public class Mekanism
|
||||
|
||||
MinecraftForge.EVENT_BUS.post(new BoxBlacklistEvent());
|
||||
|
||||
addIntegratedItems();
|
||||
|
||||
OreDictManager.init();
|
||||
|
||||
//Update the config-dependent recipes after the recipes have actually been added in the first place
|
||||
|
||||
@@ -24,7 +24,6 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
|
||||
public class TransporterManager
|
||||
{
|
||||
@@ -145,10 +144,10 @@ public class TransporterManager
|
||||
}
|
||||
}
|
||||
|
||||
if(Loader.isModLoaded("MinefactoryReloaded") && tile instanceof IDeepStorageUnit && !(tile instanceof TileEntityBin))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// if(Loader.isModLoaded("MinefactoryReloaded") && tile instanceof IDeepStorageUnit && !(tile instanceof TileEntityBin))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
if(tile instanceof ISidedInventory)
|
||||
{
|
||||
|
||||
@@ -41,8 +41,8 @@ public final class MekanismHooks
|
||||
public boolean AE2Loaded = false;
|
||||
public boolean TeslaLoaded = false;
|
||||
|
||||
public boolean MetallurgyCoreLoaded = false;
|
||||
public boolean MetallurgyBaseLoaded = false;
|
||||
// public boolean MetallurgyCoreLoaded = false;
|
||||
// public boolean MetallurgyBaseLoaded = false;
|
||||
|
||||
public void hook()
|
||||
{
|
||||
@@ -54,12 +54,12 @@ public final class MekanismHooks
|
||||
if(Loader.isModLoaded("appliedenergistics2")) AE2Loaded = true;
|
||||
if(Loader.isModLoaded("tesla")) TeslaLoaded = true;
|
||||
|
||||
if(Loader.isModLoaded("Metallurgy3Core"))
|
||||
{
|
||||
MetallurgyCoreLoaded = true;
|
||||
|
||||
if(Loader.isModLoaded("Metallurgy3Base")) MetallurgyBaseLoaded = true;
|
||||
}
|
||||
// if(Loader.isModLoaded("Metallurgy3Core"))
|
||||
// {
|
||||
// MetallurgyCoreLoaded = true;
|
||||
//
|
||||
// if(Loader.isModLoaded("Metallurgy3Base")) MetallurgyBaseLoaded = true;
|
||||
// }
|
||||
|
||||
if(IC2Loaded)
|
||||
{
|
||||
@@ -71,6 +71,11 @@ public final class MekanismHooks
|
||||
{
|
||||
loadCCPeripheralProviders();
|
||||
}
|
||||
|
||||
// if(MettallurgyCoreLoaded)
|
||||
// {
|
||||
// loadMettallurgy();
|
||||
// }
|
||||
}
|
||||
|
||||
@Method(modid = "IC2")
|
||||
@@ -178,4 +183,59 @@ public final class MekanismHooks
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// public void loadMettallurgy()
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// String[] setNames = {"base", "precious", "nether", "fantasy", "ender", "utility"};
|
||||
//
|
||||
// for (String setName : setNames)
|
||||
// {
|
||||
// for (IOreInfo oreInfo : MetallurgyAPI.getMetalSet(setName).getOreList().values())
|
||||
// {
|
||||
// switch (oreInfo.getType())
|
||||
// {
|
||||
// case ALLOY:
|
||||
// if (oreInfo.getIngot() != null && oreInfo.getDust() != null)
|
||||
// {
|
||||
// RecipeHandler.addCrusherRecipe(MekanismUtils.size(oreInfo.getIngot(), 1), MekanismUtils.size(oreInfo.getDust(), 1));
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// case DROP:
|
||||
// ItemStack ore = oreInfo.getOre();
|
||||
// ItemStack drop = oreInfo.getDrop();
|
||||
//
|
||||
// if (drop != null && ore != null)
|
||||
// {
|
||||
// RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(drop, 12));
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// default:
|
||||
// ItemStack ore = oreInfo.getOre();
|
||||
// ItemStack dust = oreInfo.getDust();
|
||||
// ItemStack ingot = oreInfo.getIngot();
|
||||
//
|
||||
// if (ore != null && dust != null)
|
||||
// {
|
||||
// RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(dust, 2));
|
||||
// RecipeHandler.addCombinerRecipe(MekanismUtils.size(dust, 8), MekanismUtils.size(ore, 1));
|
||||
// }
|
||||
//
|
||||
// if (ingot != null && dust != null)
|
||||
// {
|
||||
// RecipeHandler.addCrusherRecipe(MekanismUtils.size(ingot, 1), MekanismUtils.size(dust, 1));
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -7,10 +7,11 @@ import li.cil.oc.api.Network;
|
||||
import li.cil.oc.api.driver.NamedBlock;
|
||||
import li.cil.oc.api.machine.Arguments;
|
||||
import li.cil.oc.api.machine.Context;
|
||||
import li.cil.oc.api.network.ManagedEnvironment;
|
||||
import li.cil.oc.api.network.ManagedPeripheral;
|
||||
import li.cil.oc.api.network.Visibility;
|
||||
import li.cil.oc.api.prefab.AbstractManagedEnvironment;
|
||||
import li.cil.oc.api.prefab.DriverSidedTileEntity;
|
||||
import li.cil.oc.api.prefab.ManagedEnvironment;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -40,7 +41,7 @@ public class OCDriver extends DriverSidedTileEntity
|
||||
return null;
|
||||
}
|
||||
|
||||
public class OCManagedEnvironment extends ManagedEnvironment implements NamedBlock, ManagedPeripheral
|
||||
public class OCManagedEnvironment extends AbstractManagedEnvironment implements NamedBlock, ManagedPeripheral
|
||||
{
|
||||
public IComputerIntegration computerTile;
|
||||
|
||||
@@ -78,4 +79,4 @@ public class OCDriver extends DriverSidedTileEntity
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,10 +42,8 @@ import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.Optional.Interface;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
|
||||
@Interface(iface = "powercrystals.minefactoryreloaded.api.IDeepStorageUnit", modid = "MineFactoryReloaded")
|
||||
public class TileEntityBin extends TileEntityBasicBlock implements ISidedInventory, IActiveState, IDeepStorageUnit, IConfigurable, ITierUpgradeable
|
||||
public class TileEntityBin extends TileEntityBasicBlock implements ISidedInventory, IActiveState, IConfigurable, ITierUpgradeable
|
||||
{
|
||||
public boolean isActive;
|
||||
|
||||
@@ -637,41 +635,41 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStoredItemType()
|
||||
{
|
||||
if(itemType == null)
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
return MekanismUtils.size(itemType, getItemCount());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStoredItemCount(int amount)
|
||||
{
|
||||
if(amount == 0)
|
||||
{
|
||||
setStoredItemType(ItemStack.EMPTY, 0);
|
||||
}
|
||||
|
||||
setItemCount(amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStoredItemType(ItemStack type, int amount)
|
||||
{
|
||||
itemType = type;
|
||||
cacheCount = amount;
|
||||
|
||||
topStack = ItemStack.EMPTY;
|
||||
bottomStack = ItemStack.EMPTY;
|
||||
|
||||
markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
// @Override
|
||||
// public ItemStack getStoredItemType()
|
||||
// {
|
||||
// if(itemType == null)
|
||||
// {
|
||||
// return ItemStack.EMPTY;
|
||||
// }
|
||||
//
|
||||
// return MekanismUtils.size(itemType, getItemCount());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void setStoredItemCount(int amount)
|
||||
// {
|
||||
// if(amount == 0)
|
||||
// {
|
||||
// setStoredItemType(ItemStack.EMPTY, 0);
|
||||
// }
|
||||
//
|
||||
// setItemCount(amount);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void setStoredItemType(ItemStack type, int amount)
|
||||
// {
|
||||
// itemType = type;
|
||||
// cacheCount = amount;
|
||||
//
|
||||
// topStack = ItemStack.EMPTY;
|
||||
// bottomStack = ItemStack.EMPTY;
|
||||
//
|
||||
// markDirty();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
public int getMaxStoredCount()
|
||||
{
|
||||
return tier.storage;
|
||||
@@ -771,4 +769,4 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
||||
return tileEntityBin.remove(amount, simulate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user