-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release Patch 1.1.1 for LoTAS 1.8.9 to 1.12.2
Changes: - Fixed TAS Challenges and Auto Strafing - Hotfix 1.9 and 1.10
- Loading branch information
Showing
183 changed files
with
1,655 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
.gradle | ||
.metadata | ||
.settings | ||
.classpath | ||
.project | ||
build | ||
bin | ||
run | ||
*.launch | ||
Private.java | ||
|
||
.idea/ | ||
Fabric-1.14.4/.gradle/ | ||
Fabric-1.14.4/build/ | ||
Fabric-1.14.4/run/ | ||
out/ | ||
|
||
eclipse/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import groovy.json.JsonOutput | ||
|
||
version = "1.1.0" | ||
group = "de.pfannekuchen.lotas" | ||
|
||
apply from: 'versions2/preprocessor.gradle' | ||
apply from: 'version.gradle' | ||
|
||
defaultTasks 'build' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
pluginManagement { | ||
repositories { | ||
maven { | ||
name = 'Fabric' | ||
url = 'https://maven.fabricmc.net/' | ||
} | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
def versions2 = [ | ||
'fabric', | ||
'1.14.4' | ||
] | ||
versions2.collect {":versions2:$it"}.each { | ||
include it | ||
} |
12 changes: 12 additions & 0 deletions
12
LoTAS-Fabric/src/main/java/de/pfannekuchen/lotas/core/LoTASModContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package de.pfannekuchen.lotas.core; | ||
|
||
import de.pfannekuchen.lotas.core.utils.KeybindsUtils; | ||
import net.fabricmc.api.ModInitializer; | ||
|
||
public class LoTASModContainer implements ModInitializer { | ||
|
||
@Override | ||
public void onInitialize() { | ||
KeybindsUtils.registerKeybinds(); | ||
} | ||
} |
152 changes: 152 additions & 0 deletions
152
LoTAS-Fabric/src/main/java/de/pfannekuchen/lotas/core/MCVer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
package de.pfannekuchen.lotas.core; | ||
|
||
public class MCVer { | ||
|
||
public static int clamp(int num, int min, int max) { | ||
if (num < min) { | ||
return min; | ||
} else { | ||
return num > max ? max : num; | ||
} | ||
} | ||
|
||
public static int ceil(float value) { | ||
int i = (int)value; | ||
return value > (float)i ? i + 1 : i; | ||
} | ||
|
||
public static float sin(float value) { | ||
return (float) Math.sin(value); | ||
} | ||
|
||
public static float cos(float value) { | ||
return (float) Math.cos(value); | ||
} | ||
|
||
public static double sqrt(double value) | ||
{ | ||
return Math.sqrt(value); | ||
} | ||
|
||
public static float sqrt(float value) | ||
{ | ||
return (float)Math.sqrt((double)value); | ||
} | ||
|
||
public static float clamp(float num, float min, float max) { | ||
if (num < min) { | ||
return min; | ||
} else { | ||
return num > max ? max : num; | ||
} | ||
} | ||
|
||
public static float abs(float a) { | ||
return (a <= 0.0F) ? 0.0F - a : a; | ||
} | ||
|
||
// public static int x(GuiButton button) { | ||
// //#if MC>=11200 | ||
// return button.x; | ||
// //#else | ||
// //$$ return button.xPosition; | ||
// //#endif | ||
// } | ||
// | ||
// public static int y(GuiButton button) { | ||
// //#if MC>=11200 | ||
// return button.y; | ||
// //#else | ||
// //$$ return button.yPosition; | ||
// //#endif | ||
// } | ||
// | ||
// public static EntityPlayerSP player(Minecraft mc) { | ||
// //#if MC>=11100 | ||
// return mc.player; | ||
// //#else | ||
// //$$ return mc.thePlayer; | ||
// //#endif | ||
// } | ||
// | ||
// public static WorldServer world(IntegratedServer mc, int dimension) { | ||
// //#if MC>=11200 | ||
// return mc.getWorld(dimension); | ||
// //#else | ||
// //$$ return mc.worldServerForDimension(dimension); | ||
// //#endif | ||
// } | ||
// | ||
// public static WorldClient world(Minecraft mc) { | ||
// //#if MC>=11100 | ||
// return mc.world; | ||
// //#else | ||
// //$$ return mc.theWorld; | ||
// //#endif | ||
// } | ||
// | ||
// public static FontRenderer getFontRenderer(Minecraft mc) { | ||
// //#if MC>=11200 | ||
// return mc.fontRenderer; | ||
// //#else | ||
// //$$ return mc.fontRendererObj; | ||
// //#endif | ||
// } | ||
// | ||
// public static WorldServer[] getWorlds(MinecraftServer server) { | ||
// //#if MC>=11100 | ||
// return server.worlds; | ||
// //#else | ||
// //$$ return server.worldServers; | ||
// //#endif | ||
// } | ||
// | ||
// public static World world(EntityLiving entity) { | ||
// //#if MC>=11100 | ||
// return entity.getEntityWorld(); | ||
// //#else | ||
// //$$ return entity.worldObj; | ||
// //#endif | ||
// } | ||
// | ||
// public static Item getItem(String itemId) { | ||
// int mainVersion = Integer.parseInt(ForgeVersion.mcVersion.split("\\.")[1]); | ||
// if (mainVersion <= 10) { | ||
// return Item.getByNameOrId(itemId.toLowerCase()); | ||
// } | ||
// return Item.getByNameOrId(itemId); | ||
// } | ||
// | ||
// public static Block getBlock(String blockId) { | ||
// int mainVersion = Integer.parseInt(ForgeVersion.mcVersion.split("\\.")[1]); | ||
// if (mainVersion <= 8) { | ||
// return Block.getBlockFromName(blockId.toLowerCase()); | ||
// } | ||
// return Block.getBlockFromName(blockId); | ||
// } | ||
// | ||
// public static AxisAlignedBB aabb(double d, double e, double f, double g, double h, double i) { | ||
// return new AxisAlignedBB(d, e, f, g, h, i); | ||
// } | ||
// | ||
// public static Packet<?> loginStart(GameProfile gameProfile) { | ||
// //#if MC>=10900 | ||
// return (new CPacketLoginStart(gameProfile)); | ||
// //#else | ||
// //$$ return (new C00PacketLoginStart(gameProfile)); | ||
// //#endif | ||
// } | ||
// | ||
// public static Packet<?> handshake(String string, int i, EnumConnectionState login, boolean b) { | ||
// //#if MC>=11202 | ||
// return new C00Handshake(string, i, login, b); | ||
// //#else | ||
// //$$ return new C00Handshake(316, string, i, login, b); | ||
// //#endif | ||
// } | ||
// | ||
// public static AxisAlignedBB expandBy32(AxisAlignedBB box) { | ||
// return new AxisAlignedBB(box.minX - 16, box.minY - 16, box.minZ - 16, box.maxX + 16, box.maxY + 16, box.maxZ + 16); | ||
// } | ||
|
||
} |
62 changes: 62 additions & 0 deletions
62
LoTAS-Fabric/src/main/java/de/pfannekuchen/lotas/core/utils/KeybindsUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package de.pfannekuchen.lotas.core.utils; | ||
|
||
import java.io.IOException; | ||
|
||
import org.lwjgl.glfw.GLFW; | ||
|
||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.gui.hud.InGameHud; | ||
import net.minecraft.client.gui.screen.GameMenuScreen; | ||
import net.minecraft.client.options.KeyBinding; | ||
|
||
public class KeybindsUtils { | ||
|
||
public static KeyBinding saveStateKeybind = new KeyBinding("Savestate", GLFW.GLFW_KEY_J, "Stating"); | ||
public static final KeyBinding loadStateKeybind = new KeyBinding("Loadstate", GLFW.GLFW_KEY_K, "Stating"); | ||
public static final KeyBinding loadDupeKeybind = new KeyBinding("Load Items/Chests", GLFW.GLFW_KEY_O, "Duping"); | ||
public static final KeyBinding saveDupeKeybind = new KeyBinding("Save Items/Chests", GLFW.GLFW_KEY_P, "Duping"); | ||
public static final KeyBinding holdStrafeKeybind = new KeyBinding("Auto-Strafe", GLFW.GLFW_KEY_H, "Moving"); | ||
public static final KeyBinding toggleFreecamKeybind = new KeyBinding("Freecam", GLFW.GLFW_KEY_I, "Moving"); | ||
public static final KeyBinding increaseTickrateKeybind = new KeyBinding("Faster Tickrate", GLFW.GLFW_KEY_PERIOD, "Tickrate Changer"); | ||
public static final KeyBinding decreaseTickrateKeybind = new KeyBinding("Slower Tickrate", GLFW.GLFW_KEY_COMMA, "Tickrate Changer"); | ||
public static final KeyBinding advanceTicksKeybind = new KeyBinding("Advance Tick", GLFW.GLFW_KEY_F9, "Tickrate Changer"); | ||
public static final KeyBinding toggleAdvanceKeybind = new KeyBinding("Tickrate Zero Toggle", GLFW.GLFW_KEY_F8, "Tickrate Changer"); | ||
public static final KeyBinding toggleTimerKeybind = new KeyBinding("Start/Stop Timer", GLFW.GLFW_KEY_KP_5, "Tickrate Changer"); | ||
public static boolean shouldSavestate; | ||
public static boolean shouldLoadstate; | ||
public static boolean isFreecaming; | ||
public static int savedTickrate; | ||
|
||
public static void keyEvent() { | ||
while (saveStateKeybind.wasPressed() /*&& ChallengeMap.currentMap == null*/) { | ||
MinecraftClient.getInstance().openScreen(new GameMenuScreen(true)); | ||
shouldSavestate = true; | ||
} | ||
while(loadStateKeybind.wasPressed()) { | ||
MinecraftClient.getInstance().openScreen(new GameMenuScreen(true)); | ||
shouldLoadstate = true; | ||
} | ||
// } else if (loadDupeKeybind.isPressed()) { | ||
// DupeMod.loadChests(); | ||
// DupeMod.loadItems(); | ||
// } else if (saveDupeKeybind.isPressed()) { | ||
// DupeMod.saveChests(); | ||
// DupeMod.saveItems(); | ||
// } | ||
} | ||
|
||
public static void registerKeybinds() { | ||
KeyBindingHelper.registerKeyBinding(saveStateKeybind); | ||
KeyBindingHelper.registerKeyBinding(loadStateKeybind); | ||
// KeyBindingHelper.registerKeyBinding(loadDupeKeybind); | ||
// KeyBindingHelper.registerKeyBinding(saveDupeKeybind); | ||
// KeyBindingHelper.registerKeyBinding(holdStrafeKeybind); | ||
// KeyBindingHelper.registerKeyBinding(toggleFreecamKeybind); | ||
KeyBindingHelper.registerKeyBinding(increaseTickrateKeybind); | ||
KeyBindingHelper.registerKeyBinding(decreaseTickrateKeybind); | ||
KeyBindingHelper.registerKeyBinding(advanceTicksKeybind); | ||
KeyBindingHelper.registerKeyBinding(toggleAdvanceKeybind); | ||
// KeyBindingHelper.registerKeyBinding(toggleTimerKeybind); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
LoTAS-Fabric/src/main/java/de/pfannekuchen/lotas/core/utils/Keyboard.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.pfannekuchen.lotas.core.utils; | ||
|
||
import org.lwjgl.glfw.GLFW; | ||
|
||
import net.minecraft.client.MinecraftClient; | ||
|
||
/** | ||
* A LWJGL style keyboard method | ||
* @author ScribbleLP | ||
* | ||
*/ | ||
public class Keyboard { | ||
|
||
public static boolean isKeyDown(int keyCode) { | ||
MinecraftClient mc=MinecraftClient.getInstance(); | ||
return GLFW.glfwGetKey(mc.window.getHandle(), keyCode) == GLFW.GLFW_KEY_DOWN; | ||
} | ||
public static boolean isPressed(int keyCode) { | ||
MinecraftClient mc=MinecraftClient.getInstance(); | ||
return GLFW.glfwGetKey(mc.window.getHandle(), keyCode) == GLFW.GLFW_PRESS; | ||
} | ||
} |
Oops, something went wrong.