Scrapped Particle System again, doesn't really work..

This commit is contained in:
Ellpeck 2015-07-07 14:50:45 +02:00
parent f316d690d4
commit 311fadbc4b
2 changed files with 1 additions and 54 deletions

View file

@ -22,7 +22,6 @@ import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import java.util.List;
import java.util.Random;
public class BlockPhantomface extends BlockContainerBase implements INameableItem{
@ -42,7 +41,6 @@ public class BlockPhantomface extends BlockContainerBase implements INameableIte
this.setHardness(4.5F);
this.setResistance(10.0F);
this.setStepSound(soundTypeStone);
this.setTickRandomly(true);
if(type == FACE || type == LIQUIFACE || type == ENERGYFACE) this.range = ConfigIntValues.PHANTOMFACE_RANGE.getValue();
else if(type == BREAKER || type == PLACER) this.range = ConfigIntValues.PHANTOM_PLACER_RANGE.getValue();
@ -129,28 +127,6 @@ public class BlockPhantomface extends BlockContainerBase implements INameableIte
}
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand){
WorldPos boundPosition = null;
if(this.type == FACE || this.type == ENERGYFACE || this.type == LIQUIFACE) boundPosition = ((TileEntityPhantomface)world.getTileEntity(x, y, z)).boundPosition;
else if(this.type == PLACER || this.type == BREAKER) boundPosition = ((TileEntityPhantomPlacer)world.getTileEntity(x, y, z)).boundPosition;
if(boundPosition != null){
for(int l = 0; l < 3; l++){
double d1 = (double)((float)boundPosition.getY()+rand.nextFloat());
int i1 = rand.nextInt(2)*2-1;
int j1 = rand.nextInt(2)*2-1;
double d4 = ((double)rand.nextFloat()-0.5D)*0.125D;
double d2 = (double)boundPosition.getZ()+0.5D+0.25D*(double)j1;
double d5 = (double)(rand.nextFloat()*1.0F*(float)j1);
double d0 = (double)boundPosition.getX()+0.5D+0.25D*(double)i1;
double d3 = (double)(rand.nextFloat()*1.0F*(float)i1);
world.spawnParticle("portal", d0, d1, d2, d3, d4, d5);
}
}
}
public static class TheItemBlock extends ItemBlock{
private Block theBlock;

View file

@ -6,8 +6,6 @@ import cofh.api.energy.IEnergyReceiver;
import ellpeck.actuallyadditions.blocks.BlockPhantomface;
import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.network.sync.IPacketSyncerToClient;
import ellpeck.actuallyadditions.network.sync.PacketSyncerToClient;
import ellpeck.actuallyadditions.util.WorldPos;
import ellpeck.actuallyadditions.util.WorldUtil;
import net.minecraft.block.Block;
@ -25,10 +23,9 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
public class TileEntityPhantomface extends TileEntityInventoryBase implements IPacketSyncerToClient{
public class TileEntityPhantomface extends TileEntityInventoryBase{
public WorldPos boundPosition;
private WorldPos lastBoundPos;
public int type;
@ -72,11 +69,6 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
if(!this.hasBoundTile()){
this.boundPosition = null;
}
if(this.boundPosition != null && !this.boundPosition.isEqual(this.lastBoundPos)){
this.lastBoundPos = this.boundPosition.copy();
this.sendUpdate();
}
}
}
@ -125,27 +117,6 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
return false;
}
@Override
public int[] getValues(){
if(this.boundPosition != null){
return new int[]{this.boundPosition.getWorld().provider.dimensionId, this.boundPosition.getX(), this.boundPosition.getY(), this.boundPosition.getZ()};
}
return new int[0];
}
@Override
public void setValues(int[] values){
if(values.length > 0){
this.boundPosition = new WorldPos(DimensionManager.getWorld(values[0]), values[1], values[2], values[3]);
}
else this.boundPosition = null;
}
@Override
public void sendUpdate(){
PacketSyncerToClient.sendPacket(this);
}
public static class TileEntityPhantomLiquiface extends TileEntityPhantomface implements IFluidHandler{
public TileEntityPhantomLiquiface(){