Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix furnace cook speed multiplier using values between 0 and 1
- Loading branch information
1 parent
7672c9e
commit 3a234c3
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
patches/server/0082-Fix-furnace-cook-speed-multiplier-using-values-betwe.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 18dc84765e5cea1ad800fda880c6703913cd2180 Mon Sep 17 00:00:00 2001 | ||
From: William Blake Galbreath <blake.galbreath@gmail.com> | ||
Date: Sat, 19 Oct 2019 03:36:52 -0500 | ||
Subject: [PATCH] Fix furnace cook speed multiplier using values between 0 and | ||
1 | ||
|
||
--- | ||
src/main/java/net/minecraft/server/TileEntityFurnace.java | 6 ++++-- | ||
1 file changed, 4 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java | ||
index 55b5646103..caa5b4368c 100644 | ||
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java | ||
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java | ||
@@ -291,8 +291,10 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I | ||
} | ||
|
||
if (this.isBurning() && this.canBurn(irecipe)) { | ||
- this.cookTime += cookSpeedMultiplier; // Paper - cook speed multiplier API | ||
- if (this.cookTime >= this.cookTimeTotal) { // Paper - cook speed multiplier API | ||
+ // Purpur start - fix cook speed multiplier API | ||
+ ++this.cookTime; | ||
+ if (this.cookTime >= this.cookTimeTotal / this.cookSpeedMultiplier) { | ||
+ // Purpur end - fix cook speed multiplier API | ||
this.cookTime = 0; | ||
this.cookTimeTotal = this.getRecipeCookingTime(); | ||
this.burn(irecipe); | ||
-- | ||
2.23.0.rc1 | ||
|