2015-06-04 12:57:23 +02:00
|
|
|
From 6c5e2e0b943ed4311fe1a44494f2adc860ca73df Mon Sep 17 00:00:00 2001
|
2014-10-25 05:25:14 +02:00
|
|
|
From: gsand <gsandowns@gmail.com>
|
2015-03-08 02:16:09 +01:00
|
|
|
Date: Sun, 8 Mar 2015 04:10:02 -0500
|
2014-10-25 05:25:14 +02: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
|
2015-05-30 08:11:16 +02:00
|
|
|
index f6a43c0..0e6f8c0 100644
|
2014-10-25 05:25:14 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityBoat.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
|
2014-11-28 02:17:45 +01:00
|
|
|
@@ -340,13 +340,7 @@ public class EntityBoat extends Entity {
|
2014-10-25 05:25:14 +02:00
|
|
|
if (!destroyEvent.isCancelled()) {
|
2015-03-08 02:16:09 +01:00
|
|
|
this.die();
|
|
|
|
if (this.world.getGameRules().getBoolean("doEntityDrops")) {
|
2014-10-25 05:25:14 +02:00
|
|
|
- for (k = 0; k < 3; ++k) {
|
2014-11-28 02:17:45 +01:00
|
|
|
- this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F);
|
2014-10-25 05:25:14 +02:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- for (k = 0; k < 2; ++k) {
|
|
|
|
- this.a(Items.STICK, 1, 0.0F);
|
|
|
|
- }
|
2014-11-28 02:17:45 +01:00
|
|
|
+ breakNaturally(); // PaperSpigot
|
2014-10-25 05:25:14 +02:00
|
|
|
}
|
2015-03-08 02:16:09 +01:00
|
|
|
} // CraftBukkit end
|
2014-10-25 05:25:14 +02:00
|
|
|
}
|
2015-03-08 02:16:09 +01:00
|
|
|
@@ -451,15 +445,7 @@ public class EntityBoat extends Entity {
|
2014-10-25 05:25:14 +02:00
|
|
|
if (!destroyEvent.isCancelled()) {
|
2015-03-08 02:16:09 +01:00
|
|
|
this.die();
|
|
|
|
if (this.world.getGameRules().getBoolean("doEntityDrops")) {
|
2014-11-28 02:17:45 +01:00
|
|
|
- int i;
|
2014-10-25 05:25:14 +02:00
|
|
|
-
|
2014-11-28 02:17:45 +01:00
|
|
|
- for (i = 0; i < 3; ++i) {
|
|
|
|
- this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F);
|
2014-10-25 05:25:14 +02:00
|
|
|
- }
|
|
|
|
-
|
2014-11-28 02:17:45 +01:00
|
|
|
- for (i = 0; i < 2; ++i) {
|
2014-10-25 05:25:14 +02:00
|
|
|
- this.a(Items.STICK, 1, 0.0F);
|
|
|
|
- }
|
2014-11-28 02:17:45 +01:00
|
|
|
+ breakNaturally(); // PaperSpigot
|
2014-10-25 05:25:14 +02:00
|
|
|
}
|
2015-03-08 02:16:09 +01:00
|
|
|
} // CraftBukkit end
|
2014-10-25 05:25:14 +02:00
|
|
|
}
|
2015-03-08 02:16:09 +01:00
|
|
|
@@ -495,4 +481,21 @@ public class EntityBoat extends Entity {
|
2014-11-28 02:17:45 +01:00
|
|
|
public int m() {
|
2014-10-25 05:25:14 +02: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 02:17:45 +01:00
|
|
|
+ this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F);
|
2014-10-25 05:25:14 +02: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
|
2015-06-04 12:57:23 +02:00
|
|
|
index 7804086..9e2f4d1 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
|
2015-06-04 12:57:23 +02:00
|
|
|
@@ -222,4 +222,10 @@ 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;
|
|
|
|
+ private void mechanicsChanges()
|
|
|
|
+ {
|
|
|
|
+ boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-06-04 12:57:23 +02:00
|
|
|
1.9.5.msysgit.1
|
2014-10-25 05:25:14 +02:00
|
|
|
|