2014-10-25 06:41:49 +02:00
|
|
|
From 87f63a5ecd0f0459f65ccf07aa38b5b47b99a3a8 Mon Sep 17 00:00:00 2001
|
2014-10-25 05:25:14 +02:00
|
|
|
From: gsand <gsandowns@gmail.com>
|
|
|
|
Date: Fri, 24 Oct 2014 22:09:58 -0500
|
|
|
|
Subject: [PATCH] Configurable game mechanics changes
|
|
|
|
|
|
|
|
|
2014-10-25 06:41:49 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockTorch.java b/src/main/java/net/minecraft/server/BlockTorch.java
|
|
|
|
index d95aff2..784d4c0 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/BlockTorch.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockTorch.java
|
|
|
|
@@ -32,7 +32,8 @@ public class BlockTorch extends Block {
|
|
|
|
} else {
|
|
|
|
Block block = world.getType(i, j, k);
|
2014-10-25 05:25:14 +02:00
|
|
|
|
2014-10-25 06:41:49 +02:00
|
|
|
- return block == Blocks.FENCE || block == Blocks.NETHER_FENCE || block == Blocks.GLASS || block == Blocks.COBBLE_WALL;
|
|
|
|
+ // PaperSpigot - Allow torch placement on stained glass as well
|
|
|
|
+ return world.paperSpigotConfig.lessPickyTorches ? block == Blocks.FENCE || block == Blocks.NETHER_FENCE || block == Blocks.GLASS || block == Blocks.STAINED_GLASS || block == Blocks.COBBLE_WALL : block == Blocks.FENCE || block == Blocks.NETHER_FENCE || block == Blocks.GLASS || block == Blocks.COBBLE_WALL;
|
2014-10-25 05:25:14 +02:00
|
|
|
}
|
|
|
|
}
|
2014-10-25 06:41:49 +02:00
|
|
|
|
2014-10-25 05:25:14 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java
|
|
|
|
index c9f2b13..7c4c303 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/EntityBoat.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
|
|
|
|
@@ -337,13 +337,7 @@ public class EntityBoat extends Entity {
|
|
|
|
if (!destroyEvent.isCancelled()) {
|
|
|
|
this.die();
|
|
|
|
|
|
|
|
- for (k = 0; k < 3; ++k) {
|
|
|
|
- this.a(Item.getItemOf(Blocks.WOOD), 1, 0.0F);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for (k = 0; k < 2; ++k) {
|
|
|
|
- this.a(Items.STICK, 1, 0.0F);
|
|
|
|
- }
|
|
|
|
+ breakNaturally(); // PaperSpigot - Customizable boat drops
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|
|
|
|
@@ -452,15 +446,7 @@ public class EntityBoat extends Entity {
|
|
|
|
if (!destroyEvent.isCancelled()) {
|
|
|
|
this.die();
|
|
|
|
|
|
|
|
- int l;
|
|
|
|
-
|
|
|
|
- for (l = 0; l < 3; ++l) {
|
|
|
|
- this.a(Item.getItemOf(Blocks.WOOD), 1, 0.0F);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for (l = 0; l < 2; ++l) {
|
|
|
|
- this.a(Items.STICK, 1, 0.0F);
|
|
|
|
- }
|
|
|
|
+ breakNaturally(); // PaperSpigot - Customizable boat drops
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|
|
|
|
@@ -495,4 +481,21 @@ public class EntityBoat extends Entity {
|
|
|
|
public int i() {
|
|
|
|
return this.datawatcher.getInt(18);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * PaperSpigot - Handles boat drops depending on the user's config setting
|
|
|
|
+ */
|
|
|
|
+ public void breakNaturally() {
|
|
|
|
+ if (this.world.paperSpigotConfig.boatsDropBoats) {
|
|
|
|
+ this.a(Items.BOAT, 1, 0.0F);
|
|
|
|
+ } else {
|
|
|
|
+ for (int k = 0; k < 3; ++k) {
|
|
|
|
+ this.a(Item.getItemOf(Blocks.WOOD), 1, 0.0F);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (int k = 0; k < 2; ++k) {
|
|
|
|
+ this.a(Items.STICK, 1, 0.0F);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-10-25 06:41:49 +02:00
|
|
|
index f80c075..6b789e4 100644
|
2014-10-25 05:25:14 +02:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
@@ -188,4 +188,12 @@ public class PaperSpigotWorldConfig
|
2014-10-25 06:41:49 +02:00
|
|
|
removeUnloadedTNTEntities = getBoolean( "remove-unloaded.tnt-entities", true );
|
|
|
|
removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true );
|
2014-10-25 05:25:14 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean boatsDropBoats;
|
2014-10-25 06:41:49 +02:00
|
|
|
+ public boolean lessPickyTorches;
|
2014-10-25 05:25:14 +02:00
|
|
|
+ private void mechanicsChanges()
|
|
|
|
+ {
|
|
|
|
+ boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
|
2014-10-25 06:41:49 +02:00
|
|
|
+ lessPickyTorches = getBoolean ( "game-mechanics.less-picky-torch-placement", false );
|
2014-10-25 05:25:14 +02:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|