The Great Renamening of 2020
This commit is contained in:
@@ -28,7 +28,7 @@ import net.minecraftforge.client.model.data.IModelData;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.client.render.cablebus.CubeBuilder;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
import appeng.tile.qnb.QuantumBridgeTileEntity;
|
||||
|
||||
class QnbFormedBakedModel implements IDynamicBakedModel {
|
||||
|
||||
@@ -79,7 +79,7 @@ class QnbFormedBakedModel implements IDynamicBakedModel {
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, Random rand,
|
||||
IModelData modelData) {
|
||||
QnbFormedState formedState = modelData.getData(TileQuantumBridge.FORMED_STATE);
|
||||
QnbFormedState formedState = modelData.getData(QuantumBridgeTileEntity.FORMED_STATE);
|
||||
|
||||
if (formedState == null) {
|
||||
return this.baseModel.getQuads(state, side, rand);
|
||||
|
||||
+6
-6
@@ -31,9 +31,9 @@ import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
import appeng.tile.qnb.QuantumBridgeTileEntity;
|
||||
|
||||
public abstract class BlockQuantumBase extends AEBaseTileBlock<TileQuantumBridge> {
|
||||
public abstract class QuantumBaseBlock extends AEBaseTileBlock<QuantumBridgeTileEntity> {
|
||||
|
||||
public static final BooleanProperty FORMED = BooleanProperty.create("formed");
|
||||
|
||||
@@ -44,7 +44,7 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock<TileQuantumBridge
|
||||
SHAPE = VoxelShapes.create(new AxisAlignedBB(shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave));
|
||||
}
|
||||
|
||||
public BlockQuantumBase(Block.Properties props) {
|
||||
public QuantumBaseBlock(Block.Properties props) {
|
||||
super(props);
|
||||
this.setFullSize(this.setOpaque(false));
|
||||
this.setDefaultState(this.getDefaultState().with(FORMED, false));
|
||||
@@ -62,14 +62,14 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock<TileQuantumBridge
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileQuantumBridge te) {
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, QuantumBridgeTileEntity te) {
|
||||
return currentState.with(FORMED, te.isFormed());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
final TileQuantumBridge bridge = this.getTileEntity(world, pos);
|
||||
final QuantumBridgeTileEntity bridge = this.getTileEntity(world, pos);
|
||||
if (bridge != null) {
|
||||
bridge.neighborUpdate();
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock<TileQuantumBridge
|
||||
return; // Just a block state change
|
||||
}
|
||||
|
||||
final TileQuantumBridge bridge = this.getTileEntity(w, pos);
|
||||
final QuantumBridgeTileEntity bridge = this.getTileEntity(w, pos);
|
||||
if (bridge != null) {
|
||||
bridge.breakCluster();
|
||||
}
|
||||
+7
-7
@@ -39,13 +39,13 @@ import net.minecraft.world.World;
|
||||
import appeng.client.EffectType;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerQNB;
|
||||
import appeng.container.implementations.QNBContainer;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
import appeng.tile.qnb.QuantumBridgeTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockQuantumLinkChamber extends BlockQuantumBase {
|
||||
public class QuantumLinkChamberBlock extends QuantumBaseBlock {
|
||||
|
||||
private static final VoxelShape SHAPE;
|
||||
|
||||
@@ -55,13 +55,13 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase {
|
||||
new AxisAlignedBB(onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel));
|
||||
}
|
||||
|
||||
public BlockQuantumLinkChamber() {
|
||||
public QuantumLinkChamberBlock() {
|
||||
super(defaultProps(AEGlassMaterial.INSTANCE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void animateTick(final BlockState state, final World w, final BlockPos pos, final Random rand) {
|
||||
final TileQuantumBridge bridge = this.getTileEntity(w, pos);
|
||||
final QuantumBridgeTileEntity bridge = this.getTileEntity(w, pos);
|
||||
if (bridge != null) {
|
||||
if (bridge.hasQES()) {
|
||||
if (AppEng.proxy.shouldAddParticles(rand)) {
|
||||
@@ -79,10 +79,10 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileQuantumBridge tg = this.getTileEntity(w, pos);
|
||||
final QuantumBridgeTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(ContainerQNB.TYPE, p, ContainerLocator.forTileEntity(tg));
|
||||
ContainerOpener.openContainer(QNBContainer.TYPE, p, ContainerLocator.forTileEntity(tg));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
+4
-4
@@ -27,21 +27,21 @@ import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
import appeng.tile.qnb.QuantumBridgeTileEntity;
|
||||
|
||||
public class BlockQuantumRing extends BlockQuantumBase {
|
||||
public class QuantumRingBlock extends QuantumBaseBlock {
|
||||
|
||||
private static final VoxelShape SHAPE = createShape(2.0 / 16.0);
|
||||
private static final VoxelShape SHAPE_CORNER = createShape(4.0 / 16.0);
|
||||
private static final VoxelShape SHAPE_FORMED = createShape(1.0 / 16.0);
|
||||
|
||||
public BlockQuantumRing() {
|
||||
public QuantumRingBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
|
||||
final TileQuantumBridge bridge = this.getTileEntity(w, pos);
|
||||
final QuantumBridgeTileEntity bridge = this.getTileEntity(w, pos);
|
||||
if (bridge != null && bridge.isCorner()) {
|
||||
return SHAPE_CORNER;
|
||||
} else if (bridge != null && bridge.isFormed()) {
|
||||
Reference in New Issue
Block a user