The Great Renamening of 2020

This commit is contained in:
Sebastian Hartte
2020-06-22 12:14:54 +02:00
parent abe3334488
commit b4471b1abb
441 changed files with 3395 additions and 3468 deletions
@@ -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;
}
@@ -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);
}
@@ -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;
}
@@ -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);
}
@@ -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);
}
}
}
@@ -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();
}
@@ -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));
@@ -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;
@@ -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;
}
@@ -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);
}
@@ -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);
@@ -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;