2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-03-07 01:08:51 +01:00
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
|
|
Date: Sat, 7 Mar 2020 00:07:51 +0000
|
|
|
|
Subject: [PATCH] Validate tripwire hook placement before update
|
|
|
|
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/BlockTripwireHook.java b/src/main/java/net/minecraft/world/level/block/BlockTripwireHook.java
|
|
|
|
index 8b24978cb54f2102d61f27038dedc5e3dc392dbc..5e3cf96b813d2871adf7a7f870af6c6a5dd878c1 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/BlockTripwireHook.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/BlockTripwireHook.java
|
|
|
|
@@ -170,6 +170,7 @@ public class BlockTripwireHook extends Block {
|
2020-03-07 01:08:51 +01:00
|
|
|
|
|
|
|
this.a(world, blockposition, flag4, flag5, flag2, flag3);
|
|
|
|
if (!flag) {
|
|
|
|
+ if (world.getType(blockposition).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate
|
|
|
|
world.setTypeAndData(blockposition, (IBlockData) iblockdata3.set(BlockTripwireHook.FACING, enumdirection), 3);
|
|
|
|
if (flag1) {
|
|
|
|
this.a(world, blockposition, enumdirection);
|