aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>2023-01-10 18:12:53 +0000
committerGTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>2023-01-10 18:12:53 +0000
commit7193265d8e78ff3f13fe10054fce497037864846 (patch)
treeacfdcef0ec27b6b8e51a14818725692a2762b2ad /src/main/java/com
parentecbd8d8b3db89e135f6f2f297e952a12d1b15b39 (diff)
downloadGT5-Unofficial-7193265d8e78ff3f13fe10054fce497037864846.tar.gz
GT5-Unofficial-7193265d8e78ff3f13fe10054fce497037864846.tar.bz2
GT5-Unofficial-7193265d8e78ff3f13fe10054fce497037864846.zip
Fully purge useless unused checks/class/block
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/block/QuantumStuffBlock.java107
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java32
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java33
4 files changed, 1 insertions, 175 deletions
diff --git a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java
index 53389d6fa5..0c32c0300f 100644
--- a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java
@@ -8,7 +8,6 @@ import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.compatibility.openmodularturrets.blocks.turretbases.TurretBaseEM;
import com.github.technus.tectech.compatibility.openmodularturrets.blocks.turretheads.TurretHeadEM;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.thing.block.QuantumStuffBlock;
import com.github.technus.tectech.thing.block.ReactorSimBlock;
import com.github.technus.tectech.thing.block.TileEyeOfHarmony;
import com.github.technus.tectech.thing.casing.*;
@@ -52,9 +51,6 @@ public class ThingsLoader implements Runnable {
QuantumGlassBlock.run();
TecTech.LOGGER.info("Quantum Glass registered");
- QuantumStuffBlock.run();
- TecTech.LOGGER.info("Quantum Stuff registered");
-
if (Loader.isModLoaded("openmodularturrets")) {
TurretHeadEM.run();
TecTech.LOGGER.info("TurretHeadEM registered");
diff --git a/src/main/java/com/github/technus/tectech/thing/block/QuantumStuffBlock.java b/src/main/java/com/github/technus/tectech/thing/block/QuantumStuffBlock.java
deleted file mode 100644
index 2717a95425..0000000000
--- a/src/main/java/com/github/technus/tectech/thing/block/QuantumStuffBlock.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package com.github.technus.tectech.thing.block;
-
-import static com.github.technus.tectech.Reference.MODID;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import eu.usrv.yamcore.blocks.BlockBase;
-import java.util.ArrayList;
-import java.util.Random;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-
-/**
- * Created by danie_000 on 17.12.2016.
- */
-public final class QuantumStuffBlock extends BlockBase {
- public static IIcon stuff;
- public static int renderID;
- public static QuantumStuffBlock INSTANCE;
-
- public QuantumStuffBlock() {
- super(Material.iron);
- setBlockBounds(0, 0, 0, 1, 1, 1);
- setBlockName("quantumStuff");
- setHarvestLevel("wrench", 0);
- setHardness(500);
- setResistance(1);
- setLightOpacity(0);
- setBlockTextureName(MODID + ":blockQuantumStuff");
- }
-
- @Override
- public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) {
- return false;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister p_149651_1_) {
- super.registerBlockIcons(p_149651_1_);
- stuff = blockIcon;
- }
-
- @Override
- public boolean isOpaqueCube() {
- return false;
- }
-
- @Override
- public boolean getCanBlockGrass() {
- return false;
- }
-
- // @Override
- // public boolean canRenderInPass(int pass) {
- // return true;
- // }
-
- @Override
- public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
- return false;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getRenderBlockPass() {
- return 1;
- }
-
- @Override
- public boolean renderAsNormalBlock() {
- return false;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean shouldSideBeRendered(
- IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
- return false;
- }
-
- @Override
- public int getRenderType() {
- return renderID;
- }
-
- public static void run() {
- INSTANCE = new QuantumStuffBlock();
- GameRegistry.registerBlock(INSTANCE, INSTANCE.getUnlocalizedName());
- }
-
- @Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
- return new ArrayList<>();
- }
-
- @Override
- public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
- return null;
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
index 56b68e8d37..25c8610388 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
@@ -23,7 +23,6 @@ import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitiv
import com.github.technus.tectech.recipe.TT_recipe;
import com.github.technus.tectech.thing.CustomItemList;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.thing.block.QuantumStuffBlock;
import com.github.technus.tectech.thing.item.ElementalDefinitionScanStorage_EM;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
@@ -39,11 +38,8 @@ import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
@@ -163,25 +159,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
eDismantleBoom = true;
}
- private void quantumStuff(boolean shouldExist) {
- IGregTechTileEntity base = getBaseMetaTileEntity();
- if (base != null && base.getWorld() != null) {
- int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 4 + base.getXCoord();
- int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 4 + base.getYCoord();
- int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 4 + base.getZCoord();
- Block block = base.getWorld().getBlock(xDir, yDir, zDir);
- if (shouldExist) {
- if (block != null && block.getMaterial() == Material.air) {
- base.getWorld().setBlock(xDir, yDir, zDir, QuantumStuffBlock.INSTANCE, 0, 2);
- }
- } else {
- if (block instanceof QuantumStuffBlock) {
- base.getWorld().setBlock(xDir, yDir, zDir, Blocks.air, 0, 2);
- }
- }
- }
- }
-
private void addComputationRequirements(int depthPlus, int capabilities) {
if (areBitsSet(SCAN_GET_NOMENCLATURE, capabilities)) {
computationRequired += depthPlus * 3L;
@@ -296,7 +273,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
eRequiredData = (short) (scannerRecipe.mSpecialValue >>> 16);
eAmpereFlow = (short) (scannerRecipe.mSpecialValue & 0xFFFF);
mEUt = scannerRecipe.mEUt;
- quantumStuff(true);
return true;
}
} else if (CustomItemList.scanContainer.isStackEqual(itemStack, false, true)) {
@@ -331,12 +307,10 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
computationRemaining = computationRequired *= 20;
mMaxProgresstime = 20; // const
mEfficiencyIncrease = 10000;
- quantumStuff(true);
return true;
}
}
}
- quantumStuff(false);
objectResearched = null;
computationRemaining = 0;
return false;
@@ -359,7 +333,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
}
objectResearched = null;
computationRemaining = 0;
- quantumStuff(false);
}
@Override
@@ -449,7 +422,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
@Override
public void onRemoval() {
- quantumStuff(false);
super.onRemoval();
}
@@ -515,7 +487,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
@Override
public void stopMachine() {
- quantumStuff(false);
super.stopMachine();
computationRequired = computationRemaining = 0;
objectResearched = null;
@@ -539,14 +510,11 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
}
}
if (eRecipe == null) {
- quantumStuff(false);
objectResearched = null;
eRequiredData = 0;
computationRequired = computationRemaining = 0;
mMaxProgresstime = 0;
mEfficiencyIncrease = 0;
- } else {
- quantumStuff(true);
}
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
index 2078a2e5ab..38c4393c64 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
@@ -11,7 +11,6 @@ import static net.minecraft.util.StatCollector.translateToLocal;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMInstanceStackMap;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.thing.block.QuantumStuffBlock;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.util.TT_Utility;
@@ -22,9 +21,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import java.util.HashMap;
import java.util.function.Supplier;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
@@ -186,25 +182,6 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
EMInstanceStackMap[] inputs, GT_MetaTileEntity_EM_machine te, Parameters parameters);
}
- private void quantumStuff(boolean shouldIExist) {
- IGregTechTileEntity base = getBaseMetaTileEntity();
- if (base != null && base.getWorld() != null) {
- int xDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetX * 2 + base.getXCoord();
- int yDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetY * 2 + base.getYCoord();
- int zDir = ForgeDirection.getOrientation(base.getBackFacing()).offsetZ * 2 + base.getZCoord();
- Block block = base.getWorld().getBlock(xDir, yDir, zDir);
- if (shouldIExist) {
- if (block != null && block.getMaterial() == Material.air) {
- base.getWorld().setBlock(xDir, yDir, zDir, QuantumStuffBlock.INSTANCE, 0, 2);
- }
- } else {
- if (block instanceof QuantumStuffBlock) {
- base.getWorld().setBlock(xDir, yDir, zDir, Blocks.air, 0, 2);
- }
- }
- }
- }
-
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_EM_machine(mName);
@@ -274,14 +251,10 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
@Override
public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) {
setCurrentBehaviour();
- if (aBaseMetaTileEntity.isServerSide()) {
- quantumStuff(aBaseMetaTileEntity.isActive());
- }
}
@Override
public void onRemoval() {
- quantumStuff(false);
super.onRemoval();
}
@@ -331,19 +304,16 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
eRequiredData = control.getRequiredData();
mEfficiencyIncrease = control.getEffIncrease();
boolean polluted = polluteEnvironment(control.getPollutionToAdd());
- quantumStuff(polluted);
return polluted;
}
@Override
public void stopMachine() {
- quantumStuff(false);
super.stopMachine();
}
@Override
protected void afterRecipeCheckFailed() {
- quantumStuff(false);
super.afterRecipeCheckFailed();
}
@@ -367,8 +337,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
outputEM[i] = null;
}
}
- quantumStuff(false);
- // all other are handled by base multi block code - cleaning is automatic
+ // all others are handled by base multi block code - cleaning is automatic
}
@Override