mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 05af2837c [CI-SKIP] Improved the annotation test output 586966949 abstract custom set tags, add entity tags c7667378e Added PlayerLoomPatternSelectEvent 00972e80d Reimplement GS4QueryEvent 544c5c278 Re-add coral block tags (#4987) 7d56c8deb Added PlayerLecternPageChangeEvent c7cdf255b Add BlockFailedDispenseEvent c8a8d6fbe Added world settings for mobs picking up loot 91eda5bd3 Added ServerResourcesReloadedEvent be81b4f5c Add a Enchantable MaterialTag 975d18703 Add doors to material tags d075e748e colorful itemdump f3ba3dee0 Added WorldGameRuleChangeEvent 086d20118 Guardian beam workaround b63c890ec Support spawning item stacks d7d74c552 added height config for bamboo 7878e3bc2 Use setAmount for Recipe Amount 50e70697b Add EntityLoadCrossbowEvent f344e092c Add Anti-Xray bypass permission 9fd31e675 fix for nerfed slime mobs splitting 4a7962cd1 Zombie API - breaking doors 5650a41f5 Fix interact event not being called in adventure 2c9ed4335 Add PlayerFlowerPotManipulateEvent 1f32290b6 [Auto] Updated Upstream (CraftBukkit) d87694a20 Redact Velocity forwarding secret properly (#4980) 24a0b0206 [Auto] Updated Upstream (CraftBukkit) 7681042ef [Auto] Updated Upstream (Bukkit/CraftBukkit) 7dea3dba6 [Auto] Updated Upstream (CraftBukkit) 4b3792920 JavaDoc fixes f13b4727e Allow disabling mob spawner spawn egg transformation 525b50737 Cache burn durations 2c37d1077 Optimized tick ready check b4000b01a Add API to get the Material of Boats and Minecarts f1317386d Fix sign lazy initialisation 9f61759d9 Updated Upstream (CraftBukkit/Spigot) (#4972) aaff430b6 [CI-SKIP] Use GitHub Actions for build status 9f4055d99 Fix harming potion dupe 7bfb781ff Additional Block Material API's 0eaffd008 Micro Optimize DataBits Tuinity Changes: 9e5cabb6e Port starlight changes
59 lines
3.1 KiB
Diff
59 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Mon, 19 Oct 2020 15:14:01 -0500
|
|
Subject: [PATCH] Infinite fuel furnace
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
|
|
index e75e676d196d9f5a3409ec50645fab611b0afdad..76ea1d003b43d822e2b85eec3b8740155efd531a 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
|
|
@@ -278,6 +278,22 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
|
|
if (!this.world.isClientSide) {
|
|
ItemStack itemstack = (ItemStack) this.items.get(1);
|
|
|
|
+ // Purpur start
|
|
+ boolean infiniteFuel = false;
|
|
+ if (world.purpurConfig.furnaceInfiniteFuel && !isBurning() && itemstack.isEmpty() && !items.get(0).isEmpty() && world.getTime() % 20 == 0) {
|
|
+ BlockPosition pos = getPosition().down();
|
|
+ IBlockData iblockdata = world.getTypeIfLoaded(pos);
|
|
+ if (iblockdata != null && iblockdata.equals(Blocks.LAVA)) {
|
|
+ Fluid fluid = iblockdata.getFluid();
|
|
+ if (fluid != null && fluid.isSource()) {
|
|
+ world.setTypeAndData(pos, Blocks.AIR.getBlockData(), 3);
|
|
+ itemstack = Items.LAVA_BUCKET.createItemStack();
|
|
+ infiniteFuel = true;
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ // Purpur end
|
|
+
|
|
if (!this.isBurning() && (itemstack.isEmpty() || ((ItemStack) this.items.get(0)).isEmpty())) {
|
|
if (!this.isBurning() && this.cookTime > 0) {
|
|
this.cookTime = MathHelper.clamp(this.cookTime - 2, 0, this.cookTimeTotal);
|
|
@@ -331,6 +347,8 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
|
|
flag1 = true;
|
|
this.world.setTypeAndData(this.position, (IBlockData) this.world.getType(this.position).set(BlockFurnace.LIT, this.isBurning()), 3);
|
|
}
|
|
+
|
|
+ if (infiniteFuel) this.items.set(1, ItemStack.NULL_ITEM); // Purpur
|
|
}
|
|
|
|
if (flag1) {
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index bf403f3d02fe63df4e17ec461cc818861cc956a3..07519a988c61b23904f5c70becbc6c525456c39f 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -333,6 +333,11 @@ public class PurpurWorldConfig {
|
|
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
|
}
|
|
|
|
+ public boolean furnaceInfiniteFuel = false;
|
|
+ private void furnaceSettings() {
|
|
+ furnaceInfiniteFuel = getBoolean("blocks.furnace.infinite-fuel", furnaceInfiniteFuel);
|
|
+ }
|
|
+
|
|
public boolean lavaInfinite = false;
|
|
public int lavaInfiniteRequiredSources = 2;
|
|
public int lavaSpeedNether = 10;
|