Make Leaves Waterlogged

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2022-06-08 17:31:13 +10:00
parent 7f44ec20a2
commit 5806a895dc
2 changed files with 30 additions and 2 deletions

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Leaves {
public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Leaves, org.bukkit.block.data.Waterlogged {
public CraftLeaves() {
super();
@ -37,4 +37,18 @@ public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBl
public void setDistance(int distance) {
set(DISTANCE, distance);
}
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockLeaves.class, "waterlogged");
@Override
public boolean isWaterlogged() {
return get(WATERLOGGED);
}
@Override
public void setWaterlogged(boolean waterlogged) {
set(WATERLOGGED, waterlogged);
}
}

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.craftbukkit.block.impl;
public final class CraftMangroveLeaves extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Leaves {
public final class CraftMangroveLeaves extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Leaves, org.bukkit.block.data.Waterlogged {
public CraftMangroveLeaves() {
super();
@ -37,4 +37,18 @@ public final class CraftMangroveLeaves extends org.bukkit.craftbukkit.block.data
public void setDistance(int distance) {
set(DISTANCE, distance);
}
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.MangroveLeavesBlock.class, "waterlogged");
@Override
public boolean isWaterlogged() {
return get(WATERLOGGED);
}
@Override
public void setWaterlogged(boolean waterlogged) {
set(WATERLOGGED, waterlogged);
}
}