The Great Renamening of 2020
This commit is contained in:
@@ -36,11 +36,11 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.api.util.IOrientableBlock;
|
||||
import appeng.block.misc.BlockLightDetector;
|
||||
import appeng.block.misc.BlockSkyCompass;
|
||||
import appeng.block.networking.BlockWireless;
|
||||
import appeng.block.misc.LightDetectorBlock;
|
||||
import appeng.block.misc.SkyCompassBlock;
|
||||
import appeng.block.networking.WirelessBlock;
|
||||
import appeng.me.helpers.IGridProxyable;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
|
||||
public class AEBaseBlockItem extends BlockItem {
|
||||
|
||||
@@ -84,14 +84,14 @@ public class AEBaseBlockItem extends BlockItem {
|
||||
PlayerEntity player = context.getPlayer();
|
||||
|
||||
if (this.blockType instanceof AEBaseTileBlock) {
|
||||
if (this.blockType instanceof BlockLightDetector) {
|
||||
if (this.blockType instanceof LightDetectorBlock) {
|
||||
up = side;
|
||||
if (up == Direction.UP || up == Direction.DOWN) {
|
||||
forward = Direction.SOUTH;
|
||||
} else {
|
||||
forward = Direction.UP;
|
||||
}
|
||||
} else if (this.blockType instanceof BlockWireless || this.blockType instanceof BlockSkyCompass) {
|
||||
} else if (this.blockType instanceof WirelessBlock || this.blockType instanceof SkyCompassBlock) {
|
||||
forward = side;
|
||||
if (forward == Direction.UP || forward == Direction.DOWN) {
|
||||
up = Direction.SOUTH;
|
||||
@@ -133,8 +133,8 @@ public class AEBaseBlockItem extends BlockItem {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (this.blockType instanceof AEBaseTileBlock && !(this.blockType instanceof BlockLightDetector)) {
|
||||
final AEBaseTile tile = ((AEBaseTileBlock<?>) this.blockType).getTileEntity(context.getWorld(),
|
||||
if (this.blockType instanceof AEBaseTileBlock && !(this.blockType instanceof LightDetectorBlock)) {
|
||||
final AEBaseTileEntity tile = ((AEBaseTileBlock<?>) this.blockType).getTileEntity(context.getWorld(),
|
||||
context.getPos());
|
||||
ori = tile;
|
||||
|
||||
|
||||
@@ -52,15 +52,15 @@ import appeng.api.implementations.items.MemoryCardMessages;
|
||||
import appeng.api.implementations.tiles.IColorableTile;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
import appeng.tile.AEBaseInvTile;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
import appeng.tile.storage.TileSkyChest;
|
||||
import appeng.block.networking.CableBusBlock;
|
||||
import appeng.tile.AEBaseInvTileEntity;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
import appeng.tile.networking.CableBusTileEntity;
|
||||
import appeng.tile.storage.SkyChestTileEntity;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.SettingsFrom;
|
||||
|
||||
public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock {
|
||||
public abstract class AEBaseTileBlock<T extends AEBaseTileEntity> extends AEBaseBlock {
|
||||
|
||||
@Nonnull
|
||||
private Class<T> tileEntityClass;
|
||||
@@ -75,7 +75,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock
|
||||
public void setTileEntity(final Class<T> tileEntityClass, Supplier<T> factory) {
|
||||
this.tileEntityClass = tileEntityClass;
|
||||
this.tileEntityFactory = factory;
|
||||
this.setInventory(AEBaseInvTile.class.isAssignableFrom(tileEntityClass));
|
||||
this.setInventory(AEBaseInvTileEntity.class.isAssignableFrom(tileEntityClass));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,7 +127,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock
|
||||
return; // Just a block state change
|
||||
}
|
||||
|
||||
final AEBaseTile te = this.getTileEntity(w, pos);
|
||||
final AEBaseTileEntity te = this.getTileEntity(w, pos);
|
||||
if (te != null) {
|
||||
final ArrayList<ItemStack> drops = new ArrayList<>();
|
||||
if (te.dropItems()) {
|
||||
@@ -167,8 +167,8 @@ public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock
|
||||
@Override
|
||||
public int getComparatorInputOverride(BlockState state, final World w, final BlockPos pos) {
|
||||
final TileEntity te = this.getTileEntity(w, pos);
|
||||
if (te instanceof AEBaseInvTile) {
|
||||
AEBaseInvTile invTile = (AEBaseInvTile) te;
|
||||
if (te instanceof AEBaseInvTileEntity) {
|
||||
AEBaseInvTileEntity invTile = (AEBaseInvTileEntity) te;
|
||||
if (invTile.getInternalInventory().getSlots() > 0) {
|
||||
return ItemHandlerHelper.calcRedstoneFromInventory(invTile.getInternalInventory());
|
||||
}
|
||||
@@ -192,7 +192,7 @@ public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock
|
||||
// than a translation component, since our custom naming cannot handle
|
||||
// untranslated
|
||||
// I18N strings and we would translate it using the server's locale :-(
|
||||
AEBaseTile te = this.getTileEntity(w, pos);
|
||||
AEBaseTileEntity te = this.getTileEntity(w, pos);
|
||||
if (te != null && is.hasDisplayName()) {
|
||||
ITextComponent displayName = is.getDisplayName();
|
||||
if (displayName instanceof StringTextComponent) {
|
||||
@@ -212,13 +212,13 @@ public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock
|
||||
final BlockState blockState = world.getBlockState(pos);
|
||||
final Block block = blockState.getBlock();
|
||||
|
||||
final AEBaseTile tile = this.getTileEntity(world, pos);
|
||||
final AEBaseTileEntity tile = this.getTileEntity(world, pos);
|
||||
|
||||
if (tile == null) {
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
if (tile instanceof TileCableBus || tile instanceof TileSkyChest) {
|
||||
if (tile instanceof CableBusTileEntity || tile instanceof SkyChestTileEntity) {
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
@@ -243,9 +243,9 @@ public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
if (heldItem.getItem() instanceof IMemoryCard && !(this instanceof BlockCableBus)) {
|
||||
if (heldItem.getItem() instanceof IMemoryCard && !(this instanceof CableBusBlock)) {
|
||||
final IMemoryCard memoryCard = (IMemoryCard) heldItem.getItem();
|
||||
final AEBaseTile tileEntity = this.getTileEntity(world, pos);
|
||||
final AEBaseTileEntity tileEntity = this.getTileEntity(world, pos);
|
||||
|
||||
if (tileEntity == null) {
|
||||
return ActionResultType.FAIL;
|
||||
|
||||
@@ -32,10 +32,10 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerCraftingCPU;
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.container.implementations.CraftingCPUContainer;
|
||||
import appeng.tile.crafting.CraftingTileEntity;
|
||||
|
||||
public abstract class AbstractCraftingUnitBlock<T extends TileCraftingTile> extends AEBaseTileBlock<T> {
|
||||
public abstract class AbstractCraftingUnitBlock<T extends CraftingTileEntity> extends AEBaseTileBlock<T> {
|
||||
public static final BooleanProperty FORMED = BooleanProperty.create("formed");
|
||||
public static final BooleanProperty POWERED = BooleanProperty.create("powered");
|
||||
|
||||
@@ -57,7 +57,7 @@ public abstract class AbstractCraftingUnitBlock<T extends TileCraftingTile> exte
|
||||
@Override
|
||||
public void neighborChanged(final BlockState state, final World worldIn, final BlockPos pos, final Block blockIn,
|
||||
final BlockPos fromPos, boolean isMoving) {
|
||||
final TileCraftingTile cp = this.getTileEntity(worldIn, pos);
|
||||
final CraftingTileEntity cp = this.getTileEntity(worldIn, pos);
|
||||
if (cp != null) {
|
||||
cp.updateMultiBlock();
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public abstract class AbstractCraftingUnitBlock<T extends TileCraftingTile> exte
|
||||
return; // Just a block state change
|
||||
}
|
||||
|
||||
final TileCraftingTile cp = this.getTileEntity(w, pos);
|
||||
final CraftingTileEntity cp = this.getTileEntity(w, pos);
|
||||
if (cp != null) {
|
||||
cp.breakCluster();
|
||||
}
|
||||
@@ -80,11 +80,11 @@ public abstract class AbstractCraftingUnitBlock<T extends TileCraftingTile> exte
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity p, Hand hand,
|
||||
BlockRayTraceResult hit) {
|
||||
final TileCraftingTile tg = this.getTileEntity(w, pos);
|
||||
final CraftingTileEntity tg = this.getTileEntity(w, pos);
|
||||
|
||||
if (tg != null && !p.isCrouching() && tg.isFormed() && tg.isActive()) {
|
||||
if (!w.isRemote()) {
|
||||
ContainerOpener.openContainer(ContainerCraftingCPU.TYPE, p,
|
||||
ContainerOpener.openContainer(CraftingCPUContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -18,10 +18,10 @@
|
||||
|
||||
package appeng.block.crafting;
|
||||
|
||||
import appeng.tile.crafting.TileCraftingMonitorTile;
|
||||
import appeng.tile.crafting.CraftingMonitorTileEntity;
|
||||
|
||||
public class BlockCraftingMonitor extends AbstractCraftingUnitBlock<TileCraftingMonitorTile> {
|
||||
public BlockCraftingMonitor(Properties props) {
|
||||
public class CraftingMonitorBlock extends AbstractCraftingUnitBlock<CraftingMonitorTileEntity> {
|
||||
public CraftingMonitorBlock(Properties props) {
|
||||
super(props, CraftingUnitType.MONITOR);
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -18,11 +18,11 @@
|
||||
|
||||
package appeng.block.crafting;
|
||||
|
||||
import appeng.tile.crafting.TileCraftingStorageTile;
|
||||
import appeng.tile.crafting.CraftingStorageTileEntity;
|
||||
|
||||
public class BlockCraftingStorage extends AbstractCraftingUnitBlock<TileCraftingStorageTile> {
|
||||
public class CraftingStorageBlock extends AbstractCraftingUnitBlock<CraftingStorageTileEntity> {
|
||||
|
||||
public BlockCraftingStorage(Properties props, CraftingUnitType type) {
|
||||
public CraftingStorageBlock(Properties props, CraftingUnitType type) {
|
||||
super(props, type);
|
||||
}
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ import appeng.api.features.AEFeature;
|
||||
import appeng.block.AEBaseBlockItem;
|
||||
import appeng.core.AEConfig;
|
||||
|
||||
public class ItemCraftingStorage extends AEBaseBlockItem {
|
||||
public class CraftingStorageItem extends AEBaseBlockItem {
|
||||
|
||||
public ItemCraftingStorage(Block id, Properties props) {
|
||||
public CraftingStorageItem(Block id, Properties props) {
|
||||
super(id, props);
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
package appeng.block.crafting;
|
||||
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.tile.crafting.CraftingTileEntity;
|
||||
|
||||
public class CraftingUnitBlock extends AbstractCraftingUnitBlock<TileCraftingTile> {
|
||||
public class CraftingUnitBlock extends AbstractCraftingUnitBlock<CraftingTileEntity> {
|
||||
|
||||
public CraftingUnitBlock(Properties props, CraftingUnitType type) {
|
||||
super(props, type);
|
||||
|
||||
+7
-7
@@ -32,14 +32,14 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerMolecularAssembler;
|
||||
import appeng.tile.crafting.TileMolecularAssembler;
|
||||
import appeng.container.implementations.MolecularAssemblerContainer;
|
||||
import appeng.tile.crafting.MolecularAssemblerTileEntity;
|
||||
|
||||
public class BlockMolecularAssembler extends AEBaseTileBlock<TileMolecularAssembler> {
|
||||
public class MolecularAssemblerBlock extends AEBaseTileBlock<MolecularAssemblerTileEntity> {
|
||||
|
||||
public static final BooleanProperty POWERED = BooleanProperty.create("powered");
|
||||
|
||||
public BlockMolecularAssembler(Block.Properties props) {
|
||||
public MolecularAssemblerBlock(Block.Properties props) {
|
||||
super(props);
|
||||
setDefaultState(getDefaultState().with(POWERED, false));
|
||||
}
|
||||
@@ -51,17 +51,17 @@ public class BlockMolecularAssembler extends AEBaseTileBlock<TileMolecularAssemb
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileMolecularAssembler te) {
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, MolecularAssemblerTileEntity te) {
|
||||
return currentState.with(POWERED, te.isPowered());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity p, Hand hand,
|
||||
BlockRayTraceResult hit) {
|
||||
final TileMolecularAssembler tg = this.getTileEntity(w, pos);
|
||||
final MolecularAssemblerTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null && !p.isCrouching()) {
|
||||
if (!tg.isRemote()) {
|
||||
ContainerOpener.openContainer(ContainerMolecularAssembler.TYPE, p,
|
||||
ContainerOpener.openContainer(MolecularAssemblerContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
+9
-9
@@ -45,12 +45,12 @@ import net.minecraftforge.common.util.FakePlayer;
|
||||
import appeng.api.implementations.tiles.ICrankable;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.core.stats.AeStats;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.grindstone.TileCrank;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
import appeng.tile.grindstone.CrankTileEntity;
|
||||
|
||||
public class BlockCrank extends AEBaseTileBlock<TileCrank> {
|
||||
public class CrankBlock extends AEBaseTileBlock<CrankTileEntity> {
|
||||
|
||||
public BlockCrank(Properties props) {
|
||||
public CrankBlock(Properties props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class BlockCrank extends AEBaseTileBlock<TileCrank> {
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
final TileCrank tile = this.getTileEntity(w, pos);
|
||||
final CrankTileEntity tile = this.getTileEntity(w, pos);
|
||||
if (tile != null) {
|
||||
if (tile.power()) {
|
||||
AeStats.TurnedCranks.addToPlayer(player, 1);
|
||||
@@ -81,7 +81,7 @@ public class BlockCrank extends AEBaseTileBlock<TileCrank> {
|
||||
@Override
|
||||
public void onBlockPlacedBy(final World world, final BlockPos pos, final BlockState state,
|
||||
final LivingEntity placer, final ItemStack stack) {
|
||||
final AEBaseTile tile = this.getTileEntity(world, pos);
|
||||
final AEBaseTileEntity tile = this.getTileEntity(world, pos);
|
||||
if (tile != null) {
|
||||
final Direction mnt = this.findCrankable(world, pos);
|
||||
Direction forward = Direction.UP;
|
||||
@@ -97,7 +97,7 @@ public class BlockCrank extends AEBaseTileBlock<TileCrank> {
|
||||
@Override
|
||||
public boolean isValidOrientation(final IWorld w, final BlockPos pos, final Direction forward, final Direction up) {
|
||||
final TileEntity te = w.getTileEntity(pos);
|
||||
return !(te instanceof TileCrank) || this.isCrankable(w, pos, up.getOpposite());
|
||||
return !(te instanceof CrankTileEntity) || this.isCrankable(w, pos, up.getOpposite());
|
||||
}
|
||||
|
||||
private Direction findCrankable(final IBlockReader world, final BlockPos pos) {
|
||||
@@ -124,7 +124,7 @@ public class BlockCrank extends AEBaseTileBlock<TileCrank> {
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
final AEBaseTile tile = this.getTileEntity(world, pos);
|
||||
final AEBaseTileEntity tile = this.getTileEntity(world, pos);
|
||||
if (tile != null) {
|
||||
if (!this.isCrankable(world, pos, tile.getUp().getOpposite())) {
|
||||
this.dropCrank(world, pos);
|
||||
@@ -140,7 +140,7 @@ public class BlockCrank extends AEBaseTileBlock<TileCrank> {
|
||||
}
|
||||
|
||||
private Direction getUp(IBlockReader world, BlockPos pos) {
|
||||
TileCrank crank = getTileEntity(world, pos);
|
||||
CrankTileEntity crank = getTileEntity(world, pos);
|
||||
return crank != null ? crank.getUp() : null;
|
||||
}
|
||||
|
||||
+6
-6
@@ -32,22 +32,22 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerGrinder;
|
||||
import appeng.tile.grindstone.TileGrinder;
|
||||
import appeng.container.implementations.GrinderContainer;
|
||||
import appeng.tile.grindstone.GrinderTileEntity;
|
||||
|
||||
public class BlockGrinder extends AEBaseTileBlock<TileGrinder> {
|
||||
public class GrinderBlock extends AEBaseTileBlock<GrinderTileEntity> {
|
||||
|
||||
public BlockGrinder(Properties props) {
|
||||
public GrinderBlock(Properties props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
|
||||
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
|
||||
final TileGrinder tg = this.getTileEntity(w, pos);
|
||||
final GrinderTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null && !p.isCrouching()) {
|
||||
if (p instanceof ServerPlayerEntity) {
|
||||
ContainerOpener.openContainer(ContainerGrinder.TYPE, p,
|
||||
ContainerOpener.openContainer(GrinderContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
+6
-6
@@ -31,13 +31,13 @@ import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.implementations.ContainerCellWorkbench;
|
||||
import appeng.tile.misc.TileCellWorkbench;
|
||||
import appeng.container.implementations.CellWorkbenchContainer;
|
||||
import appeng.tile.misc.CellWorkbenchTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockCellWorkbench extends AEBaseTileBlock<TileCellWorkbench> {
|
||||
public class CellWorkbenchBlock extends AEBaseTileBlock<CellWorkbenchTileEntity> {
|
||||
|
||||
public BlockCellWorkbench() {
|
||||
public CellWorkbenchBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ public class BlockCellWorkbench extends AEBaseTileBlock<TileCellWorkbench> {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileCellWorkbench tg = this.getTileEntity(w, pos);
|
||||
final CellWorkbenchTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerCellWorkbench.open(p, ContainerLocator.forTileEntity(tg));
|
||||
CellWorkbenchContainer.open(p, ContainerLocator.forTileEntity(tg));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
+9
-9
@@ -57,12 +57,12 @@ import appeng.client.render.renderable.ItemRenderable;
|
||||
import appeng.client.render.tesr.ModularTESR;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.tile.misc.TileCharger;
|
||||
import appeng.tile.misc.ChargerTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockCharger extends AEBaseTileBlock<TileCharger> {
|
||||
public class ChargerBlock extends AEBaseTileBlock<ChargerTileEntity> {
|
||||
|
||||
public BlockCharger() {
|
||||
public ChargerBlock() {
|
||||
super(defaultProps(Material.IRON).notSolid());
|
||||
|
||||
this.setFullSize(this.setOpaque(false));
|
||||
@@ -81,7 +81,7 @@ public class BlockCharger extends AEBaseTileBlock<TileCharger> {
|
||||
}
|
||||
|
||||
if (Platform.isServer()) {
|
||||
final TileCharger tc = this.getTileEntity(w, pos);
|
||||
final ChargerTileEntity tc = this.getTileEntity(w, pos);
|
||||
if (tc != null) {
|
||||
tc.activate(player);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class BlockCharger extends AEBaseTileBlock<TileCharger> {
|
||||
return;
|
||||
}
|
||||
|
||||
final TileCharger tile = this.getTileEntity(w, pos);
|
||||
final ChargerTileEntity tile = this.getTileEntity(w, pos);
|
||||
if (tile != null) {
|
||||
if (AEApi.instance().definitions().materials().certusQuartzCrystalCharged()
|
||||
.isSameAs(tile.getInternalInventory().getStackInSlot(0))) {
|
||||
@@ -122,7 +122,7 @@ public class BlockCharger extends AEBaseTileBlock<TileCharger> {
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
|
||||
|
||||
final TileCharger tile = this.getTileEntity(w, pos);
|
||||
final ChargerTileEntity tile = this.getTileEntity(w, pos);
|
||||
if (tile != null) {
|
||||
final double twoPixels = 2.0 / 16.0;
|
||||
final Direction up = tile.getUp();
|
||||
@@ -178,12 +178,12 @@ public class BlockCharger extends AEBaseTileBlock<TileCharger> {
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static Function<TileEntityRendererDispatcher, TileEntityRenderer<TileCharger>> createTesr() {
|
||||
return dispatcher -> new ModularTESR<>(dispatcher, new ItemRenderable<>(BlockCharger::getRenderedItem));
|
||||
public static Function<TileEntityRendererDispatcher, TileEntityRenderer<ChargerTileEntity>> createTesr() {
|
||||
return dispatcher -> new ModularTESR<>(dispatcher, new ItemRenderable<>(ChargerBlock::getRenderedItem));
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private static Pair<ItemStack, TransformationMatrix> getRenderedItem(TileCharger tile) {
|
||||
private static Pair<ItemStack, TransformationMatrix> getRenderedItem(ChargerTileEntity tile) {
|
||||
TransformationMatrix transform = new TransformationMatrix(new Vector3f(0.5f, 0.375f, 0.5f), null, null, null);
|
||||
return new ImmutablePair<>(tile.getInternalInventory().getStackInSlot(0), transform);
|
||||
}
|
||||
+6
-6
@@ -32,13 +32,13 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerCondenser;
|
||||
import appeng.tile.misc.TileCondenser;
|
||||
import appeng.container.implementations.CondenserContainer;
|
||||
import appeng.tile.misc.CondenserTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockCondenser extends AEBaseTileBlock<TileCondenser> {
|
||||
public class CondenserBlock extends AEBaseTileBlock<CondenserTileEntity> {
|
||||
|
||||
public BlockCondenser() {
|
||||
public CondenserBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ public class BlockCondenser extends AEBaseTileBlock<TileCondenser> {
|
||||
}
|
||||
|
||||
if (Platform.isServer()) {
|
||||
final TileCondenser tc = this.getTileEntity(w, pos);
|
||||
final CondenserTileEntity tc = this.getTileEntity(w, pos);
|
||||
if (tc != null && !player.isCrouching()) {
|
||||
ContainerOpener.openContainer(ContainerCondenser.TYPE, player,
|
||||
ContainerOpener.openContainer(CondenserContainer.TYPE, player,
|
||||
ContainerLocator.forTileEntitySide(tc, hit.getFace()));
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
+6
-6
@@ -33,12 +33,12 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerInscriber;
|
||||
import appeng.tile.misc.TileInscriber;
|
||||
import appeng.container.implementations.InscriberContainer;
|
||||
import appeng.tile.misc.InscriberTileEntity;
|
||||
|
||||
public class BlockInscriber extends AEBaseTileBlock<TileInscriber> {
|
||||
public class InscriberBlock extends AEBaseTileBlock<InscriberTileEntity> {
|
||||
|
||||
public BlockInscriber(Properties props) {
|
||||
public InscriberBlock(Properties props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ public class BlockInscriber extends AEBaseTileBlock<TileInscriber> {
|
||||
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
|
||||
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
|
||||
if (!p.isCrouching()) {
|
||||
final TileInscriber tg = this.getTileEntity(w, pos);
|
||||
final InscriberTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null) {
|
||||
if (!tg.isRemote()) {
|
||||
ContainerOpener.openContainer(ContainerInscriber.TYPE, p,
|
||||
ContainerOpener.openContainer(InscriberContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -7,13 +7,13 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import appeng.bootstrap.TileEntityRendering;
|
||||
import appeng.bootstrap.TileEntityRenderingCustomizer;
|
||||
import appeng.client.render.tesr.InscriberTESR;
|
||||
import appeng.tile.misc.TileInscriber;
|
||||
import appeng.tile.misc.InscriberTileEntity;
|
||||
|
||||
public class InscriberRendering extends TileEntityRenderingCustomizer<TileInscriber> {
|
||||
public class InscriberRendering extends TileEntityRenderingCustomizer<InscriberTileEntity> {
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public void customize(TileEntityRendering<TileInscriber> rendering) {
|
||||
public void customize(TileEntityRendering<InscriberTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(InscriberTESR::new);
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -38,15 +38,15 @@ import appeng.api.util.IOrientable;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerInterface;
|
||||
import appeng.tile.misc.TileInterface;
|
||||
import appeng.container.implementations.InterfaceContainer;
|
||||
import appeng.tile.misc.InterfaceTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockInterface extends AEBaseTileBlock<TileInterface> {
|
||||
public class InterfaceBlock extends AEBaseTileBlock<InterfaceTileEntity> {
|
||||
|
||||
private static final BooleanProperty OMNIDIRECTIONAL = BooleanProperty.create("omnidirectional");
|
||||
|
||||
public BlockInterface() {
|
||||
public InterfaceBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BlockInterface extends AEBaseTileBlock<TileInterface> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileInterface te) {
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, InterfaceTileEntity te) {
|
||||
return currentState.with(OMNIDIRECTIONAL, te.isOmniDirectional());
|
||||
}
|
||||
|
||||
@@ -68,10 +68,10 @@ public class BlockInterface extends AEBaseTileBlock<TileInterface> {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileInterface tg = this.getTileEntity(w, pos);
|
||||
final InterfaceTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(ContainerInterface.TYPE, p,
|
||||
ContainerOpener.openContainer(InterfaceContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -86,8 +86,8 @@ public class BlockInterface extends AEBaseTileBlock<TileInterface> {
|
||||
|
||||
@Override
|
||||
protected void customRotateBlock(final IOrientable rotatable, final Direction axis) {
|
||||
if (rotatable instanceof TileInterface) {
|
||||
((TileInterface) rotatable).setSide(axis);
|
||||
if (rotatable instanceof InterfaceTileEntity) {
|
||||
((InterfaceTileEntity) rotatable).setSide(axis);
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -41,14 +41,14 @@ import appeng.api.util.IOrientable;
|
||||
import appeng.api.util.IOrientableBlock;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.helpers.MetaRotation;
|
||||
import appeng.tile.misc.TileLightDetector;
|
||||
import appeng.tile.misc.LightDetectorTileEntity;
|
||||
|
||||
public class BlockLightDetector extends AEBaseTileBlock<TileLightDetector> implements IOrientableBlock {
|
||||
public class LightDetectorBlock extends AEBaseTileBlock<LightDetectorTileEntity> implements IOrientableBlock {
|
||||
|
||||
// Used to alternate between two variants of the fixture on adjacent blocks
|
||||
public static final BooleanProperty ODD = BooleanProperty.create("odd");
|
||||
|
||||
public BlockLightDetector() {
|
||||
public LightDetectorBlock() {
|
||||
super(defaultProps(Material.MISCELLANEOUS).notSolid());
|
||||
|
||||
this.setDefaultState(this.getDefaultState().with(BlockStateProperties.FACING, Direction.UP).with(ODD, false));
|
||||
@@ -75,7 +75,7 @@ public class BlockLightDetector extends AEBaseTileBlock<TileLightDetector> imple
|
||||
public void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor) {
|
||||
super.onNeighborChange(state, world, pos, neighbor);
|
||||
|
||||
final TileLightDetector tld = this.getTileEntity(world, pos);
|
||||
final LightDetectorTileEntity tld = this.getTileEntity(world, pos);
|
||||
if (tld != null) {
|
||||
tld.updateLight();
|
||||
}
|
||||
+2
-2
@@ -55,7 +55,7 @@ import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.helpers.MetaRotation;
|
||||
|
||||
public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock {
|
||||
public class QuartzFixtureBlock extends AEBaseBlock implements IOrientableBlock {
|
||||
|
||||
// Cache VoxelShapes for each facing
|
||||
private static final Map<Direction, VoxelShape> SHAPES;
|
||||
@@ -79,7 +79,7 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock
|
||||
// Used to alternate between two variants of the fixture on adjacent blocks
|
||||
public static final BooleanProperty ODD = BooleanProperty.create("odd");
|
||||
|
||||
public BlockQuartzFixture() {
|
||||
public QuartzFixtureBlock() {
|
||||
super(defaultProps(Material.MISCELLANEOUS).doesNotBlockMovement().hardnessAndResistance(0).lightValue(14)
|
||||
.sound(SoundType.GLASS));
|
||||
|
||||
+5
-5
@@ -38,21 +38,21 @@ import appeng.block.AEBaseTileBlock;
|
||||
import appeng.client.render.effects.ParticleTypes;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.tile.misc.TileQuartzGrowthAccelerator;
|
||||
import appeng.tile.misc.QuartzGrowthAcceleratorTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock<TileQuartzGrowthAccelerator>
|
||||
public class QuartzGrowthAcceleratorBlock extends AEBaseTileBlock<QuartzGrowthAcceleratorTileEntity>
|
||||
implements IOrientableBlock {
|
||||
|
||||
private static final BooleanProperty POWERED = BooleanProperty.create("powered");
|
||||
|
||||
public BlockQuartzGrowthAccelerator() {
|
||||
public QuartzGrowthAcceleratorBlock() {
|
||||
super(defaultProps(Material.ROCK).sound(SoundType.METAL));
|
||||
this.setDefaultState(this.getDefaultState().with(POWERED, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileQuartzGrowthAccelerator te) {
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, QuartzGrowthAcceleratorTileEntity te) {
|
||||
return currentState.with(POWERED, te.isPowered());
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock<TileQuartzGrow
|
||||
return;
|
||||
}
|
||||
|
||||
final TileQuartzGrowthAccelerator cga = this.getTileEntity(w, pos);
|
||||
final QuartzGrowthAcceleratorTileEntity cga = this.getTileEntity(w, pos);
|
||||
|
||||
if (cga != null && cga.isPowered() && AppEng.proxy.shouldAddParticles(r)) {
|
||||
final double d0 = r.nextFloat() - 0.5F;
|
||||
+7
-7
@@ -36,14 +36,14 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerSecurityStation;
|
||||
import appeng.tile.misc.TileSecurityStation;
|
||||
import appeng.container.implementations.SecurityStationContainer;
|
||||
import appeng.tile.misc.SecurityStationTileEntity;
|
||||
|
||||
public class BlockSecurityStation extends AEBaseTileBlock<TileSecurityStation> {
|
||||
public class SecurityStationBlock extends AEBaseTileBlock<SecurityStationTileEntity> {
|
||||
|
||||
private static final BooleanProperty POWERED = BooleanProperty.create("powered");
|
||||
|
||||
public BlockSecurityStation() {
|
||||
public SecurityStationBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
|
||||
this.setDefaultState(this.getDefaultState().with(POWERED, false));
|
||||
@@ -56,7 +56,7 @@ public class BlockSecurityStation extends AEBaseTileBlock<TileSecurityStation> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileSecurityStation te) {
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, SecurityStationTileEntity te) {
|
||||
return currentState.with(POWERED, te.isActive());
|
||||
}
|
||||
|
||||
@@ -67,13 +67,13 @@ public class BlockSecurityStation extends AEBaseTileBlock<TileSecurityStation> {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileSecurityStation tg = this.getTileEntity(w, pos);
|
||||
final SecurityStationTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null) {
|
||||
if (w.isRemote()) {
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
ContainerOpener.openContainer(ContainerSecurityStation.TYPE, p,
|
||||
ContainerOpener.openContainer(SecurityStationContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
+6
-6
@@ -33,17 +33,17 @@ import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.tile.misc.TileSkyCompass;
|
||||
import appeng.tile.misc.SkyCompassTileEntity;
|
||||
|
||||
public class BlockSkyCompass extends AEBaseTileBlock<TileSkyCompass> {
|
||||
public class SkyCompassBlock extends AEBaseTileBlock<SkyCompassTileEntity> {
|
||||
|
||||
public BlockSkyCompass(Block.Properties props) {
|
||||
public SkyCompassBlock(Block.Properties props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidOrientation(final IWorld w, final BlockPos pos, final Direction forward, final Direction up) {
|
||||
final TileSkyCompass sc = this.getTileEntity(w, pos);
|
||||
final SkyCompassTileEntity sc = this.getTileEntity(w, pos);
|
||||
if (sc != null) {
|
||||
return false;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class BlockSkyCompass extends AEBaseTileBlock<TileSkyCompass> {
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
final TileSkyCompass sc = this.getTileEntity(world, pos);
|
||||
final SkyCompassTileEntity sc = this.getTileEntity(world, pos);
|
||||
final Direction forward = sc.getForward();
|
||||
if (!this.canPlaceAt(world, pos, forward.getOpposite())) {
|
||||
this.dropTorch(world, pos);
|
||||
@@ -87,7 +87,7 @@ public class BlockSkyCompass extends AEBaseTileBlock<TileSkyCompass> {
|
||||
|
||||
// TODO: This definitely needs to be memoized
|
||||
|
||||
final TileSkyCompass tile = this.getTileEntity(w, pos);
|
||||
final SkyCompassTileEntity tile = this.getTileEntity(w, pos);
|
||||
if (tile != null) {
|
||||
final Direction forward = tile.getForward();
|
||||
|
||||
@@ -24,13 +24,13 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import appeng.bootstrap.TileEntityRendering;
|
||||
import appeng.bootstrap.TileEntityRenderingCustomizer;
|
||||
import appeng.client.render.tesr.SkyCompassTESR;
|
||||
import appeng.tile.misc.TileSkyCompass;
|
||||
import appeng.tile.misc.SkyCompassTileEntity;
|
||||
|
||||
public class SkyCompassRendering extends TileEntityRenderingCustomizer<TileSkyCompass> {
|
||||
public class SkyCompassRendering extends TileEntityRenderingCustomizer<SkyCompassTileEntity> {
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(TileEntityRendering<TileSkyCompass> rendering) {
|
||||
public void customize(TileEntityRendering<SkyCompassTileEntity> rendering) {
|
||||
rendering.tileEntityRenderer(SkyCompassTESR::new);
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -44,14 +44,14 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.entity.EntityTinyTNTPrimed;
|
||||
import appeng.entity.TinyTNTPrimedEntity;
|
||||
|
||||
public class BlockTinyTNT extends AEBaseBlock {
|
||||
public class TinyTNTBlock extends AEBaseBlock {
|
||||
|
||||
private static final VoxelShape SHAPE = VoxelShapes
|
||||
.create(new AxisAlignedBB(0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f));
|
||||
|
||||
public BlockTinyTNT(Block.Properties props) {
|
||||
public TinyTNTBlock(Block.Properties props) {
|
||||
super(props);
|
||||
setFullSize(setOpaque(false));
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class BlockTinyTNT extends AEBaseBlock {
|
||||
|
||||
public void startFuse(final World w, final BlockPos pos, final LivingEntity igniter) {
|
||||
if (!w.isRemote) {
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed(w, pos.getX() + 0.5F,
|
||||
final TinyTNTPrimedEntity primedTinyTNTEntity = new TinyTNTPrimedEntity(w, pos.getX() + 0.5F,
|
||||
pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter);
|
||||
w.addEntity(primedTinyTNTEntity);
|
||||
w.playSound(null, primedTinyTNTEntity.getPosX(), primedTinyTNTEntity.getPosY(),
|
||||
@@ -141,7 +141,7 @@ public class BlockTinyTNT extends AEBaseBlock {
|
||||
public void onExplosionDestroy(final World w, final BlockPos pos, final Explosion exp) {
|
||||
super.onExplosionDestroy(w, pos, exp);
|
||||
if (!w.isRemote) {
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed(w, pos.getX() + 0.5F,
|
||||
final TinyTNTPrimedEntity primedTinyTNTEntity = new TinyTNTPrimedEntity(w, pos.getX() + 0.5F,
|
||||
pos.getY() + 0.5F, pos.getZ() + 0.5F, exp.getExplosivePlacedBy());
|
||||
primedTinyTNTEntity
|
||||
.setFuse(w.rand.nextInt(primedTinyTNTEntity.getFuse() / 4) + primedTinyTNTEntity.getFuse() / 8);
|
||||
+11
-11
@@ -40,24 +40,24 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerVibrationChamber;
|
||||
import appeng.container.implementations.VibrationChamberContainer;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.misc.TileVibrationChamber;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
import appeng.tile.misc.VibrationChamberTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public final class BlockVibrationChamber extends AEBaseTileBlock<TileVibrationChamber> {
|
||||
public final class VibrationChamberBlock extends AEBaseTileBlock<VibrationChamberTileEntity> {
|
||||
|
||||
// Indicates that the vibration chamber is currently working
|
||||
private static final BooleanProperty ACTIVE = BooleanProperty.create("active");
|
||||
|
||||
public BlockVibrationChamber() {
|
||||
public VibrationChamberBlock() {
|
||||
super(defaultProps(Material.IRON).hardnessAndResistance(4.2F));
|
||||
this.setDefaultState(this.getDefaultState().with(ACTIVE, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileVibrationChamber te) {
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, VibrationChamberTileEntity te) {
|
||||
return currentState.with(ACTIVE, te.isOn);
|
||||
}
|
||||
|
||||
@@ -75,9 +75,9 @@ public final class BlockVibrationChamber extends AEBaseTileBlock<TileVibrationCh
|
||||
}
|
||||
|
||||
if (Platform.isServer()) {
|
||||
final TileVibrationChamber tc = this.getTileEntity(w, pos);
|
||||
final VibrationChamberTileEntity tc = this.getTileEntity(w, pos);
|
||||
if (tc != null && !player.isCrouching()) {
|
||||
ContainerOpener.openContainer(ContainerVibrationChamber.TYPE, player,
|
||||
ContainerOpener.openContainer(VibrationChamberContainer.TYPE, player,
|
||||
ContainerLocator.forTileEntitySide(tc, hit.getFace()));
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
@@ -92,9 +92,9 @@ public final class BlockVibrationChamber extends AEBaseTileBlock<TileVibrationCh
|
||||
return;
|
||||
}
|
||||
|
||||
final AEBaseTile tile = this.getTileEntity(w, pos);
|
||||
if (tile instanceof TileVibrationChamber) {
|
||||
final TileVibrationChamber tc = (TileVibrationChamber) tile;
|
||||
final AEBaseTileEntity tile = this.getTileEntity(w, pos);
|
||||
if (tile instanceof VibrationChamberTileEntity) {
|
||||
final VibrationChamberTileEntity tc = (VibrationChamberTileEntity) tile;
|
||||
if (tc.isOn) {
|
||||
double f1 = pos.getX() + 0.5F;
|
||||
double f2 = pos.getY() + 0.5F;
|
||||
+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();
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraftforge.client.model.data.IModelData;
|
||||
import appeng.client.render.cablebus.CubeBuilder;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.helpers.Splotch;
|
||||
import appeng.tile.misc.TilePaint;
|
||||
import appeng.tile.misc.PaintSplotchesTileEntity;
|
||||
|
||||
/**
|
||||
* Renders paint blocks, which render multiple "splotches" that have been
|
||||
@@ -58,7 +58,7 @@ class PaintSplotchesBakedModel implements IDynamicBakedModel {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
PaintSplotches splotchesState = extraData.getData(TilePaint.SPLOTCHES);
|
||||
PaintSplotches splotchesState = extraData.getData(PaintSplotchesTileEntity.SPLOTCHES);
|
||||
|
||||
if (splotchesState == null) {
|
||||
// This is the inventory model which should usually not be used other than in
|
||||
|
||||
+5
-5
@@ -37,11 +37,11 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.tile.misc.TilePaint;
|
||||
import appeng.tile.misc.PaintSplotchesTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockPaint extends AEBaseTileBlock<TilePaint> {
|
||||
public BlockPaint() {
|
||||
public class PaintSplotchesBlock extends AEBaseTileBlock<PaintSplotchesTileEntity> {
|
||||
public PaintSplotchesBlock() {
|
||||
super(defaultProps(Material.WATER, MaterialColor.AIR));
|
||||
this.setFullSize(false);
|
||||
this.setOpaque(false);
|
||||
@@ -61,7 +61,7 @@ public class BlockPaint extends AEBaseTileBlock<TilePaint> {
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
final TilePaint tp = this.getTileEntity(world, pos);
|
||||
final PaintSplotchesTileEntity tp = this.getTileEntity(world, pos);
|
||||
|
||||
if (tp != null) {
|
||||
tp.neighborChanged();
|
||||
@@ -77,7 +77,7 @@ public class BlockPaint extends AEBaseTileBlock<TilePaint> {
|
||||
|
||||
@Override
|
||||
public int getLightValue(final BlockState state, final IBlockReader w, final BlockPos pos) {
|
||||
final TilePaint tp = this.getTileEntity(w, pos);
|
||||
final PaintSplotchesTileEntity tp = this.getTileEntity(w, pos);
|
||||
|
||||
if (tp != null) {
|
||||
return tp.getLightLevel();
|
||||
+1
-1
@@ -9,7 +9,7 @@ import appeng.bootstrap.BlockRenderingCustomizer;
|
||||
import appeng.bootstrap.IBlockRendering;
|
||||
import appeng.bootstrap.IItemRendering;
|
||||
|
||||
public class PaintRendering extends BlockRenderingCustomizer {
|
||||
public class PaintSplotchesRendering extends BlockRenderingCustomizer {
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -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()) {
|
||||
+2
-2
@@ -44,12 +44,12 @@ import appeng.block.AEBaseBlock;
|
||||
* This block is used to fill empty space in spatial dimensions and delinates
|
||||
* the border of a spatial dimensions's usable space.
|
||||
*/
|
||||
public class BlockMatrixFrame extends AEBaseBlock {
|
||||
public class MatrixFrameBlock extends AEBaseBlock {
|
||||
|
||||
private static final Material MATERIAL = new Material(MaterialColor.AIR, false, true, true, false, false, false,
|
||||
false, PushReaction.PUSH_ONLY);
|
||||
|
||||
public BlockMatrixFrame() {
|
||||
public MatrixFrameBlock() {
|
||||
super(Properties.create(MATERIAL).hardnessAndResistance(-1.0F, 6000000.0F).notSolid().noDrops());
|
||||
}
|
||||
|
||||
+7
-7
@@ -34,20 +34,20 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerSpatialIOPort;
|
||||
import appeng.tile.spatial.TileSpatialIOPort;
|
||||
import appeng.container.implementations.SpatialIOPortContainer;
|
||||
import appeng.tile.spatial.SpatialIOPortTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockSpatialIOPort extends AEBaseTileBlock<TileSpatialIOPort> {
|
||||
public class SpatialIOPortBlock extends AEBaseTileBlock<SpatialIOPortTileEntity> {
|
||||
|
||||
public BlockSpatialIOPort() {
|
||||
public SpatialIOPortBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
final TileSpatialIOPort te = this.getTileEntity(world, pos);
|
||||
final SpatialIOPortTileEntity te = this.getTileEntity(world, pos);
|
||||
if (te != null) {
|
||||
te.updateRedstoneState();
|
||||
}
|
||||
@@ -60,10 +60,10 @@ public class BlockSpatialIOPort extends AEBaseTileBlock<TileSpatialIOPort> {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileSpatialIOPort tg = this.getTileEntity(w, pos);
|
||||
final SpatialIOPortTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(ContainerSpatialIOPort.TYPE, p,
|
||||
ContainerOpener.openContainer(SpatialIOPortContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
+5
-5
@@ -26,18 +26,18 @@ import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.tile.spatial.TileSpatialPylon;
|
||||
import appeng.tile.spatial.SpatialPylonTileEntity;
|
||||
|
||||
public class BlockSpatialPylon extends AEBaseTileBlock<TileSpatialPylon> {
|
||||
public class SpatialPylonBlock extends AEBaseTileBlock<SpatialPylonTileEntity> {
|
||||
|
||||
public BlockSpatialPylon() {
|
||||
public SpatialPylonBlock() {
|
||||
super(defaultProps(AEGlassMaterial.INSTANCE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
final TileSpatialPylon tsp = this.getTileEntity(world, pos);
|
||||
final SpatialPylonTileEntity tsp = this.getTileEntity(world, pos);
|
||||
if (tsp != null) {
|
||||
tsp.neighborChanged();
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class BlockSpatialPylon extends AEBaseTileBlock<TileSpatialPylon> {
|
||||
|
||||
@Override
|
||||
public int getLightValue(final BlockState state, final IBlockReader w, final BlockPos pos) {
|
||||
final TileSpatialPylon tsp = this.getTileEntity(w, pos);
|
||||
final SpatialPylonTileEntity tsp = this.getTileEntity(w, pos);
|
||||
if (tsp != null) {
|
||||
return tsp.getLightValue();
|
||||
}
|
||||
+7
-7
@@ -36,16 +36,16 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerChest;
|
||||
import appeng.container.implementations.ChestContainer;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.tile.storage.TileChest;
|
||||
import appeng.tile.storage.ChestTileEntity;
|
||||
|
||||
public class BlockChest extends AEBaseTileBlock<TileChest> {
|
||||
public class ChestBlock extends AEBaseTileBlock<ChestTileEntity> {
|
||||
|
||||
private final static EnumProperty<DriveSlotState> SLOT_STATE = EnumProperty.create("slot_state",
|
||||
DriveSlotState.class);
|
||||
|
||||
public BlockChest() {
|
||||
public ChestBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
this.setDefaultState(this.getDefaultState().with(SLOT_STATE, DriveSlotState.EMPTY));
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class BlockChest extends AEBaseTileBlock<TileChest> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileChest te) {
|
||||
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, ChestTileEntity te) {
|
||||
DriveSlotState slotState = DriveSlotState.EMPTY;
|
||||
|
||||
if (te.getCellCount() >= 1) {
|
||||
@@ -74,7 +74,7 @@ public class BlockChest extends AEBaseTileBlock<TileChest> {
|
||||
@Override
|
||||
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand,
|
||||
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
|
||||
final TileChest tg = this.getTileEntity(w, pos);
|
||||
final ChestTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null && !p.isCrouching()) {
|
||||
if (w.isRemote()) {
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -85,7 +85,7 @@ public class BlockChest extends AEBaseTileBlock<TileChest> {
|
||||
p.sendMessage(PlayerMessages.ChestCannotReadStorageCell.get());
|
||||
}
|
||||
} else {
|
||||
ContainerOpener.openContainer(ContainerChest.TYPE, p,
|
||||
ContainerOpener.openContainer(ChestContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
|
||||
+6
-6
@@ -32,13 +32,13 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerDrive;
|
||||
import appeng.tile.storage.TileDrive;
|
||||
import appeng.container.implementations.DriveContainer;
|
||||
import appeng.tile.storage.DriveTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockDrive extends AEBaseTileBlock<TileDrive> {
|
||||
public class DriveBlock extends AEBaseTileBlock<DriveTileEntity> {
|
||||
|
||||
public BlockDrive() {
|
||||
public DriveBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
}
|
||||
|
||||
@@ -49,10 +49,10 @@ public class BlockDrive extends AEBaseTileBlock<TileDrive> {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileDrive tg = this.getTileEntity(w, pos);
|
||||
final DriveTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(ContainerDrive.TYPE, p, ContainerLocator.forTileEntity(tg));
|
||||
ContainerOpener.openContainer(DriveContainer.TYPE, p, ContainerLocator.forTileEntity(tg));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
+7
-7
@@ -34,20 +34,20 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerIOPort;
|
||||
import appeng.tile.storage.TileIOPort;
|
||||
import appeng.container.implementations.IOPortContainer;
|
||||
import appeng.tile.storage.IOPortTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockIOPort extends AEBaseTileBlock<TileIOPort> {
|
||||
public class IOPortBlock extends AEBaseTileBlock<IOPortTileEntity> {
|
||||
|
||||
public BlockIOPort() {
|
||||
public IOPortBlock() {
|
||||
super(defaultProps(Material.IRON));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos,
|
||||
boolean isMoving) {
|
||||
final TileIOPort te = this.getTileEntity(world, pos);
|
||||
final IOPortTileEntity te = this.getTileEntity(world, pos);
|
||||
if (te != null) {
|
||||
te.updateRedstoneState();
|
||||
}
|
||||
@@ -60,10 +60,10 @@ public class BlockIOPort extends AEBaseTileBlock<TileIOPort> {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileIOPort tg = this.getTileEntity(w, pos);
|
||||
final IOPortTileEntity tg = this.getTileEntity(w, pos);
|
||||
if (tg != null) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(ContainerIOPort.TYPE, p,
|
||||
ContainerOpener.openContainer(IOPortContainer.TYPE, p,
|
||||
ContainerLocator.forTileEntitySide(tg, hit.getFace()));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
+7
-7
@@ -39,11 +39,11 @@ import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerSkyChest;
|
||||
import appeng.tile.storage.TileSkyChest;
|
||||
import appeng.container.implementations.SkyChestContainer;
|
||||
import appeng.tile.storage.SkyChestTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockSkyChest extends AEBaseTileBlock<TileSkyChest> {
|
||||
public class SkyChestBlock extends AEBaseTileBlock<SkyChestTileEntity> {
|
||||
|
||||
private static final double AABB_OFFSET_BOTTOM = 0.00;
|
||||
private static final double AABB_OFFSET_SIDES = 0.06;
|
||||
@@ -55,7 +55,7 @@ public class BlockSkyChest extends AEBaseTileBlock<TileSkyChest> {
|
||||
|
||||
public final SkyChestType type;
|
||||
|
||||
public BlockSkyChest(final SkyChestType type, Properties props) {
|
||||
public SkyChestBlock(final SkyChestType type, Properties props) {
|
||||
super(props);
|
||||
this.type = type;
|
||||
}
|
||||
@@ -74,12 +74,12 @@ public class BlockSkyChest extends AEBaseTileBlock<TileSkyChest> {
|
||||
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand,
|
||||
final @Nullable ItemStack heldItem, final BlockRayTraceResult hit) {
|
||||
if (Platform.isServer()) {
|
||||
TileSkyChest tile = getTileEntity(w, pos);
|
||||
SkyChestTileEntity tile = getTileEntity(w, pos);
|
||||
if (tile == null) {
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
ContainerOpener.openContainer(ContainerSkyChest.TYPE, player, ContainerLocator.forTileEntity(tile));
|
||||
ContainerOpener.openContainer(SkyChestContainer.TYPE, player, ContainerLocator.forTileEntity(tile));
|
||||
}
|
||||
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -93,7 +93,7 @@ public class BlockSkyChest extends AEBaseTileBlock<TileSkyChest> {
|
||||
}
|
||||
|
||||
private AxisAlignedBB computeAABB(final IBlockReader w, final BlockPos pos) {
|
||||
final TileSkyChest sk = this.getTileEntity(w, pos);
|
||||
final SkyChestTileEntity sk = this.getTileEntity(w, pos);
|
||||
Direction o = Direction.UP;
|
||||
|
||||
if (sk != null) {
|
||||
Reference in New Issue
Block a user