aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils/Utils.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-11-28 18:41:44 -0500
committerbowser0000 <bowser0000@gmail.com>2020-11-28 18:41:44 -0500
commit16de12d5ca1871c3de01fa2442ba9a8b9141401c (patch)
treedd82f406973344cbfb1b6bc103d49e4a205b382a /src/main/java/me/Danker/utils/Utils.java
parent9592c4bcf0fd912b7ca5586977d47422b933d56e (diff)
downloadSkyblockMod-16de12d5ca1871c3de01fa2442ba9a8b9141401c.tar.gz
SkyblockMod-16de12d5ca1871c3de01fa2442ba9a8b9141401c.tar.bz2
SkyblockMod-16de12d5ca1871c3de01fa2442ba9a8b9141401c.zip
Add F7 stage 3 arrow and 2 terminal puzzle solvers
Starts with letter terminal and select all colour terminal
Diffstat (limited to 'src/main/java/me/Danker/utils/Utils.java')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index 29e61ed..245d071 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -23,6 +23,7 @@ import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.item.EntityItemFrame;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.scoreboard.ScoreObjective;
@@ -31,6 +32,7 @@ import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StringUtils;
import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
public class Utils {
@@ -403,4 +405,19 @@ public class Utils {
return closestBlock;
}
+ public static BlockPos getBlockUnderItemFrame(World world, EntityItemFrame itemFrame) {
+ switch (itemFrame.facingDirection) {
+ case NORTH:
+ return new BlockPos(itemFrame.posX, itemFrame.posY, itemFrame.posZ + 1);
+ case EAST:
+ return new BlockPos(itemFrame.posX - 1, itemFrame.posY, itemFrame.posZ - 0.5);
+ case SOUTH:
+ return new BlockPos(itemFrame.posX, itemFrame.posY, itemFrame.posZ - 1);
+ case WEST:
+ return new BlockPos(itemFrame.posX + 1, itemFrame.posY, itemFrame.posZ - 0.5);
+ default:
+ return null;
+ }
+ }
+
}