mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 09:51:12 +01:00
SPIGOT-5716: Clarify documentation of MultipleFacing
This commit is contained in:
parent
46a1386066
commit
d07a78b1f3
10 changed files with 100 additions and 20 deletions
|
@ -10,12 +10,20 @@ public abstract class CraftMultipleFacing extends CraftBlockData implements Mult
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,12 +21,20 @@ public final class CraftChorusFruit extends org.bukkit.craftbukkit.block.data.Cr
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,12 +21,20 @@ public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.Cra
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,12 +21,20 @@ public final class CraftFence extends org.bukkit.craftbukkit.block.data.CraftBlo
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,12 +40,20 @@ public final class CraftFire extends org.bukkit.craftbukkit.block.data.CraftBloc
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,12 +21,20 @@ public final class CraftHugeMushroom extends org.bukkit.craftbukkit.block.data.C
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,12 +21,20 @@ public final class CraftIronBars extends org.bukkit.craftbukkit.block.data.Craft
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,12 +21,20 @@ public final class CraftStainedGlassPane extends org.bukkit.craftbukkit.block.da
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,12 +49,20 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,12 +21,20 @@ public final class CraftVine extends org.bukkit.craftbukkit.block.data.CraftBloc
|
|||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
return get(FACES[face.ordinal()]);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
set(FACES[face.ordinal()], has);
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue