2015-01-29 21:26:20 +00:00
|
|
|
From 3d4f74eca88c363209d02f64020a781597420236 Mon Sep 17 00:00:00 2001
|
2014-10-25 03:25:14 +00:00
|
|
|
From: gsand <gsandowns@gmail.com>
|
2014-11-28 01:17:45 +00:00
|
|
|
Date: Fri, 28 Nov 2014 13:53:48 -0600
|
2014-10-25 03:25:14 +00:00
|
|
|
Subject: [PATCH] Configurable game mechanics changes
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java
|
2014-11-28 01:17:45 +00:00
|
|
|
index dc4f526..45b5ac5 100644
|
2014-10-25 03:25:14 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityBoat.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
|
2014-11-28 01:17:45 +00:00
|
|
|
@@ -340,13 +340,7 @@ public class EntityBoat extends Entity {
|
2014-10-25 03:25:14 +00:00
|
|
|
if (!destroyEvent.isCancelled()) {
|
|
|
|
this.die();
|
|
|
|
|
|
|
|
- for (k = 0; k < 3; ++k) {
|
2014-11-28 01:17:45 +00:00
|
|
|
- this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F);
|
2014-10-25 03:25:14 +00:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for (k = 0; k < 2; ++k) {
|
|
|
|
- this.a(Items.STICK, 1, 0.0F);
|
|
|
|
- }
|
2014-11-28 01:17:45 +00:00
|
|
|
+ breakNaturally(); // PaperSpigot
|
2014-10-25 03:25:14 +00:00
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|
|
|
|
@@ -452,15 +446,7 @@ public class EntityBoat extends Entity {
|
|
|
|
if (!destroyEvent.isCancelled()) {
|
|
|
|
this.die();
|
|
|
|
|
2014-11-28 01:17:45 +00:00
|
|
|
- int i;
|
2014-10-25 03:25:14 +00:00
|
|
|
-
|
2014-11-28 01:17:45 +00:00
|
|
|
- for (i = 0; i < 3; ++i) {
|
|
|
|
- this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F);
|
2014-10-25 03:25:14 +00:00
|
|
|
- }
|
|
|
|
-
|
2014-11-28 01:17:45 +00:00
|
|
|
- for (i = 0; i < 2; ++i) {
|
2014-10-25 03:25:14 +00:00
|
|
|
- this.a(Items.STICK, 1, 0.0F);
|
|
|
|
- }
|
2014-11-28 01:17:45 +00:00
|
|
|
+ breakNaturally(); // PaperSpigot
|
2014-10-25 03:25:14 +00:00
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|
2014-11-28 01:17:45 +00:00
|
|
|
@@ -496,4 +482,21 @@ public class EntityBoat extends Entity {
|
|
|
|
public int m() {
|
2014-10-25 03:25:14 +00:00
|
|
|
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) {
|
2014-11-28 01:17:45 +00:00
|
|
|
+ this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F);
|
2014-10-25 03:25:14 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ 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-12-06 04:28:08 +00:00
|
|
|
index 9507ab5..7f02e29 100644
|
2014-10-25 03:25:14 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-12-06 04:28:08 +00:00
|
|
|
@@ -180,4 +180,10 @@ public class PaperSpigotWorldConfig
|
2014-10-25 04:41:49 +00:00
|
|
|
removeUnloadedTNTEntities = getBoolean( "remove-unloaded.tnt-entities", true );
|
|
|
|
removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true );
|
2014-10-25 03:25:14 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean boatsDropBoats;
|
|
|
|
+ private void mechanicsChanges()
|
|
|
|
+ {
|
|
|
|
+ boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-01-29 21:26:20 +00:00
|
|
|
1.9.5.msysgit.0
|
2014-10-25 03:25:14 +00:00
|
|
|
|