mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Update to 1.15
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From ac356c05ef43bc12cf80573c18c57ee924fae231 Mon Sep 17 00:00:00 2001
|
||||
From 1e761b4f982976c32121123d6d7256dcae9a2914 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 23 May 2019 16:20:21 -0500
|
||||
Subject: [PATCH] Campfires should fall with gravity
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Campfires should fall with gravity
|
||||
3 files changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index a0177d8c0..56def823e 100644
|
||||
index 4d29faccaa..bad1098406 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -376,6 +376,7 @@ public class Block implements IMaterial {
|
||||
@@ -387,6 +387,7 @@ public class Block implements IMaterial {
|
||||
PacketDebug.a(world, blockposition);
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ index a0177d8c0..56def823e 100644
|
||||
return 10;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
index 9d59e339c..121433a4e 100644
|
||||
index 6303be944c..5d1312d2f1 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
@@ -72,8 +72,32 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
|
||||
return (IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) this.getBlockData().set(BlockCampfire.d, flag)).set(BlockCampfire.c, this.j(world.getType(blockposition.down())))).set(BlockCampfire.b, !flag)).set(BlockCampfire.e, blockactioncontext.f());
|
||||
@@ -74,8 +74,32 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
|
||||
return (IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) this.getBlockData().set(BlockCampfire.d, flag)).set(BlockCampfire.c, this.h(world.getType(blockposition.down())))).set(BlockCampfire.b, !flag)).set(BlockCampfire.e, blockactioncontext.f());
|
||||
}
|
||||
|
||||
+ // Purpur start - Campfires should fall with gravity
|
||||
@@ -36,7 +36,7 @@ index 9d59e339c..121433a4e 100644
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void tick(IBlockData iblockdata, World world, BlockPosition pos, Random random) {
|
||||
+ public void tick(IBlockData iblockdata, WorldServer world, BlockPosition pos, Random random) {
|
||||
+ if (world.purpurConfig.campfireObeysGravity && BlockFalling.canFallThrough(world.getType(pos.down())) && pos.getY() >= 0) {
|
||||
+ world.addEntity(new EntityFallingBlock(world, pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, world.getType(pos)));
|
||||
+ }
|
||||
@@ -58,7 +58,7 @@ index 9d59e339c..121433a4e 100644
|
||||
if ((Boolean) iblockdata.get(BlockCampfire.d)) {
|
||||
generatoraccess.getFluidTickList().a(blockposition, FluidTypes.WATER, FluidTypes.WATER.a((IWorldReader) generatoraccess));
|
||||
}
|
||||
@@ -107,7 +131,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
|
||||
@@ -104,7 +128,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
|
||||
|
||||
@Override
|
||||
public boolean place(GeneratorAccess generatoraccess, BlockPosition blockposition, IBlockData iblockdata, Fluid fluid) {
|
||||
@@ -68,7 +68,7 @@ index 9d59e339c..121433a4e 100644
|
||||
|
||||
if (flag) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 314fd584b..871c0e234 100644
|
||||
index 314fd584b8..871c0e2349 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -61,6 +61,11 @@ public class PurpurWorldConfig {
|
||||
@@ -84,5 +84,5 @@ index 314fd584b..871c0e234 100644
|
||||
public int campfireRegenDuration = 80;
|
||||
public int campfireRegenRange = 5;
|
||||
--
|
||||
2.23.0.rc1
|
||||
2.24.0.rc1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user