The Great Renamening of 2020
This commit is contained in:
+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;
|
||||
Reference in New Issue
Block a user