mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-01 13:11:30 +01:00
30d007b163
Undo the accidental renaming of a method ine45e15c
Aikar wanted to rename DataPalette#getDataBits(T object) to getOrCreateIdFor ine45e15c
but he also accidentally renamed ChunkPacketInfo#getDataBitsIndex(int chunkSectionIndex) to getOrCreateIdForIndex. Remove chunk-edge-mode and chunk loading entirely from Anti-Xray The chunk-edge-mode is broken since several versions. Loading chunk neighbors for chunk edge obfuscation isn't needed anymore. Unlike in previous versions, these are under normal circumstances already loaded at the time we need them (plugins for example can bypass this). Use the modified methods and constructors everywhere Anti-Xray provides support for the default nms methods and constructors, which where modified by Anti-Xray to avoid breaking stuff (plugins) which somehow uses these methods. However, the modified versions of those methods and constructors should be used where possible.
54 lines
2.8 KiB
Diff
54 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Byteflux <byte@byteflux.net>
|
|
Date: Wed, 2 Mar 2016 02:17:54 -0600
|
|
Subject: [PATCH] Generator Settings
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 515673e0fec..928fefb4195 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
|
private void perPlayerMobSpawns() {
|
|
perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false);
|
|
}
|
|
+
|
|
+ public boolean generateFlatBedrock;
|
|
+ private void generatorSettings() {
|
|
+ generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java
|
|
index af81a841428..2268fbdd871 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java
|
|
@@ -0,0 +0,0 @@ public abstract class ChunkGeneratorAbstract<T extends GeneratorSettingsDefault>
|
|
int i = ichunkaccess.getPos().d();
|
|
int j = ichunkaccess.getPos().e();
|
|
T t0 = this.getSettings();
|
|
- int k = t0.u();
|
|
- int l = t0.t();
|
|
+ int k = t0.u(); final int floorHeight = k; // Paper
|
|
+ int l = t0.t(); final int roofHeight = l; // Paper
|
|
Iterator iterator = BlockPosition.b(i, 0, j, i + 15, 0, j + 15).iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
@@ -0,0 +0,0 @@ public abstract class ChunkGeneratorAbstract<T extends GeneratorSettingsDefault>
|
|
|
|
if (l > 0) {
|
|
for (i1 = l; i1 >= l - 4; --i1) {
|
|
- if (i1 >= l - random.nextInt(5)) {
|
|
+ if (i1 >= (getWorld().paperConfig.generateFlatBedrock ? roofHeight : l - random.nextInt(5))) { // Paper - Configurable flat bedrock roof
|
|
ichunkaccess.setType(blockposition_mutableblockposition.d(blockposition.getX(), i1, blockposition.getZ()), Blocks.BEDROCK.getBlockData(), false);
|
|
}
|
|
}
|
|
@@ -0,0 +0,0 @@ public abstract class ChunkGeneratorAbstract<T extends GeneratorSettingsDefault>
|
|
|
|
if (k < 256) {
|
|
for (i1 = k + 4; i1 >= k; --i1) {
|
|
- if (i1 <= k + random.nextInt(5)) {
|
|
+ if (i1 <= (getWorld().paperConfig.generateFlatBedrock ? floorHeight : k + random.nextInt(5))) { // Paper - Configurable flat bedrock floor
|
|
ichunkaccess.setType(blockposition_mutableblockposition.d(blockposition.getX(), i1, blockposition.getZ()), Blocks.BEDROCK.getBlockData(), false);
|
|
}
|
|
}
|
|
--
|