More work for 1.14

This commit is contained in:
Shane Freeder
2019-04-26 02:24:00 +01:00
parent 29a22e708f
commit aa701c743f
33 changed files with 257 additions and 941 deletions

View File

@@ -6,22 +6,22 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 67cd4af4f5..3f9de7e55a 100644
index c4103680d4..9433d04f43 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
}
return this.world.getChunkProvider().getLightEngine();
}
+ public final int getLightSubtracted(BlockPosition blockposition, int i) { return this.a(blockposition, i); } // Paper - OBFHELPER
public int a(BlockPosition blockposition, int i) {
return this.a(blockposition, i, this.world.o().g());
return this.a(blockposition, i, this.world.getWorldProvider().g());
}
diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java
index 646c5a91b8..554825ec1f 100644
index bac6c9d65b..0930552b1f 100644
--- a/src/main/java/net/minecraft/server/IWorldReader.java
+++ b/src/main/java/net/minecraft/server/IWorldReader.java
@@ -0,0 +0,0 @@ public interface IWorldReader extends IBlockAccess {
@@ -0,0 +0,0 @@ public interface IWorldReader extends IIBlockAccess {
}
int getLightLevel(BlockPosition blockposition, int i);
@@ -42,23 +42,23 @@ index 646c5a91b8..554825ec1f 100644
+ }
+ // Paper end
boolean isChunkLoaded(int i, int j, boolean flag);
@Nullable
IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 6e7c0c9da4..fd45090685 100644
index 55e8c7c7d4..e8831e2a40 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public final List<Entity> k = Lists.newArrayList();
protected final IntHashMap<Entity> entitiesById = new IntHashMap<>();
private final long F = 16777215L;
- private int G;
+ private int G; public int getSkylightSubtracted() { return this.G; } public void setSkylightSubtracted(int value) { this.G = value;} // Paper - OBFHELPER
protected int m = (new Random()).nextInt();
protected final int n = 1013904223;
protected float o;
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return this.getType(blockposition).isAir();
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
private final long b = 16777215L;
private final Thread c;
- private int d;
+ private int d; public int getSkylightSubtracted() { return this.d; } public void setSkylightSubtracted(int value) { this.d = value;} // Paper - OBFHELPER
protected int j = (new Random()).nextInt();
protected final int k = 1013904223;
protected float l;
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
return i < 0 || i >= 256;
}
+ // Paper start