Huge changes + bugfixes & latest build.

This commit is contained in:
Dragon2488 2017-01-01 19:53:17 +07:00
parent 9df6a3d5f3
commit 76847aa4e7
15 changed files with 100 additions and 161 deletions

2
.gitignore vendored
View file

@ -74,10 +74,8 @@ local.properties
gradle/wrapper/gradle-wrapper.properties
gradlew
gradlew.bat
!build/libs/*
# Linux
*~
build/
run/

View file

@ -1,7 +1,7 @@
minecraft.version=1.10.2
forge.version=12.18.1.2079
gt.version=5.10.24
gt.version=5.10.30
forestry.version=5.2.7.220
ic2.version=2.6.99-ex110

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -39,6 +39,7 @@ import ic2.core.block.type.ResourceBlock;
import ic2.core.item.type.CraftingItemType;
import ic2.core.ref.BlockName;
import ic2.core.ref.ItemName;
import ic2.core.ref.TeBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -615,62 +616,62 @@ public class GT_Mod implements IGT_Mod {
e.printStackTrace(GT_Log.err);
}
}
/*идите нахуй короче
String tName = "";
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "blastfurnace"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "blastfurnace", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.blast_furnace, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "blockcutter"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "blockcutter", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.block_cutter, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "inductionFurnace"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "inductionFurnace", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.induction_furnace, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "generator"), false)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "generator", false)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.generator, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "windMill"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "windMill", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.wind_generator, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "waterMill"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "waterMill", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.water_generator, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "solarPanel"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "solarPanel", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.solar_generator, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "centrifuge"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "centrifuge", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.centrifuge, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "electrolyzer"), false)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "electrolyzer", false)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.electrolyzer, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "compressor"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "compressor", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.compressor, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "electroFurnace"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "electroFurnace", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.electric_furnace, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "extractor"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "extractor", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.extractor, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "macerator"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "macerator", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.macerator, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "recycler"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "recycler", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.recycler, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "metalformer"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "metalformer", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.metal_former, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "orewashingplant"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "orewashingplant", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.ore_washing_plant, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "massFabricator"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "massFabricator", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.matter_generator, 1));
}
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "replicator"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1));
}*/
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + "replicator", true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2TEItem(TeBlock.replicator, 1));
}
if (gregtechproxy.mNerfedVanillaTools) {
GT_Log.out.println("GT_Mod: Nerfing Vanilla Tool Durability");
Items.WOODEN_SWORD.setMaxDamage(12);

View file

@ -2,11 +2,6 @@ package gregtech.api;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import gregtech.common.blocks.GT_Block_Machines;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.init.SoundEvents;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IDamagableItem;
@ -22,12 +17,16 @@ import gregtech.api.objects.GT_ItemStack;
import gregtech.api.threads.GT_Runnable_MachineBlockUpdate;
import gregtech.api.util.*;
import gregtech.api.world.GT_Worldgen;
import gregtech.common.blocks.GT_Block_Machines;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.*;
@ -227,13 +226,13 @@ public class GregTech_API {
sDimensionalList.add(0);
sDimensionalList.add(1);
sSoundList.put(0, SoundEvents.ENTITY_ARROW_SHOOT.getSoundName().toString());
sSoundList.put(1, SoundEvents.BLOCK_ANVIL_USE.getSoundName().toString());
sSoundList.put(2, SoundEvents.BLOCK_ANVIL_BREAK.getSoundName().toString());
sSoundList.put(3, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON.getSoundName().toString());
sSoundList.put(4, SoundEvents.ENTITY_ITEM_BREAK.getSoundName().toString());
sSoundList.put(5, SoundEvents.ENTITY_GENERIC_EXPLODE.getSoundName().toString());
sSoundList.put(6, SoundEvents.ITEM_FIRECHARGE_USE.getSoundName().toString());
sSoundList.put(0, "entity.arrow.shoot"); //SoundEvents.ENTITY_ARROW_SHOOT.getSoundName().toString());
sSoundList.put(1, "block.anvil.use");//SoundEvents.BLOCK_ANVIL_USE.getSoundName().toString());
sSoundList.put(2, "block.anvil.break");//SoundEvents.BLOCK_ANVIL_BREAK.getSoundName().toString());
sSoundList.put(3, "block.stone_button.click_on");//SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON.getSoundName().toString());
sSoundList.put(4, "entity.item.break");//SoundEvents.ENTITY_ITEM_BREAK.getSoundName().toString());
sSoundList.put(5, "entity.generic.explode");//SoundEvents.ENTITY_GENERIC_EXPLODE.getSoundName().toString());
sSoundList.put(6, "item.firecharge.use");//SoundEvents.ITEM_FIRECHARGE_USE.getSoundName().toString());
sSoundList.put(100, aTextIC2Lower + ":" + "tools.Wrench");
sSoundList.put(101, aTextIC2Lower + ":" + "tools.RubberTrampoline");

View file

@ -709,7 +709,7 @@ public class Textures {
@Override
@SideOnly(Side.CLIENT)
public void run() {
System.out.println("Register icon " + mIconName);
//System.out.println("Register icon " + mIconName);
mIcon = GregTech_API.sBlockIcons.registerSprite(new ResourceLocation(RES_PATH_ITEM + mIconName));
mOverlay = GregTech_API.sBlockIcons.registerSprite(new ResourceLocation(RES_PATH_ITEM + mIconName + "_OVERLAY"));
}

View file

@ -308,8 +308,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
for (EntityEquipmentSlot i : EntityEquipmentSlot.values()) {
ItemStack tArmor = aPlayer.getItemStackFromSlot(i);
if (GT_ModHandler.isElectricItem(tArmor)) {
IElectricItem tArmorItem = (IElectricItem) tArmor.getItem();
if (tArmorItem.canProvideEnergy(tArmor) && tArmorItem.getTier(tArmor) >= getTier(aStack)) {
if (GT_ModHandler.isChargerItem(tArmor) && ElectricItem.manager.getTier(tArmor) >= getTier(aStack)) {
double tCharge = ElectricItem.manager.discharge(tArmor, charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), Integer.MAX_VALUE, true, true, false);
if (tCharge > 0) {
charge(aStack, tCharge, Integer.MAX_VALUE, true, false);

View file

@ -9,8 +9,10 @@ import gregtech.api.interfaces.internal.IGT_CraftingRecipe;
import gregtech.api.objects.GT_HashSet;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.ItemData;
import ic2.api.item.ElectricItem;
import ic2.api.item.IBoxable;
import ic2.api.item.IElectricItem;
import ic2.api.item.ISpecialElectricItem;
import ic2.api.reactor.IReactorComponent;
import ic2.api.recipe.*;
import ic2.core.Ic2Items;
@ -274,7 +276,7 @@ public class GT_ModHandler {
* Returns a Liquid Stack with given amount of Steam.
*/
public static FluidStack getSteam(long aAmount) {
return new FluidStack(FluidName.steam.getInstance(), (int) aAmount);
return Materials.Water.getGas(aAmount);
}
/**
@ -1537,12 +1539,12 @@ public class GT_ModHandler {
public static int chargeElectricItem(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreLimit, boolean aSimulate) {
try {
if (isElectricItem(aStack)) {
int tTier = ((ic2.api.item.IElectricItem) aStack.getItem()).getTier(aStack);
int tTier = ElectricItem.manager.getTier(aStack);
if (tTier < 0 || tTier == aTier || aTier == Integer.MAX_VALUE) {
if (!aIgnoreLimit && tTier >= 0)
aCharge = (int) Math.min(aCharge, V[Math.max(0, Math.min(V.length - 1, tTier))]);
if (aCharge > 0) {
int rCharge = (int) Math.max(0.0, ic2.api.item.ElectricItem.manager.charge(aStack, aCharge, tTier, true, aSimulate));
int rCharge = (int) Math.max(0.0, ElectricItem.manager.charge(aStack, aCharge, tTier, true, aSimulate));
return rCharge + (rCharge * 4 > aTier ? aTier : 0);
}
}
@ -1560,15 +1562,13 @@ public class GT_ModHandler {
*/
public static int dischargeElectricItem(ItemStack aStack, int aCharge, int aTier, boolean aIgnoreLimit, boolean aSimulate, boolean aIgnoreDischargability) {
try {
// if (isElectricItem(aStack) && (aIgnoreDischargability || ((ic2.api.item.IElectricItem)aStack.getItem()).canProvideEnergy(aStack))) {
if (isElectricItem(aStack)) {
int tTier = ((ic2.api.item.IElectricItem) aStack.getItem()).getTier(aStack);
int tTier = ElectricItem.manager.getTier(aStack);
if (tTier < 0 || tTier == aTier || aTier == Integer.MAX_VALUE) {
if (!aIgnoreLimit && tTier >= 0)
aCharge = (int) Math.min(aCharge, V[Math.max(0, Math.min(V.length - 1, tTier))]);
if (aCharge > 0) {
// int rCharge = Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, T, aSimulate));
int rCharge = (int) Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, true, !aIgnoreDischargability, aSimulate));
int rCharge = (int) Math.max(0, ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, true, !aIgnoreDischargability, aSimulate));
return rCharge - (rCharge * 4 > aTier ? aTier : 0);
}
}
@ -1584,9 +1584,7 @@ public class GT_ModHandler {
*/
public static boolean canUseElectricItem(ItemStack aStack, int aCharge) {
try {
if (isElectricItem(aStack)) {
return ic2.api.item.ElectricItem.manager.canUse(aStack, aCharge);
}
return isElectricItem(aStack) && ElectricItem.manager.canUse(aStack, aCharge);
} catch (Throwable e) {/*Do nothing*/}
return false;
}
@ -1598,12 +1596,7 @@ public class GT_ModHandler {
*/
public static boolean useElectricItem(ItemStack aStack, int aCharge, EntityPlayer aPlayer) {
try {
if (isElectricItem(aStack)) {
ic2.api.item.ElectricItem.manager.use(aStack, 0, aPlayer);
if (ic2.api.item.ElectricItem.manager.canUse(aStack, aCharge)) {
return ic2.api.item.ElectricItem.manager.use(aStack, aCharge, aPlayer);
}
}
return isElectricItem(aStack) && ElectricItem.manager.use(aStack, aCharge, aPlayer);
} catch (Throwable e) {/*Do nothing*/}
return false;
}
@ -1685,8 +1678,12 @@ public class GT_ModHandler {
*/
public static boolean isChargerItem(ItemStack aStack) {
try {
if (isElectricItem(aStack)) {
return ((ic2.api.item.IElectricItem) aStack.getItem()).canProvideEnergy(aStack);
if (aStack != null && isElectricItem(aStack)) {
if (aStack.getItem() instanceof ISpecialElectricItem) {
return true;
} else if (aStack.getItem() instanceof IElectricItem) {
return ((IElectricItem) aStack.getItem()).canProvideEnergy(aStack);
}
}
} catch (Throwable e) {/*Do nothing*/}
return false;
@ -1697,28 +1694,24 @@ public class GT_ModHandler {
*/
public static boolean isElectricItem(ItemStack aStack) {
try {
return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem) aStack.getItem()).getTier(aStack) < Integer.MAX_VALUE;
return aStack != null && (aStack.getItem() instanceof IElectricItem || aStack.getItem() instanceof ISpecialElectricItem);
} catch (Throwable e) {/*Do nothing*/}
return false;
}
public static boolean isElectricItem(ItemStack aStack, byte aTier) {
try {
return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem) aStack.getItem()).getTier(aStack) == aTier;
return aStack != null && isElectricItem(aStack) && ElectricItem.manager.getTier(aStack) == aTier;
} catch (Throwable e) {/*Do nothing*/}
return false;
}
public static void registerBoxableItemToToolBox(ItemStack aStack) {
if (aStack != null) registerBoxableItemToToolBox(aStack.getItem());
}
public static void registerBoxableItemToToolBox(Item aItem) {
if (aItem != null && sBoxableWrapper != null) {
try {
try {
if (aItem != null && sBoxableWrapper != null) {
ic2.api.item.ItemWrapper.registerBoxable(aItem, (IBoxable) sBoxableWrapper);
} catch (Throwable e) {/*Do nothing*/}
}
}
} catch (Throwable e) {/*Do nothing*/}
}
public static int getCapsuleCellContainerCountMultipliedWithStackSize(ItemStack... aStacks) {

View file

@ -221,7 +221,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
GT_Utility.copyAmount(1, aOre.mEvent.getOre()));
}
} else {
System.out.println("Thingy Name: "+ aOre.mEvent.getName() + " !!!Unknown 'Thingy' detected!!! This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
//System.out.println("Thingy Name: "+ aOre.mEvent.getName() + " !!!Unknown 'Thingy' detected!!! This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
}
}
@ -1266,13 +1266,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
return;
}
} else {
//for (Dyes tDye : Dyes.VALUES) {
// if (aEvent.getName().endsWith(tDye.name().replaceFirst("dye", ""))) {
// GT_OreDictUnificator.addToBlacklist(aEvent.getOre());
// GT_Log.ore.println(tModToName + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is.");
// return;
// }
//}
for (Dyes tDye : Dyes.VALUES) {
if (aEvent.getName().endsWith(tDye.name().replaceFirst("dye", ""))) {
GT_OreDictUnificator.addToBlacklist(aEvent.getOre());
GT_Log.ore.println(tModToName + " Oh man, why the fuck would anyone need a OreDictified Color for this, that is even too much for GregTech... do not report this, this is just a random Comment about how ridiculous this is.");
return;
}
}
//System.out.println("Material Name: "+aEvent.getName()+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
//GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
return;

View file

@ -269,9 +269,9 @@ public class GT_Block_Machines extends GT_Generic_Block implements IDebugableBlo
return false;
}
if (!worldIn.isRemote && gregTechTileEntity.isUseableByPlayer(playerIn)) {
return gregTechTileEntity.onRightclick(playerIn, (byte) side.getIndex(), hitX, hitY, hitZ, EnumHand.MAIN_HAND);
gregTechTileEntity.onRightclick(playerIn, (byte) side.getIndex(), hitX, hitY, hitZ, EnumHand.MAIN_HAND);
}
return false;
return true;
}

View file

@ -18,6 +18,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTank {
@ -96,14 +97,20 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
if (aBaseMetaTileEntity.isClientSide()) {
return true;
}
if (aPlayer != null) {
if (GT_Utility.areStacksEqual(aPlayer.getHeldItem(hand), new ItemStack(Items.WATER_BUCKET, 1))) {
fill(Materials.Water.getFluid(1000 * aPlayer.getHeldItem(hand).stackSize), true);
aPlayer.getHeldItem(hand).setItem(Items.BUCKET);
} else {
aBaseMetaTileEntity.openGUI(aPlayer);
ItemStack stack = aPlayer != null ? aPlayer.getHeldItem(hand) : null;
if (stack != null) {
FluidStack fluidStack = GT_Utility.getFluidForFilledItem(stack, true);
int capacity = getFillableStack() == null ? getCapacity() : getCapacity() - getFillableStack().amount;
if(fluidStack != null && fluidStack.getFluid() == FluidRegistry.WATER && fluidStack.amount <= capacity) {
ItemStack empty = GT_Utility.getContainerForFilledItem(stack, true);
if(aPlayer.inventory.addItemStackToInventory(empty)) {
stack.stackSize--;
fill(fluidStack, true);
return true;
}
}
}
aBaseMetaTileEntity.openGUI(aPlayer);
return true;
}

View file

@ -1,58 +0,0 @@
package gregtech.loaders.misc;
import java.io.File;
import java.util.HashMap;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
public class OreProcessingConfiguration
implements Runnable
{
private final Configuration mConfiguration;
private final HashMap<String, Boolean> mEnabledMaterials;
public OreProcessingConfiguration(File aModConfigurationDirectory)
{
this.mEnabledMaterials = new HashMap<>();
this.mConfiguration =
new Configuration(new File(new File(aModConfigurationDirectory, "GregTech"), "OreProcessing.cfg"));
this.mConfiguration.load();
this.loadConfiguration();
if (this.mConfiguration.hasChanged())
{
this.mConfiguration.save();
}
}
private void loadConfiguration()
{
for (Materials tMaterial : GregTech_API.sGeneratedMaterials)
{
if (tMaterial != null && tMaterial != Materials._NULL)
{
String tMaterialName = tMaterial.name();
boolean tDefaultValue = (tMaterial.mTypes & 8) != 0;
Property tProperty =
this.mConfiguration.get("processores", tMaterialName + "_" + tDefaultValue, tDefaultValue);
this.mEnabledMaterials.put(tMaterialName, tProperty.getBoolean(tDefaultValue));
}
}
}
@Override
public void run()
{
for (String tMaterialName : this.mEnabledMaterials.keySet())
{
if (this.mEnabledMaterials.get(tMaterialName))
{
Materials.valueOf(tMaterialName).mTypes |= 8;
}
else if ((Materials.valueOf(tMaterialName).mTypes & 8) != 0)
{
Materials.valueOf(tMaterialName).mTypes ^= 8;
}
}
}
}

View file

@ -387,8 +387,8 @@ public class GT_Loader_Item_Block_And_Fluid
//manually register fluid containers for vanilla liquids
GT_Mod.gregtechproxy.registerFluidContainer(ItemList.Cell_Water.get(1), ItemList.Cell_Empty.get(1), FluidRegistry.WATER, 10000);
GT_Mod.gregtechproxy.registerFluidContainer(ItemList.Cell_Lava.get(1), ItemList.Cell_Empty.get(1), FluidRegistry.LAVA, 10000);
GT_Mod.gregtechproxy.registerFluidContainer(ItemList.Cell_Water.get(1), ItemList.Cell_Empty.get(1), FluidRegistry.WATER, 1000);
GT_Mod.gregtechproxy.registerFluidContainer(ItemList.Cell_Lava.get(1), ItemList.Cell_Empty.get(1), FluidRegistry.LAVA, 1000);
GT_Mod.gregtechproxy.addFluid("Air", "Air", Materials.Air, 2, 295, ItemList.Cell_Air.get(1), ItemList.Cell_Empty.get(1), 2000);
GT_Mod.gregtechproxy.addFluid("Oxygen", "Oxygen", Materials.Oxygen, 2, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), ItemList.Cell_Empty.get(1), 1000);