aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTec <daniel112092@gmail.com>2022-01-13 22:27:27 +0100
committerMartin Robertz <dream-master@gmx.net>2022-01-29 21:21:48 +0100
commit91ca8b69b5e2a9610411a5e6b1fac66d3663de15 (patch)
treedbcec969a04dc4abd7c847b03515ebe3e935c618 /src
parent5bb0894b4c54cd10e987493ad3402ad9522407db (diff)
downloadGT5-Unofficial-91ca8b69b5e2a9610411a5e6b1fac66d3663de15.tar.gz
GT5-Unofficial-91ca8b69b5e2a9610411a5e6b1fac66d3663de15.tar.bz2
GT5-Unofficial-91ca8b69b5e2a9610411a5e6b1fac66d3663de15.zip
cherry pick
This should make the EM anomaly and projectile as it was
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java53
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java2
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java105
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/tileentity/turret/TileTurretHeadEM.java11
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompat.java30
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java8
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java7
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/iElementalAspect.java8
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/transformations/AspectDefinitionCompat.java29
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/transformations/AspectDefinitionCompatEnabled.java (renamed from src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompatEnabled.java)20
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompat.java10
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompatEnabled.java33
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java126
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java69
-rw-r--r--src/main/java/com/github/technus/tectech/loader/MainLoader.java6
-rw-r--r--src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java13
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/anomaly/AnomalyHandler.java247
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/anomaly/CancerCommand.java10
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/anomaly/ChargeCommand.java10
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java53
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dAtomDefinition.java163
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/dHadronDefinition.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java10
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java61
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/tileEntity/ReactorSimTileEntity.java2
27 files changed, 586 insertions, 508 deletions
diff --git a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
index bf96d61795..72cee6d7aa 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
@@ -1,6 +1,7 @@
package com.github.technus.tectech.compatibility.gtpp;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack;
+import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo;
import gregtech.api.enums.OrePrefixes;
import net.minecraftforge.fluids.FluidStack;
@@ -66,34 +67,34 @@ public class GtppAtomLoader implements Runnable{
}
//endregion
- TRANSFORMATION_INFO.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(10), AVOGADRO_CONSTANT_144), getFluid("NEON",144));
+ bTransformationInfo.TRANSFORMATION_INFO.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(10), AVOGADRO_CONSTANT_144), getFluid("NEON",144));
generate("GERMANIUM",true,true);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(32), AVOGADRO_CONSTANT_144), OrePrefixes.dust, getUnlocalizedName("GERMANIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(34), AVOGADRO_CONSTANT_144), OrePrefixes.dust, getUnlocalizedName("SELENIUM"),1);
- TRANSFORMATION_INFO.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(35), AVOGADRO_CONSTANT_144), getFluid("BROMINE",144));
- TRANSFORMATION_INFO.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(36), AVOGADRO_CONSTANT_144), getFluid("KRYPTON",144));
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(40), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("ZIRCONIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(43), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("TECHNETIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(44), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("RUTHENIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(45), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("RHODIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(53), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("IODINE"),1);
- TRANSFORMATION_INFO.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(54), AVOGADRO_CONSTANT_144),getFluid("XENON",144));
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(72), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("HAFNIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(75), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("RHENIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(81), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("THALLIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(32), AVOGADRO_CONSTANT_144), OrePrefixes.dust, getUnlocalizedName("GERMANIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(34), AVOGADRO_CONSTANT_144), OrePrefixes.dust, getUnlocalizedName("SELENIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(35), AVOGADRO_CONSTANT_144), getFluid("BROMINE",144));
+ bTransformationInfo.TRANSFORMATION_INFO.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(36), AVOGADRO_CONSTANT_144), getFluid("KRYPTON",144));
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(40), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("ZIRCONIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(43), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("TECHNETIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(44), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("RUTHENIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(45), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("RHODIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(53), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("IODINE"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addFluid(new cElementalDefinitionStack(getFirstStableIsotope(54), AVOGADRO_CONSTANT_144),getFluid("XENON",144));
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(72), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("HAFNIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(75), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("RHENIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getFirstStableIsotope(81), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("THALLIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(84), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("POLONIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(85), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("ASTATINE"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(87), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("FRANCIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(88), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("RADIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(89), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("ACTINIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(91), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("PROTACTINIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(93), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("NEPTUNIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(84), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("POLONIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(85), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("ASTATINE"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(87), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("FRANCIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(88), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("RADIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(89), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("ACTINIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(91), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("PROTACTINIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(93), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("NEPTUNIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(96), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("CURIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(97), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("BERKELIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(98), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("CALIFORNIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(99), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("EINSTEINIUM"),1);
- TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(100), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("FERMIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(96), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("CURIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(97), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("BERKELIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(98), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("CALIFORNIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(99), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("EINSTEINIUM"),1);
+ bTransformationInfo.TRANSFORMATION_INFO.addOredict(new cElementalDefinitionStack(getBestUnstableIsotope(100), AVOGADRO_CONSTANT_144),OrePrefixes.dust, getUnlocalizedName("FERMIUM"),1);
}
}
diff --git a/src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java b/src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java
index 2842a71df3..595d814fc5 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/openComputers/AvrArchitecture.java
@@ -21,7 +21,7 @@ import li.cil.oc.api.machine.Signal;
import li.cil.oc.common.SaveHandler;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import org.apache.commons.io.IOUtils;
+import org.apache.commons.compress.utils.IOUtils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
diff --git a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java
index 92acd71ecd..a0b6106151 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/entity/projectiles/projectileEM.java
@@ -1,10 +1,8 @@
package com.github.technus.tectech.compatibility.openmodularturrets.entity.projectiles;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition;
import gregtech.api.GregTech_API;
import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
@@ -18,8 +16,6 @@ import openmodularturrets.tileentity.turretbase.TurretBase;
import openmodularturrets.util.PlayerUtil;
import openmodularturrets.util.TurretHeadUtil;
-import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT;
-
/**
* Created by Bass on 27/07/2017.
@@ -33,6 +29,7 @@ public class projectileEM extends LaserProjectile {
private int ampLevel;
private float massFactor;
+ private double mass,charge;
public projectileEM(World par1World) {
super(par1World);
@@ -51,6 +48,8 @@ public class projectileEM extends LaserProjectile {
super(par1World, turretBase);
this.turretBase = turretBase;
if(projectileContent != null){
+ mass=projectileContent.getMass();
+ charge=projectileContent.getCharge();
massFactor =(float) (projectileContent.definition.getMass()/ dHadronDefinition.hadron_n_.getMass());
if(projectileContent.definition.getType()>1 || projectileContent.definition.getType()<-1) {
@@ -66,66 +65,70 @@ public class projectileEM extends LaserProjectile {
gravity = Math.min(0.0025F / Math.abs(projectileContent.definition.getCharge()), massFactor / 100f);
}
}
- //todo make the recipe require some overflow hatches
-
- //todo add more subspace pollution
}
@Override
protected void onImpact(MovingObjectPosition movingobjectposition) {
if(ticksExisted > 1) {
- if(movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
- Block hitBlock = worldObj.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ);
- if(hitBlock != null){
- if (hitBlock.getMaterial().isSolid() && TecTech.configTecTech.ENABLE_TURRET_EXPLOSIONS && antiMatter) {
- worldObj.playSoundEffect(posX, posY, posZ, "openmodularturrets:laserHit", ConfigHandler.getTurretSoundVolume(), TecTech.RANDOM.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,
- (strange ?10:1) * TecTech.configTecTech.TURRET_EXPLOSION_FACTOR * massFactor * (isAmped? ampLevel*.1f +1:1) * (ticksExisted/250f), true);
- } else {
- return;
- }
- }
- }
-
- if(movingobjectposition.entityHit != null && !worldObj.isRemote) {
+ if(!worldObj.isRemote){
worldObj.playSoundEffect(posX, posY, posZ, "openmodularturrets:laserHit", ConfigHandler.getTurretSoundVolume(), TecTech.RANDOM.nextFloat() + 0.5F);
- if(movingobjectposition.entityHit != null && !worldObj.isRemote) {
- float damage = (strange ?10:1) * TecTech.configTecTech.TURRET_DAMAGE_FACTOR * massFactor * (isAmped? ampLevel*.1f +1:1);
-
- if(movingobjectposition.entityHit instanceof EntityPlayer) {
- if(canDamagePlayer((EntityPlayer)movingobjectposition.entityHit)) {
+ switch (movingobjectposition.typeOfHit){
+ case BLOCK:
+ Block hitBlock = worldObj.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ);
+ if(hitBlock != null){
+ if (TecTech.configTecTech.ENABLE_TURRET_EXPLOSIONS && antiMatter && hitBlock.getMaterial().isSolid()) {
+ 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,
+ TecTech.configTecTech.TURRET_EXPLOSION_FACTOR * (strange ? 10 : 1) * massFactor * (isAmped ? ampLevel * .1f + 1 : 1) * (ticksExisted / 250f), true);
+ } else {
+ return;
+ }
+ }
+ break;
+ case ENTITY:
+ float damage = (strange ?10:1) * TecTech.configTecTech.TURRET_DAMAGE_FACTOR * massFactor * (isAmped? ampLevel*.1f +1:1);
+
+ if(movingobjectposition.entityHit instanceof EntityPlayer) {
+ EntityPlayer player=(EntityPlayer)movingobjectposition.entityHit;
+ if(canDamagePlayer(player)) {
+ movingobjectposition.entityHit.setFire((strange ?10:1)*2);
+ movingobjectposition.entityHit.attackEntityFrom(new NormalDamageSource("laser"), damage);
+ if(antiMatter) {
+ movingobjectposition.entityHit.hurtResistantTime = 0;
+ }
+ if(strange){
+ TecTech.anomalyHandler.addCancer(player,mass);
+ }
+ if(charge!=0) {
+ TecTech.anomalyHandler.addCharge(player,charge);
+ }
+ }
+ } else {
movingobjectposition.entityHit.setFire((strange ?10:1)*2);
movingobjectposition.entityHit.attackEntityFrom(new NormalDamageSource("laser"), damage);
if(antiMatter) {
movingobjectposition.entityHit.hurtResistantTime = 0;
}
}
- } else {
- movingobjectposition.entityHit.setFire((strange ?10:1)*2);
- movingobjectposition.entityHit.attackEntityFrom(new NormalDamageSource("laser"), damage);
- if(antiMatter) {
- movingobjectposition.entityHit.hurtResistantTime = 0;
+
+ if (TecTech.configTecTech.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,
+ (strange ?10:1) * TecTech.configTecTech.TURRET_EXPLOSION_FACTOR * massFactor * (isAmped? ampLevel*.1f +1:1) * (ticksExisted/250f), true);
}
- }
-
- if (TecTech.configTecTech.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,
- (strange ?10:1) * TecTech.configTecTech.TURRET_EXPLOSION_FACTOR * massFactor * (isAmped? ampLevel*.1f +1:1) * (ticksExisted/250f), true);
- }
+ break;
}
}
setDead();
diff --git a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/tileentity/turret/TileTurretHeadEM.java b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/tileentity/turret/TileTurretHeadEM.java
index 1c8d476a36..fd039a0630 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/tileentity/turret/TileTurretHeadEM.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/openmodularturrets/tileentity/turret/TileTurretHeadEM.java
@@ -5,8 +5,6 @@ import com.github.technus.tectech.compatibility.openmodularturrets.entity.projec
import com.github.technus.tectech.compatibility.openmodularturrets.tileentity.turretbase.TileTurretBaseEM;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition;
-import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition;
import com.github.technus.tectech.thing.item.DebugElementalInstanceContainer_EM;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
@@ -17,7 +15,8 @@ import openmodularturrets.handler.ConfigHandler;
import openmodularturrets.tileentity.turrets.TurretHead;
import openmodularturrets.util.TurretHeadUtil;
-import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.*;
+import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT;
+import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT_DIMINISHED;
/**
* Created by Bass on 27/07/2017.
@@ -72,8 +71,8 @@ public class TileTurretHeadEM extends TurretHead{
public final TurretProjectile createProjectile(World world, Entity target, ItemStack ammo) {
while(hatchContentPointer!=null && hatchContentPointer.hasStacks()) {
cElementalInstanceStack stack = hatchContentPointer.get(TecTech.RANDOM.nextInt(hatchContentPointer.size()));
- if(stack.amount<AVOGADRO_CONSTANT_KIND_OF_SMALLER){
- hatchContentPointer.remove(stack.definition);
+ if(stack.amount<AVOGADRO_CONSTANT_DIMINISHED){
+ TecTech.anomalyHandler.addAnomaly(this,hatchContentPointer.remove(stack.definition).getMass());//todo reduce
continue;
}
hatchContentPointer.removeAmount(false, stack.definition.getStackForm(AVOGADRO_CONSTANT));
@@ -82,6 +81,8 @@ public class TileTurretHeadEM extends TurretHead{
return new projectileEM(world, TurretHeadUtil.getTurretBase(worldObj, xCoord, yCoord, zCoord), stack);
}
return new projectileEM(world, TurretHeadUtil.getTurretBase(worldObj, xCoord, yCoord, zCoord), null);
+
+ //todo make the recipe require some overflow hatches
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompat.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompat.java
deleted file mode 100644
index c3231e6132..0000000000
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompat.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions;
-
-
-import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElementalDefinition;
-import com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition;
-
-import java.util.HashMap;
-
-/**
- * Created by Tec on 21.05.2017.
- */
-public class AspectDefinitionCompat {
- public static AspectDefinitionCompat aspectDefinitionCompat;
- public static final HashMap<cElementalDefinition,String> defToAspect = new HashMap<>();
- public static final HashMap<String,cElementalDefinition> aspectToDef = new HashMap<>();
-
- public void run(){}
-
- Object getAspect(cElementalDefinition definition){
- return null;
- }
-
- String getAspectTag(cElementalDefinition definition){
- return null;
- }
-
- iElementalDefinition getDefinition(String aspect){
- return null;
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
index ddef29b214..8f570c1247 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
@@ -1,6 +1,7 @@
package com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions;
import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.transformations.AspectDefinitionCompat;
import com.github.technus.tectech.util.Util;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDecay;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDefinitionStackMap;
@@ -24,7 +25,7 @@ import static net.minecraft.util.StatCollector.translateToLocal;
/**
* Created by Tec on 06.05.2017.
*/
-public final class dComplexAspectDefinition extends cElementalDefinition implements iElementalAspect {
+public final class dComplexAspectDefinition extends cElementalDefinition {
private final int hash;
public final double mass;
@@ -253,11 +254,6 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme
}
@Override
- public Object materializeIntoAspect() {
- return AspectDefinitionCompat.aspectDefinitionCompat.getAspect(this);
- }
-
- @Override
public iElementalDefinition getAnti() {
return null;
}
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java
index 02e7d2fe21..9c6d107bff 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java
@@ -8,7 +8,7 @@ import static net.minecraft.util.StatCollector.translateToLocal;
/**
* Created by Tec on 06.05.2017.
*/
-public final class ePrimalAspectDefinition extends cElementalPrimitive implements iElementalAspect {
+public final class ePrimalAspectDefinition extends cElementalPrimitive {
public static final ePrimalAspectDefinition
magic_air = new ePrimalAspectDefinition(translateToLocal("tt.keyword.Air"), "a`", 1e1D, 35),
magic_earth = new ePrimalAspectDefinition(translateToLocal("tt.keyword.Earth"), "e`", 1e9D, 34),
@@ -36,11 +36,6 @@ public final class ePrimalAspectDefinition extends cElementalPrimitive implement
}
@Override
- public Object materializeIntoAspect() {
- return AspectDefinitionCompat.aspectDefinitionCompat.getAspect(this);
- }
-
- @Override
public boolean isTimeSpanHalfLife() {
return false;
}
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/iElementalAspect.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/iElementalAspect.java
deleted file mode 100644
index 3cb2d8e5e8..0000000000
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/iElementalAspect.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions;
-
-/**
- * Created by Tec on 21.05.2017.
- */
-public interface iElementalAspect {
- Object materializeIntoAspect();
-}
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/transformations/AspectDefinitionCompat.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/transformations/AspectDefinitionCompat.java
new file mode 100644
index 0000000000..343071e26e
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/transformations/AspectDefinitionCompat.java
@@ -0,0 +1,29 @@
+package com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.transformations;
+
+
+import com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition;
+
+import java.util.HashMap;
+
+/**
+ * Created by Tec on 21.05.2017.
+ */
+public class AspectDefinitionCompat {
+ public static AspectDefinitionCompat aspectDefinitionCompat;
+ public final HashMap<iElementalDefinition,String> defToAspect = new HashMap<>();
+ public final HashMap<String,iElementalDefinition> aspectToDef = new HashMap<>();
+
+ public void run(){}
+
+ public Object getAspect(iElementalDefinition definition){
+ return null;
+ }
+
+ public String getAspectTag(iElementalDefinition definition){
+ return null;
+ }
+
+ public iElementalDefinition getDefinition(String aspect){
+ return null;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/compatibil