Utils ported
This commit is contained in:
@@ -118,7 +118,7 @@ public class MolecularAssemblerRenderer extends BlockEntityRenderer<MolecularAss
|
||||
|
||||
if (AppEng.proxy.shouldAddParticles(particleRandom)) {
|
||||
for (int x = 0; x < (int) Math.ceil(status.getSpeed() / 5.0); x++) {
|
||||
minecraft.particles.addParticle(ParticleTypes.CRAFTING, centerX, centerY, centerZ, 0, 0, 0);
|
||||
minecraft.particleManager.addParticle(ParticleTypes.CRAFTING, centerX, centerY, centerZ, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class MolecularAssemblerRenderer extends BlockEntityRenderer<MolecularAss
|
||||
ms.translate(0, -0.2f, 0);
|
||||
}
|
||||
|
||||
itemRenderer.renderItem(is, ModelTransformation.TransformType.GROUND, combinedLightIn,
|
||||
itemRenderer.renderItem(is, ModelTransformation.Mode.GROUND, combinedLightIn,
|
||||
OverlayTexture.NO_OVERLAY, ms, bufferIn);
|
||||
ms.pop();
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import appeng.api.implementations.tiles.ICrankable;
|
||||
import appeng.tile.AEBaseBlockEntity;
|
||||
|
||||
public class CrankBlockEntity extends AEBaseBlockEntity implements ITickableTileEntity {
|
||||
public class CrankBlockEntity extends AEBaseBlockEntity implements Tickable {
|
||||
|
||||
private final int ticksPerRotation = 18;
|
||||
|
||||
@@ -92,7 +92,7 @@ public class CrankBlockEntity extends AEBaseBlockEntity implements ITickableTile
|
||||
public void setOrientation(final Direction inForward, final Direction inUp) {
|
||||
super.setOrientation(inForward, inUp);
|
||||
final BlockState state = this.world.getBlockState(this.pos);
|
||||
state.getBlock().neighborChanged(state, this.world, this.pos, state.getBlock(), this.pos, false);
|
||||
state.getBlock().neighborUpdate(state, this.world, this.pos, state.getBlock(), this.pos, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,7 +56,7 @@ public class GrinderBlockEntity extends AEBaseInvBlockEntity implements ICrankab
|
||||
public void setOrientation(final Direction inForward, final Direction inUp) {
|
||||
super.setOrientation(inForward, inUp);
|
||||
final BlockState state = this.world.getBlockState(this.pos);
|
||||
state.getBlock().neighborChanged(state, this.world, this.pos, state.getBlock(), this.pos, false);
|
||||
state.getBlock().neighborUpdate(state, this.world, this.pos, state.getBlock(), this.pos, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
package appeng.tile.misc;
|
||||
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
|
||||
import appeng.tile.AEBaseBlockEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class LightDetectorBlockEntity extends AEBaseBlockEntity implements ITickableTileEntity {
|
||||
public class LightDetectorBlockEntity extends AEBaseBlockEntity implements Tickable {
|
||||
|
||||
private int lastCheck = 30;
|
||||
private int lastLight = 0;
|
||||
@@ -47,7 +47,7 @@ public class LightDetectorBlockEntity extends AEBaseBlockEntity implements ITick
|
||||
}
|
||||
|
||||
public void updateLight() {
|
||||
final int val = this.world.getLight(this.pos);
|
||||
final int val = this.world.getLightLevel(this.pos);
|
||||
|
||||
if (this.lastLight != val) {
|
||||
this.lastLight = val;
|
||||
|
||||
@@ -145,7 +145,7 @@ public class PaintSplotchesBlockEntity extends AEBaseBlockEntity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void neighborChanged() {
|
||||
public void neighborUpdate() {
|
||||
if (this.dots == null) {
|
||||
return;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public class PaintSplotchesBlockEntity extends AEBaseBlockEntity {
|
||||
public boolean isSideValid(final Direction side) {
|
||||
final BlockPos p = this.pos.offset(side);
|
||||
final BlockState blk = this.world.getBlockState(p);
|
||||
return blk.isSolidSide(world, p, side.getOpposite());
|
||||
return blk.isSideSolidFullSquare(world, p, side.getOpposite());
|
||||
}
|
||||
|
||||
private void removeSide(final Direction side) {
|
||||
@@ -215,7 +215,7 @@ public class PaintSplotchesBlockEntity extends AEBaseBlockEntity {
|
||||
final BlockPos p = this.pos.offset(side);
|
||||
|
||||
final BlockState blk = this.world.getBlockState(p);
|
||||
if (blk.isSolidSide(this.world, p, side.getOpposite())) {
|
||||
if (blk.isSideSolidFullSquare(this.world, p, side.getOpposite())) {
|
||||
final PaintBallItem ipb = (PaintBallItem) type.getItem();
|
||||
|
||||
final AEColor col = ipb.getColor();
|
||||
|
||||
@@ -22,14 +22,12 @@ import java.io.IOException;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.util.math.Direction;
|
||||
@@ -56,7 +54,7 @@ import appeng.tile.grid.AENetworkInvBlockEntity;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.inv.InvOperation;
|
||||
|
||||
public class QuantumBridgeBlockEntity extends AENetworkInvBlockEntity implements IAEMultiBlock, ITickableTileEntity {
|
||||
public class QuantumBridgeBlockEntity extends AENetworkInvBlockEntity implements IAEMultiBlock, Tickable {
|
||||
|
||||
public static final ModelProperty<QnbFormedState> FORMED_STATE = new ModelProperty<>();
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public class SpatialPylonBlockEntity extends AENetworkBlockEntity implements IAE
|
||||
@Override
|
||||
public void onReady() {
|
||||
super.onReady();
|
||||
this.neighborChanged();
|
||||
this.neighborUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,7 +96,7 @@ public class SpatialPylonBlockEntity extends AENetworkBlockEntity implements IAE
|
||||
super.remove();
|
||||
}
|
||||
|
||||
public void neighborChanged() {
|
||||
public void neighborUpdate() {
|
||||
this.calc.calculateMultiblock(this.world, this.getLocation());
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
@@ -110,7 +110,7 @@ import appeng.util.inv.filter.IAEItemFilter;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class ChestBlockEntity extends AENetworkPowerBlockEntity
|
||||
implements IMEChest, ITerminalHost, IPriorityHost, IConfigManagerHost, IColorableTile, ITickableTileEntity {
|
||||
implements IMEChest, ITerminalHost, IPriorityHost, IConfigManagerHost, IColorableTile, Tickable {
|
||||
private final AppEngInternalInventory inputInventory = new AppEngInternalInventory(this, 1);
|
||||
private final AppEngInternalInventory cellInventory = new AppEngInternalInventory(this, 1);
|
||||
private final FixedItemInv internalInventory = new WrapperChainedItemHandler(this.inputInventory,
|
||||
|
||||
@@ -24,11 +24,11 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.tileentity.IChestLid;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
@@ -37,7 +37,7 @@ import appeng.tile.AEBaseInvBlockEntity;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.inv.InvOperation;
|
||||
|
||||
public class SkyChestBlockEntity extends AEBaseInvBlockEntity implements ITickableTileEntity, IChestLid {
|
||||
public class SkyChestBlockEntity extends AEBaseInvBlockEntity implements Tickable, IChestLid {
|
||||
|
||||
private final AppEngInternalInventory inv = new AppEngInternalInventory(this, 9 * 4);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user