aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorBlood-Asp <bloodasphendrik@gmail.com>2016-10-16 18:08:26 +0200
committerBlood-Asp <bloodasphendrik@gmail.com>2016-10-16 18:08:26 +0200
commitfa79dcd2635a317972ca0a8400cf8820c40e72de (patch)
tree2e5bac28974b1d917dc1932a678324c8ea68737d /src/main/java/gregtech/common
parentf97698b054c1d3ef1544365a65ccd90ba8d3bb6c (diff)
downloadGT5-Unofficial-fa79dcd2635a317972ca0a8400cf8820c40e72de.tar.gz
GT5-Unofficial-fa79dcd2635a317972ca0a8400cf8820c40e72de.tar.bz2
GT5-Unofficial-fa79dcd2635a317972ca0a8400cf8820c40e72de.zip
Base IC2 Classic compat. Reactor components disabled, some recipes likely missing/broken
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java22
-rw-r--r--src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java4
2 files changed, 5 insertions, 21 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
index 558505356f..a2d46f3922 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
@@ -21,6 +21,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@@ -209,11 +210,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z)
{
if(world.getBlockMetadata(x, y, z)==5){
- EntityIC2Explosive entitytntprimed = getExplosionEntity(world, x, y, z, player == null ? null : player);
- if (entitytntprimed == null) {
- return false;
- }
-
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x, y, z, player == null ? null : player);
world.spawnEntityInWorld(entitytntprimed);
world.playSoundAtEntity(entitytntprimed, "random.fuse", 1.0F, 1.0F);
@@ -223,15 +220,6 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
return super.removedByPlayer(world, player, x, y, z);
}
- public EntityIC2Explosive getExplosionEntity(World world, int x, int y, int z, EntityLivingBase igniter)
- {
- EntityIC2Explosive ret;
- ret = new EntityItnt(world, x + 0.5D, y + 0.5D, z + 0.5D);
- ret.setIgniter(igniter);
-
- return ret;
- }
-
public void onBlockAdded(World world, int x, int y, int z)
{
super.onBlockAdded(world, x, y, z);
@@ -249,10 +237,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion)
{
- EntityIC2Explosive entitytntprimed = getExplosionEntity(world, x, y, z, explosion == null ? null : explosion.getExplosivePlacedBy());
- if (entitytntprimed == null) {
- return;
- }
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x, y, z, explosion.getExplosivePlacedBy());
entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8);
world.spawnEntityInWorld(entitytntprimed);
}
@@ -261,7 +246,6 @@ public class GT_Block_Reinforced extends GT_Generic_Block {
{
if ((player.getCurrentEquippedItem() != null) && (player.getCurrentEquippedItem().getItem() == Items.flint_and_steel)&&par1World.getBlockMetadata(x, y, z)==5)
{
-// par1World.setBlockMetadataWithNotify(x, y, z, 6, 7);
removedByPlayer(par1World, player, x, y, z);
return true;
diff --git a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java
index ea132a7dbd..3b57809c07 100644
--- a/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java
+++ b/src/main/java/gregtech/common/items/GT_NeutronReflector_Item.java
@@ -1,10 +1,10 @@
package gregtech.common.items;
+import gregtech.api.GregTech_API;
import gregtech.api.items.GT_Generic_Item;
import gregtech.api.items.GT_RadioactiveCellIC_Item;
import ic2.api.reactor.IReactor;
import ic2.api.reactor.IReactorComponent;
-import ic2.core.item.reactor.ItemReactorMOX;
import net.minecraft.item.ItemStack;
public class GT_NeutronReflector_Item
@@ -18,7 +18,7 @@ public class GT_NeutronReflector_Item
public boolean acceptUraniumPulse(IReactor reactor, ItemStack yourStack, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun) {
if (!heatrun) {
- if ((pulsingStack.getItem() instanceof ItemReactorMOX)) {
+ if (!GregTech_API.mIC2Classic&&(pulsingStack.getItem() instanceof ic2.core.item.reactor.ItemReactorMOX)) {
float breedereffectiveness = reactor.getHeat() / reactor.getMaxHeat();
float ReaktorOutput = 4.0F * breedereffectiveness + 1.0F;
reactor.addOutput(ReaktorOutput);