SPIGOT-7873: Add powered state for skulls

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2024-08-24 07:42:35 +10:00
parent 0b4a111361
commit 51e69e6788
7 changed files with 105 additions and 7 deletions

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftPiglinWallSkull extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Directional {
public final class CraftPiglinWallSkull extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.WallSkull, org.bukkit.block.data.Directional, org.bukkit.block.data.Powerable {
public CraftPiglinWallSkull() {
super();
@ -31,4 +31,18 @@ public final class CraftPiglinWallSkull extends org.bukkit.craftbukkit.block.dat
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
return getValues(FACING, org.bukkit.block.BlockFace.class);
}
// org.bukkit.craftbukkit.block.data.CraftPowerable
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.PiglinWallSkullBlock.class, "powered");
@Override
public boolean isPowered() {
return get(POWERED);
}
@Override
public void setPowered(boolean powered) {
set(POWERED, powered);
}
}

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftSkull extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Rotatable {
public final class CraftSkull extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Skull, org.bukkit.block.data.Powerable, org.bukkit.block.data.Rotatable {
public CraftSkull() {
super();
@ -13,6 +13,20 @@ public final class CraftSkull extends org.bukkit.craftbukkit.block.data.CraftBlo
super(state);
}
// org.bukkit.craftbukkit.block.data.CraftPowerable
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockSkull.class, "powered");
@Override
public boolean isPowered() {
return get(POWERED);
}
@Override
public void setPowered(boolean powered) {
set(POWERED, powered);
}
// org.bukkit.craftbukkit.block.data.CraftRotatable
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockSkull.class, "rotation");

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftSkullPlayer extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Rotatable {
public final class CraftSkullPlayer extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Skull, org.bukkit.block.data.Powerable, org.bukkit.block.data.Rotatable {
public CraftSkullPlayer() {
super();
@ -13,6 +13,20 @@ public final class CraftSkullPlayer extends org.bukkit.craftbukkit.block.data.Cr
super(state);
}
// org.bukkit.craftbukkit.block.data.CraftPowerable
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockSkullPlayer.class, "powered");
@Override
public boolean isPowered() {
return get(POWERED);
}
@Override
public void setPowered(boolean powered) {
set(POWERED, powered);
}
// org.bukkit.craftbukkit.block.data.CraftRotatable
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockSkullPlayer.class, "rotation");

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftSkullPlayerWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Directional {
public final class CraftSkullPlayerWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.WallSkull, org.bukkit.block.data.Directional, org.bukkit.block.data.Powerable {
public CraftSkullPlayerWall() {
super();
@ -31,4 +31,18 @@ public final class CraftSkullPlayerWall extends org.bukkit.craftbukkit.block.dat
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
return getValues(FACING, org.bukkit.block.BlockFace.class);
}
// org.bukkit.craftbukkit.block.data.CraftPowerable
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockSkullPlayerWall.class, "powered");
@Override
public boolean isPowered() {
return get(POWERED);
}
@Override
public void setPowered(boolean powered) {
set(POWERED, powered);
}
}

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftSkullWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Directional {
public final class CraftSkullWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.WallSkull, org.bukkit.block.data.Directional, org.bukkit.block.data.Powerable {
public CraftSkullWall() {
super();
@ -31,4 +31,18 @@ public final class CraftSkullWall extends org.bukkit.craftbukkit.block.data.Craf
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
return getValues(FACING, org.bukkit.block.BlockFace.class);
}
// org.bukkit.craftbukkit.block.data.CraftPowerable
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockSkullWall.class, "powered");
@Override
public boolean isPowered() {
return get(POWERED);
}
@Override
public void setPowered(boolean powered) {
set(POWERED, powered);
}
}

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftWitherSkull extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Rotatable {
public final class CraftWitherSkull extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Skull, org.bukkit.block.data.Powerable, org.bukkit.block.data.Rotatable {
public CraftWitherSkull() {
super();
@ -13,6 +13,20 @@ public final class CraftWitherSkull extends org.bukkit.craftbukkit.block.data.Cr
super(state);
}
// org.bukkit.craftbukkit.block.data.CraftPowerable
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockWitherSkull.class, "powered");
@Override
public boolean isPowered() {
return get(POWERED);
}
@Override
public void setPowered(boolean powered) {
set(POWERED, powered);
}
// org.bukkit.craftbukkit.block.data.CraftRotatable
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockWitherSkull.class, "rotation");

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftWitherSkullWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Directional {
public final class CraftWitherSkullWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.WallSkull, org.bukkit.block.data.Directional, org.bukkit.block.data.Powerable {
public CraftWitherSkullWall() {
super();
@ -31,4 +31,18 @@ public final class CraftWitherSkullWall extends org.bukkit.craftbukkit.block.dat
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
return getValues(FACING, org.bukkit.block.BlockFace.class);
}
// org.bukkit.craftbukkit.block.data.CraftPowerable
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockWitherSkullWall.class, "powered");
@Override
public boolean isPowered() {
return get(POWERED);
}
@Override
public void setPowered(boolean powered) {
set(POWERED, powered);
}
}