mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-09-18 21:33:01 +00:00
26 lines
1 KiB
Diff
26 lines
1 KiB
Diff
From d988708096dcd502f3814adde856375d2fef1562 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Tue, 15 Apr 2014 10:48:35 +1000
|
|
Subject: [PATCH] Check Skull canPlace
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ItemSkull.java b/src/main/java/net/minecraft/server/ItemSkull.java
|
|
index df79c0dd2..299a1a15e 100644
|
|
--- a/src/main/java/net/minecraft/server/ItemSkull.java
|
|
+++ b/src/main/java/net/minecraft/server/ItemSkull.java
|
|
@@ -36,6 +36,12 @@ public class ItemSkull extends Item {
|
|
if (world.isClientSide) {
|
|
return EnumInteractionResult.SUCCESS;
|
|
} else {
|
|
+ // Spigot Start
|
|
+ if ( !Blocks.SKULL.canPlace( world, blockposition ) )
|
|
+ {
|
|
+ return EnumInteractionResult.FAIL;
|
|
+ }
|
|
+ // Spigot End
|
|
world.setTypeAndData(blockposition, Blocks.SKULL.getBlockData().set(BlockSkull.FACING, enumdirection), 11);
|
|
int i = 0;
|
|
|
|
--
|
|
2.14.1
|
|
|