aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java12
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalInstanceStackMap.java4
-rw-r--r--src/main/java/com/github/technus/tectech/loader/EntityLoader.java15
-rw-r--r--src/main/java/com/github/technus/tectech/loader/MainLoader.java10
-rw-r--r--src/main/java/com/github/technus/tectech/loader/ThingsLoader.java5
-rw-r--r--src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/ClientProxy.java15
-rw-r--r--src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java3
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/entity/projectileEM.java74
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/tileEntity/TileTurretBaseEM.java78
-rw-r--r--src/main/java/openmodularturrets/blocks/turretbases/TurretBaseEM.java (renamed from src/main/java/com/github/technus/tectech/thing/block/TurretBaseEM.java)10
-rw-r--r--src/main/java/openmodularturrets/blocks/turretbases/TurretBaseItemEM.java (renamed from src/main/java/com/github/technus/tectech/thing/block/TurretBaseItemEM.java)2
-rw-r--r--src/main/java/openmodularturrets/blocks/turretheads/TurretHeadEM.java (renamed from src/main/java/com/github/technus/tectech/thing/block/TurretHeadEM.java)4
-rw-r--r--src/main/java/openmodularturrets/blocks/turretheads/TurretHeadItemEM.java (renamed from src/main/java/com/github/technus/tectech/thing/block/TurretHeadItemEM.java)2
-rw-r--r--src/main/java/openmodularturrets/blocks/turretheads/TurretHeadItemRenderEM.java37
-rw-r--r--src/main/java/openmodularturrets/blocks/turretheads/TurretHeadRenderEM.java (renamed from src/main/java/com/github/technus/tectech/thing/block/TurretHeadRenderEM.java)2
-rw-r--r--src/main/java/openmodularturrets/entity/projectiles/projectileEM.java123
-rw-r--r--src/main/java/openmodularturrets/entity/projectiles/projectileRenderEM.java74
-rw-r--r--src/main/java/openmodularturrets/tileentity/turret/TileTurretHeadEM.java (renamed from src/main/java/com/github/technus/tectech/thing/tileEntity/TileTurretHeadEM.java)21
-rw-r--r--src/main/java/openmodularturrets/tileentity/turretbase/TileTurretBaseEM.java63
38 files changed, 392 insertions, 182 deletions
diff --git a/src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java b/src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java
index 633bbc5097..59b3e2e0fe 100644
--- a/src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java
+++ b/src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java
@@ -15,6 +15,9 @@ public class TecTechConfig extends ConfigManager {
public static final boolean DEBUG_MODE = true;
public boolean BOOM_ENABLE;
public boolean NERF_FUSION;
+ public boolean ENABLE_TURRET_EXPLOSIONS;
+ public float TURRET_DAMAGE_FACTOR;
+ public float TURRET_EXPLOSION_FACTOR;
@Override
protected void PreInit() {
@@ -22,6 +25,9 @@ public class TecTechConfig extends ConfigManager {
//DEBUG_MODE = false;
BOOM_ENABLE = true;
NERF_FUSION = true;
+ ENABLE_TURRET_EXPLOSIONS = true;
+ TURRET_DAMAGE_FACTOR=10;
+ TURRET_EXPLOSION_FACTOR=1;
}
@Override
@@ -34,6 +40,12 @@ public class TecTechConfig extends ConfigManager {
"Set to false to disable explosions on everything bad that you can do (this will not be available after release)");
NERF_FUSION = _mainConfig.getBoolean("NerfFusion", "Features", NERF_FUSION,
"Set to false to disable nerfing of plasmas heavier than Fe");
+ ENABLE_TURRET_EXPLOSIONS = _mainConfig.getBoolean("TurretBoomEnable", "Features", ENABLE_TURRET_EXPLOSIONS,
+ "Set to false to disable explosions caused by EM turrets");
+ TURRET_DAMAGE_FACTOR = _mainConfig.getFloat("TurretDamageFactor", "Features", TURRET_DAMAGE_FACTOR, 0, Short.MAX_VALUE,
+ "Damage is multiplied by this number");
+ TURRET_EXPLOSION_FACTOR = _mainConfig.getFloat("TurretExplosionFactor", "Features", TURRET_EXPLOSION_FACTOR, 0, Short.MAX_VALUE,
+ "Explosion strength is multiplied by this number");
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalInstanceStackMap.java b/src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalInstanceStackMap.java
index 3443463718..7d27f573bb 100644
--- a/src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalInstanceStackMap.java
+++ b/src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalInstanceStackMap.java
@@ -267,6 +267,10 @@ public final class cElementalInstanceStackMap implements Comparable<cElementalIn
return map.get(def);
}
+ public cElementalInstanceStack get(int i){
+ return map.values().toArray(new cElementalInstanceStack[0])[i];
+ }
+
public String[] getElementalInfo() {
final String[] info = new String[map.size() * 4];
int i = 0;
diff --git a/src/main/java/com/github/technus/tectech/loader/EntityLoader.java b/src/main/java/com/github/technus/tectech/loader/EntityLoader.java
new file mode 100644
index 0000000000..f77312850c
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/loader/EntityLoader.java
@@ -0,0 +1,15 @@
+package com.github.technus.tectech.loader;
+
+import com.github.technus.tectech.TecTech;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import openmodularturrets.entity.projectiles.projectileEM;
+
+/**
+ * Created by Tec on 30.07.2017.
+ */
+public class EntityLoader implements Runnable {
+ @Override
+ public void run() {
+ EntityRegistry.registerModEntity(projectileEM.class, "projectileEM", 0, TecTech.instance, 16, 5, true);
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java
index 9355c20c9b..a370e8a4a4 100644
--- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java
@@ -10,7 +10,9 @@ import com.github.technus.tectech.thing.casing.GT_Container_CasingsTT;
import com.github.technus.tectech.thing.item.DebugBuilder;
import com.github.technus.tectech.thing.item.DebugContainer_EM;
import com.github.technus.tectech.thing.machineTT;
+import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ProgressManager;
+import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
@@ -18,6 +20,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
+import openmodularturrets.entity.projectiles.projectileEM;
import java.util.List;
@@ -30,7 +33,7 @@ public final class MainLoader {//TODO add checks for - is mod loaded dreamcraft
public static DamageSource microwaving;
public void load() {
- ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 5);
+ ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 6);
progressBarLoad.step("Elemental Things");
new ElementalLoader().run();
@@ -43,6 +46,7 @@ public final class MainLoader {//TODO add checks for - is mod loaded dreamcraft
} else {
essentiaContainerCompat = new EssentiaCompat();
}
+ TecTech.Logger.info("Thaumcraft Compatibility Done");
progressBarLoad.step("Regular Things");
new ThingsLoader().run();
@@ -52,6 +56,10 @@ public final class MainLoader {//TODO add checks for - is mod loaded dreamcraft
new MachineLoader().run();
TecTech.Logger.info("Machine Init Done");
+ progressBarLoad.step("Register entities");
+ new EntityLoader().run();
+ TecTech.Logger.info("Entities registered");
+
progressBarLoad.step("Add damage types");
microwaving=new DamageSource("microwaving");
microwaving.setDamageAllowedInCreativeMode();
diff --git a/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java b/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java
index 8a3523f9df..3f4b92c3c4 100644
--- a/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/ThingsLoader.java
@@ -2,13 +2,14 @@ package com.github.technus.tectech.loader;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.thing.block.TurretBaseEM;
-import com.github.technus.tectech.thing.block.TurretHeadEM;
+import openmodularturrets.blocks.turretbases.TurretBaseEM;
+import openmodularturrets.blocks.turretheads.TurretHeadEM;
import com.github.technus.tectech.thing.casing.GT_Block_CasingsTT;
import com.github.technus.tectech.thing.casing.GT_Container_CasingsTT;
import com.github.technus.tectech.thing.item.DebugBuilder;
import com.github.technus.tectech.thing.item.DebugContainer_EM;
import cpw.mods.fml.common.Loader;
+import openmodularturrets.entity.projectiles.projectileEM;
/**
* Created by danie_000 on 16.11.2016.
diff --git a/src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
index 4a94679a6d..af93f0ca06 100644
--- a/src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
+++ b/src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
@@ -16,6 +16,7 @@ import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
import static com.github.technus.tectech.magicAddon.EssentiaCompat.essentiaContainerCompat;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.E;
import static gregtech.api.enums.GT_Values.V;
diff --git a/src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
index c1783fc774..fc704d7ecb 100644
--- a/src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
+++ b/src/main/java/com/github/technus/tectech/magicAddon/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
@@ -16,6 +16,7 @@ import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
import static com.github.technus.tectech.magicAddon.EssentiaCompat.essentiaContainerCompat;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.E;
import static gregtech.api.enums.GT_Values.V;
diff --git a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
index d68ef8b9a3..ba76c0ec44 100644
--- a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
@@ -2,8 +2,12 @@ package com.github.technus.tectech.proxy;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.thing.block.QuantumGlassRender;
-import com.github.technus.tectech.thing.block.TurretHeadRenderEM;
-import com.github.technus.tectech.thing.tileEntity.TileTurretHeadEM;
+import openmodularturrets.blocks.turretheads.TurretHeadEM;
+import openmodularturrets.blocks.turretheads.TurretHeadItemRenderEM;
+import openmodularturrets.blocks.turretheads.TurretHeadRenderEM;
+import openmodularturrets.entity.projectiles.projectileEM;
+import openmodularturrets.entity.projectiles.projectileRenderEM;
+import openmodularturrets.tileentity.turret.TileTurretHeadEM;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
@@ -14,12 +18,12 @@ import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.particle.EntityExplodeFX;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.world.World;
+import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
-import static openmodularturrets.client.render.renderers.blockitem.TileEntityRenderers.laserTurretRenderer;
-
public class ClientProxy extends CommonProxy {
@Override
public void registerRenderInfo() {
@@ -29,6 +33,9 @@ public class ClientProxy extends CommonProxy {
if(Loader.isModLoaded("openmodularturrets")) {
TurretHeadRenderEM turretHeadRenderEM=new TurretHeadRenderEM();
ClientRegistry.bindTileEntitySpecialRenderer(TileTurretHeadEM.class, turretHeadRenderEM);
+ MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(TurretHeadEM.INSTANCE), new TurretHeadItemRenderEM(turretHeadRenderEM, new TileTurretHeadEM()));
+
+ RenderingRegistry.registerEntityRenderingHandler(projectileEM.class, new projectileRenderEM());
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java
index 85036897a3..4961bc784e 100644
--- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java
+++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java
@@ -22,13 +22,14 @@ import java.util.List;
*/
public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract {
+ public final static int textureOffset = 96;
private static IIcon eM0, eM1, eM1s, eM2, eM2s, eM3, eM3s, eM4, eM5, eM6, eM7, eM7s, eM8, eM9, eM10, eM11, eM12, eM13, eM14;
private static IIcon debug[] = new IIcon[6];
public GT_Block_CasingsTT() {
super(GT_Item_CasingsTT.class, "gt.blockcasingsTT", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 15; i = (byte) (i + 1)) {
- Textures.BlockIcons.CASING_BLOCKS[(i + 96)] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.CASING_BLOCKS[(i + textureOffset)] = new GT_CopiedBlockTexture(this, 6, i);
/*IMPORTANT for block recoloring**/
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "High Power Casing");
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/entity/projectileEM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/entity/projectileEM.java
deleted file mode 100644
index 76b0071527..0000000000
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/entity/projectileEM.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.github.technus.tectech.thing.metaTileEntity.entity;
-
-import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStackMap;
-import net.minecraft.block.Block;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.world.World;
-import openmodularturrets.entity.projectiles.LaserProjectile;
-import openmodularturrets.entity.projectiles.damagesources.NormalDamageSource;
-import openmodularturrets.handler.ConfigHandler;
-import openmodularturrets.tileentity.turretbase.TurretBase;
-import openmodularturrets.util.PlayerUtil;
-
-import java.util.Random;
-
-/**
- * Created by Bass on 27/07/2017.
- */
-public class projectileEM extends LaserProjectile {
- private TurretBase turretBase;
-
- public projectileEM(World par1World) {
- super(par1World);
- this.gravity = 0.0F;
- }
-
- public projectileEM(World par1World, TurretBase turretBase, cElementalInstanceStackMap avalableEM) {
- super(par1World, turretBase);
- this.turretBase = turretBase;
- this.gravity = 0.0F;
- }
-
- protected void onImpact(MovingObjectPosition movingobjectposition) {
- if(this.ticksExisted > 1) {
- if(movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
- Block hitBlock = this.worldObj.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ);
- if(hitBlock != null && !hitBlock.getMaterial().isSolid()) {
- return;
- }
- }
-
- if(movingobjectposition.entityHit != null && !this.worldObj.isRemote) {
- Random random = new Random();
- this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "openmodularturrets:laserHit", ConfigHandler.getTurretSoundVolume(), random.nextFloat() + 0.5F);
- if(movingobjectposition.entityHit != null && !this.worldObj.isRemote) {
- int damage = ConfigHandler.getLaserTurretSettings().getDamage();
- if(movingobjectposition.entityHit instanceof EntityLivingBase) {
- EntityLivingBase elb = (EntityLivingBase)movingobjectposition.entityHit;
- damage = (int)((double)damage + (double)((int)elb.getHealth()) * 0.1D);
- }
-
- if(movingobjectposition.entityHit instanceof EntityPlayer) {
- if(this.canDamagePlayer((EntityPlayer)movingobjectposition.entityHit)) {
- movingobjectposition.entityHit.setFire(2);
- movingobjectposition.entityHit.attackEntityFrom(new NormalDamageSource("laser"), (float)damage);
- movingobjectposition.entityHit.hurtResistantTime = 0;
- }
- } else {
- movingobjectposition.entityHit.setFire(2);
- movingobjectposition.entityHit.attackEntityFrom(new NormalDamageSource("laser"), (float)damage);
- movingobjectposition.entityHit.hurtResistantTime = 0;
- }
- }
- }
-
- this.setDead();
- }
- }
-
- private boolean canDamagePlayer(EntityPlayer entityPlayer) {
- return ConfigHandler.turretDamageTrustedPlayers || this.turretBase.getTrustedPlayer(entityPlayer.getUniqueID()) == null && !PlayerUtil.getPlayerUIDUnstable(this.turretBase.getOwner()).equals(entityPlayer.getUniqueID());
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
index 57488e9072..799bdc1404 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
@@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
/**
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
index 3f83e923f4..118af9093c 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
@@ -14,6 +14,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.E;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
index eebfd99b28..3ee9b844b1 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
@@ -19,6 +19,7 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
/**
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
index 6e36a8b3a7..3f347ba33b 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
@@ -24,6 +24,7 @@ import net.minecraft.util.EnumChatFormatting;
import java.util.ArrayList;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.V;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java
index 9c4e7ff147..bc59a4fb0d 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafter.java
@@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
/**
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
index 19b63ed604..dd4ca44a3a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
@@ -14,6 +14,7 @@ import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
import static com.github.technus.tectech.elementalMatter.interfaces.iElementalDefinition.stableRawLifeTime;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.VN;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
index 4814ba3cde..fbe526d905 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
import static com.github.technus.tectech.Util.StructureBuilder;
import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.refMass;
import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.refUnstableMass;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.V;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
index 2a3a229cd6..38d3d67f31 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.GregTech_API.mEUtoRF;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
index 71f9ccfdc0..a77b10bd9d 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
@@ -11,6 +11,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.V;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
index 09ed83fa5e..334dd45642 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
@@ -20,6 +20,7 @@ import static com.github.technus.tectech.Util.StructureBuilder;
import static com.github.technus.tectech.Util.isInputEqual;
import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.refMass;
import static com.github.technus.tectech.elementalMatter.definitions.dAtomDefinition.refUnstableMass;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.V;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
index f59e835652..81832939ed 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
@@ -19,6 +19,7 @@ import net.minecraft.util.EnumChatFormatting;
import java.util.ArrayList;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.E;
import static gregtech.api.enums.GT_Values.V;
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 731758f955..5acd5e047f 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
@@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
/**
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
index 66d25782a1..e2124a9710 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
@@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
/**
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
index 66058ec3a3..ab85a2058b 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
@@ -14,6 +14,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.V;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
index df8fc702b0..0080d9b3f6 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
@@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.GregTech_API.sBlockCasings1;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
index 7f54412f0b..0bad115812 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
@@ -14,6 +14,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
import static gregtech.api.enums.GT_Values.E;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java
index b790b84394..1b2babf471 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java
@@ -40,6 +40,7 @@ import java.util.Map;
import static com.github.technus.tectech.CommonValues.*;
import static com.github.technus.tectech.Util.StructureChecker;
import static com.github.technus.tectech.Util.StructureCheckerAdvanced;
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.GT_Values.VN;
@@ -57,7 +58,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
protected static Textures.BlockIcons.CustomIcon ScreenOFF;
protected static Textures.BlockIcons.CustomIcon ScreenON;
- protected final static int textureOffset = 96;
public ArrayList<GT_MetaTileEntity_Hatch_InputElemental> eInputHatches = new ArrayList<>();
public ArrayList<GT_MetaTileEntity_Hatch_OutputElemental> eOutputHatches = new ArrayList<>();
diff --git a/src/main/java/com/github/technus/tectech/thing/tileEntity/TileTurretBaseEM.java b/src/main/java/com/github/technus/tectech/thing/tileEntity/TileTurretBaseEM.java
deleted file mode 100644
index 4f7f399b93..0000000000
--- a/src/main/java/com/github/technus/tectech/thing/tileEntity/TileTurretBaseEM.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.github.technus.tectech.thing.tileEntity;
-
-import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStackMap;
-import com.github.technus.tectech.elementalMatter.interfaces.iElementalInstanceContainer;
-import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
-import cpw.mods.fml.common.Optional;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import openmodularturrets.tileentity.turretbase.TurretBaseTierFiveTileEntity;
-
-/**
- * Created by Bass on 27/07/2017.
- */
-
-public class TileTurretBaseEM extends TurretBaseTierFiveTileEntity implements iElementalInstanceContainer {
- public TileTurretBaseEM(int MaxEnergyStorage, int MaxIO) {
- super(MaxEnergyStorage, MaxIO);
- }
-
- @Override
- public int getSizeInventory() {
- return 13;
- }
-
- public String getInventoryName() {
- return "modtur.turretbasefive";
- }
-
- @Optional.Method(
- modid = "OpenComputers"
- )
- public String getComponentName() {
- return "turretBaseEM";
- }
-
- @Override
- public int getBaseTier() {
- return 5;
- }
-
- @Override
- public cElementalInstanceStackMap getContainerHandler() {
- World worldIn=getWorldObj();
- TileEntity te;
- if((te=worldIn.getTileEntity(xCoord + 1, yCoord, zCoord)) instanceof IGregTechTileEntity)
- if(((IGregTechTileEntity)te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
- return ((GT_MetaTileEntity_Hatch_InputElemental)((IGregTechTileEntity) te).getMetaTileEntity()).getContainerHandler();
-
- if((te=worldIn.getTileEntity(xCoord - 1, yCoord, zCoord)) instanceof IGregTechTileEntity)
- if(((IGregTechTileEntity)te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
- return ((GT_MetaTileEntity_Hatch_InputElemental)((IGregTechTileEntity) te).getMetaTileEntity()).getContainerHandler();
-
- if((te=worldIn.getTileEntity(xCoord, yCoord+1, zCoord)) instanceof IGregTechTileEntity)
- if(((IGregTechTileEntity)te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
- return ((GT_MetaTileEntity_Hatch_InputElemental)((IGregTechTileEntity) te).getMetaTileEntity()).getContainerHandler();
-
- if((te=worldIn.getTileEntity(xCoord, yCoord-1, zCoord)) instanceof IGregTechTileEntity)
- if(((IGregTechTileEntity)te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
- return ((GT_MetaTileEntity_Hatch_InputElemental)((IGregTechTileEntity) te).getMetaTileEntity()).getContainerHandler();
-
- if((te=worldIn.getTileEntity(xCoord, yCoord, zCoord+1)) instanceof IGregTechTileEntity)
- if(((IGregTechTileEntity)te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
- return ((GT_MetaTileEntity_Hatch_InputElemental)((IGregTechTileEntity) te).getMetaTileEntity()).getContainerHandler();
-
- if((te=worldIn.getTileEntity(xCoord, yCoord, zCoord-1)) instanceof IGregTechTileEntity)
- if(((IGregTechTileEntity)te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
- return ((GT_MetaTileEntity_Hatch_InputElemental)((IGregTechTileEntity) te).getMetaTileEntity()).getContainerHandler();
-
- return null;
- }
-
- @Override
- @Deprecated
- public float purgeOverflow() {
- throw new NoSuchMethodError("This is not a valid use");
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/thing/block/TurretBaseEM.java b/src/main/java/openmodularturrets/blocks/turretbases/TurretBaseEM.java
index ac410c36ab..78733d0599 100644
--- a/src/main/java/com/github/technus/tectech/thing/block/TurretBaseEM.java
+++ b/src/main/java/openmodularturrets/blocks/turretbases/TurretBaseEM.java
@@ -1,19 +1,21 @@
-package com.github.technus.tectech.thing.block;
+package openmodularturrets.blocks.turretbases;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.auxiliary.Reference;
-import com.github.technus.tectech.thing.tileEntity.TileTurretBaseEM;
+import openmodularturrets.handler.ConfigHandler;
+import openmodularturrets.tileentity.turretbase.TileTurretBaseEM;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
-import openmodularturrets.blocks.turretbases.BlockAbstractTurretBase;
/**
* Created by Bass on 27/07/2017.
*/
public class TurretBaseEM extends BlockAbstractTurretBase {
+ private final int MaxCharge = ConfigHandler.getBaseTierFiveMaxCharge();
+ private final int MaxIO = ConfigHandler.getBaseTierFiveMaxIo();
public static TurretBaseEM INSTANCE;
public TurretBaseEM(){
@@ -27,7 +29,7 @@ public class TurretBaseEM extends BlockAbstractTurretBase {
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- return new TileTurretBaseEM(1000000000,50000);
+ return new TileTurretBaseEM(MaxCharge,MaxIO);
}
public void registerBlockIcons(IIconRegister p_149651_1_) {
diff --git a/src/main/java/com/github/technus/tectech/thing/block/TurretBaseItemEM.java b/src/main/java/openmodularturrets/blocks/turretbases/TurretBaseItemEM.java
index 1c8dc311cf..36437fa741 100644
--- a/src/main/java/com/github/technus/tectech/thing/block/TurretBaseItemEM.java
+++ b/src/main/java/openmodularturrets/blocks/turretbases/TurretBaseItemEM.java
@@ -1,4 +1,4 @@
-package com.github.technus.tectech.thing.block;
+package openmodularturrets.blocks.turretbases;
import com.github.technus.tectech.CommonValues;
import net.minecraft.block.Block;
diff --git a/src/main/java/com/github/technus/tectech/thing/block/TurretHeadEM.java b/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadEM.java
index d6fc241aef..255a5a56d3 100644
--- a/src/main/java/com/github/technus/tectech/thing/block/TurretHeadEM.java
+++ b/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadEM.java
@@ -1,8 +1,8 @@
-package com.github.technus.tectech.thing.block;
+package openmodularturrets.blocks.turretheads;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.auxiliary.Reference;
-import com.github.technus.tectech.thing.tileEntity.TileTurretHeadEM;
+import openmodularturrets.tileentity.turret.TileTurretHeadEM;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
diff --git a/src/main/java/com/github/technus/tectech/thing/block/TurretHeadItemEM.java b/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadItemEM.java
index e8ee236809..db2e034710 100644
--- a/src/main/java/com/github/technus/tectech/thing/block/TurretHeadItemEM.java
+++ b/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadItemEM.java
@@ -1,4 +1,4 @@
-package com.github.technus.tectech.thing.block;
+package openmodularturrets.blocks.turretheads;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
diff --git a/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadItemRenderEM.java b/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadItemRenderEM.java
new file mode 100644
index 0000000000..fbfda7c6ee
--- /dev/null
+++ b/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadItemRenderEM.java
@@ -0,0 +1,37 @@
+package openmodularturrets.blocks.turretheads;
+
+import openmodularturrets.tileentity.turret.TileTurretHeadEM;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.client.IItemRenderer;
+import openmodularturrets.client.render.models.ModelLaserTurret;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * Created by Tec on 30.07.2017.
+ */
+public class TurretHeadItemRenderEM implements IItemRenderer {
+ private final TurretHeadRenderEM turretRenderer;
+ private final TileTurretHeadEM turretTileEntity;
+ private final ModelLaserTurret model;
+
+ public TurretHeadItemRenderEM(TurretHeadRenderEM turretRenderer, TileTurretHeadEM turretTileEntity) {
+ this.turretRenderer = turretRenderer;
+ this.turretTileEntity = turretTileEntity;
+ this.model = new ModelLaserTurret();
+ }
+
+ public boolean handleRenderType(ItemStack item, ItemRenderType type) {
+ return true;
+ }
+
+ public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
+ return true;
+ }
+
+ public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
+ GL11.glPushMatrix();
+ GL11.glTranslated(-0.5D, -0.5D, -0.5D);
+ this.turretRenderer.renderTileEntityAt(this.turretTileEntity, 0.0D, 0.0D, 0.0D, 0.0F);
+ GL11.glPopMatrix();
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/thing/block/TurretHeadRenderEM.java b/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadRenderEM.java
index 6d10a0cde5..f0aa331645 100644
--- a/src/main/java/com/github/technus/tectech/thing/block/TurretHeadRenderEM.java
+++ b/src/main/java/openmodularturrets/blocks/turretheads/TurretHeadRenderEM.java
@@ -1,4 +1,4 @@
-package com.github.technus.tectech.thing.block;
+package openmodularturrets.blocks.turretheads;
import openmodularturrets.client.render.renderers.blockitem.LaserTurretRenderer;
diff --git a/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java b/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java
new file mode 100644
index 0000000000..1d118964ca
--- /dev/null
+++ b/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java
@@ -0,0 +1,123 @@
+package openmodularturrets.entity.projectiles;
+
+import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStack;
+import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStackMap;
+import com.github.technus.tectech.elementalMatter.definitions.dHadronDefinition;
+import com.github.technus.tectech.elementalMatter.definitions.eQuarkDefinition;
+import gregtech.api.GregTech_API;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.world.World;
+import openmodularturrets.entity.projectiles.damagesources.NormalDamageSource;
+import openmodularturrets.handler.ConfigHandler;
+import openmodularturrets.tileentity.turretbase.TurretBase;
+
+
+/**
+ * Created by Bass on 27/07/2017.
+ */
+public class projectileEM extends TurretProjectile {
+ public float gravity=0;
+ private TurretBase turretBase;
+
+ private boolean exotic, antiMatter;
+
+ private float massFactor;
+
+ public projectileEM(World par1World) {
+ super(par1World);
+ }
+
+ public projectileEM(World par1World, TurretBase turretBase, cElementalInstanceStackMap avalableEM) {
+ super(par1World);
+ this.turretBase = turretBase;
+ boolean onlyQuarks=true;
+ if(avalableEM!=null && avalableEM.hasStacks()) {
+ for (cElementalInstanceStack stack : avalableEM.values()) {
+ if (!(stack.definition instanceof eQuarkDefinition)) {
+ onlyQuarks = false;
+ }
+ }
+ if (onlyQuarks) {
+ avalableEM.clear();
+ } else {
+ cElementalInstanceStack consumeFromThis=avalableEM.get(TecTech.Rnd.nextInt(avalableEM.size()));
+ massFactor =consumeFromThis.definition.getMass()/ dHadronDefinition.hadron_n_.getMass();
+
+ if(consumeFromThis.definition.getType()>1 || consumeFromThis.definition.getType()<-1) exotic = true;
+ if(consumeFromThis.definition.getType()<0) antiMatter = true;
+
+ if (consumeFromThis.definition.getCharge() == 0) this.gravity = massFactor/100f;
+ else this.gravity = Math.min(0.0025F/Math.abs(consumeFromThis.definition.getCharge()),massFactor/100f);
+
+ antiMatter=true;//todo remove
+
+ avalableEM.removeAmount(false,consumeFromThis.definition.getStackForm(1));
+ }
+ }
+ //todo add subspace pollution
+ }
+
+ protected void onImpact(MovingObjectPosition movingobjectposition) {
+ if(this.ticksExisted > 1) {
+ if(movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
+ Block hitBlock = this.worldObj.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ);
+ if(hitBlock != null){
+ if (hitBlock.getMaterial().isSolid() && TecTech.ModConfig.ENABLE_TURRET_EXPLOSIONS && antiMatter) {
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "openmodularturrets:laserHit", ConfigHandler.getTurretSoundVolume(), TecTech.Rnd.nextFloat() + 0.5F);
+ GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(209), 1.0F, -1.0F,
+ movingobjectposition.blockX,
+ movingobjectposition.blockY,
+ movingobjectposition.blockZ);
+ worldObj.createExplosion(null,
+ movingobjectposition.blockX + 0.5D,
+ movingobjectposition.blockY + 0.5D,
+ movingobjectposition.blockZ + 0.5D, (exotic?10:1) * TecTech.ModConfig.TURRET_EXPLOSION_FACTOR * massFactor * (isAmped?(amp_level*.1f)+1:1) * (ticksExisted/250f), true);
+ } else {
+ return;
+ }
+ }
+ }
+
+ if(movingobjectposition.entityHit != null && !this.worldObj.isRemote) {
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "openmodularturrets:laserHit", ConfigHandler.getTurretSoundVolume(), TecTech.Rnd.nextFloat() + 0.5F);
+ if(movingobjectposition.entityHit != null && !this.worldObj.isRemote) {
+ float damage = (exotic?10:1) * TecTech.ModConfig.TURRET_DAMAGE_FACTOR * massFactor * (isAmped?(amp_level*.1f)+1:1);
+
+ if(movingobjectposition.entityHit instanceof EntityPlayer) {
+ if(this.canDamagePlayer((EntityPlayer)movingobjectposition.entityHit)) {
+ movingobjectposition.entityHit.setFire((exotic?10:1)*2);
+ movingobjectposition.entityHit.attackEntityFrom(new NormalDamageSource("laser"), damage);
+ if(antiMatter) movingobjectposition.entityHit.hurtResistantTime = 0;
+ }
+ } else {
+ movingobjectposition.entityHit.setFire((exotic?10:1)*2);
+ movingobjectposition.entityHit.attackEntityFrom(new NormalDamageSource("laser"), damage);
+ if(antiMatter) movingobjectposition.entityHit.hurtResistantTime = 0;
+ }
+
+ if (TecTech.ModConfig.ENABLE_TURRET_EXPLOSIONS && antiMatter) {
+ GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(209), 1.0F, -1.0F,
+ (int)movingobjectposition.entityHit.posX,
+ (int)movingobjectposition.entityHit.posY,
+ (int)movingobjectposition.entityHit.posZ);
+ worldObj.createExplosion(null,
+ movingobjectposition.entityHit.posX,
+ movingobjectposition.entityHit.posY,
+ movingobjectposition.entityHit.posZ, (exotic?10:1) * TecTech.ModConfig.TURRET_EXPLOSION_FACTOR * massFactor * (isAmped?(amp_level*.1f)+1:1) * (ticksExisted/250f), true);
+ }
+ }
+ }
+ this.setDead();
+ }
+ }
+
+ public void onEntityUpdate() {
+ if(this.ticksExisted >= 250) {
+ this.setDead();
+ }
+ }
+}
diff --git a/src/main/java/openmodularturrets/entity/projectiles/projectileRenderEM.java b/src/main/java/openmodularturrets/entity/projectiles/projectileRenderEM.java
new file mode 100644
index 0000000000..4ce942958b
--- /dev/null
+++ b/src/main/java/openmodularturrets/entity/projectiles/projectileRenderEM.java
@@ -0,0 +1,74 @@
+package openmodularturrets.entity.projectiles;
+
+import com.github.technus.tectech.auxiliary.Reference;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * Created by Tec on 29.07.2017.
+ */
+@SideOnly(Side.CLIENT)
+public class projectileRenderEM extends Render {
+ private static final ResourceLocation textures = new ResourceLocation(Reference.MODID + ":textures/entity/projectileEM.png");
+
+ public projectileRenderEM() {
+ }
+
+ private void render(projectileEM entity, double par2, double par4, double par6, float par9) {
+ this.bindEntityTexture(entity);
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float)par2, (float)par4 + 0.3F, (float)par6);
+ GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
+ Tessellator var18 = Tessellator.instance;
+ byte b0 = 0;
+ float f2 = 0.0F;
+ float f3 = 0.5F;
+ float f4 = (float)(b0 * 10) / 32.0F;
+ float f5 = (float)(5 + b0 * 10) / 32.0F;
+ float f10 = 0.05625F;
+ GL11.glEnable('耺');
+ float f11 = - par9;
+ if(f11 > 0.0F) {
+ float i = -MathHelper.sin(f11 * 3.0F) * f11;
+ GL11.glRotatef(i, 0.0F, 0.0F, 1.0F);
+ }
+
+ GL11.glDisable(2896);
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 240.0F);
+ GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glScalef(f10, f10, f10);
+ GL11.glTranslatef(0.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(f10, 0.0F, 0.0F);
+
+ for(int var19 = 0; var19 < 4; ++var19) {
+ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(0.0F, 0.0F, f10);
+ var18.startDrawingQuads();
+ var18.addVertexWithUV(-16.0D, -2.0D, 0.0D, (double)f2, (double)f4);
+ var18.addVertexWithUV(16.0D, -2.0D, 0.0D, (double)f3, (double)f4);
+ var18.addVertexWithUV(16.0D, 2.0D, 0.0D, (double)f3, (double)f5);
+ var18.addVertexWithUV(-16.0D, 2.0D, 0.0D, (double)f2, (double)f5);
+ var18.draw();
+ }
+
+ GL11.glEnable(2896);
+ GL11.glDisable('耺');
+ GL11.glPopMatrix();
+ }
+
+ protected ResourceLocation getEntityTexture(Entity par1Entity) {
+ return textures;
+ }
+
+ public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
+ render((projectileEM)par1Entity, par2, par4, par6, par9);
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/thing/tileEntity/TileTurretHeadEM.java b/src/main/java/openmodularturrets/tileentity/turret/TileTurretHeadEM.java
index f6211fac31..277d692f47 100644
--- a/src/main/java/com/github/technus/tectech/thing/tileEntity/TileTurretHeadEM.java
+++ b/src/main/java/openmodularturrets/tileentity/turret/TileTurretHeadEM.java
@@ -1,14 +1,15 @@
-package com.github.technus.tectech.thing.tileEntity;
+package openmodularturrets.tileentity.turret;
import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStackMap;
import com.github.technus.tectech.thing.item.DebugContainer_EM;
-import com.github.technus.tectech.thing.metaTileEntity.entity.projectileEM;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import openmodularturrets.entity.projectiles.TurretProjectile;
+import openmodularturrets.entity.projectiles.projectileEM;
import openmodularturrets.handler.ConfigHandler;
+import openmodularturrets.tileentity.turretbase.TileTurretBaseEM;
import openmodularturrets.tileentity.turrets.TurretHead;
import openmodularturrets.util.TurretHeadUtil;
@@ -22,19 +23,19 @@ public class TileTurretHeadEM extends TurretHead{
}
public int getTurretRange() {
- return ConfigHandler.getLaserTurretSettings().getRange();
+ return ConfigHandler.getLaserTurretSettings().getRange()<<1;
}
public int getTurretPowerUsage() {
- return ConfigHandler.getLaserTurretSettings().getPowerUsage();
+ return ConfigHandler.getLaserTurretSettings().getPowerUsage()<<4;
}
public int getTurretFireRate() {
- return ConfigHandler.getLaserTurretSettings().getFireRate();
+ return (int)Math.ceil(ConfigHandler.getLaserTurretSettings().getFireRate()/2f);
}
public double getTurretAccuracy() {
- return ConfigHandler.getLaserTurretSettings().getAccuracy() / 10.0D;
+ return (int)Math.ceil(ConfigHandler.getLaserTurretSettings().getAccuracy() / 10.0F);
}
@Override
@@ -56,12 +57,8 @@ public class TileTurretHeadEM extends TurretHead{
return DebugContainer_EM.INSTANCE;//Placeholder item that cannot be achieved, yet still usable for debug
}
- public TurretProjectile createProjectile(World world, Entity target, ItemStack ammo) {
- //if(hatchContentPointer!=null && hatchContentPointer.hasStacks()){
- projectileEM projectile= new projectileEM(world, TurretHeadUtil.getTurretBase(worldObj, xCoord, yCoord, zCoord), hatchContentPointer);
- return projectile;
- //}
- //return new LaserProjectile(world, TurretHeadUtil.getTurretBase(worldObj, xCoord, yCoord, zCoord));
+ public final TurretProjectile createProjectile(World world, Entity target, ItemStack ammo) {
+ return new projectileEM(world, TurretHeadUtil.getTurretBase(worldObj, xCoord, yCoord, zCoord), hatchContentPointer);
}
public String getLaunchSoundEffect() {
diff --git a/src/main/java/openmodularturrets/tileentity/turretbase/TileTurretBaseEM.java b/src/main/java/openmodularturrets/tileentity/turretbase/TileTurretBaseEM.java
new file mode 100644
index 0000000000..84620a6e71
--- /dev/null
+++ b/src/main/java/openmodularturrets/tileentity/turretbase/TileTurretBaseEM.java
@@ -0,0 +1,63 @@
+package openmodularturrets.tileentity.turretbase;
+
+import com.github.technus.tectech.elementalMatter.classes.cElementalInstanceStackMap;
+import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
+import cpw.mods.fml.common.Optional;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import openmodularturrets.tileentity.turretbase.TurretBaseTierFiveTileEntity;
+
+import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
+
+/**
+ * Created by Bass on 27/07/2017.
+ */
+
+public class TileTurretBaseEM extends TurretBaseTierFiveTileEntity {
+ public TileTurretBaseEM(int MaxEnergyStorage, int MaxIO) {
+ super(MaxEnergyStorage, MaxIO);
+ }
+
+ @Optional.Method(
+ modid = "OpenComputers"
+ )
+ public String getComponentName() {
+ return "turretBaseEM";
+ }
+
+ public final cElementalInstanceStackMap getContainerHandler() {
+ World worldIn = getWorldObj();
+ TileEntity te;
+ if ((te = worldIn.getTileEntity(xCoord + 1, yCoord, zCoord)) instanceof IGregTechTileEntity &&
+ ((IGregTechTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
+ return getFromHatch((GT_MetaTileEntity_Hatch_InputElemental) ((IGregTechTileEntity) te).getMetaTileEntity());
+
+ if ((te = worldIn.getTileEntity(xCoord - 1, yCoord, zCoord)) instanceof IGregTechTileEntity &&
+ ((IGregTechTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
+ return getFromHatch((GT_MetaTileEntity_Hatch_InputElemental) ((IGregTechTileEntity) te).getMetaTileEntity());
+
+ if ((te = worldIn.getTileEntity(xCoord, yCoord + 1, zCoord)) instanceof IGregTechTileEntity &&
+ ((IGregTechTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
+ return getFromHatch((GT_MetaTileEntity_Hatch_InputElemental) ((IGregTechTileEntity) te).getMetaTileEntity());
+
+ if ((te = worldIn.getTileEntity(xCoord, yCoord - 1, zCoord)) instanceof IGregTechTileEntity &&
+ ((IGregTechTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
+ return getFromHatch((GT_MetaTileEntity_Hatch_InputElemental) ((IGregTechTileEntity) te).getMetaTileEntity());
+
+ if ((te = worldIn.getTileEntity(xCoord, yCoord, zCoord + 1)) instanceof IGregTechTileEntity &&
+ ((IGregTechTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
+ return getFromHatch((GT_MetaTileEntity_Hatch_InputElemental) ((IGregTechTileEntity) te).getMetaTileEntity());
+
+ if ((te = worldIn.getTileEntity(xCoord, yCoord, zCoord - 1)) instanceof IGregTechTileEntity &&
+ ((IGregTechTileEntity) te).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_InputElemental)
+ return getFromHatch((GT_MetaTileEntity_Hatch_InputElemental) ((IGregTechTileEntity) te).getMetaTileEntity());
+
+ return null;
+ }
+
+ private cElementalInstanceStackMap getFromHatch(GT_MetaTileEntity_Hatch_InputElemental hatch) {
+ hatch.mMachineBlock = textureOffset + 4;
+ return hatch.getContainerHandler();
+ }
+}