Skip to content

Commit ba54f43

Browse files
authored
Merge pull request #597 from fixrtm/signal-converter-not-loaded
fix: null pointer exception on loading block
2 parents 9f42f8a + 7dbdf27 commit ba54f43

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG-SNAPSHOTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The changelog for 2.0.23 and earlier is generated by [anatawa12's fork of `auto-
1919

2020
### Fixed
2121
- Formation is broken when we disconnected long formation `#596`
22+
- Signal Converter Setting is not loaded correctly `#597`
2223

2324
### Security
2425

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Thanks to prepare-changelog.sh, we have some macros.
2626

2727
### Fixed
2828
- Formation is broken when we disconnected long formation `#596`
29+
- Signal Converter Setting is not loaded correctly `#597`
2930

3031
### Security
3132

src/main/ngtlib-patches/jp/ngt/ngtlib/block/TileEntityCustom.java.patch

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818

1919
public NBTTagCompound getUpdateTag() {
2020
return this.writeToNBT(new NBTTagCompound());
21-
@@ -50,11 +43,12 @@
21+
@@ -49,12 +42,13 @@
22+
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) {
2223
this.readFromNBT(pkt.getNbtCompound());
2324
}
2425

2526
protected void sendPacket() {
26-
if (this.world == null || !this.world.isRemote) {
27+
- if (this.world == null || !this.world.isRemote) {
2728
- PacketNBT.sendToClient(this);
29+
+ if (this.world != null && !this.world.isRemote) {
2830
+ net.minecraft.block.state.IBlockState state = getWorld().getBlockState(getPos());
2931
+ getWorld().notifyBlockUpdate(getPos(), state, state, 0);
3032
}

0 commit comments

Comments
 (0)