mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
Fix a null pointer in ShapeDetectorBlock
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
2c9a7d4b67
commit
18c03d87ac
15
paper-server/nms-patches/ShapeDetectorBlock.patch
Normal file
15
paper-server/nms-patches/ShapeDetectorBlock.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/ShapeDetectorBlock.java 2015-02-02 20:26:40.044135504 +0000
|
||||
+++ src/main/java/net/minecraft/server/ShapeDetectorBlock.java 2015-02-02 20:26:40.056135504 +0000
|
||||
@@ -16,8 +16,10 @@
|
||||
}
|
||||
|
||||
public IBlockData a() {
|
||||
- if (this.c == null && this.a.isLoaded(this.b)) {
|
||||
- this.c = this.a.getType(this.b);
|
||||
+ // CraftBukkit start - fix null pointer
|
||||
+ if (this.c == null) {
|
||||
+ this.c = this.a.isLoaded(this.b) ? this.a.getType(this.b) : Blocks.AIR.getBlockData();
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
return this.c;
|
Loading…
Reference in New Issue
Block a user