Remove part layer api in favor of capabilities (#355)

This commit is contained in:
Serenibyss
2024-01-08 09:52:05 -06:00
committed by GitHub
parent 0b7341e4a8
commit 4829ec8286
9 changed files with 8 additions and 496 deletions
@@ -22,13 +22,11 @@ package appeng.tile.networking;
import appeng.api.networking.IGridNode;
import appeng.api.parts.IFacadeContainer;
import appeng.api.parts.IPart;
import appeng.api.parts.LayerFlags;
import appeng.api.parts.SelectedPart;
import appeng.api.util.AECableType;
import appeng.api.util.AEColor;
import appeng.api.util.AEPartLocation;
import appeng.api.util.DimensionalCoord;
import appeng.block.networking.BlockCableBus;
import appeng.helpers.AEMultiTile;
import appeng.helpers.ICustomCollision;
import appeng.hooks.TickHandler;
@@ -101,7 +99,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
protected void updateTileSetting() {
if (this.getCableBus().isRequiresDynamicRender()) {
try {
final TileCableBus tcb = (TileCableBus) BlockCableBus.getTesrTile().newInstance();
final TileCableBus tcb = TileCableBusTESR.class.newInstance();
tcb.copyFrom(this);
this.getWorld().setTileEntity(this.pos, tcb);
} catch (final Throwable ignored) {
@@ -283,11 +281,6 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
return this.getCableBus().isEmpty();
}
@Override
public Set<LayerFlags> getLayerFlags() {
return this.getCableBus().getLayerFlags();
}
@Override
public void cleanup() {
this.getWorld().setBlockToAir(this.pos);
@@ -19,9 +19,6 @@
package appeng.tile.networking;
import appeng.block.networking.BlockCableBus;
public class TileCableBusTESR extends TileCableBus {
/**
@@ -31,7 +28,7 @@ public class TileCableBusTESR extends TileCableBus {
protected void updateTileSetting() {
if (!this.getCableBus().isRequiresDynamicRender()) {
try {
final TileCableBus tcb = (TileCableBus) BlockCableBus.getNoTesrTile().newInstance();
final TileCableBus tcb = TileCableBus.class.newInstance();
tcb.copyFrom(this);
this.getWorld().setTileEntity(this.pos, tcb);
} catch (final Throwable ignored) {