aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/xmrvizzy/skyblocker/skyblock
diff options
context:
space:
mode:
authorExternalTime <84183548+ExternalTime@users.noreply.github.com>2021-10-20 00:47:21 +0200
committerExternalTime <84183548+ExternalTime@users.noreply.github.com>2021-10-20 00:47:21 +0200
commit0653f9fba555abb0b1686276aaea55734cc3fc2a (patch)
tree35c729e7b1782876df540f8862ea9eda81021fec /src/main/java/me/xmrvizzy/skyblocker/skyblock
parent42dd089a4af357565d885c409777ffd84be5e092 (diff)
downloadSkyblocker-0653f9fba555abb0b1686276aaea55734cc3fc2a.tar.gz
Skyblocker-0653f9fba555abb0b1686276aaea55734cc3fc2a.tar.bz2
Skyblocker-0653f9fba555abb0b1686276aaea55734cc3fc2a.zip
Added feature changing lever hitboxes to ones from 1.8
Diffstat (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock')
-rw-r--r--src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java
new file mode 100644
index 00000000..fc26f913
--- /dev/null
+++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/OldLever.java
@@ -0,0 +1,44 @@
+package me.xmrvizzy.skyblocker.skyblock.dungeon;
+
+import me.xmrvizzy.skyblocker.config.SkyblockerConfig;
+import net.minecraft.block.Block;
+import net.minecraft.block.enums.WallMountLocation;
+import net.minecraft.util.math.Direction;
+import net.minecraft.util.shape.VoxelShape;
+
+public class OldLever {
+ protected static final VoxelShape FLOOR_SHAPE;
+ protected static final VoxelShape NORTH_SHAPE;
+ protected static final VoxelShape SOUTH_SHAPE;
+ protected static final VoxelShape EAST_SHAPE;
+ protected static final VoxelShape WEST_SHAPE;
+
+ public static VoxelShape getShape(WallMountLocation wallMountLocation, Direction direction) {
+ if (!SkyblockerConfig.get().locations.dungeons.oldLevers)
+ return null;
+
+ if (wallMountLocation == WallMountLocation.FLOOR) {
+ return FLOOR_SHAPE;
+ } else if (wallMountLocation == WallMountLocation.WALL) {
+ switch (direction) {
+ case EAST:
+ return EAST_SHAPE;
+ case WEST:
+ return WEST_SHAPE;
+ case SOUTH:
+ return SOUTH_SHAPE;
+ case NORTH:
+ return NORTH_SHAPE;
+ }
+ }
+ return null;
+ }
+
+ static {
+ FLOOR_SHAPE = Block.createCuboidShape(4, 0, 4, 12, 10, 12);
+ NORTH_SHAPE = Block.createCuboidShape(5.0D, 3.0D, 10.0D, 11.0D, 13.0D, 16.0D);
+ SOUTH_SHAPE = Block.createCuboidShape(5.0D, 3.0D, 0.0D, 11.0D, 13.0D, 6.0D);
+ WEST_SHAPE = Block.createCuboidShape(10.0D, 3.0D, 5.0D, 16.0D, 13.0D, 11.0D);
+ EAST_SHAPE = Block.createCuboidShape(0.0D, 3.0D, 5.0D, 6.0D, 13.0D, 11.0D);
+ }
+}