From d7aa96880e18a93232f2718356cefd1799bc906d Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 24 Aug 2018 12:34:54 +0200 Subject: [PATCH] Prepare cocoa beans and/or end rod. --- ...tered.java => BukkitAttachedCentered.java} | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) rename NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/{BukkitBottomCentered.java => BukkitAttachedCentered.java} (69%) diff --git a/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitBottomCentered.java b/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitAttachedCentered.java similarity index 69% rename from NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitBottomCentered.java rename to NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitAttachedCentered.java index cab2848a..42a1a64b 100644 --- a/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitBottomCentered.java +++ b/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BukkitAttachedCentered.java @@ -19,33 +19,26 @@ import org.bukkit.World; import fr.neatmonster.nocheatplus.utilities.map.BlockCache; /** - * Bottom center cuboid. + * Somehow attached to a block face, centered cuboid. * * @author asofold * */ -public class BukkitBottomCentered implements BukkitShapeModel { - - private final double minXZ; - private final double maxXZ; - private final double height; +public class BukkitAttachedCentered implements BukkitShapeModel { // TODO: Add modifications (shape alteration interface). - public BukkitBottomCentered(double inset, double height) { - this(inset, 1.0 - inset, height); - } - - public BukkitBottomCentered(double minXZ, double maxXZ, double height) { - this.minXZ = minXZ; - this.maxXZ = maxXZ; - this.height = height; + public BukkitAttachedCentered(double inset, double length, + boolean invertFace) { + // TODO: Might add a signature to specify minY and maxY (attach NWSE only). + // TODO: Implement. } @Override public double[] getShape(final BlockCache blockCache, final World world, final int x, final int y, final int z) { - return new double[] {minXZ, 0.0, minXZ, maxXZ, height, maxXZ}; + // TODO: Implement (attached face via ... directional and/or facing etc.). + return new double[] {0.0, 0.0, 0.0, 1.0, 1.0, 1.0}; } @Override