Skip to content

Commit 76e1c1f

Browse files
committed
Merge branch 'master' into zb-lotsa-mui2
2 parents 16df071 + 32c6d59 commit 76e1c1f

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/main/java/gregtech/api/capability/GregtechDataCodes.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
public class GregtechDataCodes {
1111

12-
public static final int UPDATE_PRIVATE = assignId();
13-
public static final int LOCK_FILL = assignId();
1412
private static int nextId = 0;
1513

1614
public static int assignId() {
@@ -97,6 +95,7 @@ public static int assignId() {
9795
public static final int MAINTENANCE_MULTIPLIER = assignId();
9896
public static final int UPDATE_UPWARDS_FACING = assignId();
9997
public static final int UPDATE_FLIP = assignId();
98+
public static final int LOCK_FILL = assignId();
10099

101100
// Item Bus Item Stack Auto Collapsing
102101
public static final int TOGGLE_COLLAPSE_ITEMS = assignId();
@@ -157,6 +156,9 @@ public static int assignId() {
157156
// Detector Covers
158157
public static final int UPDATE_INVERTED = assignId();
159158

159+
// Ender Covers
160+
public static final int UPDATE_PRIVATE = assignId();
161+
160162
// HPCA / Research Station
161163
public static final int DAMAGE_STATE = assignId();
162164
public static final int LOCK_OBJECT_HOLDER = assignId();

src/main/java/gregtech/api/cover/CoverSaveHandler.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package gregtech.api.cover;
22

3-
import gregtech.api.metatileentity.interfaces.ISyncedTileEntity;
43
import gregtech.api.util.GTLog;
54

65
import net.minecraft.nbt.NBTTagCompound;
@@ -67,7 +66,6 @@ public static void receiveInitialSyncData(@NotNull PacketBuffer buf, @NotNull Co
6766
} else {
6867
Cover cover = definition.createCover(coverHolder, facing);
6968
cover.readInitialSyncData(buf);
70-
ISyncedTileEntity.checkInitialData(buf, cover);
7169
coverHolder.addCover(facing, cover);
7270
}
7371
}
@@ -109,7 +107,6 @@ public static void readCoverPlacement(@NotNull PacketBuffer buf, @NotNull CoverH
109107
coverHolder.addCover(placementSide, cover);
110108

111109
cover.readInitialSyncData(buf);
112-
ISyncedTileEntity.checkInitialData(buf, cover);
113110
}
114111
coverHolder.scheduleRenderUpdate();
115112
}

src/main/java/gregtech/api/metatileentity/MetaTileEntity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,6 @@ public void receiveInitialSyncData(@NotNull PacketBuffer buf) {
10451045
GTLog.logger.warn("Could not find MTETrait for id: {} at position {}.", traitNetworkId, getPos());
10461046
} else {
10471047
trait.receiveInitialSyncData(buf);
1048-
ISyncedTileEntity.checkInitialData(buf, trait);
10491048
}
10501049
}
10511050
CoverSaveHandler.receiveInitialSyncData(buf, this);
@@ -1085,6 +1084,8 @@ public void receiveCustomData(int dataId, @NotNull PacketBuffer buf) {
10851084
GTLog.logger.warn("Could not find MTETrait for id: {} at position {}.", traitNetworkId, getPos());
10861085
} else {
10871086
trait.receiveCustomData(internalId, buf);
1087+
1088+
// this should be fine, as nothing else is read after this
10881089
ISyncedTileEntity.checkCustomData(internalId, buf, trait);
10891090
}
10901091
} else if (dataId == COVER_ATTACHED_MTE) {
@@ -1102,6 +1103,8 @@ public void receiveCustomData(int dataId, @NotNull PacketBuffer buf) {
11021103
int internalId = buf.readVarInt();
11031104
if (cover != null) {
11041105
cover.readCustomData(internalId, buf);
1106+
1107+
// this should be fine, as nothing else is read after this
11051108
ISyncedTileEntity.checkCustomData(internalId, buf, cover);
11061109
}
11071110
} else if (dataId == UPDATE_SOUND_MUFFLED) {

0 commit comments

Comments
 (0)