@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/World.java
|
||||
+++ b/net/minecraft/world/level/World.java
|
||||
@@ -78,6 +78,28 @@
|
||||
@@ -80,6 +80,28 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import net.minecraft.world.scores.Scoreboard;
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
public static final Codec<ResourceKey<World>> RESOURCE_KEY_CODEC = ResourceKey.codec(Registries.DIMENSION);
|
||||
@@ -119,7 +141,42 @@
|
||||
@@ -120,7 +142,42 @@
|
||||
private final DamageSources damageSources;
|
||||
private long subTickCount;
|
||||
|
||||
- protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, IRegistryCustom iregistrycustom, Holder<DimensionManager> holder, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j) {
|
||||
- protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, IRegistryCustom iregistrycustom, Holder<DimensionManager> holder, boolean flag, boolean flag1, long i, int j) {
|
||||
+ // CraftBukkit start Added the following
|
||||
+ private final CraftWorld world;
|
||||
+ public boolean pvpMode;
|
||||
@@ -58,7 +58,7 @@
|
||||
+
|
||||
+ public abstract ResourceKey<WorldDimension> getTypeKey();
|
||||
+
|
||||
+ protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, IRegistryCustom iregistrycustom, Holder<DimensionManager> holder, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
||||
+ protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, IRegistryCustom iregistrycustom, Holder<DimensionManager> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
||||
+ this.generator = gen;
|
||||
+ this.world = new CraftWorld((WorldServer) this, gen, biomeProvider, env);
|
||||
+
|
||||
@@ -70,9 +70,9 @@
|
||||
+ }
|
||||
+
|
||||
+ // CraftBukkit end
|
||||
this.profiler = supplier;
|
||||
this.levelData = worlddatamutable;
|
||||
this.dimensionTypeRegistration = holder;
|
||||
final DimensionManager dimensionmanager = (DimensionManager) holder.value();
|
||||
@@ -128,15 +185,15 @@
|
||||
this.dimension = resourcekey;
|
||||
this.isClientSide = flag;
|
||||
@@ -255,7 +255,7 @@
|
||||
public void onBlockStateChange(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {}
|
||||
|
||||
@Override
|
||||
@@ -337,6 +515,14 @@
|
||||
@@ -339,6 +517,14 @@
|
||||
|
||||
@Override
|
||||
public IBlockData getBlockState(BlockPosition blockposition) {
|
||||
@@ -270,19 +270,7 @@
|
||||
if (this.isOutsideBuildHeight(blockposition)) {
|
||||
return Blocks.VOID_AIR.defaultBlockState();
|
||||
} else {
|
||||
@@ -523,6 +709,11 @@
|
||||
case 4:
|
||||
explosion_effect = Explosion.Effect.TRIGGER_BLOCK;
|
||||
break;
|
||||
+ // CraftBukkit start - handle custom explosion type
|
||||
+ case 5:
|
||||
+ explosion_effect = Explosion.Effect.DESTROY;
|
||||
+ break;
|
||||
+ // CraftBukkit end
|
||||
default:
|
||||
throw new MatchException((String) null, (Throwable) null);
|
||||
}
|
||||
@@ -544,6 +735,16 @@
|
||||
@@ -509,6 +695,16 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity getBlockEntity(BlockPosition blockposition) {
|
||||
@@ -299,7 +287,7 @@
|
||||
return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && Thread.currentThread() != this.thread ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, Chunk.EnumTileEntityState.IMMEDIATE));
|
||||
}
|
||||
|
||||
@@ -551,6 +752,12 @@
|
||||
@@ -516,6 +712,12 @@
|
||||
BlockPosition blockposition = tileentity.getBlockPos();
|
||||
|
||||
if (!this.isOutsideBuildHeight(blockposition)) {
|
||||
@@ -312,7 +300,7 @@
|
||||
this.getChunkAt(blockposition).addAndRegisterBlockEntity(tileentity);
|
||||
}
|
||||
}
|
||||
@@ -680,7 +887,7 @@
|
||||
@@ -645,7 +847,7 @@
|
||||
|
||||
for (int k = 0; k < j; ++k) {
|
||||
EntityComplexPart entitycomplexpart = aentitycomplexpart[k];
|
||||
@@ -321,7 +309,7 @@
|
||||
|
||||
if (t0 != null && predicate.test(t0)) {
|
||||
list.add(t0);
|
||||
@@ -958,7 +1165,7 @@
|
||||
@@ -912,7 +1114,7 @@
|
||||
|
||||
public static enum a implements INamable {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user