Random small stuff
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
--- a/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java
|
||||
+++ b/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
@Override
|
||||
public void place(TreeDecorator.Context generator) {
|
||||
+ if (generator.logs().isEmpty()) return; // Paper - Fix crash when trying to generate without logs
|
||||
RandomSource randomSource = generator.random();
|
||||
if (!(randomSource.nextFloat() >= this.probability)) {
|
||||
List<BlockPos> list = generator.logs();
|
||||
@@ -1,21 +0,0 @@
|
||||
--- a/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||
+++ b/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||
@@ -83,8 +83,17 @@
|
||||
Vec3 vec3 = context.getOptionalParameter(LootContextParams.ORIGIN);
|
||||
if (vec3 != null) {
|
||||
ServerLevel serverLevel = context.getLevel();
|
||||
+ // Paper start - Configurable cartographer treasure maps
|
||||
+ if (!serverLevel.paperConfig().environment.treasureMaps.enabled) {
|
||||
+ /*
|
||||
+ * NOTE: I fear users will just get a plain map as their "treasure"
|
||||
+ * This is preferable to disrespecting the config.
|
||||
+ */
|
||||
+ return stack;
|
||||
+ }
|
||||
+ // Paper end - Configurable cartographer treasure maps
|
||||
BlockPos blockPos = serverLevel.findNearestMapStructure(
|
||||
- this.destination, BlockPos.containing(vec3), this.searchRadius, this.skipKnownStructures
|
||||
+ this.destination, BlockPos.containing(vec3), this.searchRadius, !serverLevel.paperConfig().environment.treasureMaps.findAlreadyDiscoveredLootTable.or(!this.skipKnownStructures) // Paper - Configurable cartographer treasure maps
|
||||
);
|
||||
if (blockPos != null) {
|
||||
ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), this.zoom, true, true);
|
||||
Reference in New Issue
Block a user