Some another attempt

This commit is contained in:
Technus 2016-10-08 14:29:42 +02:00
parent 2ea962f4e4
commit 36752e1333

View file

@ -25,6 +25,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
@ -194,7 +195,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
@Override @Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
//TODO FIX //TODO FIX
// (aBaseMetaTileEntity.isClientSide() && aBaseMetaTileEntity.isActive()) { //if (aBaseMetaTileEntity.isClientSide() && aBaseMetaTileEntity.isActive()) {
// pollutionParticles(aBaseMetaTileEntity); // pollutionParticles(aBaseMetaTileEntity);
//} //}
if (aBaseMetaTileEntity.isServerSide()) { if (aBaseMetaTileEntity.isServerSide()) {
@ -313,14 +314,16 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
//MAKE THE POLLUTION ROLL!!! TODO Fix? //MAKE THE POLLUTION ROLL!!! TODO Fix?
public void pollutionParticles(IGregTechTileEntity aBaseMetaTileEntity){ public void pollutionParticles(IGregTechTileEntity aBaseMetaTileEntity){
World aWorld =DimensionManager.getWorld(aBaseMetaTileEntity.getWorld().provider.dimensionId);
//World aWorld=aBaseMetaTileEntity.getWorld();
if(!aWorld.isRemote)return;
int xPos; int xPos;
int yPos; int yPos;
int zPos; int zPos;
IGregTechTileEntity muffler; IGregTechTileEntity muffler;
World aWorld =aBaseMetaTileEntity.getWorld();
for (MetaTileEntity tTileEntity : mMufflerHatches) { for (MetaTileEntity tTileEntity : mMufflerHatches) {
muffler = tTileEntity.getBaseMetaTileEntity(); muffler = tTileEntity.getBaseMetaTileEntity();
xPos = ForgeDirection.getOrientation(muffler.getFrontFacing()).offsetX+muffler.getXCoord(); xPos = ForgeDirection.getOrientation(muffler.getFrontFacing()).offsetX+muffler.getXCoord();//TODO optimize?
yPos = ForgeDirection.getOrientation(muffler.getFrontFacing()).offsetY+muffler.getYCoord(); yPos = ForgeDirection.getOrientation(muffler.getFrontFacing()).offsetY+muffler.getYCoord();
zPos = ForgeDirection.getOrientation(muffler.getFrontFacing()).offsetZ+muffler.getZCoord(); zPos = ForgeDirection.getOrientation(muffler.getFrontFacing()).offsetZ+muffler.getZCoord();
System.out.print("x:"+xPos); System.out.print("x:"+xPos);