6
6
import net .minecraft .block .*;
7
7
import net .minecraft .block .entity .BlockEntity ;
8
8
import net .minecraft .block .enums .BedPart ;
9
+ import net .minecraft .block .enums .BlockFace ;
9
10
import net .minecraft .block .enums .DoubleBlockHalf ;
10
11
import net .minecraft .block .enums .SlabType ;
11
- import net .minecraft .block .enums .WallMountLocation ;
12
12
import net .minecraft .fluid .Fluids ;
13
13
import net .minecraft .item .BlockItem ;
14
14
import net .minecraft .item .ItemStack ;
15
15
import net .minecraft .item .Items ;
16
- import net .minecraft .item .SkullItem ;
16
+ import net .minecraft .item .PlayerHeadItem ;
17
17
import net .minecraft .nbt .NbtCompound ;
18
18
import net .minecraft .registry .tag .BlockTags ;
19
- import net .minecraft .state .property .DirectionProperty ;
20
19
import net .minecraft .state .property .Properties ;
21
20
import net .minecraft .util .math .BlockPos ;
22
21
import net .minecraft .util .math .Direction ;
@@ -34,7 +33,7 @@ public static boolean areEqual(BlockState sourceState, @Nullable NbtCompound sou
34
33
if (sourceBlock != targetBlock ) return false ;
35
34
36
35
if (sourceBlock instanceof ButtonBlock ) {
37
- if (sourceState .get (ButtonBlock .FACE ) == WallMountLocation .WALL ) {
36
+ if (sourceState .get (ButtonBlock .FACE ) == BlockFace .WALL ) {
38
37
return sourceState .get (ButtonBlock .FACING ) == targetState .get (ButtonBlock .FACING );
39
38
}
40
39
@@ -185,7 +184,7 @@ public static int getBuildComplexity(CachedBlocks build) {
185
184
public static void addBlockEntityNbt (ItemStack stack , BlockEntity blockEntity ) {
186
185
NbtCompound nbtCompound = blockEntity .createNbtWithIdentifyingData ();
187
186
BlockItem .setBlockEntityNbt (stack , blockEntity .getType (), nbtCompound );
188
- if (stack .getItem () instanceof SkullItem && nbtCompound .contains ("SkullOwner" )) {
187
+ if (stack .getItem () instanceof PlayerHeadItem && nbtCompound .contains ("SkullOwner" )) {
189
188
NbtCompound nbtCompound2 = nbtCompound .getCompound ("SkullOwner" );
190
189
NbtCompound nbtCompound3 = stack .getOrCreateNbt ();
191
190
nbtCompound3 .put ("SkullOwner" , nbtCompound2 );
0 commit comments