Cleanup our patches

This commit is contained in:
Zach Brown
2014-08-05 18:45:22 -05:00
parent e7c9889883
commit 4df7953678
14 changed files with 106 additions and 193 deletions

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com>
Date: Sun, 6 Jul 2014 02:46:20 -0500
Date: Tue, 5 Aug 2014 17:31:07 -0500
Subject: [PATCH] Inverted Daylight Detector Toggle
@@ -8,14 +8,6 @@ diff --git a/src/main/java/net/minecraft/server/BlockDaylightDetector.java b/src
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/BlockDaylightDetector.java
+++ b/src/main/java/net/minecraft/server/BlockDaylightDetector.java
@@ -0,0 +0,0 @@
package net.minecraft.server;
+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot
+
import java.util.Random;
public class BlockDaylightDetector extends BlockContainer {
@@ -0,0 +0,0 @@ public class BlockDaylightDetector extends BlockContainer {
f += (6.2831855F - f) * 0.2F;
}
@@ -24,15 +16,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- if (i1 < 0) {
- i1 = 0;
- }
+ // PaperSpigot start - Inverted Daylight Detectors
+ if (PaperSpigotWorldConfig.InvertedDaylightDetectors) {
-
- if (i1 > 15) {
- i1 = 15;
+ // PaperSpigot start - Configurable "inversion" for daylight detectors
+ if (world.paperSpigotConfig.invertedDaylightDetectors) {
+ i1 = Math.round((float) i1 * MathHelper.cos(f) * -1 + 15);
+ if (i1 < 10) {
+ i1 = 0;
+ }
- if (i1 > 15) {
- i1 = 15;
+
+ if (i1 > 9) {
+ i1 = 15;
+ }
@@ -55,15 +48,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
{
babyZombieMovementSpeed = getDouble( "baby-zombie-movement-speed", 0.5D );
reedMaxHeight = getInt( "max-growth-height.reeds", 3 );
log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
}
+
+ public static boolean InvertedDaylightDetectors;
+ private void InvertedDaylightDetectors()
+ public boolean invertedDaylightDetectors;
+ private void invertedDaylightDetectors()
+ {
+ InvertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false );
+ log( "Inverted Redstone Lamps: " + InvertedDaylightDetectors );
+ invertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false );
+ log( "Inverted Redstone Lamps: " + invertedDaylightDetectors );
+ }
}
--