Fix visual updates for quartz growth accelerator not occuring on power change of TE.
This commit is contained in:
@@ -21,6 +21,7 @@ package appeng.block.misc;
|
|||||||
|
|
||||||
import appeng.api.util.IOrientableBlock;
|
import appeng.api.util.IOrientableBlock;
|
||||||
import appeng.block.AEBaseTileBlock;
|
import appeng.block.AEBaseTileBlock;
|
||||||
|
import appeng.client.render.effects.LightningFX;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.AppEng;
|
import appeng.core.AppEng;
|
||||||
import appeng.tile.misc.TileQuartzGrowthAccelerator;
|
import appeng.tile.misc.TileQuartzGrowthAccelerator;
|
||||||
@@ -29,6 +30,7 @@ import net.minecraft.block.Block;
|
|||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.state.BooleanProperty;
|
import net.minecraft.state.BooleanProperty;
|
||||||
import net.minecraft.state.StateContainer;
|
import net.minecraft.state.StateContainer;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
@@ -53,13 +55,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock<TileQuartzGrow
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld world, BlockPos pos, BlockPos facingPos) {
|
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileQuartzGrowthAccelerator te) {
|
||||||
// FIXME: This is not correct since placement updates dont occur when the TE updates
|
return currentState.with( POWERED, te.isPowered() );
|
||||||
TileQuartzGrowthAccelerator te = this.getTileEntity( world, pos );
|
|
||||||
boolean powered = te != null && te.isPowered();
|
|
||||||
|
|
||||||
return super.updatePostPlacement(stateIn, facing, facingState, world, pos, facingPos)
|
|
||||||
.with( POWERED, powered );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -145,8 +142,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock<TileQuartzGrow
|
|||||||
ry += dz * forward.getYOffset();
|
ry += dz * forward.getYOffset();
|
||||||
rz += dz * forward.getZOffset();
|
rz += dz * forward.getZOffset();
|
||||||
|
|
||||||
// FIXME final LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D );
|
final LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D );
|
||||||
// FIXME Minecraft.getInstance().effectRenderer.addEffect( fx );
|
Minecraft.getInstance().particles.addEffect( fx );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user