Archiviert
13
0

Actually fix division by 0 in growth

Dieser Commit ist enthalten in:
md_5 2013-12-03 09:05:49 +11:00
Ursprung 31572d6c20
Commit c8145fb896
14 geänderte Dateien mit 63 neuen und 73 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From 3ab78de5ed40a1b0368005186ae44885139aff05 Mon Sep 17 00:00:00 2001
From 654a9071d73b6cf7a30503340743cb1481b185b5 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 10:36:24 +1000
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index a83e578..718a2f6 100644
index a83e578..e1f4e61 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,43 +1,23 @@
@ -64,15 +64,6 @@ index a83e578..718a2f6 100644
<build>
<plugins>
<plugin>
@@ -52,7 +32,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>1.4</version>
+ <version>2.1</version>
<executions>
<execution>
<phase>package</phase>
--
1.8.3.2

Datei anzeigen

@ -1,11 +1,11 @@
From 4b914f695027412127875091a38d36fbddc46a07 Mon Sep 17 00:00:00 2001
From 88d2db45ea440c18444cadaed4ec125857d9a0fd Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 13:07:39 +1000
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 2afdff4..fb6b5c4 100644
index 2afdff4..a77fec8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,20 @@
@ -137,7 +137,7 @@ index 2afdff4..fb6b5c4 100644
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>1.4</version>
+ <version>2.1</version>
+ <version>2.0</version>
<executions>
<execution>
<phase>package</phase>

Datei anzeigen

@ -1,4 +1,4 @@
From bade146cff75a2d2fca7a80c11ce655816a7517c Mon Sep 17 00:00:00 2001
From 0e9e9f837e632371bc99feef840016669013d383 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 17:17:20 +1000
Subject: [PATCH] Crop Growth Rates
@ -214,10 +214,10 @@ index 4fae805..a90fab1 100644
if (l < 7) {
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 478d9e6..1c598ed 100644
index 478d9e6..f38bb25 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -75,4 +75,36 @@ public class SpigotWorldConfig
@@ -75,4 +75,35 @@ public class SpigotWorldConfig
chunksPerTick = getInt( "chunks-per-tick", 650 );
log( "Chunks to Grow per Tick: " + chunksPerTick );
}
@ -230,28 +230,27 @@ index 478d9e6..1c598ed 100644
+ public int pumpkinModifier;
+ public int saplingModifier;
+ public int wheatModifier;
+ private int getAndValidateGrowth(String crop)
+ {
+ int modifier = getInt( "growth." + crop.toLowerCase() + "-modifier", 100 );
+ if ( modifier == 0 )
+ {
+ log( "Cannot set " + crop + " growth to zero, defaulting to 100" );
+ modifier = 100;
+ }
+ log( crop + " Growth Modifier: " + modifier + "%" );
+
+ return modifier;
+ }
+ private void growthModifiers()
+ {
+ cactusModifier = getInt( "growth.cactus-modifier", 100 );
+ log( "Cactus Growth Modifier: " + cactusModifier + "%" );
+
+ caneModifier = getInt( "growth.cane-modifier", 100 );
+ log( "Cane Growth Modifier: " + caneModifier + "%" );
+
+ melonModifier = getInt( "growth.melon-modifier", 100 );
+ log( "Melon Growth Modifier: " + melonModifier + "%" );
+
+ mushroomModifier = getInt( "growth.mushroom-modifier", 100 );
+ log( "Mushroom Growth Modifier: " + mushroomModifier + "%" );
+
+ pumpkinModifier = getInt( "growth.pumpkin-modifier", 100 );
+ log( "Pumpkin Growth Modifier: " + pumpkinModifier + "%" );
+
+ saplingModifier = getInt( "growth.sapling-modifier", 100 );
+ log( "Sapling Growth Modifier: " + saplingModifier + "%" );
+
+ wheatModifier = getInt( "growth.wheat-modifier", 100 );
+ log( "Wheat Growth Modifier: " + wheatModifier + "%" );
+ cactusModifier = getAndValidateGrowth( "Cactus" );
+ caneModifier = getAndValidateGrowth( "Cane" );
+ melonModifier = getAndValidateGrowth( "Melon" );
+ mushroomModifier = getAndValidateGrowth( "Mushroom" );
+ pumpkinModifier = getAndValidateGrowth( "Pumpkin" );
+ saplingModifier = getAndValidateGrowth( "Sapling" );
+ wheatModifier = getAndValidateGrowth( "Wheat" );
+ }
}
--

Datei anzeigen

@ -1,4 +1,4 @@
From 6caca256eacb7bcf592e0c987f6b2bc3e3365f2d Mon Sep 17 00:00:00 2001
From 36e07136ffd507e8e6007b4b993711d804ccfdd1 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:46:33 +1100
Subject: [PATCH] Merge tweaks and configuration
@ -41,7 +41,7 @@ index bbcf674..08b9ac8 100644
}
} else {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a8dbc44..c91ae63 100644
index 7bf2225..3f9eb56 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -927,6 +927,23 @@ public abstract class World implements IBlockAccess {
@ -69,12 +69,12 @@ index a8dbc44..c91ae63 100644
if (event != null && (event.isCancelled() || entity.dead)) {
entity.dead = true;
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 1c598ed..610f753 100644
index f38bb25..9f07e71 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -107,4 +107,18 @@ public class SpigotWorldConfig
wheatModifier = getInt( "growth.wheat-modifier", 100 );
log( "Wheat Growth Modifier: " + wheatModifier + "%" );
@@ -106,4 +106,18 @@ public class SpigotWorldConfig
saplingModifier = getAndValidateGrowth( "Sapling" );
wheatModifier = getAndValidateGrowth( "Wheat" );
}
+
+ public double itemMerge;

Datei anzeigen

@ -1,4 +1,4 @@
From ff4ef17762df254ce5e8a0842b247d59cb1524dd Mon Sep 17 00:00:00 2001
From a6ea8e41020b8091fcb339406511328536f7ea51 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:52:41 +1100
Subject: [PATCH] View Distance
@ -32,10 +32,10 @@ index 812e887..9f09a3d 100644
this.entitiesById = new IntHashMap();
}
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 610f753..3e66d79 100644
index 9f07e71..97d56bd 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -121,4 +121,11 @@ public class SpigotWorldConfig
@@ -120,4 +120,11 @@ public class SpigotWorldConfig
expMerge = getDouble("merge-radius.exp", 3.0 );
log( "Experience Merge Radius: " + expMerge );
}

Datei anzeigen

@ -1,4 +1,4 @@
From f6ae5fd819d9eec7c5fac9f58d43065bf344d962 Mon Sep 17 00:00:00 2001
From da4488dbd8e31eac4c10fd45a7689dccd26f6b5a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 16 May 2013 18:51:05 +1000
Subject: [PATCH] Orebfuscator
@ -337,7 +337,7 @@ index 0000000..6413ac0
+ }
+}
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 3e66d79..bab9d8f 100644
index 97d56bd..3a4f338 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -1,5 +1,6 @@
@ -347,7 +347,7 @@ index 3e66d79..bab9d8f 100644
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -128,4 +129,29 @@ public class SpigotWorldConfig
@@ -127,4 +128,29 @@ public class SpigotWorldConfig
viewDistance = getInt( "view-distance", Bukkit.getViewDistance() );
log( "View Distance: " + viewDistance );
}

Datei anzeigen

@ -1,4 +1,4 @@
From 01e36b7b71f41815e86bc7c29f9878559c6ca756 Mon Sep 17 00:00:00 2001
From db2106733be2b8cf3ebae74d23e77382c41512f8 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 17:29:54 +1000
Subject: [PATCH] Fix Mob Spawning Relative to View Distance
@ -135,10 +135,10 @@ index f514b78..3f0dd70 100644
continue label110;
}
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index bab9d8f..9f95452 100644
index 3a4f338..47d9015 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -154,4 +154,11 @@ public class SpigotWorldConfig
@@ -153,4 +153,11 @@ public class SpigotWorldConfig
antiXrayInstance = new AntiXray( this );
}

Datei anzeigen

@ -1,4 +1,4 @@
From a748467688abd31e2a1fee9f5f2e5339ff99c5b2 Mon Sep 17 00:00:00 2001
From 2241fc88484109e7c539e3fb8d6822fbc90bc359 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Feb 2013 05:10:21 -0500
Subject: [PATCH] Entity Activation Range
@ -457,10 +457,10 @@ index 0000000..db4c927
+ }
+}
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 9f95452..cca32b5 100644
index 47d9015..5bda2e5 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -161,4 +161,15 @@ public class SpigotWorldConfig
@@ -160,4 +160,15 @@ public class SpigotWorldConfig
mobSpawnRange = (byte) getInt( "mob-spawn-range", 4 );
log( "Mob Spawn Range: " + mobSpawnRange );
}

Datei anzeigen

@ -1,4 +1,4 @@
From da8c410852c7404861f3ebc96e6d36ff5a9d2274 Mon Sep 17 00:00:00 2001
From 4df31e16f45eb8f0f5088616cf65230a56838594 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Feb 2013 11:58:47 -0500
Subject: [PATCH] Entity Tracking Ranges
@ -24,10 +24,10 @@ index 97d0bbb..fc679ae 100644
i = this.e;
}
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index cca32b5..8ef6c6a 100644
index 5bda2e5..d6e8433 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -172,4 +172,19 @@ public class SpigotWorldConfig
@@ -171,4 +171,19 @@ public class SpigotWorldConfig
miscActivationRange = getInt( "entity-activation-range.misc", miscActivationRange );
log( "Entity Activation Range: An " + animalActivationRange + " / Mo " + monsterActivationRange + " / Mi " + miscActivationRange );
}

Datei anzeigen

@ -1,4 +1,4 @@
From 16ff028b744bbd1483273fd2f8d2182a39893d78 Mon Sep 17 00:00:00 2001
From 8a1d964f7cb36ae4498be6c3c3335001bfec5bff Mon Sep 17 00:00:00 2001
From: erocs <github@erocs.org>
Date: Sun, 8 Sep 2013 12:06:15 -0700
Subject: [PATCH] Hopper Cooldowns
@ -59,10 +59,10 @@ index 730eb78..a68b748 100644
}
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 8ef6c6a..b63d3ad 100644
index d6e8433..4e4db0a 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -187,4 +187,17 @@ public class SpigotWorldConfig
@@ -186,4 +186,17 @@ public class SpigotWorldConfig
maxTrackingRange = getInt( "entity-tracking-range.other", maxTrackingRange );
log( "Entity Tracking Range: Pl " + playerTrackingRange + " / An " + animalTrackingRange + " / Mo " + monsterTrackingRange + " / Mi " + miscTrackingRange + " / Other " + maxTrackingRange );
}

Datei anzeigen

@ -1,4 +1,4 @@
From 590e9da3ab31190fe854da92f316ffbd3495a49b Mon Sep 17 00:00:00 2001
From 3a0cee96b7a2ad5126b13d9fbb1012936889d61a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 22 Jun 2013 16:12:02 +1000
Subject: [PATCH] Allow Disabling of Random Lighting Updates
@ -18,10 +18,10 @@ index 3108628..baa5d55 100644
entityhuman = (EntityHuman) this.players.get(i);
j = MathHelper.floor(entityhuman.locX) + this.random.nextInt(11) - 5;
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index b63d3ad..2caafa2 100644
index 4e4db0a..1422e38 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -200,4 +200,11 @@ public class SpigotWorldConfig
@@ -199,4 +199,11 @@ public class SpigotWorldConfig
hopperCheck = getInt( "ticks-per.hopper-check", hopperTransfer );
log( "Hopper Transfer: " + hopperTransfer + " Hopper Check: " + hopperCheck );
}

Datei anzeigen

@ -1,4 +1,4 @@
From 26499a0df37cb661110560600a9c9186e9591cb1 Mon Sep 17 00:00:00 2001
From 7c4f02339a3f02f4ffb9ff27193aaf1933e6311e Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 21 Sep 2013 12:33:09 +1000
Subject: [PATCH] Allow Disabling of 1.6.3 Structure Saving
@ -25,10 +25,10 @@ index 1eb87ae..b3c8101 100644
this.e = new PersistentStructure(this.a());
world.a(this.a(), (PersistentBase) this.e);
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 2caafa2..a34670e 100644
index 1422e38..43e8958 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -207,4 +207,16 @@ public class SpigotWorldConfig
@@ -206,4 +206,16 @@ public class SpigotWorldConfig
randomLightUpdates = getBoolean( "random-light-updates", false );
log( "Random Lighting Updates: " + randomLightUpdates );
}

Datei anzeigen

@ -1,4 +1,4 @@
From 00298b5a36ffbe43b5e2fc2b1b1a425a56617de1 Mon Sep 17 00:00:00 2001
From 8ecf984537b078aba7dee4602ff1194776f54664 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 22 Sep 2013 19:10:53 +1000
Subject: [PATCH] Item Despawn Rate
@ -18,10 +18,10 @@ index 08b9ac8..8ea7abc 100644
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
this.age = 0;
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index a34670e..4631165 100644
index 43e8958..6e024bf 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -219,4 +219,11 @@ public class SpigotWorldConfig
@@ -218,4 +218,11 @@ public class SpigotWorldConfig
log( "*** WARNING *** Please use this option with caution, SpigotMC is not responsible for any issues this option may cause in the future!" );
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 683f6fa005c918a69a114df53c6ee1a9e012a6f9 Mon Sep 17 00:00:00 2001
From d079e164f9fcdc49363a127419bb0feda4513715 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 14 Oct 2013 19:20:10 +1100
Subject: [PATCH] Arrow Despawn Rate
@ -18,10 +18,10 @@ index 3fd3de9..a49519b 100644
}
} else {
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 4631165..300db67 100644
index 6e024bf..4f406b0 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -226,4 +226,11 @@ public class SpigotWorldConfig
@@ -225,4 +225,11 @@ public class SpigotWorldConfig
itemDespawnRate = getInt( "item-despawn-rate", 6000 );
log( "Item Despawn Rate: " + itemDespawnRate );
}