Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-5716: Clarify documentation of MultipleFacing
Dieser Commit ist enthalten in:
Ursprung
46a1386066
Commit
d07a78b1f3
@ -10,12 +10,20 @@ public abstract class CraftMultipleFacing extends CraftBlockData implements Mult
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -21,12 +21,20 @@ public final class CraftChorusFruit extends org.bukkit.craftbukkit.block.data.Cr
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -21,12 +21,20 @@ public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.Cra
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -21,12 +21,20 @@ public final class CraftFence extends org.bukkit.craftbukkit.block.data.CraftBlo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -40,12 +40,20 @@ public final class CraftFire extends org.bukkit.craftbukkit.block.data.CraftBloc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -21,12 +21,20 @@ public final class CraftHugeMushroom extends org.bukkit.craftbukkit.block.data.C
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -21,12 +21,20 @@ public final class CraftIronBars extends org.bukkit.craftbukkit.block.data.Craft
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -21,12 +21,20 @@ public final class CraftStainedGlassPane extends org.bukkit.craftbukkit.block.da
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -49,12 +49,20 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
@ -21,12 +21,20 @@ public final class CraftVine extends org.bukkit.craftbukkit.block.data.CraftBloc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
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
|
@Override
|
||||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
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
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren