The Great Renamening of 2020
This commit is contained in:
+13
-13
@@ -67,20 +67,20 @@ import appeng.client.render.cablebus.CableBusBakedModel;
|
||||
import appeng.client.render.cablebus.CableBusBreakingParticle;
|
||||
import appeng.client.render.cablebus.CableBusRenderState;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketClick;
|
||||
import appeng.core.sync.packets.ClickPacket;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.integration.abstraction.IAEFacade;
|
||||
import appeng.parts.ICableBusContainer;
|
||||
import appeng.parts.NullCableBusContainer;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
import appeng.tile.networking.CableBusTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockCableBus extends AEBaseTileBlock<TileCableBus> implements IAEFacade {
|
||||
public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implements IAEFacade {
|
||||
|
||||
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
|
||||
|
||||
public BlockCableBus() {
|
||||
public CableBusBlock() {
|
||||
super(defaultProps(AEGlassMaterial.INSTANCE).notSolid().noDrops());
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public class BlockCableBus extends AEBaseTileBlock<TileCableBus> implements IAEF
|
||||
public boolean removedByPlayer(BlockState state, World world, BlockPos pos, PlayerEntity player,
|
||||
boolean willHarvest, IFluidState fluid) {
|
||||
if (player.abilities.isCreativeMode) {
|
||||
final AEBaseTile tile = this.getTileEntity(world, pos);
|
||||
final AEBaseTileEntity tile = this.getTileEntity(world, pos);
|
||||
if (tile != null) {
|
||||
tile.disableDrops();
|
||||
}
|
||||
@@ -284,8 +284,8 @@ public class BlockCableBus extends AEBaseTileBlock<TileCableBus> implements IAEF
|
||||
final TileEntity te = w.getTileEntity(pos);
|
||||
ICableBusContainer out = null;
|
||||
|
||||
if (te instanceof TileCableBus) {
|
||||
out = ((TileCableBus) te).getCableBus();
|
||||
if (te instanceof CableBusTileEntity) {
|
||||
out = ((CableBusTileEntity) te).getCableBus();
|
||||
}
|
||||
|
||||
return out == null ? NULL_CABLE_BUS : out;
|
||||
@@ -296,8 +296,8 @@ public class BlockCableBus extends AEBaseTileBlock<TileCableBus> implements IAEF
|
||||
final TileEntity te = w.getTileEntity(pos);
|
||||
IFacadeContainer out = null;
|
||||
|
||||
if (te instanceof TileCableBus) {
|
||||
out = ((TileCableBus) te).getCableBus().getFacadeContainer();
|
||||
if (te instanceof CableBusTileEntity) {
|
||||
out = ((CableBusTileEntity) te).getCableBus().getFacadeContainer();
|
||||
}
|
||||
|
||||
return out;
|
||||
@@ -313,7 +313,7 @@ public class BlockCableBus extends AEBaseTileBlock<TileCableBus> implements IAEF
|
||||
final Vec3d hitVec = rtr.getHitVec().subtract(new Vec3d(pos));
|
||||
|
||||
if (this.cb(worldIn, pos).clicked(player, Hand.MAIN_HAND, hitVec)) {
|
||||
NetworkHandler.instance().sendToServer(new PacketClick(pos, brtr.getFace(), (float) hitVec.x,
|
||||
NetworkHandler.instance().sendToServer(new ClickPacket(pos, brtr.getFace(), (float) hitVec.x,
|
||||
(float) hitVec.y, (float) hitVec.z, Hand.MAIN_HAND, true));
|
||||
}
|
||||
}
|
||||
@@ -372,7 +372,7 @@ public class BlockCableBus extends AEBaseTileBlock<TileCableBus> implements IAEF
|
||||
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
|
||||
|
||||
// FIXME: this has to be cached, optimized, fixed in all kinds of ways
|
||||
TileCableBus te = getTileEntity(w, pos);
|
||||
CableBusTileEntity te = getTileEntity(w, pos);
|
||||
VoxelShape result = VoxelShapes.empty();
|
||||
if (te != null) {
|
||||
for (final AxisAlignedBB bx : te.getCableBus().getSelectedBoundingBoxesFromPool(false, true,
|
||||
@@ -389,7 +389,7 @@ public class BlockCableBus extends AEBaseTileBlock<TileCableBus> implements IAEF
|
||||
public VoxelShape getCollisionShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
|
||||
|
||||
// FIXME: this has to be cached, optimized, fixed in all kinds of ways
|
||||
TileCableBus te = getTileEntity(w, pos);
|
||||
CableBusTileEntity te = getTileEntity(w, pos);
|
||||
VoxelShape result = VoxelShapes.empty();
|
||||
if (te != null) {
|
||||
for (final AxisAlignedBB bx : te.getCableBus().getSelectedBoundingBoxesFromPool(false, true,
|
||||
@@ -30,7 +30,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.parts.CableBusContainer;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
import appeng.tile.networking.CableBusTileEntity;
|
||||
|
||||
/**
|
||||
* Exposes the cable bus color as tint indices 0 (dark variant), 1 (medium
|
||||
@@ -46,8 +46,8 @@ public class CableBusColor implements IBlockColor {
|
||||
|
||||
if (worldIn != null && pos != null) {
|
||||
TileEntity tileEntity = worldIn.getTileEntity(pos);
|
||||
if (tileEntity instanceof TileCableBus) {
|
||||
CableBusContainer container = ((TileCableBus) tileEntity).getCableBus();
|
||||
if (tileEntity instanceof CableBusTileEntity) {
|
||||
CableBusContainer container = ((CableBusTileEntity) tileEntity).getCableBus();
|
||||
busColor = container.getColor();
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -30,9 +30,9 @@ import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.tile.networking.TileController;
|
||||
import appeng.tile.networking.ControllerTileEntity;
|
||||
|
||||
public class BlockController extends AEBaseTileBlock<TileController> {
|
||||
public class ControllerBlock extends AEBaseTileBlock<ControllerTileEntity> {
|
||||
|
||||
public enum ControllerBlockState implements IStringSerializable {
|
||||
offline, online, conflicted;
|
||||
@@ -66,7 +66,7 @@ public class BlockController extends AEBaseTileBlock<TileController> {
|
||||
public static final EnumProperty<ControllerRenderType> CONTROLLER_TYPE = EnumProperty.create("type",
|
||||
ControllerRenderType.class);
|
||||
|
||||
public BlockController() {
|
||||
public ControllerBlock() {
|
||||
super(defaultProps(Material.IRON).hardnessAndResistance(6));
|
||||
this.setDefaultState(this.getDefaultState().with(CONTROLLER_STATE, ControllerBlockState.offline)
|
||||
.with(CONTROLLER_TYPE, ControllerRenderType.block));
|
||||
@@ -132,7 +132,7 @@ public class BlockController extends AEBaseTileBlock<TileController> {
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
final TileController tc = this.getTileEntity(world, pos);
|
||||
final ControllerTileEntity tc = this.getTileEntity(world, pos);
|
||||
if (tc != null) {
|
||||
tc.onNeighborChange(false);
|
||||
}
|
||||
+3
-3
@@ -20,11 +20,11 @@ package appeng.block.networking;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.tile.networking.TileCreativeEnergyCell;
|
||||
import appeng.tile.networking.CreativeEnergyCellTileEntity;
|
||||
|
||||
public class BlockCreativeEnergyCell extends AEBaseTileBlock<TileCreativeEnergyCell> {
|
||||
public class CreativeEnergyCellBlock extends AEBaseTileBlock<CreativeEnergyCellTileEntity> {
|
||||
|
||||
public BlockCreativeEnergyCell() {
|
||||
public CreativeEnergyCellBlock() {
|
||||
super(defaultProps(AEGlassMaterial.INSTANCE));
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -18,9 +18,9 @@
|
||||
|
||||
package appeng.block.networking;
|
||||
|
||||
public class BlockDenseEnergyCell extends BlockEnergyCell {
|
||||
public class DenseEnergyCellBlock extends EnergyCellBlock {
|
||||
|
||||
public BlockDenseEnergyCell() {
|
||||
public DenseEnergyCellBlock() {
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -21,11 +21,11 @@ package appeng.block.networking;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.tile.networking.TileEnergyAcceptor;
|
||||
import appeng.tile.networking.EnergyAcceptorTileEntity;
|
||||
|
||||
public class BlockEnergyAcceptor extends AEBaseTileBlock<TileEnergyAcceptor> {
|
||||
public class EnergyAcceptorBlock extends AEBaseTileBlock<EnergyAcceptorTileEntity> {
|
||||
|
||||
public BlockEnergyAcceptor() {
|
||||
public EnergyAcceptorBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -31,13 +31,13 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.tile.networking.TileEnergyCell;
|
||||
import appeng.tile.networking.EnergyCellTileEntity;
|
||||
|
||||
public class BlockEnergyCell extends AEBaseTileBlock<TileEnergyCell> {
|
||||
public class EnergyCellBlock extends AEBaseTileBlock<EnergyCellTileEntity> {
|
||||
|
||||
public static final IntegerProperty ENERGY_STORAGE = IntegerProperty.create("fullness", 0, 7);
|
||||
|
||||
public BlockEnergyCell() {
|
||||
public EnergyCellBlock() {
|
||||
super(defaultProps(AEGlassMaterial.INSTANCE));
|
||||
}
|
||||
|
||||
+9
-9
@@ -39,12 +39,12 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerWireless;
|
||||
import appeng.container.implementations.WirelessContainer;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.tile.networking.TileWireless;
|
||||
import appeng.tile.networking.WirelessTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockWireless extends AEBaseTileBlock<TileWireless> {
|
||||
public class WirelessBlock extends AEBaseTileBlock<WirelessTileEntity> {
|
||||
|
||||
enum State implements IStringSerializable {
|
||||
OFF, ON, HAS_CHANNEL;
|
||||
@@ -57,7 +57,7 @@ public class BlockWireless extends AEBaseTileBlock<TileWireless> {
|
||||
|
||||
public static final EnumProperty<State> STATE = EnumProperty.create("state", State.class);
|
||||
|
||||
public BlockWireless() {
|
||||
public WirelessBlock() {
|
||||
super(defaultProps(AEGlassMaterial.INSTANCE).notSolid());
|
||||
this.setFullSize(false);
|
||||
this.setOpaque(false);
|
||||
@@ -65,7 +65,7 @@ public class BlockWireless extends AEBaseTileBlock<TileWireless> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileWireless te) {
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, WirelessTileEntity te) {
|
||||
State teState = State.OFF;
|
||||
|
||||
if (te.isActive()) {
|
||||
@@ -86,11 +86,11 @@ public class BlockWireless extends AEBaseTileBlock<TileWireless> {
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity player, Hand hand,
|
||||
BlockRayTraceResult hit) {
|
||||
final TileWireless tg = this.getTileEntity(w, pos);
|
||||
final WirelessTileEntity tg = this.getTileEntity(w, pos);
|
||||
|
||||
if (tg != null && !player.isCrouching()) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(ContainerWireless.TYPE, player,
|
||||
ContainerOpener.openContainer(WirelessContainer.TYPE, player,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -101,7 +101,7 @@ public class BlockWireless extends AEBaseTileBlock<TileWireless> {
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
|
||||
final TileWireless tile = this.getTileEntity(w, pos);
|
||||
final WirelessTileEntity tile = this.getTileEntity(w, pos);
|
||||
if (tile != null) {
|
||||
final Direction forward = tile.getForward();
|
||||
|
||||
@@ -161,7 +161,7 @@ public class BlockWireless extends AEBaseTileBlock<TileWireless> {
|
||||
@Override
|
||||
public VoxelShape getCollisionShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
|
||||
|
||||
final TileWireless tile = this.getTileEntity(w, pos);
|
||||
final WirelessTileEntity tile = this.getTileEntity(w, pos);
|
||||
if (tile != null) {
|
||||
final Direction forward = tile.getForward();
|
||||
|
||||
Reference in New Issue
Block a user