aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/rosegoldaddons/Config.java4
-rw-r--r--src/main/java/rosegoldaddons/features/CropNuker.java126
-rw-r--r--src/main/java/rosegoldaddons/features/EndermanMacro.java2
-rw-r--r--src/main/java/rosegoldaddons/mixins/MixinRenderString.java10
-rw-r--r--src/main/java/rosegoldaddons/mixins/MixinRendererLivingEntity.java1
-rw-r--r--src/main/java/rosegoldaddons/utils/RotationUtils.java17
6 files changed, 93 insertions, 67 deletions
diff --git a/src/main/java/rosegoldaddons/Config.java b/src/main/java/rosegoldaddons/Config.java
index 37f1675..658b1df 100644
--- a/src/main/java/rosegoldaddons/Config.java
+++ b/src/main/java/rosegoldaddons/Config.java
@@ -153,6 +153,10 @@ public class Config extends Vigilant {
category = "Memes", subcategory = "General", min = 1, max = 3000)
public int skiblock = 3000;
+ @Property(type = PropertyType.SWITCH, name = "i dont wanna see it", description = "please i dont wanna see it",
+ category = "Memes", subcategory = "General")
+ public boolean wydsi = true;
+
@Property(type = PropertyType.SWITCH, name = "Nucleus ESP", description = "ESP for rare items dropped from nucleus",
category = "ESP", subcategory = "General")
public boolean nucleusESP = false;
diff --git a/src/main/java/rosegoldaddons/features/CropNuker.java b/src/main/java/rosegoldaddons/features/CropNuker.java
index 0fdbc95..46744df 100644
--- a/src/main/java/rosegoldaddons/features/CropNuker.java
+++ b/src/main/java/rosegoldaddons/features/CropNuker.java
@@ -8,6 +8,7 @@ import net.minecraft.util.*;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import rosegoldaddons.Main;
+import rosegoldaddons.utils.ChatUtils;
import rosegoldaddons.utils.PlayerUtils;
import java.util.ArrayList;
@@ -33,11 +34,14 @@ public class CropNuker {
}
private BlockPos closestCrop() {
- int r = 6;
+ double r = 6;
BlockPos playerPos = Minecraft.getMinecraft().thePlayer.getPosition();
playerPos = playerPos.add(0, 1, 0);
Vec3 playerVec = Minecraft.getMinecraft().thePlayer.getPositionVector();
Vec3i vec3i = new Vec3i(r, r, r);
+ if (Main.configFile.farmShapeIndex == 1) {
+ vec3i = new Vec3i(r, 2, r);
+ }
Vec3i vec3iCane = new Vec3i(r, 0, r);
ArrayList<Vec3> warts = new ArrayList<>();
if (playerPos != null) {
@@ -46,39 +50,38 @@ public class CropNuker {
for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) {
IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.nether_wart || blockState.getBlock() == Blocks.potatoes || blockState.getBlock() == Blocks.wheat || blockState.getBlock() == Blocks.carrots || blockState.getBlock() == Blocks.pumpkin || blockState.getBlock() == Blocks.melon_block || blockState.getBlock() == Blocks.brown_mushroom || blockState.getBlock() == Blocks.red_mushroom || blockState.getBlock() == Blocks.cocoa) {
- if(Main.configFile.farmShapeIndex == 0) {
+ if (Main.configFile.farmShapeIndex == 0) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
- }
- else if(Main.configFile.farmShapeIndex == 1) {
+ } else if (Main.configFile.farmShapeIndex == 1) {
EnumFacing dir = Minecraft.getMinecraft().thePlayer.getHorizontalFacing();
int x = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posX);
- int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
+ int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
switch (dir) {
case NORTH:
- if(blockPos.getZ() < z && blockPos.getX() == x) {
+ if (blockPos.getZ() < z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case SOUTH:
- if(blockPos.getZ() > z && blockPos.getX() == x) {
+ if (blockPos.getZ() > z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case WEST:
- if(blockPos.getX() < x && blockPos.getZ() == z) {
+ if (blockPos.getX() < x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case EAST:
- if(blockPos.getX() > x && blockPos.getZ() == z) {
+ if (blockPos.getX() > x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
@@ -103,39 +106,38 @@ public class CropNuker {
for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) {
IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.nether_wart) {
- if(Main.configFile.farmShapeIndex == 0) {
+ if (Main.configFile.farmShapeIndex == 0) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
- }
- else if(Main.configFile.farmShapeIndex == 1) {
+ } else if (Main.configFile.farmShapeIndex == 1) {
EnumFacing dir = Minecraft.getMinecraft().thePlayer.getHorizontalFacing();
int x = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posX);
- int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
+ int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
switch (dir) {
case NORTH:
- if(blockPos.getZ() < z && blockPos.getX() == x) {
+ if (blockPos.getZ() < z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case SOUTH:
- if(blockPos.getZ() > z && blockPos.getX() == x) {
+ if (blockPos.getZ() > z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case WEST:
- if(blockPos.getX() < x && blockPos.getZ() == z) {
+ if (blockPos.getX() < x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case EAST:
- if(blockPos.getX() > x && blockPos.getZ() == z) {
+ if (blockPos.getX() > x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
@@ -150,39 +152,38 @@ public class CropNuker {
for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) {
IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.wheat) {
- if(Main.configFile.farmShapeIndex == 0) {
+ if (Main.configFile.farmShapeIndex == 0) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
- }
- else if(Main.configFile.farmShapeIndex == 1) {
+ } else if (Main.configFile.farmShapeIndex == 1) {
EnumFacing dir = Minecraft.getMinecraft().thePlayer.getHorizontalFacing();
int x = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posX);
- int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
+ int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
switch (dir) {
case NORTH:
- if(blockPos.getZ() < z && blockPos.getX() == x) {
+ if (blockPos.getZ() < z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case SOUTH:
- if(blockPos.getZ() > z && blockPos.getX() == x) {
+ if (blockPos.getZ() > z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case WEST:
- if(blockPos.getX() < x && blockPos.getZ() == z) {
+ if (blockPos.getX() < x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case EAST:
- if(blockPos.getX() > x && blockPos.getZ() == z) {
+ if (blockPos.getX() > x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
@@ -197,39 +198,38 @@ public class CropNuker {
for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) {
IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.carrots) {
- if(Main.configFile.farmShapeIndex == 0) {
+ if (Main.configFile.farmShapeIndex == 0) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
- }
- else if(Main.configFile.farmShapeIndex == 1) {
+ } else if (Main.configFile.farmShapeIndex == 1) {
EnumFacing dir = Minecraft.getMinecraft().thePlayer.getHorizontalFacing();
int x = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posX);
- int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
+ int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
switch (dir) {
case NORTH:
- if(blockPos.getZ() < z && blockPos.getX() == x) {
+ if (blockPos.getZ() < z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case SOUTH:
- if(blockPos.getZ() > z && blockPos.getX() == x) {
+ if (blockPos.getZ() > z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case WEST:
- if(blockPos.getX() < x && blockPos.getZ() == z) {
+ if (blockPos.getX() < x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case EAST:
- if(blockPos.getX() > x && blockPos.getZ() == z) {
+ if (blockPos.getX() > x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
@@ -244,39 +244,38 @@ public class CropNuker {
for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) {
IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.potatoes) {
- if(Main.configFile.farmShapeIndex == 0) {
+ if (Main.configFile.farmShapeIndex == 0) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
- }
- else if(Main.configFile.farmShapeIndex == 1) {
+ } else if (Main.configFile.farmShapeIndex == 1) {
EnumFacing dir = Minecraft.getMinecraft().thePlayer.getHorizontalFacing();
int x = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posX);
- int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
+ int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
switch (dir) {
case NORTH:
- if(blockPos.getZ() < z && blockPos.getX() == x) {
+ if (blockPos.getZ() < z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case SOUTH:
- if(blockPos.getZ() > z && blockPos.getX() == x) {
+ if (blockPos.getZ() > z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case WEST:
- if(blockPos.getX() < x && blockPos.getZ() == z) {
+ if (blockPos.getX() < x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case EAST:
- if(blockPos.getX() > x && blockPos.getZ() == z) {
+ if (blockPos.getX() > x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
@@ -291,39 +290,38 @@ public class CropNuker {
for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) {
IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.pumpkin) {
- if(Main.configFile.farmShapeIndex == 0) {
+ if (Main.configFile.farmShapeIndex == 0) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
- }
- else if(Main.configFile.farmShapeIndex == 1) {
+ } else if (Main.configFile.farmShapeIndex == 1) {
EnumFacing dir = Minecraft.getMinecraft().thePlayer.getHorizontalFacing();
int x = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posX);
- int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
+ int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
switch (dir) {
case NORTH:
- if(blockPos.getZ() < z && blockPos.getX() == x) {
+ if (blockPos.getZ() < z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case SOUTH:
- if(blockPos.getZ() > z && blockPos.getX() == x) {
+ if (blockPos.getZ() > z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case WEST:
- if(blockPos.getX() < x && blockPos.getZ() == z) {
+ if (blockPos.getX() < x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case EAST:
- if(blockPos.getX() > x && blockPos.getZ() == z) {
+ if (blockPos.getX() > x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
@@ -338,39 +336,38 @@ public class CropNuker {
for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) {
IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.melon_block) {
- if(Main.configFile.farmShapeIndex == 0) {
+ if (Main.configFile.farmShapeIndex == 0) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
- }
- else if(Main.configFile.farmShapeIndex == 1) {
+ } else if (Main.configFile.farmShapeIndex == 1) {
EnumFacing dir = Minecraft.getMinecraft().thePlayer.getHorizontalFacing();
int x = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posX);
- int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
+ int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
switch (dir) {
case NORTH:
- if(blockPos.getZ() < z && blockPos.getX() == x) {
+ if (blockPos.getZ() < z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case SOUTH:
- if(blockPos.getZ() > z && blockPos.getX() == x) {
+ if (blockPos.getZ() > z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case WEST:
- if(blockPos.getX() < x && blockPos.getZ() == z) {
+ if (blockPos.getX() < x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case EAST:
- if(blockPos.getX() > x && blockPos.getZ() == z) {
+ if (blockPos.getX() > x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
@@ -385,39 +382,38 @@ public class CropNuker {
for (BlockPos blockPos : BlockPos.getAllInBox(playerPos.add(vec3i), playerPos.subtract(vec3i))) {
IBlockState blockState = Minecraft.getMinecraft().theWorld.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.cocoa) {
- if(Main.configFile.farmShapeIndex == 0) {
+ if (Main.configFile.farmShapeIndex == 0) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
- }
- else if(Main.configFile.farmShapeIndex == 1) {
+ } else if (Main.configFile.farmShapeIndex == 1) {
EnumFacing dir = Minecraft.getMinecraft().thePlayer.getHorizontalFacing();
int x = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posX);
- int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
+ int z = (int) Math.floor(Minecraft.getMinecraft().thePlayer.posZ);
switch (dir) {
case NORTH:
- if(blockPos.getZ() < z && blockPos.getX() == x) {
+ if (blockPos.getZ() < z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case SOUTH:
- if(blockPos.getZ() > z && blockPos.getX() == x) {
+ if (blockPos.getZ() > z && blockPos.getX() == x) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case WEST:
- if(blockPos.getX() < x && blockPos.getZ() == z) {
+ if (blockPos.getX() < x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
}
break;
case EAST:
- if(blockPos.getX() > x && blockPos.getZ() == z) {
+ if (blockPos.getX() > x && blockPos.getZ() == z) {
if (!broken.contains(blockPos)) {
warts.add(new Vec3(blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5));
}
diff --git a/src/main/java/rosegoldaddons/features/EndermanMacro.java b/src/main/java/rosegoldaddons/features/EndermanMacro.java
index bbde6db..5e88e74 100644
--- a/src/main/java/rosegoldaddons/features/EndermanMacro.java
+++ b/src/main/java/rosegoldaddons/features/EndermanMacro.java
@@ -36,7 +36,7 @@ public class EndermanMacro {
double closest = 9999;
if(Minecraft.getMinecraft().theWorld == null) return null;
for (Entity entity1 : (Minecraft.getMinecraft().theWorld.loadedEntityList)) {
- if (entity1 instanceof EntityEnderman && !(((EntityEnderman) entity1).getHealth() == 0)) {
+ if (entity1 instanceof EntityEnderman && !(((EntityEnderman) entity1).getHealth() == 0) && Minecraft.getMinecraft().thePlayer.canEntityBeSeen(entity1)) {
double dist = entity1.getDistanceSq(Minecraft.getMinecraft().thePlayer.posX, Minecraft.getMinecraft().thePlayer.posY, Minecraft.getMinecraft().thePlayer.posZ);
if (dist < closest) {
if(Main.configFile.macroRadius != 0 && dist < Main.configFile.macroRadius) {
diff --git a/src/main/java/rosegoldaddons/mixins/MixinRenderString.java b/src/main/java/rosegoldaddons/mixins/MixinRenderString.java
index 7990f61..6e95444 100644
--- a/src/main/java/rosegoldaddons/mixins/MixinRenderString.java
+++ b/src/main/java/rosegoldaddons/mixins/MixinRenderString.java
@@ -19,6 +19,10 @@ public abstract class MixinRenderString {
@Inject(method = "renderStringAtPos", at = @At("HEAD"), cancellable = true)
private void renderString(String text, boolean shadow, CallbackInfo ci) {
+ if(Main.configFile.wydsi && text.contains("727")) {
+ ci.cancel();
+ renderStringAtPos(text.replace("727", "726"), shadow);
+ }
if (Main.init) {
for (Map.Entry<String, String> entry : Main.resp.entrySet()) {
String key = entry.getKey();
@@ -26,7 +30,11 @@ public abstract class MixinRenderString {
if (text.contains(key)) {
ci.cancel();
- renderStringAtPos(text.replaceAll(key, value).replace("&", "§"), shadow);
+ try {
+ renderStringAtPos(text.replaceAll(key, value).replace("&", "§"), shadow);
+ } catch (Exception e) {
+ ChatUtils.sendMessage(e.toString());
+ }
}
}
}
diff --git a/src/main/java/rosegoldaddons/mixins/MixinRendererLivingEntity.java b/src/main/java/rosegoldaddons/mixins/MixinRendererLivingEntity.java
index f7e715a..ae85419 100644
--- a/src/main/java/rosegoldaddons/mixins/MixinRendererLivingEntity.java
+++ b/src/main/java/rosegoldaddons/mixins/MixinRendererLivingEntity.java
@@ -1,5 +1,6 @@
package rosegoldaddons.mixins;
+import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.minecraft.entity.EntityLivingBase;
diff --git a/src/main/java/rosegoldaddons/utils/RotationUtils.java b/src/main/java/rosegoldaddons/utils/RotationUtils.java
index eceeb29..a9b2e78 100644
--- a/src/main/java/rosegoldaddons/utils/RotationUtils.java
+++ b/src/main/java/rosegoldaddons/utils/RotationUtils.java
@@ -105,6 +105,23 @@ public class RotationUtils {
}).start();
}
+ public static void faceAngles(double yaw, double pitch) {
+ if (working) return;
+ new Thread(() -> {
+ try {
+ working = true;
+ for (int i = 0; i < Main.configFile.smoothLookVelocity; i++) {
+ Minecraft.getMinecraft().thePlayer.rotationYaw += yaw / Main.configFile.smoothLookVelocity;
+ Minecraft.getMinecraft().thePlayer.rotationPitch += pitch / Main.configFile.smoothLookVelocity;
+ Thread.sleep(1);
+ }
+ working = false;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }).start();
+ }
+
public static void faceEntity(Entity en) {
if (en instanceof EntityCreeper) {
facePos(new Vec3(en.posX, en.posY - 1.5, en.posZ));