Skip to content

Commit

Permalink
Release Patch 1.0.3 for LoTAS 1.8.9 to 1.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
PancakeTAS authored May 5, 2021
2 parents 871123a + c02aea1 commit 17cc3d2
Show file tree
Hide file tree
Showing 27 changed files with 103 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ private static ItemEntity haxInit(World w, double x, double y, double z, ItemSta
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = MinecraftClient.getInstance().player.x - x;
double pZ = MinecraftClient.getInstance().player.z - z;
it.setVelocity(Math.round(pX) * 0.03f, it.getVelocity().y, Math.round(pZ) * 0.03f);
it.setVelocity(Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f, it.getVelocity().y, Math.max(Math.round(pZ), 1) * 0.03f);
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = MinecraftClient.getInstance().player.x - x;
double pZ = MinecraftClient.getInstance().player.z - z;
it.setVelocity(Math.round(pX) * -0.03f, it.getVelocity().y, Math.round(pZ) * -0.03f);
it.setVelocity(Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f, it.getVelocity().y, Math.max(Math.round(pZ), 1) * -0.03f);
}
} catch (Exception e) {
// Ignore this Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ private static ItemEntity haxInit(World w, double x, double y, double z, ItemSta
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = MinecraftClient.getInstance().player.x - x;
double pZ = MinecraftClient.getInstance().player.z - z;
it.setVelocity(Math.round(pX) * 0.03f, it.getVelocity().y, Math.round(pZ) * 0.03f);
it.setVelocity(Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f, it.getVelocity().y, Math.max(Math.round(pZ), 1) * 0.03f);
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = MinecraftClient.getInstance().player.x - x;
double pZ = MinecraftClient.getInstance().player.z - z;
it.setVelocity(Math.round(pX) * -0.03f, it.getVelocity().y, Math.round(pZ) * -0.03f);
it.setVelocity(Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f, it.getVelocity().y, Math.max(Math.round(pZ), 1) * -0.03f);
}
} catch (Exception e) {
// Ignore this Error
Expand Down
2 changes: 1 addition & 1 deletion Forge-1.10.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'

version = "1.0.2"
version = "1.0.3"
group = "de.pfannekuchen.lotas"
archivesBaseName = "lotas"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ private static EntityItem haxInit(World w, double x, double y, double z, ItemSta
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = Minecraft.getMinecraft().thePlayer.posX - x;
double pZ = Minecraft.getMinecraft().thePlayer.posZ - z;
it.motionX = Math.round(pX) * 0.03f;
it.motionZ = Math.round(pZ) * 0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * 0.03f;
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = Minecraft.getMinecraft().thePlayer.posX - x;
double pZ = Minecraft.getMinecraft().thePlayer.posZ - z;
it.motionX = Math.round(pX) * -0.03f;
it.motionZ = Math.round(pZ) * -0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * -0.03f;
}
} catch (Exception e) {
// Ignore this Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public EntityItem haxInit(World w, double x, double y, double z, ItemStack stack
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = Minecraft.getMinecraft().thePlayer.posX - posX;
double pZ = Minecraft.getMinecraft().thePlayer.posZ - posZ;
it.motionX = Math.round(pX) * 0.03f;
it.motionZ = Math.round(pZ) * 0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * 0.03f;
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = Minecraft.getMinecraft().thePlayer.posX - posX;
double pZ = Minecraft.getMinecraft().thePlayer.posZ - posZ;
it.motionX = Math.round(pX) * -0.03f;
it.motionZ = Math.round(pZ) * -0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * -0.03f;
}
} catch (Exception e) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import de.pfannekuchen.lotas.Binds;
import de.pfannekuchen.lotas.challenges.ChallengeLoader;
import de.pfannekuchen.lotas.config.ConfigManager;
import de.pfannekuchen.lotas.dupemod.DupeMod;
import de.pfannekuchen.lotas.gui.GuiChallengeEscape;
import de.pfannekuchen.lotas.savestate.SavestateMod;
import de.pfannekuchen.lotas.tickratechanger.TickrateChanger;
Expand Down Expand Up @@ -58,6 +59,13 @@ public class MixinMinecraft {
@Shadow
private boolean isGamePaused;

@Inject(at = @At("HEAD"), method = "stopIntegratedServer")
private static void injectstopIntegratedServer(CallbackInfo ci) {
DupeMod.items.clear();
DupeMod.trackedObjects.clear();
DupeMod.tileentities.clear();
}

@Inject(method = "loadWorld", at = @At("HEAD"))
public void injectloadWorld(WorldClient worldClientIn, CallbackInfo ci) {
isLoadingWorld = ConfigManager.getBoolean("tools", "hitEscape") && worldClientIn != null;
Expand Down
2 changes: 1 addition & 1 deletion Forge-1.11.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'

version = "1.0.2"
version = "1.0.3"
group = "de.pfannekuchen.lotas"
archivesBaseName = "lotas"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ private static EntityItem haxInit(World w, double x, double y, double z, ItemSta
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = Minecraft.getMinecraft().player.posX - x;
double pZ = Minecraft.getMinecraft().player.posZ - z;
it.motionX = Math.round(pX) * 0.03f;
it.motionZ = Math.round(pZ) * 0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * 0.03f;
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = Minecraft.getMinecraft().player.posX - x;
double pZ = Minecraft.getMinecraft().player.posZ - z;
it.motionX = Math.round(pX) * -0.03f;
it.motionZ = Math.round(pZ) * -0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * -0.03f;
}
} catch (Exception e) {
// Ignore this Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public EntityItem haxInit(World w, double x, double y, double z, ItemStack stack
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = Minecraft.getMinecraft().player.posX - posX;
double pZ = Minecraft.getMinecraft().player.posZ - posZ;
it.motionX = Math.round(pX) * 0.03f;
it.motionZ = Math.round(pZ) * 0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * 0.03f;
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = Minecraft.getMinecraft().player.posX - posX;
double pZ = Minecraft.getMinecraft().player.posZ - posZ;
it.motionX = Math.round(pX) * -0.03f;
it.motionZ = Math.round(pZ) * -0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * -0.03f;
}
} catch (Exception e) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import de.pfannekuchen.lotas.Binds;
import de.pfannekuchen.lotas.challenges.ChallengeLoader;
import de.pfannekuchen.lotas.config.ConfigManager;
import de.pfannekuchen.lotas.dupemod.DupeMod;
import de.pfannekuchen.lotas.gui.GuiChallengeEscape;
import de.pfannekuchen.lotas.savestate.SavestateMod;
import de.pfannekuchen.lotas.tickratechanger.TickrateChanger;
Expand Down Expand Up @@ -56,7 +57,14 @@ public class MixinMinecraft {
public EntityPlayerSP player;

@Shadow
private boolean isGamePaused;
private boolean isGamePaused;

@Inject(at = @At("HEAD"), method = "stopIntegratedServer")
private static void injectstopIntegratedServer(CallbackInfo ci) {
DupeMod.items.clear();
DupeMod.trackedObjects.clear();
DupeMod.tileentities.clear();
}

@Inject(method = "loadWorld", at = @At("HEAD"))
public void injectloadWorld(WorldClient worldClientIn, CallbackInfo ci) {
Expand Down
2 changes: 1 addition & 1 deletion Forge-1.12.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'

version = "1.0.2"
version = "1.0.3"
group = "de.pfannekuchen.lotas"
archivesBaseName = "lotas"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class DupeMod {
* The Dupe Mod allows you to save items and chests without relogging. And Loading Items and Chests without alt + f4'ing the game
*/

public static void loadChests() {
public static synchronized void loadChests() {
try {
logDebug("[DupeMod] Trying to load Chests");
Minecraft mc = Minecraft.getMinecraft();
Expand All @@ -42,7 +42,7 @@ public static void loadChests() {
}
}

public static void loadItems() {
public static synchronized void loadItems() {
try {
logDebug("[DupeMod] Trying to load Items");
Minecraft mc = Minecraft.getMinecraft();
Expand Down Expand Up @@ -81,7 +81,7 @@ public static void loadItems() {
}
}

public static void saveItems() {
public static synchronized void saveItems() {
try {
logDebug("[DupeMod] Trying to save Items");
Minecraft mc = Minecraft.getMinecraft();
Expand Down Expand Up @@ -111,7 +111,7 @@ public static void saveItems() {
}
}

public static void saveChests() {
public static synchronized void saveChests() {
try {
logDebug("[DupeMod] Trying to save Chests");
Minecraft mc = Minecraft.getMinecraft();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ private static EntityItem haxInit(World w, double x, double y, double z, ItemSta
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = Minecraft.getMinecraft().player.posX - x;
double pZ = Minecraft.getMinecraft().player.posZ - z;
it.motionX = Math.round(pX) * 0.03f;
it.motionZ = Math.round(pZ) * 0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * 0.03f;
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = Minecraft.getMinecraft().player.posX - x;
double pZ = Minecraft.getMinecraft().player.posZ - z;
it.motionX = Math.round(pX) * -0.03f;
it.motionZ = Math.round(pZ) * -0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * -0.03f;
}
} catch (Exception e) {
// Ignore this Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public EntityItem haxInit(World w, double x, double y, double z, ItemStack stack
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = Minecraft.getMinecraft().player.posX - posX;
double pZ = Minecraft.getMinecraft().player.posZ - posZ;
it.motionX = Math.round(pX) * 0.03f;
it.motionZ = Math.round(pZ) * 0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * 0.03f;
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = Minecraft.getMinecraft().player.posX - posX;
double pZ = Minecraft.getMinecraft().player.posZ - posZ;
it.motionX = Math.round(pX) * -0.03f;
it.motionZ = Math.round(pZ) * -0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * -0.03f;
}
} catch (Exception e) {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public int redirectRandom(Random rand, int chance) {
return LeaveDropManipulation.dropSapling.isToggled() ? 0:rand.nextInt(chance);
}

@Redirect(remap = false, method = "getDrops", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockLeaves;dropApple(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/state/IBlockState;I)V"))
@Redirect(method = "getDrops", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockLeaves;dropApple(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/state/IBlockState;I)V"))
public void redirectDropApple(BlockLeaves leaves, World world, BlockPos pos, IBlockState state, int chance) {
this.dropApple((World)world, pos, state, !LeaveDropManipulation.dropApple.isToggled() ? chance : 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import de.pfannekuchen.lotas.challenges.ChallengeLoader;
import de.pfannekuchen.lotas.config.ConfigManager;
import de.pfannekuchen.lotas.dupemod.DupeMod;
import de.pfannekuchen.lotas.gui.GuiChallengeEscape;
import de.pfannekuchen.lotas.hotkeys.Hotkeys;
import de.pfannekuchen.lotas.savestate.SavestateMod;
Expand Down Expand Up @@ -222,6 +223,13 @@ public void injectLogo(CallbackInfo ci) {
Display.setTitle(Display.getTitle() + " - LoTAS");
}

@Inject(at = @At("HEAD"), method = "stopIntegratedServer")
private static void injectstopIntegratedServer(CallbackInfo ci) {
DupeMod.items.clear();
DupeMod.trackedObjects.clear();
DupeMod.tileentities.clear();
}

@Inject(method = "displayGuiScreen", at = @At("HEAD"))
public void injectdisplayGuiScreen(GuiScreen guiScreenIn, CallbackInfo ci) {
if (((guiScreenIn == null) ? true : guiScreenIn instanceof GuiIngameMenu) && SavestateMod.isLoading) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ private static EntityItem haxInit(World w, double x, double y, double z, ItemSta
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = Minecraft.getMinecraft().thePlayer.posX - x;
double pZ = Minecraft.getMinecraft().thePlayer.posZ - z;
it.motionX = Math.round(pX) * 0.03f;
it.motionZ = Math.round(pZ) * 0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * 0.03f;
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = Minecraft.getMinecraft().thePlayer.posX - x;
double pZ = Minecraft.getMinecraft().thePlayer.posZ - z;
it.motionX = Math.round(pX) * -0.03f;
it.motionZ = Math.round(pZ) * -0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * -0.03f;
}
} catch (Exception e) {
// Ignore this Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public EntityItem haxInit(World w, double x, double y, double z, ItemStack stack
if (ConfigManager.getBoolean("tools", "manipulateVelocityTowards")) {
double pX = Minecraft.getMinecraft().thePlayer.posX - posX;
double pZ = Minecraft.getMinecraft().thePlayer.posZ - posZ;
it.motionX = Math.round(pX) * 0.03f;
it.motionZ = Math.round(pZ) * 0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * 0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * 0.03f;
} else if (ConfigManager.getBoolean("tools", "manipulateVelocityAway")) {
double pX = Minecraft.getMinecraft().thePlayer.posX - posX;
double pZ = Minecraft.getMinecraft().thePlayer.posZ - posZ;
it.motionX = Math.round(pX) * -0.03f;
it.motionZ = Math.round(pZ) * -0.03f;
it.motionX = Math.min(Math.max(Math.round(pX), 1), -1) * -0.03f;
it.motionZ = Math.max(Math.round(pZ), 1) * -0.03f;
}
} catch (Exception e) {

Expand Down
2 changes: 1 addition & 1 deletion Forge-1.8.9/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}

version = "1.0.2"
version = "1.0.3"
group= "de.pfannekuchen.lotas" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "lotas"

Expand Down
Loading

0 comments on commit 17cc3d2

Please sign in to comment.