Minor tweaks + experimenting with a reagent guage for Project: Omega

This commit is contained in:
WayofTime 2014-12-09 19:06:47 -05:00
parent dd4c36b39c
commit 9ad3330e08
10 changed files with 259 additions and 189 deletions

View file

@ -19,6 +19,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
import codechicken.multipart.MultipartHelper;
@ -152,7 +153,7 @@ public class BlockTeleposer extends BlockContainer
return new TETeleposer();
}
public static boolean swapBlocks(World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf)
public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf)
{
TileEntity tileEntityI = worldI.getTileEntity(xi, yi, zi);
TileEntity tileEntityF = worldF.getTileEntity(xf, yf, zf);
@ -181,7 +182,7 @@ public class BlockTeleposer extends BlockContainer
return false;
}
if (blockI instanceof BlockMobSpawner || blockF instanceof BlockMobSpawner || blockI instanceof BlockPortal || blockF instanceof BlockPortal)
if (blockI instanceof BlockMobSpawner || blockF instanceof BlockMobSpawner || caller instanceof TEDemonPortal ? false : blockI instanceof BlockPortal || blockF instanceof BlockPortal)
{
return false;
}

View file

@ -40,6 +40,7 @@ public class EntityMinorDemonGruntWind extends EntityMinorDemonGrunt
@Override
public void onLivingUpdate()
{
super.onLivingUpdate();
this.fallDistance = 0;
}

View file

@ -1296,7 +1296,7 @@ public class TEDemonPortal extends TileEntity
int yDestination = yLevel + yOffset;
if(yCoord != yDestination)
{
BlockTeleposer.swapBlocks(worldObj, worldObj, xCoord, yCoord, zCoord, xCoord, yDestination, zCoord);
BlockTeleposer.swapBlocks(this, worldObj, worldObj, xCoord, yCoord, zCoord, xCoord, yDestination, zCoord);
}else
{
//Nuthin - just as a reminder that we can now increment properly

View file

@ -96,7 +96,7 @@ public class RitualEffectMagnetic extends RitualEffect
if (oreName.contains("ore"))
{
//Allow swapping code. This means the searched block is an ore.
BlockTeleposer.swapBlocks(world, world, x + i, j, z + k, xRep, yRep, zRep);
BlockTeleposer.swapBlocks(this, world, world, x + i, j, z + k, xRep, yRep, zRep);
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
if (hasPotentia)

View file

@ -30,7 +30,7 @@ public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect
{
for (int j = 0; j < vertRadius; j++)
{
BlockTeleposer.swapBlocks(world, world, posX + i * zOff, posY + j, posZ + i * xOff, posX + i * zOff, posY + j - vertRadius, posZ + i * xOff);
BlockTeleposer.swapBlocks(this, world, world, posX + i * zOff, posY + j, posZ + i * xOff, posX + i * zOff, posY + j - vertRadius, posZ + i * xOff);
}
}
}

View file

@ -40,7 +40,7 @@ public class SelfDefaultEarth extends SelfSpellEffect
{
if (!world.isAirBlock(posX + i, posY + j, posZ + k) && !SpellHelper.isBlockFluid(world.getBlock(posX + i, posY + j, posZ + k)))
{
BlockTeleposer.swapBlocks(world, world, posX + i, posY, posZ + k, posX + i, posY + j, posZ + k);
BlockTeleposer.swapBlocks(this, world, world, posX + i, posY, posZ + k, posX + i, posY + j, posZ + k);
break;
}

View file

@ -248,7 +248,7 @@ public class TETeleposer extends TileEntity implements IInventory
for (int j = -(focusLevel - 1); j <= (focusLevel - 1); j++)
{
{
if (BlockTeleposer.swapBlocks(worldObj, worldF, xCoord + i, yCoord + 1 + k, zCoord + j, xf + i, yf + 1 + k, zf + j))
if (BlockTeleposer.swapBlocks(this, worldObj, worldF, xCoord + i, yCoord + 1 + k, zCoord + j, xf + i, yf + 1 + k, zf + j))
{
transportCount++;
}