testserver/Spigot-Server-Patches/0029-Temporary-fix-for-rail...

29 lines
1.2 KiB
Diff
Raw Normal View History

From 713d5992f6f6777bd71ea4a98295c757aa98b81e Mon Sep 17 00:00:00 2001
2014-11-28 01:17:45 +00:00
From: Dmck2b <suddenly@suddenly.coffee>
Date: Fri, 28 Nov 2014 12:30:47 -0600
Subject: [PATCH] Temporary fix for rails dupe
diff --git a/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java b/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
index 063177d..f1e299f 100644
--- a/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
@@ -84,8 +84,12 @@ public abstract class BlockMinecartTrackAbstract extends Block {
}
if (flag) {
- this.b(world, blockposition, iblockdata, 0);
- world.setAir(blockposition);
+ // PaperSpigot start - Rails dupe workaround
+ if (world.getType(blockposition).getBlock().getMaterial() != Material.AIR) {
+ this.b(world, blockposition, iblockdata, 0);
+ world.setAir(blockposition);
+ }
+ // PaperSpigot end
} else {
this.b(world, blockposition, iblockdata, block);
}
--
1.9.5.msysgit.0
2014-11-28 01:17:45 +00:00