aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-03-09 17:22:32 +0900
committersyeyoung <cyong06@naver.com>2021-03-09 17:22:32 +0900
commit67cd1c5367a51e9e0824dc966515a3678c492f37 (patch)
treed77e6b5e9ff00dab1586c987ad79d94bbafc4197 /src/main/java
parent1e7e0d8853abb0c02e00259050a69bf2ed9e45f3 (diff)
downloadSkyblock-Dungeons-Guide-67cd1c5367a51e9e0824dc966515a3678c492f37.tar.gz
Skyblock-Dungeons-Guide-67cd1c5367a51e9e0824dc966515a3678c492f37.tar.bz2
Skyblock-Dungeons-Guide-67cd1c5367a51e9e0824dc966515a3678c492f37.zip
remove hacks
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java116
1 files changed, 0 insertions, 116 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java
index d73cb344..0c54297d 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java
@@ -162,122 +162,6 @@ public class FeatureListener {
@SubscribeEvent
public void onRenderWorld(RenderWorldLastEvent postRender) {
try {
- {
-
- if (Minecraft.getMinecraft().thePlayer.getItemInUse() != null){
- float partialTicks = postRender.partialTicks;
- List<Vec3> locations = new ArrayList<>();
-
- EntityPlayer shooter = Minecraft.getMinecraft().thePlayer;
- Vec3 startLoc = new Vec3(shooter.posX, shooter.posY + (double)shooter.getEyeHeight(), shooter.posZ);
- float rotationYaw = shooter.rotationYaw;
- float rotationPitch = shooter.rotationPitch;
- startLoc = startLoc.addVector((double)(MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * 0.16F),
- 0.10000000149011612D, (double)(MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * 0.16F));
-
- double motionX = (double)(-MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI));
- double motionZ = (double)(MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI));
- double motionY = (double)(-MathHelper.sin(rotationPitch / 180.0F * (float)Math.PI));
-
- float f = MathHelper.sqrt_double(motionX * motionX + motionY * motionY + motionZ * motionZ);
- motionX = motionX / (double)f;
- motionY = motionY / (double)f;
- motionZ = motionZ / (double)f;
-
- int i = Items.bow.getMaxItemUseDuration(Minecraft.getMinecraft().thePlayer.getItemInUse()) - Minecraft.getMinecraft().thePlayer.getItemInUseCount();
- float velocity = (float)i / 20.0F;
- velocity = (velocity * velocity + velocity * 2.0F) / 3.0F;
-
- if (velocity > 1.0F)
- {
- velocity = 1.0F;
- }
-
- motionX = motionX * (double)velocity * 2 * 1.5;
- motionY = motionY * (double)velocity* 2 * 1.5;
- motionZ = motionZ * (double)velocity* 2 * 1.5;
-
-
- boolean water;
-
- // do calc
-
- for (int index = 0; index < 9999; index++) {
- IBlockState iBlockState = Minecraft.getMinecraft().theWorld.getBlockState(new BlockPos(startLoc));
- Block block = iBlockState.getBlock();
- water = block == Blocks.water || block == Blocks.flowing_water;
-
- if (block.getMaterial() != Material.air)
- {
- AxisAlignedBB axisalignedbb = block.getCollisionBoundingBox(Minecraft.getMinecraft().theWorld, new BlockPos(startLoc), iBlockState);
-
- if (axisalignedbb != null && axisalignedbb.isVecInside(startLoc))
- {
- RenderUtils.highlightBlock(new BlockPos(startLoc), new Color(0,255,0,100), postRender.partialTicks);
- break;
- }
- }
-
- {
- // do magic
-
- Vec3 vec31 = startLoc;
- Vec3 vec3 = startLoc.addVector(motionX, motionY, motionZ);
- MovingObjectPosition movingobjectposition = Minecraft.getMinecraft().theWorld.rayTraceBlocks(vec31, vec3, false, true, false);
- vec31 = startLoc;
- vec3 = startLoc.addVector(motionX, motionY, motionZ);
-
- System.out.println(movingobjectposition);
-
- }
-
- locations.add(startLoc);
- startLoc = startLoc.addVector(motionX, motionY, motionZ); // it
-
- float f4 = 0.99F;
- float f6 = 0.05F;
-
- if (water) {
- f4 = 0.6F;
- }
-
- motionX *= (double) f4;
- motionY *= (double) f4;
- motionZ *= (double) f4;
- motionY -= (double) f6;
- }
- {
- Entity render = Minecraft.getMinecraft().getRenderViewEntity();
- WorldRenderer worldRenderer = Tessellator.getInstance().getWorldRenderer();
-
- double realX = render.lastTickPosX + (render.posX - render.lastTickPosX) * partialTicks;
- double realY = render.lastTickPosY + (render.posY - render.lastTickPosY) * partialTicks;
- double realZ = render.lastTickPosZ + (render.posZ - render.lastTickPosZ) * partialTicks;
-
- GlStateManager.pushMatrix();
- GlStateManager.translate(-realX, -realY, -realZ);
- GlStateManager.disableTexture2D();
- GlStateManager.enableBlend();
- GlStateManager.disableAlpha();
- GL11.glLineWidth(2);
- GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
-
- GlStateManager.color(1,1,1,1);
- worldRenderer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION);
- for (Vec3 pos2:locations) {
- worldRenderer.pos(pos2.xCoord, pos2.yCoord, pos2.zCoord).endVertex();
- }
- Tessellator.getInstance().draw();
-
- GlStateManager.translate(realX, realY, realZ);
- GlStateManager.disableBlend();
- GlStateManager.enableAlpha();
- GlStateManager.enableTexture2D();
- GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- GlStateManager.popMatrix();
- }
- }
- }
SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus();
if (!skyblockStatus.isOnSkyblock()) return;