Skip to content

Commit 6524987

Browse files
committed
small interface method changes
1 parent 06a913b commit 6524987

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

src/main/java/com/gregtechceu/gtceu/api/blockentity/IGregtechBlockEntity.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@ public interface IGregtechBlockEntity extends ISyncManaged, ITickSubscription, I
2525

2626
void notifyBlockUpdate();
2727

28-
void scheduleNeighborShapeUpdate();
28+
default void scheduleNeighborShapeUpdate() {
29+
Level level = getLevel();
30+
BlockPos pos = getBlockPos();
31+
32+
if (level == null || pos == null)
33+
return;
34+
35+
level.getBlockState(pos).updateNeighbourShapes(level, pos, Block.UPDATE_ALL);
36+
}
2937

3038
void markAsChanged();
3139

src/main/java/com/gregtechceu/gtceu/api/machine/MetaMachine.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,6 @@ public boolean triggerEvent(int id, int para) {
181181
return false;
182182
}
183183

184-
public void scheduleNeighborShapeUpdate() {
185-
Level level = getLevel();
186-
BlockPos pos = getBlockPos();
187-
188-
if (level == null) return;
189-
190-
level.getBlockState(pos).updateNeighbourShapes(level, pos, Block.UPDATE_ALL);
191-
}
192-
193184
public void setPaintingColor(int color) {
194185
if (color == this.paintingColor) return;
195186

src/main/java/com/gregtechceu/gtceu/api/pipenet/IPipeNode.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,6 @@ default NodeDataType getNodeData() {
119119

120120
default void serverTick() {}
121121

122-
default void scheduleNeighborShapeUpdate() {
123-
Level level = getLevel();
124-
BlockPos pos = getBlockPos();
125-
126-
if (level == null || pos == null)
127-
return;
128-
129-
level.getBlockState(pos).updateNeighbourShapes(level, pos, Block.UPDATE_ALL);
130-
}
131-
132-
default BlockEntity getNeighbor(Direction direction) {
133-
return getLevel().getBlockEntity(getBlockPos().relative(direction));
134-
}
135-
136122
@Override
137123
default int getDefaultPaintingColor() {
138124
return 0xFFFFFF;

0 commit comments

Comments
 (0)