aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-05-17 00:01:01 +0900
committerGitHub <noreply@github.com>2023-05-16 17:01:01 +0200
commit04514282c08ebefdb3e68a46db34092f72be2316 (patch)
tree0c9bc99f480f7e7f45a99a55a5b6619ebb5b014b /src/main/java/gtPlusPlus/core/util
parentcd58ff7cd4dc4b5ffe917a24a4b4c6da577f462d (diff)
downloadGT5-Unofficial-04514282c08ebefdb3e68a46db34092f72be2316.tar.gz
GT5-Unofficial-04514282c08ebefdb3e68a46db34092f72be2316.tar.bz2
GT5-Unofficial-04514282c08ebefdb3e68a46db34092f72be2316.zip
Remove a lot of unused classes (#629)
Diffstat (limited to 'src/main/java/gtPlusPlus/core/util')
-rw-r--r--src/main/java/gtPlusPlus/core/util/data/EnumUtils.java45
-rw-r--r--src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java50
-rw-r--r--src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java24
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java30
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java53
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java953
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java45
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java84
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java1338
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java17
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java125
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java55
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java4
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java41
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java25
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java99
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java73
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java83
-rw-r--r--src/main/java/gtPlusPlus/core/util/sys/Log.java25
19 files changed, 0 insertions, 3169 deletions
diff --git a/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java b/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java
deleted file mode 100644
index 71d0c16e14..0000000000
--- a/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gtPlusPlus.core.util.data;
-
-import com.google.common.base.Enums;
-import com.google.common.base.Optional;
-
-public class EnumUtils {
-
- /**
- * Returns the value of an Enum if it exists. If value is not found, case-insensitive search will occur. If value
- * still not found, an IllegalArgumentException is thrown.
- **/
- public static <T extends Enum<T>> T getValue(Class<T> enumeration, String name) {
- Optional<T> j = Enums.getIfPresent(enumeration, name);
- T VALUE;
- if (j == null || !j.isPresent()) {
- VALUE = valueOfIgnoreCase(enumeration, name);
- } else {
- VALUE = j.get();
- }
- return VALUE;
- }
-
- /**
- * Finds the value of the given enumeration by name, case-insensitive. Throws an IllegalArgumentException if no
- * match is found.
- **/
- private static <T extends Enum<T>> T valueOfIgnoreCase(Class<T> enumeration, String name) {
-
- for (T enumValue : enumeration.getEnumConstants()) {
- if (enumValue.name().equalsIgnoreCase(name)) {
- return enumValue;
- }
- }
-
- throw new IllegalArgumentException(
- String.format("There is no value with name '%s' in Enum %s", name, enumeration.getName()));
- }
-
- public static Object getValue(Class class1, String materialName, boolean bool) {
- if (Enum.class.isInstance(class1)) {
- return getValue(class1, materialName);
- }
- return null;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java b/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java
deleted file mode 100644
index 5332c82bf7..0000000000
--- a/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package gtPlusPlus.core.util.data;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Date;
-
-public class LoggingUtils {
-
- public static void profileLog(final Object o) {
- try {
- String content;
- final File file = new File("GregtechTimingsTC.txt");
- // if file doesnt exists, then create it
- if (!file.exists()) {
- file.createNewFile();
- final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
- final BufferedWriter bw = new BufferedWriter(fw);
- bw.write("============================================================");
- bw.write(System.lineSeparator());
- bw.close();
- }
- if (o instanceof String) {
- content = (String) o;
- } else {
- content = o.toString();
- }
- final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
- final BufferedWriter bw = new BufferedWriter(fw);
- bw.write(content);
- bw.write(System.lineSeparator());
- bw.close();
- System.out.println("Data Logged.");
-
- } catch (final IOException e) {
- System.out.println("Data logging failed.");
- }
- }
-
- public static boolean logCurrentSystemTime(final String message) {
- final Date date = new Date(System.currentTimeMillis());
- try {
- profileLog(message + " | " + date.toString());
- return true;
- } catch (final Throwable r) {
- return false;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java b/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java
deleted file mode 100644
index 71634b3af7..0000000000
--- a/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package gtPlusPlus.core.util.data;
-
-import java.nio.ByteBuffer;
-import java.util.UUID;
-
-public class UUIDUtils {
-
- // UUID Methods below created by https://gist.github.com/jeffjohnson9046
- // https://gist.github.com/jeffjohnson9046/c663dd22bbe6bb0b3f5e
-
- public static byte[] getBytesFromUUID(UUID uuid) {
- ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
- bb.putLong(uuid.getMostSignificantBits());
- bb.putLong(uuid.getLeastSignificantBits());
- return bb.array();
- }
-
- public static UUID getUUIDFromBytes(byte[] bytes) {
- ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);
- Long high = byteBuffer.getLong();
- Long low = byteBuffer.getLong();
- return new UUID(high, low);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java
deleted file mode 100644
index 56c93d4a4d..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import gtPlusPlus.preloader.CORE_Preloader;
-
-public class DEBUG_INIT {
-
- public static void registerBlocks() {
- // Debug Loading
- if (CORE_Preloader.DEBUG_MODE) {}
- }
-
- public static void registerItems() {
- /*
- * ModItems.itemDebugShapeSpawner = new DEBUG_ITEM_ShapeSpawner("itemDebugShapeSpawner",
- * AddToCreativeTab.tabMisc, 1, 500); GameRegistry.registerItem(ModItems.itemDebugShapeSpawner,
- * "itemDebugShapeSpawner"); ModItems.itemBedLocator_Base = new BedLocator_Base("itemBedLocator_Base");
- * GameRegistry.registerItem(ModItems.itemBedLocator_Base, "itemBedLocator_Base");
- * ModItems.itemBaseItemWithCharge = new BaseItemWithCharge("itemBaseItemWithCharge", 0, 1000);
- * GameRegistry.registerItem(ModItems.itemBaseItemWithCharge, "itemBaseItemWithCharge");
- */
- }
-
- public static void registerTEs() {}
-
- public static void registerMisc() {}
-
- public static void registerHandlers() {
- // MinecraftForge.EVENT_BUS.register(new DEBUG_ScreenOverlay());
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java
deleted file mode 100644
index 07f8d6385a..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import static net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK;
-
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.event.entity.player.PlayerInteractEvent;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.BaseItemGeneric;
-
-public class DEBUG_ITEM_ShapeSpawner extends BaseItemGeneric {
-
- public DEBUG_ITEM_ShapeSpawner(String s, CreativeTabs c, int stackSize, int maxDmg) {
- super(s, c, stackSize, maxDmg);
- s = "itemDebugShapeSpawner";
- c = AddToCreativeTab.tabMisc;
- stackSize = 1;
- maxDmg = 500;
- }
-
- @Override
- public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer player) {
-
- if (!world.isRemote) {
- Logger.INFO("Constructing the shape for the " + "VACUUM FREEZER");
- final Thread thread = new Thread(new DEBUG_TimerThread(world, player));
- thread.start();
- }
- return stack;
- }
-
- @SubscribeEvent
- public void playerInteractEventHandler(final PlayerInteractEvent event) {
- if (event.isCanceled() || event.world.isRemote || (event.action != RIGHT_CLICK_BLOCK)) {
- return;
- }
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(EnumChatFormatting.GOLD + "For Testing Gregtech Shapes!");
- super.addInformation(stack, aPlayer, list, bool);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java
deleted file mode 100644
index 0df691624f..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java
+++ /dev/null
@@ -1,953 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import static gregtech.api.enums.GT_Values.V;
-
-import java.util.ArrayList;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.gui.modularui.GT_UIInfos;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-
-public abstract class DEBUG_MULTIBLOCK_ShapeSpawner extends MetaTileEntity {
-
- public static boolean disableMaintenance;
- public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false,
- mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false;
- public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0,
- mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0;
- public ItemStack[] mOutputItems = null;
- public FluidStack[] mOutputFluids = null;
- public ArrayList<GT_MetaTileEntity_Hatch_Input> mInputHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Output> mOutputHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_InputBus> mInputBusses = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_OutputBus> mOutputBusses = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Dynamo> mDynamoHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<>();
-
- public DEBUG_MULTIBLOCK_ShapeSpawner(final int aID, final String aName, final String aNameRegional) {
- super(aID, aName, aNameRegional, 2);
- DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
- }
-
- public DEBUG_MULTIBLOCK_ShapeSpawner(final String aName) {
- super(aName, 2);
- DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
- }
-
- public static boolean isValidMetaTileEntity(final MetaTileEntity aMetaTileEntity) {
- return (aMetaTileEntity.getBaseMetaTileEntity() != null)
- && (aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity)
- && !aMetaTileEntity.getBaseMetaTileEntity().isDead();
- }
-
- @Override
- public boolean allowCoverOnSide(final ForgeDirection side, final GT_ItemStack aCoverID) {
- return side != this.getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public boolean isSimpleMachine() {
- return false;
- }
-
- @Override
- public boolean isFacingValid(final ForgeDirection facing) {
- return true;
- }
-
- @Override
- public boolean isAccessAllowed(final EntityPlayer aPlayer) {
- return true;
- }
-
- @Override
- public boolean isValidSlot(final int aIndex) {
- return aIndex > 0;
- }
-
- @Override
- public int getProgresstime() {
- return this.mProgresstime;
- }
-
- @Override
- public int maxProgresstime() {
- return this.mMaxProgresstime;
- }
-
- @Override
- public int increaseProgress(final int aProgress) {
- return aProgress;
- }
-
- @Override
- public void saveNBTData(final NBTTagCompound aNBT) {
- aNBT.setInteger("mEUt", this.mEUt);
- aNBT.setInteger("mProgresstime", this.mProgresstime);
- aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime);
- aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease);
- aNBT.setInteger("mEfficiency", this.mEfficiency);
- aNBT.setInteger("mPollution", this.mPollution);
- aNBT.setInteger("mRuntime", this.mRuntime);
-
- if (this.mOutputItems != null) {
- for (int i = 0; i < this.mOutputItems.length; i++) {
- if (this.mOutputItems[i] != null) {
- final NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputItems[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputItem" + i, tNBT);
- }
- }
- }
- if (this.mOutputFluids != null) {
- for (int i = 0; i < this.mOutputFluids.length; i++) {
- if (this.mOutputFluids[i] != null) {
- final NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputFluids[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputFluids" + i, tNBT);
- }
- }
- }
-
- aNBT.setBoolean("mWrench", this.mWrench);
- aNBT.setBoolean("mScrewdriver", this.mScrewdriver);
- aNBT.setBoolean("mSoftHammer", this.mSoftHammer);
- aNBT.setBoolean("mHardHammer", this.mHardHammer);
- aNBT.setBoolean("mSolderingTool", this.mSolderingTool);
- aNBT.setBoolean("mCrowbar", this.mCrowbar);
- }
-
- @Override
- public void loadNBTData(final NBTTagCompound aNBT) {
- this.mEUt = aNBT.getInteger("mEUt");
- this.mProgresstime = aNBT.getInteger("mProgresstime");
- this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- if (this.mMaxProgresstime > 0) {
- this.mRunningOnLoad = true;
- }
- this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
- this.mEfficiency = aNBT.getInteger("mEfficiency");
- this.mPollution = aNBT.getInteger("mPollution");
- this.mRuntime = aNBT.getInteger("mRuntime");
- this.mOutputItems = new ItemStack[this.getAmountOfOutputs()];
- for (int i = 0; i < this.mOutputItems.length; i++) {
- this.mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
- }
- this.mOutputFluids = new FluidStack[this.getAmountOfOutputs()];
- for (int i = 0; i < this.mOutputFluids.length; i++) {
- this.mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
- }
- this.mWrench = aNBT.getBoolean("mWrench");
- this.mScrewdriver = aNBT.getBoolean("mScrewdriver");
- this.mSoftHammer = aNBT.getBoolean("mSoftHammer");
- this.mHardHammer = aNBT.getBoolean("mHardHammer");
- this.mSolderingTool = aNBT.getBoolean("mSolderingTool");
- this.mCrowbar = aNBT.getBoolean("mCrowbar");
- }
-
- @Override
- public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
- GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
- return true;
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return 2;
- }
-
- @Override
- public void onMachineBlockUpdate() {
- this.mUpdate = 50;
- }
-
- @Override
- public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- if (this.mEfficiency < 0) {
- this.mEfficiency = 0;
- }
- if ((--this.mUpdate == 0) || (--this.mStartUpCheck == 0)) {
- this.mInputHatches.clear();
- this.mInputBusses.clear();
- this.mOutputHatches.clear();
- this.mOutputBusses.clear();
- this.mDynamoHatches.clear();
- this.mEnergyHatches.clear();
- this.mMufflerHatches.clear();
- this.mMaintenanceHatches.clear();
- this.mMachine = this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]);
- }
- if (this.mStartUpCheck < 0) {
- if (this.mMachine) {
- for (final GT_MetaTileEntity_Hatch_Maintenance tHatch : this.mMaintenanceHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (!DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance) {
- if (tHatch.mWrench) {
- this.mWrench = true;
- }
- if (tHatch.mScrewdriver) {
- this.mScrewdriver = true;
- }
- if (tHatch.mSoftHammer) {
- this.mSoftHammer = true;
- }
- if (tHatch.mHardHammer) {
- this.mHardHammer = true;
- }
- if (tHatch.mSolderingTool) {
- this.mSolderingTool = true;
- }
- if (tHatch.mCrowbar) {
- this.mCrowbar = true;
- }
- } else {
- this.mWrench = true;
- this.mScrewdriver = true;
- this.mSoftHammer = true;
- this.mHardHammer = true;
- this.mSolderingTool = true;
- this.mCrowbar = true;
- }
-
- tHatch.mWrench = false;
- tHatch.mScrewdriver = false;
- tHatch.mSoftHammer = false;
- tHatch.mHardHammer = false;
- tHatch.mSolderingTool = false;
- tHatch.mCrowbar = false;
- }
- }
- if (this.getRepairStatus() > 0) {
- if ((this.mMaxProgresstime > 0) && this.doRandomMaintenanceDamage()) {
- if (this.onRunningTick(this.mInventory[1])) {
- if (!this.polluteEnvironment(this.getPollutionPerTick(this.mInventory[1]))) {
- this.stopMachine();
- }
- if ((this.mMaxProgresstime > 0) && (++this.mProgresstime >= this.mMaxProgresstime)) {
- if (this.mOutputItems != null) {
- for (final ItemStack tStack : this.mOutputItems) {
- if (tStack != null) {
- try {
- GT_Mod.achievements.issueAchivementHatch(
- aBaseMetaTileEntity.getWorld().getPlayerEntityByName(
- aBaseMetaTileEntity.getOwnerName()),
- tStack);
- } catch (final Exception e) {}
- this.addOutput(tStack);
- }
- }
- }
- if ((this.mOutputFluids != null) && (this.mOutputFluids.length == 1)) {
- for (final FluidStack tStack : this.mOutputFluids) {
- if (tStack != null) {
- this.addOutput(tStack);
- }
- }
- } else if ((this.mOutputFluids != null) && (this.mOutputFluids.length > 1)) {
- this.addFluidOutputs(this.mOutputFluids);
- }
- this.mEfficiency = Math.max(
- 0,
- Math.min(
- this.mEfficiency + this.mEfficiencyIncrease,
- this.getMaxEfficiency(this.mInventory[1])
- - ((this.getIdealStatus() - this.getRepairStatus())
- * 1000)));
- this.mOutputItems = null;
- this.mProgresstime = 0;
- this.mMaxProgresstime = 0;
- this.mEfficiencyIncrease = 0;
- if (aBaseMetaTileEntity.isAllowedToWork()) {
- this.checkRecipe(this.mInventory[1]);
- }
- if ((this.mOutputFluids != null) && (this.mOutputFluids.length > 0)) {
- if (this.mOutputFluids.length > 1) {
- GT_Mod.achievements.issueAchievement(
- aBaseMetaTileEntity.getWorld()
- .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
- "oilplant");
- }
- }
- }
- }
- } else {
- if (((aTick % 100) == 0) || aBaseMetaTileEntity.hasWorkJustBeenEnabled()
- || aBaseMetaTileEntity.hasInventoryBeenModified()) {
-
- if (aBaseMetaTileEntity.isAllowedToWork()) {
- this.checkRecipe(this.mInventory[1]);
- }
- if (this.mMaxProgresstime <= 0) {
- this.mEfficiency = Math.max(0, this.mEfficiency - 1000);
- }
- }
- }
- } else {
- this.stopMachine();
- }
- } else {
- this.stopMachine();
- }
- }
- aBaseMetaTileEntity.setErrorDisplayID(
- (aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (this.mWrench ? 0 : 1)
- | (this.mScrewdriver ? 0 : 2)
- | (this.mSoftHammer ? 0 : 4)
- | (this.mHardHammer ? 0 : 8)
- | (this.mSolderingTool ? 0 : 16)
- | (this.mCrowbar ? 0 : 32)
- | (this.mMachine ? 0 : 64));
- aBaseMetaTileEntity.setActive(this.mMaxProgresstime > 0);
- }
- }
-
- public boolean polluteEnvironment(final int aPollutionLevel) {
- this.mPollution += aPollutionLevel;
- for (final GT_MetaTileEntity_Hatch_Muffler tHatch : this.mMufflerHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (this.mPollution >= 10000) {
- if (tHatch.polluteEnvironment()) {
- this.mPollution -= 10000;
- }
- } else {
- break;
- }
- }
- }
- return this.mPollution < 10000;
- }
-
- /**
- * Called every tick the Machine runs
- */
- public boolean onRunningTick(final ItemStack aStack) {
- if (this.mEUt > 0) {
- this.addEnergyOutput(((long) this.mEUt * this.mEfficiency) / 10000);
- return true;
- }
- if (this.mEUt < 0) {
- if (!this.drainEnergyInput(((long) -this.mEUt * 10000) / Math.max(1000, this.mEfficiency))) {
- this.stopMachine();
- return false;
- }
- }
- return true;
- }
-
- /**
- * Checks if this is a Correct Machine Part for this kind of Machine (Turbine Rotor for example)
- */
- public abstract boolean isCorrectMachinePart(ItemStack aStack);
-
- /**
- * Checks the Recipe
- */
- public abstract boolean checkRecipe(ItemStack aStack);
-
- /**
- * Checks the Machine. You have to assign the MetaTileEntities for the Hatches here.
- */
- public abstract boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack);
-
- /**
- * Gets the maximum Efficiency that spare Part can get (0 - 10000)
- */
- public abstract int getMaxEfficiency(ItemStack aStack);
-
- /**
- * Gets the pollution this Device outputs to a Muffler per tick (10000 = one Pullution Block)
- */
- public abstract int getPollutionPerTick(ItemStack aStack);
-
- /**
- * Gets the damage to the ItemStack, usually 0 or 1.
- */
- public abstract int getDamageToComponent(ItemStack aStack);
-
- /**
- * Gets the Amount of possibly outputted Items for loading the Output Stack Array from NBT. This should be the
- * largest Amount that can ever happen legitimately.
- */
- public abstract int getAmountOfOutputs();
-
- /**
- * If it explodes when the Component has to be replaced.
- */
- public abstract boolean explodesOnComponentBreak(ItemStack aStack);
-
- public void stopMachine() {
- this.mOutputItems = null;
- this.mEUt = 0;
- this.mEfficiency = 0;
- this.mProgresstime = 0;
- this.mMaxProgresstime = 0;
- this.mEfficiencyIncrease = 0;
- this.getBaseMetaTileEntity().disableWorking();
- }
-
- public int getRepairStatus() {
- return (this.mWrench ? 1 : 0) + (this.mScrewdriver ? 1 : 0)
- + (this.mSoftHammer ? 1 : 0)
- + (this.mHardHammer ? 1 : 0)
- + (this.mSolderingTool ? 1 : 0)
- + (this.mCrowbar ? 1 : 0);
- }
-
- public int getIdealStatus() {
- return 6;
- }
-
- public boolean doRandomMaintenanceDamage() {
- if (!this.isCorrectMachinePart(this.mInventory[1]) || (this.getRepairStatus() == 0)) {
- this.stopMachine();
- return false;
- }
- if (this.mRuntime++ > 1000) {
- this.mRuntime = 0;
- if (this.getBaseMetaTileEntity().getRandomNumber(6000) == 0) {
- switch (this.getBaseMetaTileEntity().getRandomNumber(6)) {
- case 0:
- this.mWrench = false;
- break;
- case 1:
- this.mScrewdriver = false;
- break;
- case 2:
- this.mSoftHammer = false;
- break;
- case 3:
- this.mHardHammer = false;
- break;
- case 4:
- this.mSolderingTool = false;
- break;
- case 5:
- this.mCrowbar = false;
- break;
- }
- }
- if ((this.mInventory[1] != null) && (this.getBaseMetaTileEntity().getRandomNumber(2) == 0)
- && !this.mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) {
- if (this.mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) {
- final NBTTagCompound tNBT = this.mInventory[1].getTagCompound();
- if (tNBT != null) {
- NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");
- if (!tNBT.getBoolean("mDis")) {
- tNBT2 = new NBTTagCompound();
- final Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[1]);
- final ItemStack tTurbine = GT_OreDictUnificator.get(OrePrefixes.turbineBlade, tMaterial, 1);
- final int i = this.mInventory[1].getItemDamage();
- if (i == 170) {
- ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 172) {
- ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 174) {
- ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 176) {
- ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- }
- tNBT.setTag("GT.CraftingComponents", tNBT2);
- tNBT.setBoolean("mDis", true);
- this.mInventory[1].setTagCompound(tNBT);
- }
- }
-
- ((GT_MetaGenerated_Tool) this.mInventory[1].getItem())
- .doDamage(this.mInventory[1], (long) Math.min(this.mEUt / 5, Math.pow(this.mEUt, 0.7)));
- if (this.mInventory[1].stackSize == 0) {
- this.mInventory[1] = null;
- }
- }
- }
- }
- return true;
- }
-
- public void explodeMultiblock() {
- this.mInventory[1] = null;
- for (final MetaTileEntity tTileEntity : this.mInputBusses) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mOutputBusses) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mInputHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mOutputHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mDynamoHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mMufflerHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mEnergyHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mMaintenanceHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- this.getBaseMetaTileEntity().doExplosion(V[8]);
- }
-
- public boolean addEnergyOutput(final long aEU) {
- if (aEU <= 0) {
- return true;
- }
- for (final GT_MetaTileEntity_Hatch_Dynamo tHatch : this.mDynamoHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, false)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public long getMaxInputVoltage() {
- long rVoltage = 0;
- for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage();
- }
- }
- return rVoltage;
- }
-
- public boolean drainEnergyInput(final long aEU) {
- if (aEU <= 0) {
- return true;
- }
- for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public boolean addOutput(final FluidStack aLiquid) {
- if (aLiquid == null) {
- return false;
- }
- final FluidStack tLiquid = aLiquid.copy();
- for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) {
- if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam()
- : tHatch.outputsLiquids()) {
- final int tAmount = tHatch.fill(tLiquid, false);
- if (tAmount >= tLiquid.amount) {
- return tHatch.fill(tLiquid, true) >= tLiquid.amount;
- } else if (tAmount > 0) {
- tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true);
- }
- }
- }
- return false;
- }
-
- private void addFluidOutputs(final FluidStack[] mOutputFluids2) {
- for (int i = 0; i < mOutputFluids2.length; i++) {
- if ((this.mOutputHatches.size() > i) && (this.mOutputHatches.get(i) != null)
- && (mOutputFluids2[i] != null)
- && isValidMetaTileEntity(this.mOutputHatches.get(i))) {
- this.mOutputHatches.get(i).fill(mOutputFluids2[i], true);
- }
- }
- }
-
- public boolean depleteInput(final FluidStack aLiquid) {
- if (aLiquid == null) {
- return false;
- }
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- FluidStack tLiquid = tHatch.getFluid();
- if ((tLiquid != null) && tLiquid.isFluidEqual(aLiquid)) {
- tLiquid = tHatch.drain(aLiquid.amount, false);
- if ((tLiquid != null) && (tLiquid.amount >= aLiquid.amount)) {
- tLiquid = tHatch.drain(aLiquid.amount, true);
- return (tLiquid != null) && (tLiquid.amount >= aLiquid.amount);
- }
- }
- }
- }
- return false;
- }
-
- public boolean addOutput(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) {
- return false;
- }
- aStack = GT_Utility.copy(aStack);
- // FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
- // if (aLiquid == null) {
- for (final GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getSizeInventory() - 1; i >= 0; i--) {
- if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, aStack)) {
- return true;
- }
- }
- }
- }
- for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) {
- if (isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) {
- if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, aStack)) {
- return true;
- }
- }
- }
- // }else {
- // for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
- // if (isValidMetaTileEntity(tHatch) &&
- // GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) {
- // int tAmount = tHatch.fill(aLiquid, false);
- // if (tAmount >= aLiquid.amount) {
- // return tHatch.fill(aLiquid, true) >= aLiquid.amount;
- // }
- // }
- // }
- // }
- return false;
- }
-
- public boolean depleteInput(final ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) {
- return false;
- }
- final FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
- if (aLiquid != null) {
- return this.depleteInput(aLiquid);
- }
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
- tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
- return true;
- }
- }
- }
- }
- for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
- tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
- return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- public ArrayList<ItemStack> getStoredOutputs() {
- final ArrayList<ItemStack> rList = new ArrayList<>();
- for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1));
- }
- }
- for (final GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- return rList;
- }
-
- public ArrayList<FluidStack> getStoredFluids() {
- final ArrayList<FluidStack> rList = new ArrayList<>();
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch) && (tHatch.getFillableStack() != null)) {
- rList.add(tHatch.getFillableStack());
- }
- }
- return rList;
- }
-
- public ArrayList<ItemStack> getStoredInputs() {
- final ArrayList<ItemStack> rList = new ArrayList<>();
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch) && (tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null)) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0));
- }
- }
- for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- }
- return rList;
- }
-
- public GT_Recipe_Map getRecipeMap() {
- return null;
- }
-
- public void updateSlots() {
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- tHatch.updateSlots();
- }
- }
- for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- tHatch.updateSlots();
- }
- }
- }
-
- public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
- return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addMaintenanceToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addEnergyInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addMufflerToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addOutputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
- }
- return false;
- }
-
- @Override
- public String[] getInfoData() {
- return new String[] { "Progress:", (this.mProgresstime / 20) + "secs", (this.mMaxProgresstime / 20) + "secs",
- "Efficiency:", (this.mEfficiency / 100.0F) + "%", "Problems:",
- "" + (this.getIdealStatus() - this.getRepairStatus()) };
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean useModularUI() {
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java
deleted file mode 100644
index 16b6979dcb..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.ScaledResolution;
-import net.minecraft.item.Item;
-import net.minecraftforge.client.event.RenderGameOverlayEvent;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class DEBUG_ScreenOverlay extends Gui {
-
- int width, height;
- Minecraft mc = Minecraft.getMinecraft();
-
- @SubscribeEvent
- public void eventHandler(final RenderGameOverlayEvent.Text event) {
-
- // if (mc.thePlayer.getHeldItem().equals(ModItems.itemStaballoyPickaxe)){
- final ScaledResolution res = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
- final FontRenderer fontRender = this.mc.fontRenderer;
- this.width = res.getScaledWidth();
- this.height = res.getScaledHeight();
- Minecraft.getMinecraft().entityRenderer.setupOverlayRendering();
- final String str = "Words";
- Item heldItem = null;
-
- try {
- heldItem = this.mc.thePlayer.getHeldItem().getItem();
-
- if (heldItem != null) {
- /*
- * if (heldItem instanceof StaballoyPickaxe){ int dmg =((StaballoyPickaxe)
- * heldItem).getDamage(((StaballoyPickaxe) heldItem).thisPickaxe); ((StaballoyPickaxe)
- * heldItem).checkFacing(((StaballoyPickaxe) heldItem).localWorld); str = "DAMAGE: "+ dmg
- * +" | FACING: "+((StaballoyPickaxe) heldItem).FACING+" | FACING_HORIZONTAL: "+((StaballoyPickaxe)
- * heldItem).FACING_HORIZONTAL+" | LOOKING DIRECTION: "+((StaballoyPickaxe) heldItem).lookingDirection;
- * drawString(fontRender, str, (this.width - fontRender.getStringWidth(str)) / 2, this.height / 10,
- * 0xFFAA00); }
- */
- }
- } catch (final NullPointerException e) {}
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java
deleted file mode 100644
index fa53c290fc..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import java.util.concurrent.TimeUnit;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import gtPlusPlus.api.objects.Logger;
-
-public class DEBUG_TimerThread implements Runnable {
-
- private final World world;
- private final EntityPlayer player;
-
- public DEBUG_TimerThread(final World WORLD, final EntityPlayer PLAYER) {
- this.world = WORLD;
- this.player = PLAYER;
- }
-
- @Override
- public void run() {
- int xDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posX).offsetX;
- int zDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posZ).offsetZ;
-
- final int stepX = Minecraft.getMinecraft().objectMouseOver.blockX;
- final int stepY = Minecraft.getMinecraft().objectMouseOver.blockY;
- final int stepZ = Minecraft.getMinecraft().objectMouseOver.blockZ;
- Logger.INFO(
- "Clicked on a Block @ " + "[X:"
- + stepX
- + "][Y:"
- + stepY
- + "][Z:"
- + stepZ
- + "]"
- + " with xDir:"
- + xDir
- + " zDir:"
- + zDir);
- this.world.setBlock(stepX, stepY, stepZ, Blocks.bedrock, 0, 3);
- Logger.INFO("Makng it Bedrock for future investment.");
- // for (int i = -1; i <= 1; i++) {
- // stepX = stepX+i;
- for (int i = stepX - 1; i <= (stepX + 1); i++) {
- for (int j = stepZ - 1; j <= (stepZ + 1); j++) {
- for (int h = stepY - 1; h <= (stepY + 1); h++) {
-
- xDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posX).offsetX;
- zDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posZ).offsetZ;
-
- // for (int j = -1; j <= 1; j++) {
- // stepZ = stepZ+j;
- // for (int h = -1; h <= 1; h++) {
- // stepY = stepY+h;
- Logger.INFO(
- "Placing Block @ " + "[X:"
- + i
- + "][Y:"
- + h
- + "][Z:"
- + j
- + "]"
- + " with xDir:"
- + xDir
- + " zDir:"
- + zDir);
- if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
- this.world.setBlock(i, h, j, Blocks.stone, 0, 3);
- } else {
- Logger.INFO("Not even sure what this is for, but I got here.");
- }
- try {
- TimeUnit.MILLISECONDS.sleep(500);
- } catch (final InterruptedException e1) {
- e1.printStackTrace();
- }
- }
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java b/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java
deleted file mode 100644
index e774824fbf..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java
+++ /dev/null
@@ -1,1338 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import java.nio.ByteBuffer;
-
-import org.lwjgl.BufferUtils;
-import org.lwjgl.opengl.GL11;
-
-/**
- * User: The Grey Ghost Date: 9/02/14
- */
-public class UtilityGL11Debug {
-
- public class GLproperty {
-
- public GLproperty(final int init_gLconstant, final String init_name, final String init_description,
- final String init_category, final String init_fetchCommand) {
- this.gLconstant = init_gLconstant;
- this.name = init_name;
- this.description = init_description;
- this.category = init_category;
- this.fetchCommand = init_fetchCommand;
- }
-
- public int gLconstant;
- public String name;
- public String description;
- public String category;
- public String fetchCommand;
- }
-
- public static UtilityGL11Debug instance = new UtilityGL11Debug();
-
- public GLproperty[] propertyList = {
- new GLproperty(GL11.GL_CURRENT_COLOR, "GL_CURRENT_COLOR", "Current color", "current", "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_INDEX,
- "GL_CURRENT_INDEX",
- "Current color index",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_TEXTURE_COORDS,
- "GL_CURRENT_TEXTURE_COORDS",
- "Current texture coordinates",
- "current",
- "glGetFloatv()"),
- new GLproperty(GL11.GL_CURRENT_NORMAL, "GL_CURRENT_NORMAL", "Current normal", "current", "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_POSITION,
- "GL_CURRENT_RASTER_POSITION",
- "Current raster position",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_DISTANCE,
- "GL_CURRENT_RASTER_DISTANCE",
- "Current raster distance",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_COLOR,
- "GL_CURRENT_RASTER_COLOR",
- "Color associated with raster position",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_INDEX,
- "GL_CURRENT_RASTER_INDEX",
- "Color index associated with raster position",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_TEXTURE_COORDS,
- "GL_CURRENT_RASTER_TEXTURE_COORDS",
- "Texture coordinates associated with raster position",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_POSITION_VALID,
- "GL_CURRENT_RASTER_POSITION_VALID",
- "Raster position valid bit",
- "current",
- "glGetBooleanv()"),
- new GLproperty(GL11.GL_EDGE_FLAG, "GL_EDGE_FLAG", "Edge flag", "current", "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY,
- "GL_VERTEX_ARRAY",
- "Vertex array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY_SIZE,
- "GL_VERTEX_ARRAY_SIZE",
- "Coordinates per vertex",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY_TYPE,
- "GL_VERTEX_ARRAY_TYPE",
- "Type of vertex coordinates",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY_STRIDE,
- "GL_VERTEX_ARRAY_STRIDE",
- "Stride between vertices",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY_POINTER,
- "GL_VERTEX_ARRAY_POINTER",
- "Pointer to the vertex array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_NORMAL_ARRAY,
- "GL_NORMAL_ARRAY",
- "Normal array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_NORMAL_ARRAY_TYPE,
- "GL_NORMAL_ARRAY_TYPE",
- "Type of normal coordinates",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_NORMAL_ARRAY_STRIDE,
- "GL_NORMAL_ARRAY_STRIDE",
- "Stride between normals",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_NORMAL_ARRAY_POINTER,
- "GL_NORMAL_ARRAY_POINTER",
- "Pointer to the normal array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY,
- "GL_COLOR_ARRAY",
- "RGBA color array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY_SIZE,
- "GL_COLOR_ARRAY_SIZE",
- "Colors per vertex",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY_TYPE,
- "GL_COLOR_ARRAY_TYPE",
- "Type of color components",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY_STRIDE,
- "GL_COLOR_ARRAY_STRIDE",
- "Stride between colors",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY_POINTER,
- "GL_COLOR_ARRAY_POINTER",
- "Pointer to the color array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_INDEX_ARRAY,
- "GL_INDEX_ARRAY",
- "Color-index array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_INDEX_ARRAY_TYPE,
- "GL_INDEX_ARRAY_TYPE",
- "Type of color indices",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_ARRAY_STRIDE,
- "GL_INDEX_ARRAY_STRIDE",
- "Stride between color indices",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_ARRAY_POINTER,
- "GL_INDEX_ARRAY_POINTER",
- "Pointer to the index array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY,
- "GL_TEXTURE_COORD_ARRAY",
- "Texture coordinate array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY_SIZE,
- "GL_TEXTURE_COORD_ARRAY_SIZE",
- "Texture coordinates per element",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY_TYPE,
- "GL_TEXTURE_COORD_ARRAY_TYPE",
- "Type of texture coordinates",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY_STRIDE,
- "GL_TEXTURE_COORD_ARRAY_STRIDE",
- "Stride between texture coordinates",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY_POINTER,
- "GL_TEXTURE_COORD_ARRAY_POINTER",
- "Pointer to the texture coordinate array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_EDGE_FLAG_ARRAY,
- "GL_EDGE_FLAG_ARRAY",
- "Edge flag array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_EDGE_FLAG_ARRAY_STRIDE,
- "GL_EDGE_FLAG_ARRAY_STRIDE",
- "Stride between edge flags",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_EDGE_FLAG_ARRAY_POINTER,
- "GL_EDGE_FLAG_ARRAY_POINTER",
- "Pointer to the edge flag array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_MODELVIEW_MATRIX,
- "GL_MODELVIEW_MATRIX",
- "Modelview matrix stack",
- "matrix",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_PROJECTION_MATRIX,
- "GL_PROJECTION_MATRIX",
- "Projection matrix stack",
- "matrix",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_TEXTURE_MATRIX,
- "GL_TEXTURE_MATRIX",
- "Texture matrix stack",
- "matrix",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_VIEWPORT,
- "GL_VIEWPORT",
- "Viewport origin and extent",
- "viewport",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_DEPTH_RANGE,
- "GL_DEPTH_RANGE",
- "Depth range near and far",
- "viewport",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_MODELVIEW_STACK_DEPTH,
- "GL_MODELVIEW_STACK_DEPTH",
- "Modelview matrix stack pointer",
- "matrix",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PROJECTION_STACK_DEPTH,
- "GL_PROJECTION_STACK_DEPTH",
- "Projection matrix stack pointer",
- "matrix",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_STACK_DEPTH,
- "GL_TEXTURE_STACK_DEPTH",
- "Texture matrix stack pointer",
- "matrix",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MATRIX_MODE,
- "GL_MATRIX_MODE",
- "Current matrix mode",
- "transform",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_NORMALIZE,
- "GL_NORMALIZE",
- "Current normal normalization on/off",
- "transform/ enable",
- "glIsEnabled()"),
- new GLproperty(GL11.GL_FOG_COLOR, "GL_FOG_COLOR", "Fog color", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_INDEX, "GL_FOG_INDEX", "Fog index", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_DENSITY, "GL_FOG_DENSITY", "Exponential fog density", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_START, "GL_FOG_START", "Linear fog start", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_END, "GL_FOG_END", "Linear fog end", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_MODE, "GL_FOG_MODE", "Fog mode", "fog", "glGetIntegerv()"),
- new GLproperty(GL11.GL_FOG, "GL_FOG", "True if fog enabled", "fog/enable", "glIsEnabled()"),
- new GLproperty(
- GL11.GL_SHADE_MODEL,
- "GL_SHADE_MODEL",
- "glShadeModel() setting",
- "lighting",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LIGHTING,
- "GL_LIGHTING",
- "True if lighting is enabled",
- "lighting/e nable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_MATERIAL,
- "GL_COLOR_MATERIAL",
- "True if color tracking is enabled",
- "lighting",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_MATERIAL_PARAMETER,
- "GL_COLOR_MATERIAL_PARAMETER",
- "Material properties tracking current color",
- "lighting",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_MATERIAL_FACE,
- "GL_COLOR_MATERIAL_FACE",
- "Face(s) affected by color tracking",
- "lighting",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_AMBIENT, "GL_AMBIENT", "Ambient material color", "lighting", "glGetMaterialfv()"),
- new GLproperty(GL11.GL_DIFFUSE, "GL_DIFFUSE", "Diffuse material color", "lighting", "glGetMaterialfv()"),
- new GLproperty(GL11.GL_SPECULAR, "GL_SPECULAR", "Specular material color", "lighting", "glGetMaterialfv()"),
- new GLproperty(GL11.GL_EMISSION, "GL_EMISSION", "Emissive material color", "lighting", "glGetMaterialfv()"),
- new GLproperty(
- GL11.GL_SHININESS,
- "GL_SHININESS",
- "Specular exponent of material",
- "lighting",
- "glGetMaterialfv()"),
- new GLproperty(
- GL11.GL_LIGHT_MODEL_AMBIENT,
- "GL_LIGHT_MODEL_AMBIENT",
- "Ambient scene color",
- "lighting",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_LIGHT_MODEL_LOCAL_VIEWER,
- "GL_LIGHT_MODEL_LOCAL_VIEWER",
- "Viewer is local",
- "lighting",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_LIGHT_MODEL_TWO_SIDE,
- "GL_LIGHT_MODEL_TWO_SIDE",
- "Use two-sided lighting",
- "lighting",
- "glGetBooleanv()"),
- new GLproperty(GL11.GL_AMBIENT, "GL_AMBIENT", "Ambient intensity of light i", "lighting", "glGetLightfv()"),
- new GLproperty(GL11.GL_DIFFUSE, "GL_DIFFUSE", "Diffuse intensity of light i", "lighting", "glGetLightfv()"),
- new GLproperty(
- GL11.GL_SPECULAR,
- "GL_SPECULAR",
- "Specular intensity of light i",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(GL11.GL_POSITION, "GL_POSITION", "Position of light i", "lighting", "glGetLightfv()"),
- new GLproperty(
- GL11.GL_CONSTANT_ATTENUATION,
- "GL_CONSTANT_ATTENUATION",
- "Constant attenuation factor",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_LINEAR_ATTENUATION,
- "GL_LINEAR_ATTENUATION",
- "Linear attenuation factor",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_QUADRATIC_ATTENUATION,
- "GL_QUADRATIC_ATTENUATION",
- "Quadratic attenuation factor",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_SPOT_DIRECTION,
- "GL_SPOT_DIRECTION",
- "Spotlight direction of light i",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_SPOT_EXPONENT,
- "GL_SPOT_EXPONENT",
- "Spotlight exponent of light i",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_SPOT_CUTOFF,
- "GL_SPOT_CUTOFF",
- "Spotlight angle of light i",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(GL11.GL_LIGHT0, "GL_LIGHT0", "True if light 0 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT1, "GL_LIGHT1", "True if light 1 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT2, "GL_LIGHT2", "True if light 2 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT3, "GL_LIGHT3", "True if light 3 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT4, "GL_LIGHT4", "True if light 4 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT5, "GL_LIGHT5", "True if light 5 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT6, "GL_LIGHT6", "True if light 6 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT7, "GL_LIGHT7", "True if light 7 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_INDEXES,
- "GL_COLOR_INDEXES",
- "ca, cd, and cs for color-index lighting",
- "lighting/e nable",
- "glGetMaterialfv()"),
- new GLproperty(GL11.GL_POINT_SIZE, "GL_POINT_SIZE", "Point size", "point", "glGetFloatv()"),
- new GLproperty(
- GL11.GL_POINT_SMOOTH,
- "GL_POINT_SMOOTH",
- "Point antialiasing on",
- "point/enable",
- "glIsEnabled()"),
- new GLproperty(GL11.GL_LINE_WIDTH, "GL_LINE_WIDTH", "Line width", "line", "glGetFloatv()"),
- new GLproperty(
- GL11.GL_LINE_SMOOTH,
- "GL_LINE_SMOOTH",
- "Line antialiasing on",
- "line/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_LINE_STIPPLE_PATTERN,
- "GL_LINE_STIPPLE_PATTERN",
- "Line stipple",
- "line",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LINE_STIPPLE_REPEAT,
- "GL_LINE_STIPPLE_REPEAT",
- "Line stipple repeat",
- "line",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LINE_STIPPLE,
- "GL_LINE_STIPPLE",
- "Line stipple enable",
- "line/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_CULL_FACE,
- "GL_CULL_FACE",
- "Polygon culling enabled",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_CULL_FACE_MODE,
- "GL_CULL_FACE_MODE",
- "Cull front-/back-facing polygons",
- "polygon",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_FRONT_FACE,
- "GL_FRONT_FACE",
- "Polygon front-face CW/CCW indicator",
- "polygon",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_POLYGON_SMOOTH,
- "GL_POLYGON_SMOOTH",
- "Polygon antialiasing on",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_POLYGON_MODE,
- "GL_POLYGON_MODE",
- "Polygon rasterization mode (front and back)",
- "polygon",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_POLYGON_OFFSET_FACTOR,
- "GL_POLYGON_OFFSET_FACTOR",
- "Polygon offset factor",
- "polygon",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_POLYGON_OFFSET_POINT,
- "GL_POLYGON_OFFSET_POINT",
- "Polygon offset enable for GL_POINT mode rasterization",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_POLYGON_OFFSET_LINE,
- "GL_POLYGON_OFFSET_LINE",
- "Polygon offset enable for GL_LINE mode rasterization",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_POLYGON_OFFSET_FILL,
- "GL_POLYGON_OFFSET_FILL",
- "Polygon offset enable for GL_FILL mode rasterization",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_POLYGON_STIPPLE,
- "GL_POLYGON_STIPPLE",
- "Polygon stipple enable",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_1D,
- "GL_TEXTURE_1D",
- "True if 1-D texturing enabled ",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_2D,
- "GL_TEXTURE_2D",
- "True if 2-D texturing enabled ",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_BINDING_1D,
- "GL_TEXTURE_BINDING_1D",
- "Texture object bound to GL_TEXTURE_1D",
- "texture",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_BINDING_2D,
- "GL_TEXTURE_BINDING_2D",
- "Texture object bound to GL_TEXTURE_2D",
- "texture",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE,
- "GL_TEXTURE",
- "x-D texture image at level of detail i",
- "UNUSED",
- "glGetTexImage()"),
- new GLproperty(
- GL11.GL_TEXTURE_WIDTH,
- "GL_TEXTURE_WIDTH",
- "x-D texture image i's width",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_HEIGHT,
- "GL_TEXTURE_HEIGHT",
- "x-D texture image i's height",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_BORDER,
- "GL_TEXTURE_BORDER",
- "x-D texture image i's border width",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_RED_SIZE,
- "GL_TEXTURE_RED_SIZE",
- "x-D texture image i's red resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_GREEN_SIZE,
- "GL_TEXTURE_GREEN_SIZE",
- "x-D texture image i's green resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_BLUE_SIZE,
- "GL_TEXTURE_BLUE_SIZE",
- "x-D texture image i's blue resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_ALPHA_SIZE,
- "GL_TEXTURE_ALPHA_SIZE",
- "x-D texture image i's alpha resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_LUMINANCE_SIZE,
- "GL_TEXTURE_LUMINANCE_SIZE",
- "x-D texture image i's luminance resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_INTENSITY_SIZE,
- "GL_TEXTURE_INTENSITY_SIZE",
- "x-D texture image i's intensity resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_BORDER_COLOR,
- "GL_TEXTURE_BORDER_COLOR",
- "Texture border color",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_MIN_FILTER,
- "GL_TEXTURE_MIN_FILTER",
- "Texture minification function",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_MAG_FILTER,
- "GL_TEXTURE_MAG_FILTER",
- "Texture magnification function",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_WRAP_S,
- "GL_TEXTURE_WRAP_S",
- "Texture wrap mode (x is S or T)",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_WRAP_T,
- "GL_TEXTURE_WRAP_T",
- "Texture wrap mode (x is S or T)",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_PRIORITY,
- "GL_TEXTURE_PRIORITY",
- "Texture object priority",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_ENV_MODE,
- "GL_TEXTURE_ENV_MODE",
- "Texture application function",
- "texture",
- "glGetTexEnviv()"),
- new GLproperty(
- GL11.GL_TEXTURE_ENV_COLOR,
- "GL_TEXTURE_ENV_COLOR",
- "Texture environment color",
- "texture",
- "glGetTexEnvfv()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_S,
- "GL_TEXTURE_GEN_S",
- "Texgen enabled (x is S, T, R, or Q)",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_T,
- "GL_TEXTURE_GEN_T",
- "Texgen enabled (x is S, T, R, or Q)",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_R,
- "GL_TEXTURE_GEN_R",
- "Texgen enabled (x is S, T, R, or Q)",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_Q,
- "GL_TEXTURE_GEN_Q",
- "Texgen enabled (x is S, T, R, or Q)",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_EYE_PLANE,
- "GL_EYE_PLANE",
- "Texgen plane equation coefficients",
- "texture",
- "glGetTexGenfv()"),
- new GLproperty(
- GL11.GL_OBJECT_PLANE,
- "GL_OBJECT_PLANE",
- "Texgen object linear coefficients",
- "texture",
- "glGetTexGenfv()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_MODE,
- "GL_TEXTURE_GEN_MODE",
- "Function used for texgen",
- "texture",
- "glGetTexGeniv()"),
- new GLproperty(
- GL11.GL_SCISSOR_TEST,
- "GL_SCISSOR_TEST",
- "Scissoring enabled",
- "scissor/enable",
- "glIsEnabled()"),
- new GLproperty(GL11.GL_SCISSOR_BOX, "GL_SCISSOR_BOX", "Scissor box", "scissor", "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ALPHA_TEST,
- "GL_ALPHA_TEST",
- "Alpha test enabled",
- "color-buffer/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_ALPHA_TEST_FUNC,
- "GL_ALPHA_TEST_FUNC",
- "Alpha test function",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ALPHA_TEST_REF,
- "GL_ALPHA_TEST_REF",
- "Alpha test reference value",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_TEST,
- "GL_STENCIL_TEST",
- "Stenciling enabled",
- "stencil-buffer/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_STENCIL_FUNC,
- "GL_STENCIL_FUNC",
- "Stencil function",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_VALUE_MASK,
- "GL_STENCIL_VALUE_MASK",
- "Stencil mask",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_REF,
- "GL_STENCIL_REF",
- "Stencil reference value",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_FAIL,
- "GL_STENCIL_FAIL",
- "Stencil fail action",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_PASS_DEPTH_FAIL,
- "GL_STENCIL_PASS_DEPTH_FAIL",
- "Stencil depth buffer fail action",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_PASS_DEPTH_PASS,
- "GL_STENCIL_PASS_DEPTH_PASS",
- "Stencil depth buffer pass action",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_DEPTH_TEST,
- "GL_DEPTH_TEST",
- "Depth buffer enabled",
- "depth-buffer/ena ble",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_DEPTH_FUNC,
- "GL_DEPTH_FUNC",
- "Depth buffer test function",
- "depth-buffer",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_BLEND, "GL_BLEND", "Blending enabled", "color-buffer/enable", "glIsEnabled()"),
- new GLproperty(
- GL11.GL_BLEND_SRC,
- "GL_BLEND_SRC",
- "Blending source function",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_BLEND_DST,
- "GL_BLEND_DST",
- "Blending destination function",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_DITHER, "GL_DITHER", "Dithering enabled", "color-buffer/enable", "glIsEnabled()"),
- new GLproperty(
- GL11.GL_INDEX_LOGIC_OP,
- "GL_INDEX_LOGIC_OP",
- "Color index logical operation enabled",
- "color-buffer/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_LOGIC_OP,
- "GL_COLOR_LOGIC_OP",
- "RGBA color logical operation enabled",
- "color-buffer/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_LOGIC_OP_MODE,
- "GL_LOGIC_OP_MODE",
- "Logical operation function",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_DRAW_BUFFER,
- "GL_DRAW_BUFFER",
- "Buffers selected for drawing",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_WRITEMASK,
- "GL_INDEX_WRITEMASK",
- "Color-index writemask",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_WRITEMASK,
- "GL_COLOR_WRITEMASK",
- "Color write enables; R, G, B, or A",
- "color-buffer",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_DEPTH_WRITEMASK,
- "GL_DEPTH_WRITEMASK",
- "Depth buffer enabled for writing",
- "depth-buffer",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_STENCIL_WRITEMASK,
- "GL_STENCIL_WRITEMASK",
- "Stencil-buffer writemask",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_CLEAR_VALUE,
- "GL_COLOR_CLEAR_VALUE",
- "Color-buffer clear value (RGBA mode)",
- "color-buffer",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_INDEX_CLEAR_VALUE,
- "GL_INDEX_CLEAR_VALUE",
- "Color-buffer clear value (color-index mode)",
- "color-buffer",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_DEPTH_CLEAR_VALUE,
- "GL_DEPTH_CLEAR_VALUE",
- "Depth-buffer clear value",
- "depth-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_CLEAR_VALUE,
- "GL_STENCIL_CLEAR_VALUE",
- "Stencil-buffer clear value",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_CLEAR_VALUE,
- "GL_ACCUM_CLEAR_VALUE",
- "Accumulation-buffer clear value",
- "accum-buffer",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_UNPACK_SWAP_BYTES,
- "GL_UNPACK_SWAP_BYTES",
- "Value of GL_UNPACK_SWAP_BYTES",
- "pixel-store",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_UNPACK_LSB_FIRST,
- "GL_UNPACK_LSB_FIRST",
- "Value of GL_UNPACK_LSB_FIRST",
- "pixel-store",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_UNPACK_ROW_LENGTH,
- "GL_UNPACK_ROW_LENGTH",
- "Value of GL_UNPACK_ROW_LENGTH",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_UNPACK_SKIP_ROWS,
- "GL_UNPACK_SKIP_ROWS",
- "Value of GL_UNPACK_SKIP_ROWS",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_UNPACK_SKIP_PIXELS,
- "GL_UNPACK_SKIP_PIXELS",
- "Value of GL_UNPACK_SKIP_PIXELS",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_UNPACK_ALIGNMENT,
- "GL_UNPACK_ALIGNMENT",
- "Value of GL_UNPACK_ALIGNMENT",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PACK_SWAP_BYTES,
- "GL_PACK_SWAP_BYTES",
- "Value of GL_PACK_SWAP_BYTES",
- "pixel-store",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_PACK_LSB_FIRST,
- "GL_PACK_LSB_FIRST",
- "Value of GL_PACK_LSB_FIRST",
- "pixel-store",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_PACK_ROW_LENGTH,
- "GL_PACK_ROW_LENGTH",
- "Value of GL_PACK_ROW_LENGTH",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PACK_SKIP_ROWS,
- "GL_PACK_SKIP_ROWS",
- "Value of GL_PACK_SKIP_ROWS",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PACK_SKIP_PIXELS,
- "GL_PACK_SKIP_PIXELS",
- "Value of GL_PACK_SKIP_PIXELS",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PACK_ALIGNMENT,
- "GL_PACK_ALIGNMENT",
- "Value of GL_PACK_ALIGNMENT",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_MAP_COLOR, "GL_MAP_COLOR", "True if colors are mapped", "pixel", "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_MAP_STENCIL,
- "GL_MAP_STENCIL",
- "True if stencil values are mapped",
- "pixel",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_INDEX_SHIFT,
- "GL_INDEX_SHIFT",
- "Value of GL_INDEX_SHIFT",
- "pixel",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_OFFSET,
- "GL_INDEX_OFFSET",
- "Value of GL_INDEX_OFFSET",
- "pixel",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_ZOOM_X, "GL_ZOOM_X", "x zoom factor", "pixel", "glGetFloatv()"),
- new GLproperty(GL11.GL_ZOOM_Y, "GL_ZOOM_Y", "y zoom factor", "pixel", "glGetFloatv()"),
- new GLproperty(GL11.GL_READ_BUFFER, "GL_READ_BUFFER", "Read source buffer", "pixel", "glGetIntegerv()"),
- new GLproperty(GL11.GL_ORDER, "GL_ORDER", "1D map order", "capability", "glGetMapiv()"),
- new GLproperty(GL11.GL_ORDER, "GL_ORDER", "2D map orders", "capability", "glGetMapiv()"),
- new GLproperty(GL11.GL_COEFF, "GL_COEFF", "1D control points", "capability", "glGetMapfv()"),
- new GLproperty(GL11.GL_COEFF, "GL_COEFF", "2D control points", "capability", "glGetMapfv()"),
- new GLproperty(GL11.GL_DOMAIN, "GL_DOMAIN", "1D domain endpoints", "capability", "glGetMapfv()"),
- new GLproperty(GL11.GL_DOMAIN, "GL_DOMAIN", "2D domain endpoints", "capability", "glGetMapfv()"),
- new GLproperty(
- GL11.GL_MAP1_GRID_DOMAIN,
- "GL_MAP1_GRID_DOMAIN",
- "1D grid endpoints",
- "eval",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_MAP2_GRID_DOMAIN,
- "GL_MAP2_GRID_DOMAIN",
- "2D grid endpoints",
- "eval",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_MAP1_GRID_SEGMENTS,
- "GL_MAP1_GRID_SEGMENTS",
- "1D grid divisions",
- "eval",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_MAP2_GRID_SEGMENTS,
- "GL_MAP2_GRID_SEGMENTS",
- "2D grid divisions",
- "eval",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_AUTO_NORMAL,
- "GL_AUTO_NORMAL",
- "True if automatic normal generation enabled",
- "eval",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_PERSPECTIVE_CORRECTION_HINT,
- "GL_PERSPECTIVE_CORRECTION_HINT",
- "Perspective correction hint",
- "hint",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_POINT_SMOOTH_HINT,
- "GL_POINT_SMOOTH_HINT",
- "Point smooth hint",
- "hint",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LINE_SMOOTH_HINT,
- "GL_LINE_SMOOTH_HINT",
- "Line smooth hint",
- "hint",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_POLYGON_SMOOTH_HINT,
- "GL_POLYGON_SMOOTH_HINT",
- "Polygon smooth hint",
- "hint",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_FOG_HINT, "GL_FOG_HINT", "Fog hint", "hint", "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_LIGHTS,
- "GL_MAX_LIGHTS",
- "Maximum number of lights",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_CLIP_PLANES,
- "GL_MAX_CLIP_PLANES",
- "Maximum number of user clipping planes",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_MODELVIEW_STACK_DEPTH,
- "GL_MAX_MODELVIEW_STACK_DEPTH",
- "Maximum modelview-matrix stack depth",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_PROJECTION_STACK_DEPTH,
- "GL_MAX_PROJECTION_STACK_DEPTH",
- "Maximum projection-matrix stack depth",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_TEXTURE_STACK_DEPTH,
- "GL_MAX_TEXTURE_STACK_DEPTH",
- "Maximum depth of texture matrix stack",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_SUBPIXEL_BITS,
- "GL_SUBPIXEL_BITS",
- "Number of bits of subpixel precision in x and y",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_TEXTURE_SIZE,
- "GL_MAX_TEXTURE_SIZE",
- "See discussion in Texture Proxy in Chapter 9",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_PIXEL_MAP_TABLE,
- "GL_MAX_PIXEL_MAP_TABLE",
- "Maximum size of a glPixelMap() translation table",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_NAME_STACK_DEPTH,
- "GL_MAX_NAME_STACK_DEPTH",
- "Maximum selection-name stack depth",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_LIST_NESTING,
- "GL_MAX_LIST_NESTING",
- "Maximum display-list call nesting",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_EVAL_ORDER,
- "GL_MAX_EVAL_ORDER",
- "Maximum evaluator polynomial order",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_VIEWPORT_DIMS,
- "GL_MAX_VIEWPORT_DIMS",
- "Maximum viewport dimensions",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_ATTRIB_STACK_DEPTH,
- "GL_MAX_ATTRIB_STACK_DEPTH",
- "Maximum depth of the attribute stack",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH,
- "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH",
- "Maximum depth of the client attribute stack",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_AUX_BUFFERS,
- "GL_AUX_BUFFERS",
- "Number of auxiliary buffers",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_RGBA_MODE,
- "GL_RGBA_MODE",
- "True if color buffers store RGBA",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_INDEX_MODE,
- "GL_INDEX_MODE",
- "True if color buffers store indices",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_DOUBLEBUFFER,
- "GL_DOUBLEBUFFER",
- "True if front and back buffers exist",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_STEREO,
- "GL_STEREO",
- "True if left and right buffers exist",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_POINT_SIZE_RANGE,
- "GL_POINT_SIZE_RANGE",
- "Range (low to high) of antialiased point sizes",
- "capability",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_POINT_SIZE_GRANULARITY,
- "GL_POINT_SIZE_GRANULARITY",
- "Antialiased point-size granularity",
- "capability",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_LINE_WIDTH_RANGE,
- "GL_LINE_WIDTH_RANGE",
- "Range (low to high) of antialiased line widths",
- "capability",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_LINE_WIDTH_GRANULARITY,
- "GL_LINE_WIDTH_GRANULARITY",
- "Antialiased line-width granularity",
- "capability",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_RED_BITS,
- "GL_RED_BITS",
- "Number of bits per red component in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_GREEN_BITS,
- "GL_GREEN_BITS",
- "Number of bits per green component in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_BLUE_BITS,
- "GL_BLUE_BITS",
- "Number of bits per blue component in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ALPHA_BITS,
- "GL_ALPHA_BITS",
- "Number of bits per alpha component in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_BITS,
- "GL_INDEX_BITS",
- "Number of bits per index in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_DEPTH_BITS,
- "GL_DEPTH_BITS",
- "Number of depth-buffer bitplanes",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_BITS,
- "GL_STENCIL_BITS",
- "Number of stencil bitplanes",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_RED_BITS,
- "GL_ACCUM_RED_BITS",
- "Number of bits per red component in the accumulation buffer",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_GREEN_BITS,
- "GL_ACCUM_GREEN_BITS",
- "Number of bits per green component in the accumulation buffer",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_BLUE_BITS,
- "GL_ACCUM_BLUE_BITS",
- "Number of bits per blue component in the accumulation buffer",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_ALPHA_BITS,
- "GL_ACCUM_ALPHA_BITS",
- "Number of bits per alpha component in the accumulation buffer",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_LIST_BASE, "GL_LIST_BASE", "Setting of glListBase()", "list", "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LIST_INDEX,
- "GL_LIST_INDEX",
- "Number of display list under construction; 0 if none",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LIST_MODE,
- "GL_LIST_MODE",
- "Mode of display list under construction; undefined if none",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ATTRIB_STACK_DEPTH,
- "GL_ATTRIB_STACK_DEPTH",
- "Attribute stack pointer",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_CLIENT_ATTRIB_STACK_DEPTH,
- "GL_CLIENT_ATTRIB_STACK_DEPTH",
- "Client attribute stack pointer",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_NAME_STACK_DEPTH,
- "GL_NAME_STACK_DEPTH",
- "Name stack depth",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_RENDER_MODE,
- "GL_RENDER_MODE",
- "glRenderMode() setting",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_SELECTION_BUFFER_POINTER,
- "GL_SELECTION_BUFFER_POINTER",
- "Pointer to selection buffer",
- "select",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_SELECTION_BUFFER_SIZE,
- "GL_SELECTION_BUFFER_SIZE",
- "Size of selection buffer",
- "select",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_FEEDBACK_BUFFER_POINTER,
- "GL_FEEDBACK_BUFFER_POINTER",
- "Pointer to feedback buffer",
- "feedback",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_FEEDBACK_BUFFER_SIZE,
- "GL_FEEDBACK_BUFFER_SIZE",
- "Size of feedback buffer",
- "feedback",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_FEEDBACK_BUFFER_TYPE,
- "GL_FEEDBACK_BUFFER_TYPE",
- "Type of feedback buffer",
- "feedback",
- "glGetIntegerv()"), };
-
- public static void dumpOpenGLstate() {}
-
- public static void dumpAllIsEnabled() // Call This
- {
- for (int i = 0; i < instance.propertyList.length; ++i) {
-
- if (instance.propertyList[i].fetchCommand == "glIsEnabled()") {
-
- System.out.print(instance.propertyList[i].name + ":");
- System.out.print(GL11.glIsEnabled(instance.propertyList[i].gLconstant));
- System.out.println(" (" + instance.propertyList[i].description + ")");
- }
- }
- }
-
- public static void dumpAllType(final String type) {
-
- for (int i = 0; i < instance.propertyList.length; ++i) {
-
- if (instance.propertyList[i].category.equals(type)) {
-
- System.out.print(instance.propertyList[i].name + ":");
- System.out.println(getPropertyAsString(i));
- System.out.println(" (" + instance.propertyList[i].description + ")");
- }
- }
- }
-
- private static String getPropertyAsString(final int propertyListIndex) {
- final int gLconstant = instance.propertyList[propertyListIndex].gLconstant;
- if (instance.propertyList[propertyListIndex].fetchCommand.equals("glIsEnabled()")) {
- return "" + GL11.glIsEnabled(gLconstant);
- }
-
- if (instance.propertyList[propertyListIndex].fetchCommand == "glGetBooleanv()") {
-
- final ByteBuffer params = BufferUtils.createByteBuffer(16);
-
- GL11.glGetBoolean(gLconstant, params);
- String out = "";
- for (int i = 0; i < params.capacity(); ++i) {
-
- out += (i == 0 ? "" : ", ") + params.get(i);
- }
- return out;
- }
-
- return "";
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java
deleted file mode 100644
index ce14c07489..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gtPlusPlus.core.util.minecraft;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.relauncher.Side;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-
-public class ClientUtils {
-
- static {
- if (FMLCommonHandler.instance().getSide() == Side.SERVER) {
- Logger.ERROR("Something tried to access the ClientUtils class from the Server Side.");
- Logger.ERROR("Soft crashing to prevent data corruption.");
- CORE.crash();
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java
deleted file mode 100644
index 1d86a7482f..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package gtPlusPlus.core.util.minecraft;
-
-import net.minecraft.item.ItemRedstone;
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.util.GT_ModHandler;
-import ic2.api.item.IElectricItem;
-import ic2.api.item.IElectricItemManager;
-import ic2.api.item.ISpecialElectricItem;
-
-public class EnergyUtils {
-
- public static class EU {
-
- public static boolean isElectricItem(ItemStack aStack) {
- if (aStack == null || aStack.getItem() == null || aStack.getItem() instanceof ItemRedstone) {
- return false;
- }
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- return true;
- } else if (aStack.getItem() instanceof IElectricItem) {
- return true;
- } else if (aStack.getItem() instanceof IElectricItemManager) {
- return true;
- } else {
- return GT_ModHandler.isElectricItem(aStack);
- }
- }
-
- public static boolean isChargerItem(ItemStack aStack) {
- return GT_ModHandler.isChargerItem(aStack);
- }
-
- public static boolean charge(ItemStack aStack, int aEnergyToInsert, int aTier) {
- return 0 != GT_ModHandler.chargeElectricItem(aStack, aEnergyToInsert, aTier, true, false);
- }
-
- public static boolean discharge(ItemStack aStack, int aEnergyToDrain, int aTier) {
- if (isElectricItem(aStack)) {
- int tTier = ((IElectricItem) aStack.getItem()).getTier(aStack);
- int aDischargeValue = GT_ModHandler
- .dischargeElectricItem(aStack, aEnergyToDrain, tTier, true, false, false);
- // Logger.INFO("Trying to drain "+aDischargeValue);
- return aDischargeValue > 0;
- } else {
- return false;
- }
- }
-
- public static long getMaxStorage(ItemStack aStack) {
- if (isElectricItem(aStack)) {
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem();
- return (long) bStack.getMaxCharge(aStack);
- }
- if (aStack.getItem() instanceof IElectricItem) {
- IElectricItem bStack = (IElectricItem) aStack.getItem();
- return (long) bStack.getMaxCharge(aStack);
- }
- if (aStack.getItem() instanceof IElectricItemManager) {
- IElectricItemManager bStack = (IElectricItemManager) aStack.getItem();
- return (long) bStack.getCharge(aStack);
- }
- } else {
- return 0;
- }
- return 0;
- }
-
- public static long getCharge(ItemStack aStack) {
- if (isElectricItem(aStack)) {
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem();
- return (long) bStack.getManager(aStack).getCharge(aStack);
- }
- if (aStack.getItem() instanceof IElectricItemManager) {
- IElectricItemManager bStack = (IElectricItemManager) aStack.getItem();
- return (long) bStack.getCharge(aStack);
- }
- } else {
- return 0;
- }
- return 0;
- }
-
- public static boolean hasCharge(ItemStack aStack) {
- if (isElectricItem(aStack)) {
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem();
- return bStack.canProvideEnergy(aStack);
- }
- if (aStack.getItem() instanceof IElectricItem) {
- IElectricItem bStack = (IElectricItem) aStack.getItem();
- return bStack.canProvideEnergy(aStack);
- }
- if (aStack.getItem() instanceof IElectricItemManager) {
- IElectricItemManager bStack = (IElectricItemManager) aStack.getItem();
- return bStack.getCharge(aStack) > 0;
- }
- } else {
- return false;
- }
- return false;
- }
-
- public static int getTier(ItemStack aStack) {
- if (isElectricItem(aStack)) {
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem();
- return bStack.getTier(aStack);
- }
- if (aStack.getItem() instanceof IElectricItem) {
- IElectricItem bStack = (IElectricItem) aStack.getItem();
- return bStack.getTier(aStack);
- }
- } else {
- return 0;
- }
- return 0;
- }
- }
-
- public static class RF {
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java
deleted file mode 100644
index ecabeaa294..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gtPlusPlus.core.util.minecraft.gregtech.material;
-
-public class MaterialBuilder {
- /*
- * public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5; private int
- * metaItemSubID; private TextureSet iconSet; private float toolSpeed = 1.0f; private int durability = 0; private
- * int toolQuality = 0; private int types = 0; private int r = 255, g = 255, b = 255, a = 0; private String name;
- * private String defaultLocalName; private int fuelType = 0; private int fuelPower = 0; private int meltingPoint =
- * 0; private int blastFurnaceTemp = 0; private boolean blastFurnaceRequired = false; private boolean transparent =
- * false; private int oreValue = 1; private int densityMultiplier = 1; private int densityDivider = 1; private Dyes
- * color = Dyes._NULL; private int extraData = 0; private List<MaterialStack> materialList = new
- * ArrayList<MaterialStack>(); private List<TC_Aspects.TC_AspectStack> aspects = new
- * ArrayList<TC_Aspects.TC_AspectStack>(); private boolean canBeCracked = false; private int liquidTemperature =
- * 300; private int gasTemperature = 300; public MaterialBuilder(int metaItemSubID, TextureSet iconSet, String
- * defaultLocalName) { this.metaItemSubID = metaItemSubID; this.iconSet = iconSet; this.name =
- * defaultLocalName.replace(" ", "").replace("-", ""); this.defaultLocalName = defaultLocalName; } public Materials
- * constructMaterial() { return new Materials( metaItemSubID, iconSet, toolSpeed, durability, toolQuality, types, r,
- * g, b, a, name, defaultLocalName, fuelType, fuelPower, meltingPoint, blastFurnaceTemp, blastFurnaceRequired,
- * transparent, oreValue, densityMultiplier, densityDivider, color, extraData, materialList, aspects); } public
- * MaterialBuilder setName(String name){ this.name = name; return this; } public MaterialBuilder setTypes(int
- * types){ this.types = types; return this; } public MaterialBuilder addDustItems(){ types = types | 1; return this;
- * } public MaterialBuilder addMetalItems(){ types = types | 2; return this; } public MaterialBuilder addGemItems(){
- * types = types | 4; return this; } public MaterialBuilder addOreItems(){ types = types | 8; return this; } public
- * MaterialBuilder addCell(){ types = types | 16; return this; } public MaterialBuilder addPlasma(){ types = types |
- * 32; return this; } public MaterialBuilder addToolHeadItems(){ types = types | 64; return this; } public
- * MaterialBuilder addGearItems(){ types = types | 128; return this; } public MaterialBuilder addFluid(){ return
- * this; } public MaterialBuilder addGas(){ return this; } public MaterialBuilder setRGBA(int r, int g, int b, int
- * a){ this.r = r; this.g = g; this.b = b; this.a = a; return this; } public MaterialBuilder setRGB(int r, int g,
- * int b){ this.r = r; this.g = g; this.b = b; return this; } public MaterialBuilder setTransparent(boolean
- * transparent){ this.transparent = transparent; return this; } public MaterialBuilder setColor(Dyes color){
- * this.color = color; return this; } public MaterialBuilder setToolSpeed(float toolSpeed) { this.toolSpeed =
- * toolSpeed; return this; } public MaterialBuilder setDurability(int durability) { this.durability = durability;
- * return this; } public MaterialBuilder setToolQuality(int toolQuality) { this.toolQuality = toolQuality; return
- * this; } public MaterialBuilder setFuelType(int fuelType) { this.fuelType = fuelType; return this; } public
- * MaterialBuilder setFuelPower(int fuelPower) { this.fuelPower = fuelPower; return this; } public MaterialBuilder
- * setMeltingPoint(int meltingPoint) { this.meltingPoint = meltingPoint; return this; } public MaterialBuilder
- * setBlastFurnaceTemp(int blastFurnaceTemp) { this.blastFurnaceTemp = blastFurnaceTemp; return this; } public
- * MaterialBuilder setBlastFurnaceRequired(boolean blastFurnaceRequired) { this.blastFurnaceRequired =
- * blastFurnaceRequired; return this; } public MaterialBuilder setOreValue(int oreValue) { this.oreValue = oreValue;
- * return this; } public MaterialBuilder setDensityMultiplier(int densityMultiplier) { this.densityMultiplier =
- * densityMultiplier; return this; } public MaterialBuilder setDensityDivider(int densityDivider) {
- * this.densityDivider = densityDivider; return this; } public MaterialBuilder setExtraData(int extraData) {
- * this.extraData = extraData; return this; } public MaterialBuilder addElectrolyzerRecipe(){ extraData = extraData
- * | 1; return this; } public MaterialBuilder addCentrifugeRecipe(){ extraData = extraData | 2; return this; }
- * public MaterialBuilder setMaterialList(List<MaterialStack> materialList) { this.materialList = materialList;
- * return this; } public MaterialBuilder setMaterialList(MaterialStack ... materials) { this.materialList =
- * Arrays.asList(materials); return this; } public MaterialBuilder setAspects(List<TC_Aspects.TC_AspectStack>
- * aspects) { this.aspects = aspects; return this; } public int getLiquidTemperature() { return liquidTemperature; }
- * public MaterialBuilder setLiquidTemperature(int liquidTemperature) { this.liquidTemperature = liquidTemperature;
- * return this; } public int getGasTemperature() { return gasTemperature; } public MaterialBuilder
- * setGasTemperature(int gasTemperature) { this.gasTemperature = gasTemperature; return this; } public boolean
- * canBeCracked() { return canBeCracked; } public MaterialBuilder setCanBeCracked(boolean canBeCracked) {
- * this.canBeCracked = canBeCracked; return this; }
- */
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java
deleted file mode 100644
index 58045150f1..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package gtPlusPlus.core.util.minecraft.gregtech.recipehandlers;
-
-public final class GregtechRecipe {
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java
deleted file mode 100644
index 5a9721204c..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import cpw.mods.fml.common.network.internal.FMLProxyPacket;
-import io.netty.buffer.Unpooled;
-import mods.railcraft.common.util.misc.Game;
-
-public abstract class CustomPacket {
-
- public static final String CHANNEL_NAME = "GTPP";
-
- public enum PacketType {
- TILE_ENTITY,
- }
-
- public FMLProxyPacket getPacket() {
- ByteArrayOutputStream bytes = new ByteArrayOutputStream();
- DataOutputStream data = new DataOutputStream(bytes);
- try {
- data.writeByte(this.getID());
- this.writeData(data);
- } catch (IOException var4) {
- Game.logThrowable("Error constructing packet: {0}", var4, new Object[] { this.getClass() });
- }
- return new FMLProxyPacket(Unpooled.wrappedBuffer(bytes.toByteArray()), "GTPP");
- }
-
- public abstract void writeData(DataOutputStream var1) throws IOException;
-
- public abstract void readData(DataInputStream var1) throws IOException;
-
- public abstract int getID();
-
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java
deleted file mode 100644
index d9b565591c..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import net.minecraft.world.WorldServer;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-public class PacketBuilder {
-
- private static PacketBuilder instance;
-
- public static PacketBuilder instance() {
- if (instance == null) {
- instance = new PacketBuilder();
- }
- return instance;
- }
-
- public void sendTileEntityPacket(IGregTechTileEntity tile) {
- if (tile.getWorld() instanceof WorldServer) {
- WorldServer world = (WorldServer) tile.getWorld();
- PacketTileEntity pkt = new PacketTileEntity(tile);
- PacketDispatcher.sendToWatchers(pkt, world, tile.getXCoord(), tile.getZCoord());
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java
deleted file mode 100644
index 69d94a4f13..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import java.lang.reflect.Method;
-
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.network.Packet;
-import net.minecraft.server.management.PlayerManager;
-import net.minecraft.world.WorldServer;
-
-import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
-import cpw.mods.fml.relauncher.ReflectionHelper;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.preloader.DevHelper;
-
-@SuppressWarnings("unchecked")
-public class PacketDispatcher {
-
- private static final Class playerInstanceClass;
- private static final Method getOrCreateChunkWatcher;
- private static final Method sendToAllPlayersWatchingChunk;
-
- public static void sendToServer(CustomPacket packet) {
- PacketHandler.INSTANCE.channel.sendToServer(packet.getPacket());
- }
-
- public static void sendToPlayer(CustomPacket packet, EntityPlayerMP player) {
- PacketHandler.INSTANCE.channel.sendTo(packet.getPacket(), player);
- }
-
- public static void sendToAll(CustomPacket packet) {
- PacketHandler.INSTANCE.channel.sendToAll(packet.getPacket());
- }
-
- public static void sendToAllAround(CustomPacket packet, TargetPoint zone) {
- PacketHandler.INSTANCE.channel.sendToAllAround(packet.getPacket(), zone);
- }
-
- public static void sendToDimension(CustomPacket packet, int dimensionId) {
- PacketHandler.INSTANCE.channel.sendToDimension(packet.getPacket(), dimensionId);
- }
-
- public static void sendToWatchers(CustomPacket packet, WorldServer world, int worldX, int worldZ) {
- try {
- Object playerInstance = getOrCreateChunkWatcher
- .invoke(world.getPlayerManager(), worldX >> 4, worldZ >> 4, false);
- if (playerInstance != null) {
- sendToAllPlayersWatchingChunk.invoke(playerInstance, packet.getPacket());
- }
-
- } catch (Exception var5) {
- Logger.ERROR(
- "Reflection Failure in PacketDispatcher.sendToWatchers() {0} {1}" + 20
- + var5
- + new Object[] {
- getOrCreateChunkWatcher.getName() + sendToAllPlayersWatchingChunk.getName() });
- throw new RuntimeException(var5);
- }
- }
-
- static {
- try {
- playerInstanceClass = PlayerManager.class.getDeclaredClasses()[0];
-
- Method a, b;
-
- try {
- a = DevHelper.getForgeMethod(
- PlayerManager.class,
- "getOrCreateChunkWatcher",
- int.class,
- int.class,
- boolean.class);
- } catch (Throwable t) {
- a = ReflectionHelper.findMethod(
- playerInstanceClass,
- (Object) null,
- new String[] { "func_72690_a", "getOrCreateChunkWatcher" },
- new Class[] { Integer.TYPE, Integer.TYPE, Boolean.TYPE });
- }
- try {
- b = DevHelper.getForgeMethod(PlayerManager.class, "sendToAllPlayersWatchingChunk", Packet.class);
- } catch (Throwable t) {
- b = ReflectionHelper.findMethod(
- playerInstanceClass,
- (Object) null,
- new String[] { "func_151251_a", "sendToAllPlayersWatchingChunk" },
- new Class[] { Packet.class });
- }
-
- getOrCreateChunkWatcher = a;
- sendToAllPlayersWatchingChunk = b;
- getOrCreateChunkWatcher.setAccessible(true);
- sendToAllPlayersWatchingChunk.setAccessible(true);
- } catch (Exception var1) {
- Logger.ERROR("Reflection Failure in PacketDispatcher initalization {0} {1}" + var1);
- throw new RuntimeException(var1);
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java
deleted file mode 100644
index 535c192bbe..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.Arrays;
-
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.network.NetHandlerPlayServer;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import cpw.mods.fml.common.network.FMLEventChannel;
-import cpw.mods.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent;
-import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent;
-import cpw.mods.fml.common.network.NetworkRegistry;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.util.minecraft.network.CustomPacket.PacketType;
-
-public class PacketHandler {
-
- public static final PacketHandler INSTANCE = new PacketHandler();
- private static final PacketType[] packetTypes = PacketType.values();
- final FMLEventChannel channel;
-
- private PacketHandler() {
- this.channel = NetworkRegistry.INSTANCE.newEventDrivenChannel("GTPP");
- this.channel.register(this);
- }
-
- public static void init() {}
-
- @SubscribeEvent
- public void onPacket(ServerCustomPacketEvent event) {
- byte[] data = new byte[event.packet.payload().readableBytes()];
- event.packet.payload().readBytes(data);
- this.onPacketData(data, ((NetHandlerPlayServer) event.handler).playerEntity);
- }
-
- @SubscribeEvent
- public void onPacket(ClientCustomPacketEvent event) {
- byte[] data = new byte[event.packet.payload().readableBytes()];
- event.packet.payload().readBytes(data);
- this.onPacketData(data, (EntityPlayerMP) null);
- }
-
- public void onPacketData(byte[] bData, EntityPlayerMP player) {
- DataInputStream data = new DataInputStream(new ByteArrayInputStream(bData));
-
- try {
- byte packetID = data.readByte();
- if (packetID < 0) {
- return;
- }
- PacketType type = packetTypes[packetID];
- Object pkt;
-
- switch (type.ordinal()) {
- case 0:
- pkt = new PacketTileEntity();
- break;
- default:
- return;
- }
-
- if (pkt != null) {
- ((CustomPacket) pkt).readData(data);
- }
- } catch (IOException var7) {
- Logger.ERROR(
- "Exception in PacketHandler.onPacketData: {0}" + var7 + new Object[] { Arrays.toString(bData) });
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java
deleted file mode 100644
index 91dba8798d..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.client.FMLClientHandler;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.api.interfaces.IGregtechPacketEntity;
-import mods.railcraft.common.util.misc.Game;
-
-public class PacketTileEntity extends CustomPacket {
-
- private IGregTechTileEntity tile;
- private IGregtechPacketEntity ptile;
-
- public PacketTileEntity() {}
-
- public PacketTileEntity(IGregTechTileEntity tile) {
- this.tile = tile;
- if (tile instanceof IGregtechPacketEntity) {
- ptile = (IGregtechPacketEntity) tile;
- }
- }
-
- @Override
- public void writeData(DataOutputStream data) throws IOException {
- if (ptile != null) {
- data.writeInt(this.tile.getXCoord());
- data.writeInt(this.tile.getYCoord());
- data.writeInt(this.tile.getZCoord());
- data.writeShort(this.tile.getMetaTileID());
- this.ptile.writePacketData(data);
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void readData(DataInputStream data) throws IOException {
- Minecraft mc = FMLClientHandler.instance().getClient();
- World world = mc != null ? mc.theWorld : null;
- if (world != null) {
- int x = data.readInt();
- int y = data.readInt();
- int z = data.readInt();
- short id = data.readShort();
- if (id >= 0 && y >= 0 && world.blockExists(x, y, z)) {
- TileEntity te = world.getTileEntity(x, y, z);
- if (te instanceof IGregTechTileEntity) {
- this.tile = (IGregTechTileEntity) te;
- if (this.tile.getMetaTileID() != id) {
- this.tile = null;
- }
- } else {
- this.tile = null;
- }
- if (this.tile != null) {
- if (tile instanceof IGregtechPacketEntity) {
- ptile = (IGregtechPacketEntity) tile;
- try {
- this.ptile.readPacketData(data);
- } catch (IOException var10) {
- throw var10;
- } catch (RuntimeException var11) {
- Game.logThrowable("Exception in PacketTileEntity.readData:", var11, new Object[0]);
- }
- }
- }
- }
- }
- }
-
- @Override
- public int getID() {
- return 0;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/sys/Log.java b/src/main/java/gtPlusPlus/core/util/sys/Log.java
deleted file mode 100644
index d9ffd5fa42..0000000000
--- a/src/main/java/gtPlusPlus/core/util/sys/Log.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package gtPlusPlus.core.util.sys;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-public final class Log {
-
- public static final Logger LOGGER = LogManager.getLogger("MiscUtils");
-
- public static void warn(final String msg) {
- LOGGER.warn(msg);
- }
-
- public static void error(final String msg) {
- LOGGER.error(msg);
- }
-
- public static void info(final String msg) {
- LOGGER.info(msg);
- }
-
- public static void debug(final String msg) {
- LOGGER.debug(msg);
- }
-}