From 215f2296418c198b58b6fb1de39e05156f310fbb Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Sun, 27 Feb 2022 00:34:52 -0600 Subject: [PATCH 01/20] Added GUI Feature Toggle for jump spamming --- .../squakefabric/config/FeatureToggle.java | 1 + .../tlesis/squakefabric/mixin/MixinJump.java | 22 +++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/tlesis/squakefabric/config/FeatureToggle.java b/src/main/java/org/tlesis/squakefabric/config/FeatureToggle.java index 272dfaf..f0081e9 100644 --- a/src/main/java/org/tlesis/squakefabric/config/FeatureToggle.java +++ b/src/main/java/org/tlesis/squakefabric/config/FeatureToggle.java @@ -26,6 +26,7 @@ public enum FeatureToggle implements IHotkeyTogglable, IConfigNotifiable VALUES = ImmutableList.copyOf(values()); diff --git a/src/main/java/org/tlesis/squakefabric/mixin/MixinJump.java b/src/main/java/org/tlesis/squakefabric/mixin/MixinJump.java index 17ba5a4..c4724c1 100644 --- a/src/main/java/org/tlesis/squakefabric/mixin/MixinJump.java +++ b/src/main/java/org/tlesis/squakefabric/mixin/MixinJump.java @@ -5,28 +5,22 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.tlesis.squakefabric.config.FeatureToggle; + -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; -import net.minecraft.world.World; @Mixin(LivingEntity.class) -public abstract class MixinJump extends Entity { - - public MixinJump(EntityType type, World world) { - super(type, world); - } +public abstract class MixinJump { @Shadow int jumpingCooldown; @Inject(method = "tickMovement", at = @At(value = "HEAD")) public void tickMovement(CallbackInfo ci) { - if (jumpingCooldown > 0) { - jumpingCooldown = 0; - } + if (FeatureToggle.JUMP_SPAM.getBooleanValue()) + if (jumpingCooldown > 0) { + jumpingCooldown = 0; + } } -} - -//TODO Inject a new getter and setter method that gets and sets jumpingCooldown +} \ No newline at end of file From 24bc1cc44eec95907921c0de8fb381aed31a72be Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Sun, 27 Feb 2022 11:05:58 -0600 Subject: [PATCH 02/20] Changed Name --- .vscode/launch.json | 4 ++-- README.md | 6 +++--- .../InitHandler.java | 16 ++++++++-------- .../ModConfig.java | 6 +++--- .../Reference.java | 6 +++--- .../SquakePlusPlus.java} | 4 ++-- .../client/PlayerAPI.java | 2 +- .../client/QuakeClientPlayer.java | 10 +++++----- .../client/SquakePlusPlusClient.java} | 4 ++-- .../config/Configs.java | 4 ++-- .../config/FeatureToggle.java | 8 ++++---- .../data/DataManager.java | 12 ++++++------ .../event/InputHandler.java | 8 ++++---- .../event/KeyCallbacks.java | 6 +++--- .../event/RenderHandler.java | 2 +- .../event/WorldLoadListener.java | 4 ++-- .../gui/GuiConfigs.java | 10 +++++----- .../mixin/MixinEntity.java | 4 ++-- .../mixin/MixinJump.java | 4 ++-- .../mixin/MixinPlayerEntity.java | 4 ++-- .../network/CarpetHelloPacketHandler.java | 4 ++-- .../scheduler/ClientTickHandler.java | 2 +- .../scheduler/ITask.java | 2 +- .../scheduler/TaskScheduler.java | 2 +- .../scheduler/TaskTimer.java | 2 +- src/main/resources/fabric.mod.json | 4 ++-- src/main/resources/mixins.squake-fabric.json | 2 +- 27 files changed, 71 insertions(+), 71 deletions(-) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/InitHandler.java (78%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/ModConfig.java (61%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/Reference.java (51%) rename src/main/java/org/tlesis/{squakefabric/SquakeFabric.java => squakeplusplus/SquakePlusPlus.java} (81%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/client/PlayerAPI.java (98%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/client/QuakeClientPlayer.java (98%) rename src/main/java/org/tlesis/{squakefabric/client/SquakeFabricClient.java => squakeplusplus/client/SquakePlusPlusClient.java} (64%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/config/Configs.java (98%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/config/FeatureToggle.java (94%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/data/DataManager.java (92%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/event/InputHandler.java (86%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/event/KeyCallbacks.java (87%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/event/RenderHandler.java (70%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/event/WorldLoadListener.java (89%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/gui/GuiConfigs.java (93%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/mixin/MixinEntity.java (87%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/mixin/MixinJump.java (87%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/mixin/MixinPlayerEntity.java (95%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/network/CarpetHelloPacketHandler.java (90%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/scheduler/ClientTickHandler.java (91%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/scheduler/ITask.java (95%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/scheduler/TaskScheduler.java (98%) rename src/main/java/org/tlesis/{squakefabric => squakeplusplus}/scheduler/TaskTimer.java (93%) diff --git a/.vscode/launch.json b/.vscode/launch.json index 61d2b16..55c0f21 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "console": "internalConsole", "stopOnEntry": false, "mainClass": "net.fabricmc.devlaunchinjector.Main", - "vmArgs": "-Dfabric.dli.config\u003dD:\\Coding\\Java\\SquakeFabric-GUI-Develop\\.gradle\\loom-cache\\launch.cfg -Dfabric.dli.env\u003dclient -Dfabric.dli.main\u003dnet.fabricmc.loader.impl.launch.knot.KnotClient", + "vmArgs": "-Dfabric.dli.config\u003dD:\\Coding\\Java\\Squake-Movement-Develop\\.gradle\\loom-cache\\launch.cfg -Dfabric.dli.env\u003dclient -Dfabric.dli.main\u003dnet.fabricmc.loader.impl.launch.knot.KnotClient", "args": "" }, { @@ -20,7 +20,7 @@ "console": "internalConsole", "stopOnEntry": false, "mainClass": "net.fabricmc.devlaunchinjector.Main", - "vmArgs": "-Dfabric.dli.config\u003dD:\\Coding\\Java\\SquakeFabric-GUI-Develop\\.gradle\\loom-cache\\launch.cfg -Dfabric.dli.env\u003dserver -Dfabric.dli.main\u003dnet.fabricmc.loader.impl.launch.knot.KnotServer", + "vmArgs": "-Dfabric.dli.config\u003dD:\\Coding\\Java\\Squake-Movement-Develop\\.gradle\\loom-cache\\launch.cfg -Dfabric.dli.env\u003dserver -Dfabric.dli.main\u003dnet.fabricmc.loader.impl.launch.knot.KnotServer", "args": "nogui" } ] diff --git a/README.md b/README.md index 8a3def6..65fbff9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# SquakeFabric -SquakeFabric is client-side mod for Minecraft which adds bunnyhopping, strafe jumping, air control, trimping, and sharking to Minecraft. It also can disable the loss of speed when taking fall damage (needs to be installed server-side). +# Squake++ +Squake++ is client-side mod for Minecraft which adds bunnyhopping, strafe jumping, air control, trimping, and sharking to Minecraft. It also can disable the loss of speed when taking fall damage (needs to be installed server-side). The modified movement code is based on Quake and Half-Life's code, with the the goal to make the movement feel the same as Half-Life. Because of this, trimping and sharking, which are based off of Fortress Forever's movement (not Half-Life), are disabled by default. These are only included as they were features in the [original Squake](https://www.curseforge.com/minecraft/mc-mods/squake) by squeek502. @@ -11,7 +11,7 @@ By default, the config GUI can be opened with `O+C` * **Sharking** - Sharking refers to a mechanic also from Fortress Forever, which allows for gliding across the surface of water by holding jump. The surface tension and friction of the water are configurable, which affect how much momentum you lose when hitting the water, and how fast you move on the water. Sharking is also disabled by default. ## Compiling -1. Clone the repository with `git clone https://github.com/Tlesis/SquakeFabric.git` +1. Clone the repository with `git clone https://github.com/Tlesis/SquakePlusPlus.git` 2. Navigate into the repository's directory 3. Run `./gradlew build` diff --git a/src/main/java/org/tlesis/squakefabric/InitHandler.java b/src/main/java/org/tlesis/squakeplusplus/InitHandler.java similarity index 78% rename from src/main/java/org/tlesis/squakefabric/InitHandler.java rename to src/main/java/org/tlesis/squakeplusplus/InitHandler.java index 6523d82..0c7b971 100644 --- a/src/main/java/org/tlesis/squakefabric/InitHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/InitHandler.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric; +package org.tlesis.squakeplusplus; import net.minecraft.client.MinecraftClient; import fi.dy.masa.malilib.config.ConfigManager; @@ -9,13 +9,13 @@ import fi.dy.masa.malilib.interfaces.IInitializationHandler; import fi.dy.masa.malilib.interfaces.IRenderer; import fi.dy.masa.malilib.network.ClientPacketChannelHandler; -import org.tlesis.squakefabric.config.Configs; -import org.tlesis.squakefabric.event.InputHandler; -import org.tlesis.squakefabric.event.KeyCallbacks; -import org.tlesis.squakefabric.event.RenderHandler; -import org.tlesis.squakefabric.event.WorldLoadListener; -import org.tlesis.squakefabric.network.CarpetHelloPacketHandler; -import org.tlesis.squakefabric.scheduler.ClientTickHandler; +import org.tlesis.squakeplusplus.config.Configs; +import org.tlesis.squakeplusplus.event.InputHandler; +import org.tlesis.squakeplusplus.event.KeyCallbacks; +import org.tlesis.squakeplusplus.event.RenderHandler; +import org.tlesis.squakeplusplus.event.WorldLoadListener; +import org.tlesis.squakeplusplus.network.CarpetHelloPacketHandler; +import org.tlesis.squakeplusplus.scheduler.ClientTickHandler; public class InitHandler implements IInitializationHandler { @Override diff --git a/src/main/java/org/tlesis/squakefabric/ModConfig.java b/src/main/java/org/tlesis/squakeplusplus/ModConfig.java similarity index 61% rename from src/main/java/org/tlesis/squakefabric/ModConfig.java rename to src/main/java/org/tlesis/squakeplusplus/ModConfig.java index 6625af4..3c99675 100644 --- a/src/main/java/org/tlesis/squakefabric/ModConfig.java +++ b/src/main/java/org/tlesis/squakeplusplus/ModConfig.java @@ -1,7 +1,7 @@ -package org.tlesis.squakefabric; +package org.tlesis.squakeplusplus; -import org.tlesis.squakefabric.config.Configs; -import org.tlesis.squakefabric.config.FeatureToggle; +import org.tlesis.squakeplusplus.config.Configs; +import org.tlesis.squakeplusplus.config.FeatureToggle; public class ModConfig { diff --git a/src/main/java/org/tlesis/squakefabric/Reference.java b/src/main/java/org/tlesis/squakeplusplus/Reference.java similarity index 51% rename from src/main/java/org/tlesis/squakefabric/Reference.java rename to src/main/java/org/tlesis/squakeplusplus/Reference.java index e35e092..bcb1a9d 100644 --- a/src/main/java/org/tlesis/squakefabric/Reference.java +++ b/src/main/java/org/tlesis/squakeplusplus/Reference.java @@ -1,9 +1,9 @@ -package org.tlesis.squakefabric; +package org.tlesis.squakeplusplus; import fi.dy.masa.malilib.util.StringUtils; public class Reference { - public static final String MOD_ID = "squakefabric"; - public static final String MOD_NAME = "Squake Fabric"; + public static final String MOD_ID = "squakeplusplus"; + public static final String MOD_NAME = "Squake++"; public static final String MOD_VERSION = StringUtils.getModVersionString(MOD_ID); } \ No newline at end of file diff --git a/src/main/java/org/tlesis/squakefabric/SquakeFabric.java b/src/main/java/org/tlesis/squakeplusplus/SquakePlusPlus.java similarity index 81% rename from src/main/java/org/tlesis/squakefabric/SquakeFabric.java rename to src/main/java/org/tlesis/squakeplusplus/SquakePlusPlus.java index ca0f338..83bc976 100644 --- a/src/main/java/org/tlesis/squakefabric/SquakeFabric.java +++ b/src/main/java/org/tlesis/squakeplusplus/SquakePlusPlus.java @@ -1,11 +1,11 @@ -package org.tlesis.squakefabric; +package org.tlesis.squakeplusplus; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import fi.dy.masa.malilib.event.InitializationHandler; import net.fabricmc.api.ModInitializer; -public class SquakeFabric implements ModInitializer { +public class SquakePlusPlus implements ModInitializer { public static final Logger logger = LogManager.getLogger(Reference.MOD_ID); diff --git a/src/main/java/org/tlesis/squakefabric/client/PlayerAPI.java b/src/main/java/org/tlesis/squakeplusplus/client/PlayerAPI.java similarity index 98% rename from src/main/java/org/tlesis/squakefabric/client/PlayerAPI.java rename to src/main/java/org/tlesis/squakeplusplus/client/PlayerAPI.java index 8ca19a5..1048be6 100644 --- a/src/main/java/org/tlesis/squakefabric/client/PlayerAPI.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/PlayerAPI.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.client; +package org.tlesis.squakeplusplus.client; import net.minecraft.entity.Entity; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/org/tlesis/squakefabric/client/QuakeClientPlayer.java b/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java similarity index 98% rename from src/main/java/org/tlesis/squakefabric/client/QuakeClientPlayer.java rename to src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java index 720d123..60cfd2c 100644 --- a/src/main/java/org/tlesis/squakefabric/client/QuakeClientPlayer.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.client; +package org.tlesis.squakeplusplus.client; import net.minecraft.block.Block; import net.minecraft.block.BlockRenderType; @@ -13,15 +13,15 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; import net.minecraft.world.chunk.ChunkStatus; -import org.tlesis.squakefabric.config.Configs; -import org.tlesis.squakefabric.config.FeatureToggle; -import org.tlesis.squakefabric.scheduler.ClientTickHandler; +import org.tlesis.squakeplusplus.config.Configs; +import org.tlesis.squakeplusplus.config.FeatureToggle; +import org.tlesis.squakeplusplus.scheduler.ClientTickHandler; import java.util.ArrayList; import java.util.List; import java.util.Random; -import static org.tlesis.squakefabric.client.PlayerAPI.*; +import static org.tlesis.squakeplusplus.client.PlayerAPI.*; public class QuakeClientPlayer { diff --git a/src/main/java/org/tlesis/squakefabric/client/SquakeFabricClient.java b/src/main/java/org/tlesis/squakeplusplus/client/SquakePlusPlusClient.java similarity index 64% rename from src/main/java/org/tlesis/squakefabric/client/SquakeFabricClient.java rename to src/main/java/org/tlesis/squakeplusplus/client/SquakePlusPlusClient.java index c759e68..c433497 100644 --- a/src/main/java/org/tlesis/squakefabric/client/SquakeFabricClient.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/SquakePlusPlusClient.java @@ -1,11 +1,11 @@ -package org.tlesis.squakefabric.client; +package org.tlesis.squakeplusplus.client; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) -public class SquakeFabricClient implements ClientModInitializer { +public class SquakePlusPlusClient implements ClientModInitializer { @Override public void onInitializeClient() {} diff --git a/src/main/java/org/tlesis/squakefabric/config/Configs.java b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java similarity index 98% rename from src/main/java/org/tlesis/squakefabric/config/Configs.java rename to src/main/java/org/tlesis/squakeplusplus/config/Configs.java index 28fb0d4..f48e51c 100644 --- a/src/main/java/org/tlesis/squakefabric/config/Configs.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.config; +package org.tlesis.squakeplusplus.config; import java.io.File; import java.util.List; @@ -14,7 +14,7 @@ import fi.dy.masa.malilib.config.options.ConfigHotkey; import fi.dy.masa.malilib.util.FileUtils; import fi.dy.masa.malilib.util.JsonUtils; -import org.tlesis.squakefabric.Reference; +import org.tlesis.squakeplusplus.Reference; public class Configs implements IConfigHandler { diff --git a/src/main/java/org/tlesis/squakefabric/config/FeatureToggle.java b/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java similarity index 94% rename from src/main/java/org/tlesis/squakefabric/config/FeatureToggle.java rename to src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java index f0081e9..f494b19 100644 --- a/src/main/java/org/tlesis/squakefabric/config/FeatureToggle.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java @@ -1,10 +1,10 @@ -package org.tlesis.squakefabric.config; +package org.tlesis.squakeplusplus.config; import com.google.common.collect.ImmutableList; import com.google.gson.JsonElement; import com.google.gson.JsonPrimitive; -import org.tlesis.squakefabric.SquakeFabric; +import org.tlesis.squakeplusplus.SquakePlusPlus; import fi.dy.masa.malilib.config.ConfigType; import fi.dy.masa.malilib.config.IConfigBoolean; @@ -188,10 +188,10 @@ public void setValueFromJsonElement(JsonElement element) { if (element.isJsonPrimitive()) { this.valueBoolean = element.getAsBoolean(); } else { - SquakeFabric.logger.warn("Failed to set config value for '{}' from the JSON element '{}'", this.getName(), element); + SquakePlusPlus.logger.warn("Failed to set config value for '{}' from the JSON element '{}'", this.getName(), element); } } catch (Exception e) { - SquakeFabric.logger.warn("Failed to set config value for '{}' from the JSON element '{}'", this.getName(), element, e); + SquakePlusPlus.logger.warn("Failed to set config value for '{}' from the JSON element '{}'", this.getName(), element, e); } } } diff --git a/src/main/java/org/tlesis/squakefabric/data/DataManager.java b/src/main/java/org/tlesis/squakeplusplus/data/DataManager.java similarity index 92% rename from src/main/java/org/tlesis/squakefabric/data/DataManager.java rename to src/main/java/org/tlesis/squakeplusplus/data/DataManager.java index 7f6e801..1389d75 100644 --- a/src/main/java/org/tlesis/squakefabric/data/DataManager.java +++ b/src/main/java/org/tlesis/squakeplusplus/data/DataManager.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.data; +package org.tlesis.squakeplusplus.data; import java.io.File; import java.util.ArrayList; @@ -16,10 +16,10 @@ import net.minecraft.item.Item; import net.minecraft.item.Items; -import org.tlesis.squakefabric.Reference; -import org.tlesis.squakefabric.SquakeFabric; -import org.tlesis.squakefabric.gui.GuiConfigs.ConfigGuiTab; -import org.tlesis.squakefabric.scheduler.TaskScheduler; +import org.tlesis.squakeplusplus.Reference; +import org.tlesis.squakeplusplus.SquakePlusPlus; +import org.tlesis.squakeplusplus.gui.GuiConfigs.ConfigGuiTab; +import org.tlesis.squakeplusplus.scheduler.TaskScheduler; public class DataManager { @@ -112,7 +112,7 @@ private static File getCurrentStorageFile(boolean globalData) { File dir = getCurrentConfigDirectory(); if (dir.exists() == false && dir.mkdirs() == false) { - SquakeFabric.logger.warn("Failed to create the config directory '{}'", dir.getAbsolutePath()); + SquakePlusPlus.logger.warn("Failed to create the config directory '{}'", dir.getAbsolutePath()); } return new File(dir, StringUtils.getStorageFileName(globalData, Reference.MOD_ID + "_", ".json", "default")); diff --git a/src/main/java/org/tlesis/squakefabric/event/InputHandler.java b/src/main/java/org/tlesis/squakeplusplus/event/InputHandler.java similarity index 86% rename from src/main/java/org/tlesis/squakefabric/event/InputHandler.java rename to src/main/java/org/tlesis/squakeplusplus/event/InputHandler.java index 4d8e73e..8c50f8e 100644 --- a/src/main/java/org/tlesis/squakefabric/event/InputHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/event/InputHandler.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.event; +package org.tlesis.squakeplusplus.event; import com.google.common.collect.ImmutableList; import fi.dy.masa.malilib.hotkeys.IHotkey; @@ -6,9 +6,9 @@ import fi.dy.masa.malilib.hotkeys.IKeybindProvider; import fi.dy.masa.malilib.hotkeys.IKeyboardInputHandler; -import org.tlesis.squakefabric.Reference; -import org.tlesis.squakefabric.config.FeatureToggle; -import org.tlesis.squakefabric.config.Configs.Options; +import org.tlesis.squakeplusplus.Reference; +import org.tlesis.squakeplusplus.config.FeatureToggle; +import org.tlesis.squakeplusplus.config.Configs.Options; public class InputHandler implements IKeybindProvider, IKeyboardInputHandler { diff --git a/src/main/java/org/tlesis/squakefabric/event/KeyCallbacks.java b/src/main/java/org/tlesis/squakeplusplus/event/KeyCallbacks.java similarity index 87% rename from src/main/java/org/tlesis/squakefabric/event/KeyCallbacks.java rename to src/main/java/org/tlesis/squakeplusplus/event/KeyCallbacks.java index 75f3b96..4354e48 100644 --- a/src/main/java/org/tlesis/squakefabric/event/KeyCallbacks.java +++ b/src/main/java/org/tlesis/squakeplusplus/event/KeyCallbacks.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.event; +package org.tlesis.squakeplusplus.event; import fi.dy.masa.malilib.gui.GuiBase; import fi.dy.masa.malilib.hotkeys.IHotkeyCallback; @@ -6,8 +6,8 @@ import fi.dy.masa.malilib.hotkeys.KeyAction; import net.minecraft.client.MinecraftClient; -import org.tlesis.squakefabric.config.Configs.Options; -import org.tlesis.squakefabric.gui.GuiConfigs; +import org.tlesis.squakeplusplus.config.Configs.Options; +import org.tlesis.squakeplusplus.gui.GuiConfigs; public class KeyCallbacks { diff --git a/src/main/java/org/tlesis/squakefabric/event/RenderHandler.java b/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java similarity index 70% rename from src/main/java/org/tlesis/squakefabric/event/RenderHandler.java rename to src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java index 1e2fbb0..1851bee 100644 --- a/src/main/java/org/tlesis/squakefabric/event/RenderHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.event; +package org.tlesis.squakeplusplus.event; import fi.dy.masa.malilib.interfaces.IRenderer; diff --git a/src/main/java/org/tlesis/squakefabric/event/WorldLoadListener.java b/src/main/java/org/tlesis/squakeplusplus/event/WorldLoadListener.java similarity index 89% rename from src/main/java/org/tlesis/squakefabric/event/WorldLoadListener.java rename to src/main/java/org/tlesis/squakeplusplus/event/WorldLoadListener.java index 848935d..2a84eb0 100644 --- a/src/main/java/org/tlesis/squakefabric/event/WorldLoadListener.java +++ b/src/main/java/org/tlesis/squakeplusplus/event/WorldLoadListener.java @@ -1,11 +1,11 @@ -package org.tlesis.squakefabric.event; +package org.tlesis.squakeplusplus.event; import javax.annotation.Nullable; import fi.dy.masa.malilib.interfaces.IWorldLoadListener; import net.minecraft.client.MinecraftClient; import net.minecraft.client.world.ClientWorld; -import org.tlesis.squakefabric.data.DataManager; +import org.tlesis.squakeplusplus.data.DataManager; public class WorldLoadListener implements IWorldLoadListener { diff --git a/src/main/java/org/tlesis/squakefabric/gui/GuiConfigs.java b/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java similarity index 93% rename from src/main/java/org/tlesis/squakefabric/gui/GuiConfigs.java rename to src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java index c9184c7..c733d9d 100644 --- a/src/main/java/org/tlesis/squakefabric/gui/GuiConfigs.java +++ b/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.gui; +package org.tlesis.squakeplusplus.gui; import java.util.Collections; import java.util.List; @@ -12,10 +12,10 @@ import fi.dy.masa.malilib.gui.button.ButtonGeneric; import fi.dy.masa.malilib.gui.button.IButtonActionListener; import fi.dy.masa.malilib.util.StringUtils; -import org.tlesis.squakefabric.Reference; -import org.tlesis.squakefabric.config.Configs; -import org.tlesis.squakefabric.config.FeatureToggle; -import org.tlesis.squakefabric.data.DataManager; +import org.tlesis.squakeplusplus.Reference; +import org.tlesis.squakeplusplus.config.Configs; +import org.tlesis.squakeplusplus.config.FeatureToggle; +import org.tlesis.squakeplusplus.data.DataManager; public class GuiConfigs extends GuiConfigsBase { diff --git a/src/main/java/org/tlesis/squakefabric/mixin/MixinEntity.java b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinEntity.java similarity index 87% rename from src/main/java/org/tlesis/squakefabric/mixin/MixinEntity.java rename to src/main/java/org/tlesis/squakeplusplus/mixin/MixinEntity.java index dda2c34..7e11187 100644 --- a/src/main/java/org/tlesis/squakefabric/mixin/MixinEntity.java +++ b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinEntity.java @@ -1,6 +1,6 @@ -package org.tlesis.squakefabric.mixin; +package org.tlesis.squakeplusplus.mixin; -import org.tlesis.squakefabric.client.QuakeClientPlayer; +import org.tlesis.squakeplusplus.client.QuakeClientPlayer; import net.minecraft.entity.Entity; import net.minecraft.util.math.Vec3d; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/org/tlesis/squakefabric/mixin/MixinJump.java b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinJump.java similarity index 87% rename from src/main/java/org/tlesis/squakefabric/mixin/MixinJump.java rename to src/main/java/org/tlesis/squakeplusplus/mixin/MixinJump.java index c4724c1..add540b 100644 --- a/src/main/java/org/tlesis/squakefabric/mixin/MixinJump.java +++ b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinJump.java @@ -1,11 +1,11 @@ -package org.tlesis.squakefabric.mixin; +package org.tlesis.squakeplusplus.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.tlesis.squakefabric.config.FeatureToggle; +import org.tlesis.squakeplusplus.config.FeatureToggle; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/org/tlesis/squakefabric/mixin/MixinPlayerEntity.java b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinPlayerEntity.java similarity index 95% rename from src/main/java/org/tlesis/squakefabric/mixin/MixinPlayerEntity.java rename to src/main/java/org/tlesis/squakeplusplus/mixin/MixinPlayerEntity.java index 7699b71..b00e853 100644 --- a/src/main/java/org/tlesis/squakefabric/mixin/MixinPlayerEntity.java +++ b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinPlayerEntity.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.mixin; +package org.tlesis.squakeplusplus.mixin; import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.PlayerEntity; @@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import static org.tlesis.squakefabric.client.QuakeClientPlayer.*; +import static org.tlesis.squakeplusplus.client.QuakeClientPlayer.*; @Mixin(PlayerEntity.class) public class MixinPlayerEntity { diff --git a/src/main/java/org/tlesis/squakefabric/network/CarpetHelloPacketHandler.java b/src/main/java/org/tlesis/squakeplusplus/network/CarpetHelloPacketHandler.java similarity index 90% rename from src/main/java/org/tlesis/squakefabric/network/CarpetHelloPacketHandler.java rename to src/main/java/org/tlesis/squakeplusplus/network/CarpetHelloPacketHandler.java index 07eacf2..ce3cbf7 100644 --- a/src/main/java/org/tlesis/squakefabric/network/CarpetHelloPacketHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/network/CarpetHelloPacketHandler.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.network; +package org.tlesis.squakeplusplus.network; import java.util.List; @@ -7,7 +7,7 @@ import fi.dy.masa.malilib.network.IPluginChannelHandler; import net.minecraft.network.PacketByteBuf; import net.minecraft.util.Identifier; -import org.tlesis.squakefabric.data.DataManager; +import org.tlesis.squakeplusplus.data.DataManager; public class CarpetHelloPacketHandler implements IPluginChannelHandler { public static final CarpetHelloPacketHandler INSTANCE = new CarpetHelloPacketHandler(); diff --git a/src/main/java/org/tlesis/squakefabric/scheduler/ClientTickHandler.java b/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java similarity index 91% rename from src/main/java/org/tlesis/squakefabric/scheduler/ClientTickHandler.java rename to src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java index 03da390..481b2dc 100644 --- a/src/main/java/org/tlesis/squakefabric/scheduler/ClientTickHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.scheduler; +package org.tlesis.squakeplusplus.scheduler; import fi.dy.masa.malilib.interfaces.IClientTickHandler; import net.minecraft.client.MinecraftClient; diff --git a/src/main/java/org/tlesis/squakefabric/scheduler/ITask.java b/src/main/java/org/tlesis/squakeplusplus/scheduler/ITask.java similarity index 95% rename from src/main/java/org/tlesis/squakefabric/scheduler/ITask.java rename to src/main/java/org/tlesis/squakeplusplus/scheduler/ITask.java index 155df62..a290722 100644 --- a/src/main/java/org/tlesis/squakefabric/scheduler/ITask.java +++ b/src/main/java/org/tlesis/squakeplusplus/scheduler/ITask.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.scheduler; +package org.tlesis.squakeplusplus.scheduler; public interface ITask { /** diff --git a/src/main/java/org/tlesis/squakefabric/scheduler/TaskScheduler.java b/src/main/java/org/tlesis/squakeplusplus/scheduler/TaskScheduler.java similarity index 98% rename from src/main/java/org/tlesis/squakefabric/scheduler/TaskScheduler.java rename to src/main/java/org/tlesis/squakeplusplus/scheduler/TaskScheduler.java index 4e6b8b5..6f8e95b 100644 --- a/src/main/java/org/tlesis/squakefabric/scheduler/TaskScheduler.java +++ b/src/main/java/org/tlesis/squakeplusplus/scheduler/TaskScheduler.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.scheduler; +package org.tlesis.squakeplusplus.scheduler; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/org/tlesis/squakefabric/scheduler/TaskTimer.java b/src/main/java/org/tlesis/squakeplusplus/scheduler/TaskTimer.java similarity index 93% rename from src/main/java/org/tlesis/squakefabric/scheduler/TaskTimer.java rename to src/main/java/org/tlesis/squakeplusplus/scheduler/TaskTimer.java index 596592d..e527362 100644 --- a/src/main/java/org/tlesis/squakefabric/scheduler/TaskTimer.java +++ b/src/main/java/org/tlesis/squakeplusplus/scheduler/TaskTimer.java @@ -1,4 +1,4 @@ -package org.tlesis.squakefabric.scheduler; +package org.tlesis.squakeplusplus.scheduler; public class TaskTimer { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 0996edc..8a11fe1 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -14,10 +14,10 @@ "environment": "*", "entrypoints": { "client": [ - "org.tlesis.squakefabric.client.SquakeFabricClient" + "org.tlesis.squakeplusplus.client.SquakePlusPlusClient" ], "main": [ - "org.tlesis.squakefabric.SquakeFabric" + "org.tlesis.squakeplusplus.SquakePlusPlus" ] }, "mixins": [ diff --git a/src/main/resources/mixins.squake-fabric.json b/src/main/resources/mixins.squake-fabric.json index f7d277c..6f08987 100644 --- a/src/main/resources/mixins.squake-fabric.json +++ b/src/main/resources/mixins.squake-fabric.json @@ -1,7 +1,7 @@ { "required": true, "minVersion": "0.8", - "package": "org.tlesis.squakefabric.mixin", + "package": "org.tlesis.squakeplusplus.mixin", "compatibilityLevel": "JAVA_17", "mixins": [ ], From c83af96aaa5e177289bd75c9d331d8e2391cc8ca Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Sun, 27 Feb 2022 11:32:27 -0600 Subject: [PATCH 03/20] Name change --- gradle.properties | 2 +- .../resources/assets/squake-fabric/lang/de.json | 5 ----- .../resources/assets/squake-fabric/lang/fr.json | 5 ----- .../resources/assets/squake-fabric/lang/ru_ru.json | 5 ----- .../{squake-fabric => squakeplusplus}/icon.png | Bin .../lang/en_us.json | 0 src/main/resources/fabric.mod.json | 10 +++++----- ...quake-fabric.json => mixins.squakeplusplus.json} | 0 8 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 src/main/resources/assets/squake-fabric/lang/de.json delete mode 100644 src/main/resources/assets/squake-fabric/lang/fr.json delete mode 100644 src/main/resources/assets/squake-fabric/lang/ru_ru.json rename src/main/resources/assets/{squake-fabric => squakeplusplus}/icon.png (100%) mode change 100755 => 100644 rename src/main/resources/assets/{squake-fabric => squakeplusplus}/lang/en_us.json (100%) rename src/main/resources/{mixins.squake-fabric.json => mixins.squakeplusplus.json} (100%) diff --git a/gradle.properties b/gradle.properties index 24b63d3..c39fa9f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ loader_version=0.13.3 # Mod Properties mod_version= 2.1.1 maven_group=tlesis -archives_base_name=squake-fabric +archives_base_name=squakeplusplus # Dependencies # Required malilib version diff --git a/src/main/resources/assets/squake-fabric/lang/de.json b/src/main/resources/assets/squake-fabric/lang/de.json deleted file mode 100644 index ddea917..0000000 --- a/src/main/resources/assets/squake-fabric/lang/de.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "squake.hotkeys.category.generic_hotkeys": "Allgemeine Hotkeys", - "squake.gui.title.configs": "Squake-Konfigurationen", - "squake.gui.button.config_gui.generic": "Generisch" -} \ No newline at end of file diff --git a/src/main/resources/assets/squake-fabric/lang/fr.json b/src/main/resources/assets/squake-fabric/lang/fr.json deleted file mode 100644 index 9b110d5..0000000 --- a/src/main/resources/assets/squake-fabric/lang/fr.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "squake.hotkeys.category.generic_hotkeys": "Raccourcis clavier génériques", - "squake.gui.title.configs": "Configurations de SQuake", - "squake.gui.button.config_gui.generic": "Générique" -} \ No newline at end of file diff --git a/src/main/resources/assets/squake-fabric/lang/ru_ru.json b/src/main/resources/assets/squake-fabric/lang/ru_ru.json deleted file mode 100644 index aa0588b..0000000 --- a/src/main/resources/assets/squake-fabric/lang/ru_ru.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "squake.hotkeys.category.generic_hotkeys": "Общие горячие клавиши", - "squake.gui.title.configs": "Squake конфигурации", - "squake.gui.button.config_gui.generic": "Общий" -} \ No newline at end of file diff --git a/src/main/resources/assets/squake-fabric/icon.png b/src/main/resources/assets/squakeplusplus/icon.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/squake-fabric/icon.png rename to src/main/resources/assets/squakeplusplus/icon.png diff --git a/src/main/resources/assets/squake-fabric/lang/en_us.json b/src/main/resources/assets/squakeplusplus/lang/en_us.json similarity index 100% rename from src/main/resources/assets/squake-fabric/lang/en_us.json rename to src/main/resources/assets/squakeplusplus/lang/en_us.json diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 8a11fe1..05b46bc 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,16 +1,16 @@ { "schemaVersion": 1, - "id": "squake-fabric", + "id": "squakeplusplus", "version": "${version}", - "name": "Squake Fabric", - "description": "Squake mod fabric port", + "name": "Squake++", + "description": "Squake++ is an improved version of Squake for Fabric", "authors": [ "He11crow", "Tlesis", "LeviOP"], "contact": {}, "license": "unlicense", - "icon": "assets/squake-fabric/icon.png", + "icon": "assets/squakeplusplus/icon.png", "environment": "*", "entrypoints": { "client": [ @@ -21,7 +21,7 @@ ] }, "mixins": [ - "mixins.squake-fabric.json" + "mixins.squakeplusplus.json" ], "depends": { "fabricloader": ">=0.12.12", diff --git a/src/main/resources/mixins.squake-fabric.json b/src/main/resources/mixins.squakeplusplus.json similarity index 100% rename from src/main/resources/mixins.squake-fabric.json rename to src/main/resources/mixins.squakeplusplus.json From 88269cc94a891296ac92ebe9942e2e178fdb488c Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Sun, 27 Feb 2022 11:34:02 -0600 Subject: [PATCH 04/20] Removed .vscode/ --- .vscode/launch.json | 27 ------- .vscode/settings.json | 3 - gradlew | 0 gradlew.bat | 178 +++++++++++++++++++++--------------------- 4 files changed, 89 insertions(+), 119 deletions(-) delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json mode change 100755 => 100644 gradlew diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 55c0f21..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "type": "java", - "name": "Minecraft Client", - "request": "launch", - "cwd": "${workspaceFolder}/run", - "console": "internalConsole", - "stopOnEntry": false, - "mainClass": "net.fabricmc.devlaunchinjector.Main", - "vmArgs": "-Dfabric.dli.config\u003dD:\\Coding\\Java\\Squake-Movement-Develop\\.gradle\\loom-cache\\launch.cfg -Dfabric.dli.env\u003dclient -Dfabric.dli.main\u003dnet.fabricmc.loader.impl.launch.knot.KnotClient", - "args": "" - }, - { - "type": "java", - "name": "Minecraft Server", - "request": "launch", - "cwd": "${workspaceFolder}/run", - "console": "internalConsole", - "stopOnEntry": false, - "mainClass": "net.fabricmc.devlaunchinjector.Main", - "vmArgs": "-Dfabric.dli.config\u003dD:\\Coding\\Java\\Squake-Movement-Develop\\.gradle\\loom-cache\\launch.cfg -Dfabric.dli.env\u003dserver -Dfabric.dli.main\u003dnet.fabricmc.loader.impl.launch.knot.KnotServer", - "args": "nogui" - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e0f15db..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "java.configuration.updateBuildConfiguration": "automatic" -} \ No newline at end of file diff --git a/gradlew b/gradlew old mode 100755 new mode 100644 diff --git a/gradlew.bat b/gradlew.bat index ac1b06f..107acd3 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega From 7e0143cc1483d05d717b3106e480f3ce099a3fd6 Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Sun, 27 Feb 2022 20:01:13 -0600 Subject: [PATCH 05/20] General Fixes & Started work on the Speedometer --- build.gradle | 4 +-- .../tlesis/squakeplusplus/InitHandler.java | 5 ++-- .../client/QuakeClientPlayer.java | 5 +++- .../squakeplusplus/compact/ModMenuImpl.java | 18 +++++++++++ .../tlesis/squakeplusplus/config/Configs.java | 30 +++++++++---------- .../squakeplusplus/config/FeatureToggle.java | 16 +++++----- .../squakeplusplus/event/RenderHandler.java | 11 ++++++- .../tlesis/squakeplusplus/gui/GuiConfigs.java | 8 +++-- .../scheduler/ClientTickHandler.java | 10 +++++++ src/main/resources/fabric.mod.json | 2 +- 10 files changed, 76 insertions(+), 33 deletions(-) create mode 100644 src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java diff --git a/build.gradle b/build.gradle index d79065e..0c1e958 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ group = project.maven_group repositories { maven { url 'https://masa.dy.fi/maven' } - //maven { url 'https://maven.terraformersmc.com/releases/' } + maven { url 'https://maven.terraformersmc.com/releases/' } } dependencies { @@ -25,7 +25,7 @@ dependencies { modImplementation "fi.dy.masa.malilib:malilib-fabric-${project.minecraft_version}:${project.malilib_version}" - //modCompileOnly "com.terraformersmc:modmenu:${project.mod_menu_version}" + modCompileOnly "com.terraformersmc:modmenu:${project.mod_menu_version}" } processResources { diff --git a/src/main/java/org/tlesis/squakeplusplus/InitHandler.java b/src/main/java/org/tlesis/squakeplusplus/InitHandler.java index 0c7b971..d465b8e 100644 --- a/src/main/java/org/tlesis/squakeplusplus/InitHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/InitHandler.java @@ -20,8 +20,8 @@ public class InitHandler implements IInitializationHandler { @Override public void registerModHandlers() { - ConfigManager.getInstance().registerConfigHandler(Reference.MOD_ID, new Configs()); + ConfigManager.getInstance().registerConfigHandler(Reference.MOD_ID, new Configs()); InputEventHandler.getKeybindManager().registerKeybindProvider(InputHandler.getInstance()); InputEventHandler.getInputManager().registerKeyboardInputHandler(InputHandler.getInstance()); @@ -29,7 +29,8 @@ public void registerModHandlers() { RenderEventHandler.getInstance().registerGameOverlayRenderer(renderer); RenderEventHandler.getInstance().registerWorldLastRenderer(renderer); - TickHandler.getInstance().registerClientTickHandler(new ClientTickHandler()); + ClientTickHandler tick = new ClientTickHandler(); + TickHandler.getInstance().registerClientTickHandler(tick); WorldLoadListener listener = new WorldLoadListener(); WorldLoadHandler.getInstance().registerWorldLoadPreHandler(listener); diff --git a/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java b/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java index 60cfd2c..1551d00 100644 --- a/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java @@ -8,6 +8,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.particle.BlockStateParticleEffect; import net.minecraft.particle.ParticleTypes; +import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.MathHelper; @@ -29,13 +30,15 @@ public class QuakeClientPlayer { private static final List baseVelocities = new ArrayList<>(); + //private static final ServerWorld world = new ServerWorld(null, null, null, null, null, null, null, null, false, 0, null, false); + public static boolean moveEntityWithHeading(PlayerEntity player, float sidemove, float forwardmove) { if (!player.world.isClient) { return false; } - if (!FeatureToggle.ENABLED.getBooleanValue()) { + if (!FeatureToggle.ENABLED.getBooleanValue() /*|| world.getGameRules().getBoolean(EnableGamerule.BHOP_ENABLE)*/) { return false; } diff --git a/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java b/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java new file mode 100644 index 0000000..ec3e914 --- /dev/null +++ b/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java @@ -0,0 +1,18 @@ +package org.tlesis.squakeplusplus.compact; + +import com.terraformersmc.modmenu.api.ConfigScreenFactory; +import com.terraformersmc.modmenu.api.ModMenuApi; +import org.tlesis.squakeplusplus.gui.GuiConfigs; + +public class ModMenuImpl implements ModMenuApi +{ + @Override + public ConfigScreenFactory getModConfigScreenFactory() + { + return (screen) -> { + GuiConfigs gui = new GuiConfigs(); + gui.setParent(screen); + return gui; + }; + } +} diff --git a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java index f48e51c..1b6e446 100644 --- a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java @@ -20,26 +20,26 @@ public class Configs implements IConfigHandler { private static final String CONFIG_FILE_NAME = Reference.MOD_ID + ".json"; - public static class Options { - public static final ConfigHotkey OPEN_CONFIG_GUI = new ConfigHotkey("Open GUI", "O,C", "Open the Config GUI"); - public static final ConfigDouble AIR_ACCELERATE = new ConfigDouble("Air Acceleration", 10.0, 0.0, 30.0, "A higher value means you can turn more sharply in the air without losing speed"); - public static final ConfigDouble GROUND_ACCELERATE = new ConfigDouble("Acceleration", 10.0, 0.0, 32767, "A higher value means you accelerate faster on the ground"); - public static final ConfigDouble MAX_AIR_ACCELERATION_PER_TICK = new ConfigDouble("Max Air Acceleration Per Tick", 0.05, 0.0, 0.1, "Limit for how much you can accelerate in a tick"); - public static final ConfigDouble HARD_CAP_THRESHOLD = new ConfigDouble("Hard Cap Threshold", 544.0, 0.0, 32767, "If you jump while above the hard cap speed (moveSpeed*hardCapThreshold), your speed is set to the hard cap speed"); - public static final ConfigDouble SOFT_CAP_DEGEN = new ConfigDouble("Soft Cap Degen", 0.65, 0.0, 32767, "The modifier used to calculate speed lost when jumping above the soft cap"); - public static final ConfigDouble SOFT_CAP_THRESHOLD = new ConfigDouble("Soft Cap Threshold", 544.0, 0.0, 32767, "See uncappedBunnyhopEnabled and softCapDegen; soft cap speed = (moveSpeed*softCapThreshold)"); - public static final ConfigDouble SHARK_SURFACE_TENSION = new ConfigDouble("Sharking Surface Tension", 0.2, 0.0, 32767, "Amount of downward momentum you lose while entering water, a higher value means that you are able to shark after hitting the water from higher up"); - public static final ConfigDouble SHARK_WATER_FRICTION = new ConfigDouble("Sharking Water Friction", 0.1, 0.0, 1.0, "Amount of friction while sharking"); - public static final ConfigDouble TRIMP_MULTIPLIER = new ConfigDouble("Trimp Multiplier", 1.4, 0.0, 32767, "A lower value means less horizontal speed converted to vertical speed"); - public static final ConfigDouble INCREASED_FALL_DISTANCE = new ConfigDouble("Fall Distance Threshold", 0.0, 0.0, 32767, "The distance needed to fall in order to take fall damage (singleplayer only)"); + public static class Options { + public static final ConfigHotkey OPEN_CONFIG_GUI = new ConfigHotkey("Open GUI", "O,C", "Open the Config GUI"); + public static final ConfigDouble SOFT_CAP_THRESHOLD = new ConfigDouble("Soft Cap Threshold", 544.0, 0.0, 32767, "See uncappedBunnyhopEnabled and softCapDegen; soft cap speed = (moveSpeed*softCapThreshold)"); + public static final ConfigDouble HARD_CAP_THRESHOLD = new ConfigDouble("Hard Cap Threshold", 544.0, 0.0, 32767, "If you jump while above the hard cap speed (moveSpeed*hardCapThreshold), your speed is set to the hard cap speed"); + public static final ConfigDouble GROUND_ACCELERATE = new ConfigDouble("Acceleration", 10.0, 0.0, 32767, "A higher value means you accelerate faster on the ground"); + public static final ConfigDouble AIR_ACCELERATE = new ConfigDouble("Air Acceleration", 10.0, 0.0, 30.0, true, "A higher value means you can turn more sharply in the air without losing speed"); + public static final ConfigDouble MAX_AIR_ACCELERATION_PER_TICK = new ConfigDouble("Max Air Acceleration Per Tick", 0.05, 0.0, 0.1, true, "Limit for how much you can accelerate in a tick"); + public static final ConfigDouble SOFT_CAP_DEGEN = new ConfigDouble("Soft Cap Degen", 0.65, 0.0, 1.0, true, "The modifier used to calculate speed lost when jumping above the soft cap"); + public static final ConfigDouble SHARK_SURFACE_TENSION = new ConfigDouble("Sharking Surface Tension", 0.2, 0.0, 1.0, true, "Amount of downward momentum you lose while entering water, a higher value means that you are able to shark after hitting the water from higher up"); + public static final ConfigDouble SHARK_WATER_FRICTION = new ConfigDouble("Sharking Water Friction", 0.1, 0.0, 1.0, true, "Amount of friction while sharking"); + public static final ConfigDouble TRIMP_MULTIPLIER = new ConfigDouble("Trimp Multiplier", 1.4, 0.0, 2.0, true, "A lower value means less horizontal speed converted to vertical speed"); + public static final ConfigDouble INCREASED_FALL_DISTANCE = new ConfigDouble("Fall Distance Threshold", 0.0, 0.0, 10.0, true, "The distance needed to fall in order to take fall damage (singleplayer only)"); public static final ImmutableList OPTIONS = ImmutableList.of( OPEN_CONFIG_GUI, - AIR_ACCELERATE, + SOFT_CAP_THRESHOLD, + HARD_CAP_THRESHOLD, GROUND_ACCELERATE, + AIR_ACCELERATE, MAX_AIR_ACCELERATION_PER_TICK, - HARD_CAP_THRESHOLD, - SOFT_CAP_THRESHOLD, SOFT_CAP_DEGEN, SHARK_SURFACE_TENSION, diff --git a/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java b/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java index f494b19..a1baa94 100644 --- a/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java @@ -20,14 +20,14 @@ public enum FeatureToggle implements IHotkeyTogglable, IConfigNotifiable { - ENABLED ("Squake", true, "", "Enables/disables all changes to movement"), - BHOP ("Bhopping", true, "", "Enables bunnyhopping and airstrafing"), - UNCAPPED_BHOP ("Uncapped Bhopping", true, "", "If enabled, the soft and hard speed caps will not be applied at all"), - SHARK ("Sharking", false, "", "Enables sharking"), - TRIMP ("Trimping", false, "", "Enables trimping"), - HL2_OLD_ENGINE_BHOP ("HL2 Old Engine Bhop", false, "", "Makes Bhopping behave like Half-Life 2 Old Engine bhopping"), - JUMP_SPAM ("Jump Spam", true, "", "Spams jump rather than having the cooldown"), - SPEEDOMETER ("Speedometer", false, "", "Its just a Speedometer"); + ENABLED ("Squake", true, "", "Enables/disables all changes to movement", "Squake"), + BHOP ("Bhopping", true, "", "Enables bunnyhopping and airstrafing", "Bhopping"), + UNCAPPED_BHOP ("Uncapped Bhopping", true, "", "If enabled, the soft and hard speed caps will not be applied at all", "Uncapped Bhopping"), + SHARK ("Sharking", false, "", "Enables sharking", "Sharking"), + TRIMP ("Trimping", false, "", "Enables trimping", "Trimping"), + HL2_OLD_ENGINE_BHOP ("HL2 Old Engine Bhop", false, "", "Makes Bhopping behave like Half-Life 2 Old Engine bhopping", "HL2 Old Engine Bhop"), + JUMP_SPAM ("Jump Spam", true, "", "Spams jump rather than having the cooldown", "Jump Spam"), + SPEEDOMETER ("Speedometer", false, "", "Its just a Speedometer", "Speedometer"); public static final ImmutableList VALUES = ImmutableList.copyOf(values()); diff --git a/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java b/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java index 1851bee..1603565 100644 --- a/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java @@ -1,5 +1,14 @@ package org.tlesis.squakeplusplus.event; +import org.tlesis.squakeplusplus.config.FeatureToggle; + import fi.dy.masa.malilib.interfaces.IRenderer; -public class RenderHandler implements IRenderer {} \ No newline at end of file +public class RenderHandler implements IRenderer { + + void foo() { + if (FeatureToggle.SPEEDOMETER.getBooleanValue()) { + + } + } +} \ No newline at end of file diff --git a/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java b/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java index c733d9d..d0aa2cc 100644 --- a/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java +++ b/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java @@ -51,15 +51,15 @@ protected int getConfigWidth() { if (tab == ConfigGuiTab.OPTIONS) { return 140; + } else if (tab == ConfigGuiTab.FEATURE_TOGGLE) { + return 260; } - return 260; } @Override protected boolean useKeybindSearch() { - return DataManager.getConfigGuiTab() == ConfigGuiTab.FEATURE_TOGGLE || - DataManager.getConfigGuiTab() == ConfigGuiTab.OPTIONS; + return DataManager.getConfigGuiTab() == ConfigGuiTab.FEATURE_TOGGLE; } @Override @@ -104,6 +104,8 @@ public ButtonListener(ConfigGuiTab tab, GuiConfigs parent) { public void actionPerformedWithButton(ButtonBase button, int mouseButton) { DataManager.setConfigGuiTab(this.tab); + this.parent.reCreateListWidget(); // apply the new config width + this.parent.getListWidget().resetScrollbarPosition(); this.parent.initGui(); } } diff --git a/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java b/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java index 481b2dc..965d5fb 100644 --- a/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java @@ -2,6 +2,7 @@ import fi.dy.masa.malilib.interfaces.IClientTickHandler; import net.minecraft.client.MinecraftClient; +import net.minecraft.entity.Entity; public class ClientTickHandler implements IClientTickHandler { public static boolean isJumping = false; @@ -14,7 +15,16 @@ public void onClientTick(MinecraftClient mc) { } if (mc.player != null) { + + Entity entity = mc.getCameraEntity(); + isJumping = mc.player.input.jumping; + + double dx = entity.getX() - entity.lastRenderX; + double dy = entity.getY() - entity.lastRenderY; + double dz = entity.getZ() - entity.lastRenderZ; + double dist = Math.sqrt(dx * dx + dy * dy + dz * dz); } + } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 05b46bc..f870deb 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "squakeplusplus", - "version": "${version}", + "version": "${mod_version}", "name": "Squake++", "description": "Squake++ is an improved version of Squake for Fabric", "authors": [ From a991f05fcd679838bcdae1171b1aa679340ed497 Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Sun, 27 Feb 2022 23:56:34 -0600 Subject: [PATCH 06/20] Adding speed-o-meter --- .../org/tlesis/squakeplusplus/ModConfig.java | 12 --- .../tlesis/squakeplusplus/SquakePlusPlus.java | 1 + .../client/QuakeClientPlayer.java | 1 - .../squakeplusplus/compact/ModMenuImpl.java | 6 +- .../tlesis/squakeplusplus/config/Configs.java | 53 +++++++--- .../squakeplusplus/config/FeatureToggle.java | 2 +- .../squakeplusplus/event/RenderHandler.java | 98 ++++++++++++++++++- .../tlesis/squakeplusplus/gui/GuiConfigs.java | 14 ++- .../mixin/MixinSpeedometer.java | 21 ++++ .../scheduler/ClientTickHandler.java | 12 +-- .../squakeplusplus/util/ScreenPositions.java | 67 +++++++++++++ .../assets/squakeplusplus/lang/en_us.json | 8 +- 12 files changed, 247 insertions(+), 48 deletions(-) delete mode 100644 src/main/java/org/tlesis/squakeplusplus/ModConfig.java create mode 100644 src/main/java/org/tlesis/squakeplusplus/mixin/MixinSpeedometer.java create mode 100644 src/main/java/org/tlesis/squakeplusplus/util/ScreenPositions.java diff --git a/src/main/java/org/tlesis/squakeplusplus/ModConfig.java b/src/main/java/org/tlesis/squakeplusplus/ModConfig.java deleted file mode 100644 index 3c99675..0000000 --- a/src/main/java/org/tlesis/squakeplusplus/ModConfig.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.tlesis.squakeplusplus; - -import org.tlesis.squakeplusplus.config.Configs; -import org.tlesis.squakeplusplus.config.FeatureToggle; - -public class ModConfig { - - public static boolean BHOP_ENABLED = FeatureToggle.BHOP.getBooleanValue(); - - public static double INCREASED_FALL_DISTANCE = Configs.Options.INCREASED_FALL_DISTANCE.getDoubleValue(); - -} \ No newline at end of file diff --git a/src/main/java/org/tlesis/squakeplusplus/SquakePlusPlus.java b/src/main/java/org/tlesis/squakeplusplus/SquakePlusPlus.java index 83bc976..badb007 100644 --- a/src/main/java/org/tlesis/squakeplusplus/SquakePlusPlus.java +++ b/src/main/java/org/tlesis/squakeplusplus/SquakePlusPlus.java @@ -11,6 +11,7 @@ public class SquakePlusPlus implements ModInitializer { @Override public void onInitialize() { + System.out.println("[Squake++]: Mod Initialize"); InitializationHandler.getInstance().registerInitializationHandler(new InitHandler()); } } diff --git a/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java b/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java index 1551d00..baa44a1 100644 --- a/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/QuakeClientPlayer.java @@ -8,7 +8,6 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.particle.BlockStateParticleEffect; import net.minecraft.particle.ParticleTypes; -import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.MathHelper; diff --git a/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java b/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java index ec3e914..a1a348d 100644 --- a/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java +++ b/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java @@ -4,11 +4,9 @@ import com.terraformersmc.modmenu.api.ModMenuApi; import org.tlesis.squakeplusplus.gui.GuiConfigs; -public class ModMenuImpl implements ModMenuApi -{ +public class ModMenuImpl implements ModMenuApi { @Override - public ConfigScreenFactory getModConfigScreenFactory() - { + public ConfigScreenFactory getModConfigScreenFactory() { return (screen) -> { GuiConfigs gui = new GuiConfigs(); gui.setParent(screen); diff --git a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java index 1b6e446..3f66078 100644 --- a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java @@ -10,28 +10,33 @@ import fi.dy.masa.malilib.config.ConfigUtils; import fi.dy.masa.malilib.config.IConfigBase; import fi.dy.masa.malilib.config.IConfigHandler; +import fi.dy.masa.malilib.config.options.ConfigBoolean; +import fi.dy.masa.malilib.config.options.ConfigColor; import fi.dy.masa.malilib.config.options.ConfigDouble; import fi.dy.masa.malilib.config.options.ConfigHotkey; +import fi.dy.masa.malilib.config.options.ConfigOptionList; import fi.dy.masa.malilib.util.FileUtils; import fi.dy.masa.malilib.util.JsonUtils; + import org.tlesis.squakeplusplus.Reference; +import org.tlesis.squakeplusplus.util.ScreenPositions; public class Configs implements IConfigHandler { private static final String CONFIG_FILE_NAME = Reference.MOD_ID + ".json"; public static class Options { - public static final ConfigHotkey OPEN_CONFIG_GUI = new ConfigHotkey("Open GUI", "O,C", "Open the Config GUI"); - public static final ConfigDouble SOFT_CAP_THRESHOLD = new ConfigDouble("Soft Cap Threshold", 544.0, 0.0, 32767, "See uncappedBunnyhopEnabled and softCapDegen; soft cap speed = (moveSpeed*softCapThreshold)"); - public static final ConfigDouble HARD_CAP_THRESHOLD = new ConfigDouble("Hard Cap Threshold", 544.0, 0.0, 32767, "If you jump while above the hard cap speed (moveSpeed*hardCapThreshold), your speed is set to the hard cap speed"); - public static final ConfigDouble GROUND_ACCELERATE = new ConfigDouble("Acceleration", 10.0, 0.0, 32767, "A higher value means you accelerate faster on the ground"); - public static final ConfigDouble AIR_ACCELERATE = new ConfigDouble("Air Acceleration", 10.0, 0.0, 30.0, true, "A higher value means you can turn more sharply in the air without losing speed"); - public static final ConfigDouble MAX_AIR_ACCELERATION_PER_TICK = new ConfigDouble("Max Air Acceleration Per Tick", 0.05, 0.0, 0.1, true, "Limit for how much you can accelerate in a tick"); - public static final ConfigDouble SOFT_CAP_DEGEN = new ConfigDouble("Soft Cap Degen", 0.65, 0.0, 1.0, true, "The modifier used to calculate speed lost when jumping above the soft cap"); - public static final ConfigDouble SHARK_SURFACE_TENSION = new ConfigDouble("Sharking Surface Tension", 0.2, 0.0, 1.0, true, "Amount of downward momentum you lose while entering water, a higher value means that you are able to shark after hitting the water from higher up"); - public static final ConfigDouble SHARK_WATER_FRICTION = new ConfigDouble("Sharking Water Friction", 0.1, 0.0, 1.0, true, "Amount of friction while sharking"); - public static final ConfigDouble TRIMP_MULTIPLIER = new ConfigDouble("Trimp Multiplier", 1.4, 0.0, 2.0, true, "A lower value means less horizontal speed converted to vertical speed"); - public static final ConfigDouble INCREASED_FALL_DISTANCE = new ConfigDouble("Fall Distance Threshold", 0.0, 0.0, 10.0, true, "The distance needed to fall in order to take fall damage (singleplayer only)"); + public static final ConfigHotkey OPEN_CONFIG_GUI = new ConfigHotkey("Open GUI", "O,C", "Open the Config GUI"); + public static final ConfigDouble SOFT_CAP_THRESHOLD = new ConfigDouble("Soft Cap Threshold", 544.0, 0.0, 32767, false, "See uncappedBunnyhopEnabled and softCapDegen; soft cap speed = (moveSpeed*softCapThreshold)"); + public static final ConfigDouble HARD_CAP_THRESHOLD = new ConfigDouble("Hard Cap Threshold", 544.0, 0.0, 32767, false, "If you jump while above the hard cap speed (moveSpeed*hardCapThreshold), your speed is set to the hard cap speed"); + public static final ConfigDouble GROUND_ACCELERATE = new ConfigDouble("Acceleration", 10.0, 0.0, 32767, false, "A higher value means you accelerate faster on the ground"); + public static final ConfigDouble AIR_ACCELERATE = new ConfigDouble("Air Acceleration", 10.0, 0.0, 30.0, true, "A higher value means you can turn more sharply in the air without losing speed"); + public static final ConfigDouble MAX_AIR_ACCELERATION_PER_TICK = new ConfigDouble("Max Air Acceleration Per Tick", 0.05, 0.0, 0.1, true, "Limit for how much you can accelerate in a tick"); + public static final ConfigDouble SOFT_CAP_DEGEN = new ConfigDouble("Soft Cap Degen", 0.65, 0.0, 1.0, true, "The modifier used to calculate speed lost when jumping above the soft cap"); + public static final ConfigDouble SHARK_SURFACE_TENSION = new ConfigDouble("Sharking Surface Tension", 0.2, 0.0, 1.0, true, "Amount of downward momentum you lose while entering water, a higher value means that you are able to shark after hitting the water from higher up"); + public static final ConfigDouble SHARK_WATER_FRICTION = new ConfigDouble("Sharking Water Friction", 0.1, 0.0, 1.0, true, "Amount of friction while sharking"); + public static final ConfigDouble TRIMP_MULTIPLIER = new ConfigDouble("Trimp Multiplier", 1.4, 0.0, 2.0, true, "A lower value means less horizontal speed converted to vertical speed"); + public static final ConfigDouble INCREASED_FALL_DISTANCE = new ConfigDouble("Fall Distance Threshold", 0.0, 0.0, 10.0, true, "The distance needed to fall in order to take fall damage (singleplayer only)"); public static final ImmutableList OPTIONS = ImmutableList.of( OPEN_CONFIG_GUI, @@ -45,9 +50,9 @@ public static class Options { SHARK_SURFACE_TENSION, SHARK_WATER_FRICTION, - TRIMP_MULTIPLIER, + TRIMP_MULTIPLIER/*, - INCREASED_FALL_DISTANCE + INCREASED_FALL_DISTANCE*/ ); public static final List HOTKEY_LIST = ImmutableList.of( @@ -55,6 +60,26 @@ public static class Options { ); } + public static class Speedometer { + public static final ConfigDouble TICK_INTERVAL = new ConfigDouble ("Speedometer Update", 20.0, 0.0, 20.0, true, "How often the Speedometer should update in game ticks"); + public static final ConfigBoolean USE_COLORS = new ConfigBoolean ("Use Speedometer Colors", true, "Use the colors set below for the speedometer"); + public static final ConfigColor DEFAULT_COLOR = new ConfigColor ("Default Color", "#FFFFFFFF", "Default text color of the speedometer"); + public static final ConfigColor ACCELERATING_COLOR = new ConfigColor ("Accelerating Color", "#00FF00FF", "Color for when you are accelerating"); + public static final ConfigColor DECELERATING_COLOR = new ConfigColor ("Decelerating Color", "#FF0000FF", "Color for when you are decelerating"); + public static final ConfigOptionList POSITIONS = new ConfigOptionList ("Screen Position", ScreenPositions.TOP_LEFT, "Where the speedometer should be displayed"); + + public static final ImmutableList OPTIONS = ImmutableList.of( + TICK_INTERVAL, + USE_COLORS, + + DEFAULT_COLOR, + ACCELERATING_COLOR, + DECELERATING_COLOR, + + POSITIONS + ); + } + public static void loadFromFile() { File configFile = new File(FileUtils.getConfigDirectory(), CONFIG_FILE_NAME); @@ -66,6 +91,7 @@ public static void loadFromFile() { ConfigUtils.readConfigBase(root, "Options", Options.OPTIONS); ConfigUtils.readConfigBase(root, "Hotkeys", Options.HOTKEY_LIST); + ConfigUtils.readConfigBase(root, "Speedometer", Speedometer.OPTIONS); ConfigUtils.readHotkeyToggleOptions(root, "GenericHotkeys", "GenericToggles", FeatureToggle.VALUES); } } @@ -79,6 +105,7 @@ public static void saveToFile() { ConfigUtils.writeConfigBase(root, "Options", Options.OPTIONS); ConfigUtils.writeConfigBase(root, "Hotkeys", Options.HOTKEY_LIST); + ConfigUtils.writeConfigBase(root, "Speedometer", Speedometer.OPTIONS); ConfigUtils.writeHotkeyToggleOptions(root, "GenericHotkeys", "GenericToggles", FeatureToggle.VALUES); JsonUtils.writeJsonToFile(root, new File(dir, CONFIG_FILE_NAME)); diff --git a/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java b/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java index a1baa94..4df7ef1 100644 --- a/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/FeatureToggle.java @@ -21,7 +21,7 @@ public enum FeatureToggle implements IHotkeyTogglable, IConfigNotifiable { ENABLED ("Squake", true, "", "Enables/disables all changes to movement", "Squake"), - BHOP ("Bhopping", true, "", "Enables bunnyhopping and airstrafing", "Bhopping"), + //BHOP ("Bhopping", true, "", "Enables bunnyhopping and airstrafing", "Bhopping"), UNCAPPED_BHOP ("Uncapped Bhopping", true, "", "If enabled, the soft and hard speed caps will not be applied at all", "Uncapped Bhopping"), SHARK ("Sharking", false, "", "Enables sharking", "Sharking"), TRIMP ("Trimping", false, "", "Enables trimping", "Trimping"), diff --git a/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java b/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java index 1603565..eb24ef6 100644 --- a/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java @@ -1,14 +1,106 @@ package org.tlesis.squakeplusplus.event; -import org.tlesis.squakeplusplus.config.FeatureToggle; +import org.tlesis.squakeplusplus.config.Configs.Speedometer; +import org.tlesis.squakeplusplus.util.ScreenPositions; import fi.dy.masa.malilib.interfaces.IRenderer; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.entity.Entity; +@Environment(EnvType.CLIENT) public class RenderHandler implements IRenderer { - void foo() { - if (FeatureToggle.SPEEDOMETER.getBooleanValue()) { + public static RenderHandler renderHandler = new RenderHandler(); + private MinecraftClient mc; + private TextRenderer textRenderer; + + private int color; + private double lastFrameSpeed = 0.0; + private float tickCounter = 0.0f; + + public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { + + System.out.println("IDK] Called"); + + this.mc = MinecraftClient.getInstance(); + this.textRenderer = mc.textRenderer; + Entity entity = mc.getCameraEntity(); + + double dx = entity.getX() - entity.lastRenderX; + double dy = entity.getY() - entity.lastRenderY; + double dz = entity.getZ() - entity.lastRenderZ; + double currentSpeed = Math.sqrt(dx * dx + dy * dy + dz * dz); + + if (Speedometer.USE_COLORS.getBooleanValue()) { + tickCounter += tickDelta; + if (tickCounter >= (float)Speedometer.TICK_INTERVAL.getDoubleValue()) { + if (currentSpeed < lastFrameSpeed) { + color = Speedometer.DECELERATING_COLOR.getColor().intValue; + } else if (currentSpeed > lastFrameSpeed) { + color = Speedometer.ACCELERATING_COLOR.getColor().intValue; + } else { + color = Speedometer.DEFAULT_COLOR.getColor().intValue; + } + } + + this.lastFrameSpeed = currentSpeed; + this.tickCounter = 0.0f; + } + + String currentSpeedText = String.format("%.2f blocks/sec", currentSpeed / 0.05F); + + // Calculate text position + int horizWidth = this.textRenderer.getWidth(currentSpeedText); + int height = this.textRenderer.fontHeight; + int paddingX = 2; + int paddingY = 2; + int marginX = 4; + int marginY = 4; + int left = 0 + marginX; + int top = 0 + marginY; + int realHorizWidth = horizWidth + paddingX * 2 - 1; + int realHeight = height + paddingY * 2 - 1; + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_LEFT) { + top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; + + left += paddingX; + top += paddingY; + } + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_RIGHT) { + top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; + left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; + + left += paddingX; + top += paddingY; + } + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_LEFT) { + left += paddingX; + top += paddingY; + } + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_RIGHT) { + left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; + + left += paddingX; + top += paddingY; } + + // Render the text + this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); + + return; } + + public void updateData(MinecraftClient mc) { + if (mc.world != null) {} + } + } \ No newline at end of file diff --git a/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java b/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java index d0aa2cc..04951ee 100644 --- a/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java +++ b/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java @@ -35,6 +35,7 @@ public void initGui() { x += this.createButton(x, y, -1, ConfigGuiTab.FEATURE_TOGGLE); x += this.createButton(x, y, -1, ConfigGuiTab.OPTIONS); + x += this.createButton(x, y, -1, ConfigGuiTab.SPEEDOMETER_OPTIONS); } private int createButton(int x, int y, int width, ConfigGuiTab tab) { @@ -49,8 +50,10 @@ private int createButton(int x, int y, int width, ConfigGuiTab tab) { protected int getConfigWidth() { ConfigGuiTab tab = DataManager.getConfigGuiTab(); - if (tab == ConfigGuiTab.OPTIONS) { + if (tab == ConfigGuiTab.OPTIONS || + tab == ConfigGuiTab.SPEEDOMETER_OPTIONS) { return 140; + } else if (tab == ConfigGuiTab.FEATURE_TOGGLE) { return 260; } @@ -70,9 +73,11 @@ public List getConfigs() { if (tab == ConfigGuiTab.OPTIONS) { configs = Configs.Options.OPTIONS; - } else if(tab == ConfigGuiTab.FEATURE_TOGGLE) { + } else if (tab == ConfigGuiTab.FEATURE_TOGGLE) { return ConfigOptionWrapper.createFor(TOGGLE_LIST.stream().map(this::wrapConfig).toList()); + } else if (tab == ConfigGuiTab.SPEEDOMETER_OPTIONS) { + configs = Configs.Speedometer.OPTIONS; } else { return Collections.emptyList(); } @@ -111,8 +116,9 @@ public void actionPerformedWithButton(ButtonBase button, int mouseButton) { } public enum ConfigGuiTab { - OPTIONS ("squake.gui.button.config_gui.options"), - FEATURE_TOGGLE ("squake.gui.button.config_gui.feature_toggle"); + OPTIONS ("squake.gui.button.config_gui.options"), + FEATURE_TOGGLE ("squake.gui.button.config_gui.feature_toggle"), + SPEEDOMETER_OPTIONS ("squake.gui.button.config_gui.speedometer_options"); private final String translationKey; diff --git a/src/main/java/org/tlesis/squakeplusplus/mixin/MixinSpeedometer.java b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinSpeedometer.java new file mode 100644 index 0000000..6de9d02 --- /dev/null +++ b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinSpeedometer.java @@ -0,0 +1,21 @@ +package org.tlesis.squakeplusplus.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.tlesis.squakeplusplus.config.FeatureToggle; +import org.tlesis.squakeplusplus.event.RenderHandler; + +import net.minecraft.client.gui.hud.InGameHud; +import net.minecraft.client.util.math.MatrixStack; + +@Mixin(InGameHud.class) +public class MixinSpeedometer { + @Inject(at = @At("TAIL"), method = "render(Lnet/minecraft/client/util/math/MatrixStack;F)V") + private void renderSpeedometer(MatrixStack matrices, float tickDelta, CallbackInfo info) { + if (FeatureToggle.SPEEDOMETER.getBooleanValue()) { + RenderHandler.renderHandler.speedometerDraw(matrices, tickDelta); + } + } +} \ No newline at end of file diff --git a/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java b/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java index 965d5fb..7f7610a 100644 --- a/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java @@ -1,8 +1,9 @@ package org.tlesis.squakeplusplus.scheduler; +import org.tlesis.squakeplusplus.event.RenderHandler; + import fi.dy.masa.malilib.interfaces.IClientTickHandler; import net.minecraft.client.MinecraftClient; -import net.minecraft.entity.Entity; public class ClientTickHandler implements IClientTickHandler { public static boolean isJumping = false; @@ -12,18 +13,11 @@ public void onClientTick(MinecraftClient mc) { if (mc.world != null && mc.player != null) { TaskScheduler.getInstanceClient().runTasks(); + RenderHandler.renderHandler.updateData(mc); } if (mc.player != null) { - - Entity entity = mc.getCameraEntity(); - isJumping = mc.player.input.jumping; - - double dx = entity.getX() - entity.lastRenderX; - double dy = entity.getY() - entity.lastRenderY; - double dz = entity.getZ() - entity.lastRenderZ; - double dist = Math.sqrt(dx * dx + dy * dy + dz * dz); } } diff --git a/src/main/java/org/tlesis/squakeplusplus/util/ScreenPositions.java b/src/main/java/org/tlesis/squakeplusplus/util/ScreenPositions.java new file mode 100644 index 0000000..09eb635 --- /dev/null +++ b/src/main/java/org/tlesis/squakeplusplus/util/ScreenPositions.java @@ -0,0 +1,67 @@ +package org.tlesis.squakeplusplus.util; + +import fi.dy.masa.malilib.config.IConfigOptionListEntry; +import fi.dy.masa.malilib.util.StringUtils; + +public enum ScreenPositions implements IConfigOptionListEntry { + + TOP_RIGHT ("Top Right", "squake.label.screenpositions.topright"), + TOP_LEFT ("Top Left", "squake.label.screenpositions.topleft"), + BOTTOM_RIGHT("Bottom Right", "squake.label.screenpositions.bottomright"), + BOTTOM_LEFT ("Bottom Left", "squake.label.screenpositions.bottomleft"), + CENTER ("Center", "squake.label.screenpositions.center"); + + private final String configString; + private final String unlocName; + + private ScreenPositions(String configString, String unlocName) { + this.configString = configString; + this.unlocName = unlocName; + } + + @Override + public String getStringValue() { + return this.configString; + } + + @Override + public String getDisplayName() { + return StringUtils.translate(this.unlocName); + } + + @Override + public IConfigOptionListEntry cycle(boolean forward) { + int id = this.ordinal(); + + if (forward) { + if (++id >= values().length) { + id = 0; + } + } else { + if (--id < 0) { + id = values().length - 1; + } + } + + return values()[id % values().length]; + } + + @Override + public ScreenPositions fromString(String name) + { + return fromStringStatic(name); + } + + public static ScreenPositions fromStringStatic(String name) + { + for (ScreenPositions aligment : ScreenPositions.values()) + { + if (aligment.configString.equalsIgnoreCase(name)) + { + return aligment; + } + } + + return ScreenPositions.TOP_LEFT; + } +} diff --git a/src/main/resources/assets/squakeplusplus/lang/en_us.json b/src/main/resources/assets/squakeplusplus/lang/en_us.json index 662dd9a..d597184 100644 --- a/src/main/resources/assets/squakeplusplus/lang/en_us.json +++ b/src/main/resources/assets/squakeplusplus/lang/en_us.json @@ -3,5 +3,11 @@ "squake.gui.title.configs": "Configs", "squake.gui.button.config_gui.options": "Options", "squake.hotkeys.category.feature_toggle_hotkeys": "Toggle Hotkeys", - "squake.gui.button.config_gui.feature_toggle": "Feature Toggle" + "squake.gui.button.config_gui.feature_toggle": "Feature Toggle", + "squake.gui.button.config_gui.speedometer_options": "Speedometer", + "squake.label.screenpositions.topright": "Top Right", + "squake.label.screenpositions.topleft": "Top Left", + "squake.label.screenpositions.bottomright": "Bottom Right", + "squake.label.screenpositions.bottomleft": "Bottom Left", + "squake.label.screenpositions.center": "Center" } \ No newline at end of file From a77c496e17abb3a65d6ccb1cf53d541ad201c02b Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Mon, 28 Feb 2022 17:36:27 -0600 Subject: [PATCH 07/20] Speedometer working (center offset needs work) --- .../squakeplusplus/client/SpeedometerHud.java | 107 ++++++++++++++++++ .../tlesis/squakeplusplus/config/Configs.java | 11 +- .../squakeplusplus/event/RenderHandler.java | 100 +--------------- .../mixin/MixinSpeedometer.java | 6 +- .../scheduler/ClientTickHandler.java | 2 - src/main/resources/mixins.squakeplusplus.json | 3 +- 6 files changed, 119 insertions(+), 110 deletions(-) create mode 100644 src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java diff --git a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java new file mode 100644 index 0000000..ced643e --- /dev/null +++ b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java @@ -0,0 +1,107 @@ +package org.tlesis.squakeplusplus.client; + +import org.tlesis.squakeplusplus.config.Configs.Speedometer; +import org.tlesis.squakeplusplus.util.ScreenPositions; + +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.util.math.Vec3d; + +public class SpeedometerHud { + + public static SpeedometerHud speedometerHud = new SpeedometerHud(); + + private MinecraftClient mc; + private TextRenderer textRenderer; + + private int color = Speedometer.DEFAULT_COLOR.getColor().intValue; + private double lastFrameSpeed = 0.0; + private float tickCounter = 0.0f; + + public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { + + this.mc = MinecraftClient.getInstance(); + this.textRenderer = mc.textRenderer; + + + Vec3d playerPosVec = mc.player.getPos(); + double travelledX = playerPosVec.x - mc.player.prevX; + double travelledZ = playerPosVec.z - mc.player.prevZ; + double currentSpeed = (double)Math.sqrt((float)(travelledX * travelledX + travelledZ * travelledZ)); + + if (Speedometer.USE_COLORS.getBooleanValue()) { + tickCounter += tickDelta; + if (tickCounter >= (float)Speedometer.TICK_INTERVAL.getIntegerValue()) { + if (currentSpeed < lastFrameSpeed) { + color = Speedometer.DECELERATING_COLOR.getColor().intValue; + } else if (currentSpeed > lastFrameSpeed) { + color = Speedometer.ACCELERATING_COLOR.getColor().intValue; + } else { + color = Speedometer.DEFAULT_COLOR.getColor().intValue; + } + } + + this.lastFrameSpeed = currentSpeed; + } + + String currentSpeedText = String.format("%.2f", currentSpeed / 0.05F); + + // Calculate text position + int horizWidth = this.textRenderer.getWidth(currentSpeedText); + int height = this.textRenderer.fontHeight; + int paddingX = 2; + int paddingY = 2; + int marginX = 4; + int marginY = 4; + int left = 0 + marginX; + int top = 0 + marginY; + int realHorizWidth = horizWidth + paddingX * 2 - 1; + int realHeight = height + paddingY * 2 - 1; + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_LEFT) { + top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; + + left += paddingX; + top += paddingY; + } + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_RIGHT) { + top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; + left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; + + left += paddingX; + top += paddingY; + } + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_LEFT) { + left += paddingX; + top += paddingY; + } + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_RIGHT) { + left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; + + left += paddingX; + top += paddingY; + } + + if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.CENTER) { + left += mc.getWindow().getScaledWidth() / 2; + top += mc.getWindow().getScaledHeight() / 2; + + if (currentSpeed > 10) { + left -= realHorizWidth - 13; + top += 2; + } else { + left -= realHorizWidth - 3; + top += 2; + } + } + + // Render the text + this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); + + return; + } +} diff --git a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java index 3f66078..34e238a 100644 --- a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java @@ -14,6 +14,7 @@ import fi.dy.masa.malilib.config.options.ConfigColor; import fi.dy.masa.malilib.config.options.ConfigDouble; import fi.dy.masa.malilib.config.options.ConfigHotkey; +import fi.dy.masa.malilib.config.options.ConfigInteger; import fi.dy.masa.malilib.config.options.ConfigOptionList; import fi.dy.masa.malilib.util.FileUtils; import fi.dy.masa.malilib.util.JsonUtils; @@ -61,12 +62,12 @@ public static class Options { } public static class Speedometer { - public static final ConfigDouble TICK_INTERVAL = new ConfigDouble ("Speedometer Update", 20.0, 0.0, 20.0, true, "How often the Speedometer should update in game ticks"); + public static final ConfigInteger TICK_INTERVAL = new ConfigInteger ("Speedometer Update", 15, 0, 20, true, "How often the Speedometer should update in game ticks"); public static final ConfigBoolean USE_COLORS = new ConfigBoolean ("Use Speedometer Colors", true, "Use the colors set below for the speedometer"); - public static final ConfigColor DEFAULT_COLOR = new ConfigColor ("Default Color", "#FFFFFFFF", "Default text color of the speedometer"); - public static final ConfigColor ACCELERATING_COLOR = new ConfigColor ("Accelerating Color", "#00FF00FF", "Color for when you are accelerating"); - public static final ConfigColor DECELERATING_COLOR = new ConfigColor ("Decelerating Color", "#FF0000FF", "Color for when you are decelerating"); - public static final ConfigOptionList POSITIONS = new ConfigOptionList ("Screen Position", ScreenPositions.TOP_LEFT, "Where the speedometer should be displayed"); + public static final ConfigColor DEFAULT_COLOR = new ConfigColor ("Default Color", "0xFFFFFFFF", "Default text color of the speedometer"); + public static final ConfigColor ACCELERATING_COLOR = new ConfigColor ("Accelerating Color", "0x0000FF05", "Color for when you are accelerating"); + public static final ConfigColor DECELERATING_COLOR = new ConfigColor ("Decelerating Color", "0x00FF0005", "Color for when you are decelerating"); + public static final ConfigOptionList POSITIONS = new ConfigOptionList ("Screen Position", ScreenPositions.CENTER, "Where the speedometer should be displayed"); public static final ImmutableList OPTIONS = ImmutableList.of( TICK_INTERVAL, diff --git a/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java b/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java index eb24ef6..c545cbf 100644 --- a/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/event/RenderHandler.java @@ -1,106 +1,8 @@ package org.tlesis.squakeplusplus.event; -import org.tlesis.squakeplusplus.config.Configs.Speedometer; -import org.tlesis.squakeplusplus.util.ScreenPositions; - import fi.dy.masa.malilib.interfaces.IRenderer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.font.TextRenderer; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.entity.Entity; @Environment(EnvType.CLIENT) -public class RenderHandler implements IRenderer { - - public static RenderHandler renderHandler = new RenderHandler(); - - private MinecraftClient mc; - private TextRenderer textRenderer; - - private int color; - private double lastFrameSpeed = 0.0; - private float tickCounter = 0.0f; - - public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { - - System.out.println("IDK] Called"); - - this.mc = MinecraftClient.getInstance(); - this.textRenderer = mc.textRenderer; - Entity entity = mc.getCameraEntity(); - - double dx = entity.getX() - entity.lastRenderX; - double dy = entity.getY() - entity.lastRenderY; - double dz = entity.getZ() - entity.lastRenderZ; - double currentSpeed = Math.sqrt(dx * dx + dy * dy + dz * dz); - - if (Speedometer.USE_COLORS.getBooleanValue()) { - tickCounter += tickDelta; - if (tickCounter >= (float)Speedometer.TICK_INTERVAL.getDoubleValue()) { - if (currentSpeed < lastFrameSpeed) { - color = Speedometer.DECELERATING_COLOR.getColor().intValue; - } else if (currentSpeed > lastFrameSpeed) { - color = Speedometer.ACCELERATING_COLOR.getColor().intValue; - } else { - color = Speedometer.DEFAULT_COLOR.getColor().intValue; - } - } - - this.lastFrameSpeed = currentSpeed; - this.tickCounter = 0.0f; - } - - String currentSpeedText = String.format("%.2f blocks/sec", currentSpeed / 0.05F); - - // Calculate text position - int horizWidth = this.textRenderer.getWidth(currentSpeedText); - int height = this.textRenderer.fontHeight; - int paddingX = 2; - int paddingY = 2; - int marginX = 4; - int marginY = 4; - int left = 0 + marginX; - int top = 0 + marginY; - int realHorizWidth = horizWidth + paddingX * 2 - 1; - int realHeight = height + paddingY * 2 - 1; - - if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_LEFT) { - top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; - - left += paddingX; - top += paddingY; - } - - if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_RIGHT) { - top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; - left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; - - left += paddingX; - top += paddingY; - } - - if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_LEFT) { - left += paddingX; - top += paddingY; - } - - if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_RIGHT) { - left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; - - left += paddingX; - top += paddingY; - } - - // Render the text - this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); - - return; - } - - public void updateData(MinecraftClient mc) { - if (mc.world != null) {} - } - -} \ No newline at end of file +public class RenderHandler implements IRenderer {} \ No newline at end of file diff --git a/src/main/java/org/tlesis/squakeplusplus/mixin/MixinSpeedometer.java b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinSpeedometer.java index 6de9d02..e5c765c 100644 --- a/src/main/java/org/tlesis/squakeplusplus/mixin/MixinSpeedometer.java +++ b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinSpeedometer.java @@ -4,8 +4,8 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.tlesis.squakeplusplus.client.SpeedometerHud; import org.tlesis.squakeplusplus.config.FeatureToggle; -import org.tlesis.squakeplusplus.event.RenderHandler; import net.minecraft.client.gui.hud.InGameHud; import net.minecraft.client.util.math.MatrixStack; @@ -14,8 +14,8 @@ public class MixinSpeedometer { @Inject(at = @At("TAIL"), method = "render(Lnet/minecraft/client/util/math/MatrixStack;F)V") private void renderSpeedometer(MatrixStack matrices, float tickDelta, CallbackInfo info) { - if (FeatureToggle.SPEEDOMETER.getBooleanValue()) { - RenderHandler.renderHandler.speedometerDraw(matrices, tickDelta); + if (FeatureToggle.SPEEDOMETER.getBooleanValue() && SpeedometerHud.speedometerHud != null) { + SpeedometerHud.speedometerHud.speedometerDraw(matrices, tickDelta); } } } \ No newline at end of file diff --git a/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java b/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java index 7f7610a..e7379fd 100644 --- a/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java +++ b/src/main/java/org/tlesis/squakeplusplus/scheduler/ClientTickHandler.java @@ -1,6 +1,5 @@ package org.tlesis.squakeplusplus.scheduler; -import org.tlesis.squakeplusplus.event.RenderHandler; import fi.dy.masa.malilib.interfaces.IClientTickHandler; import net.minecraft.client.MinecraftClient; @@ -13,7 +12,6 @@ public void onClientTick(MinecraftClient mc) { if (mc.world != null && mc.player != null) { TaskScheduler.getInstanceClient().runTasks(); - RenderHandler.renderHandler.updateData(mc); } if (mc.player != null) { diff --git a/src/main/resources/mixins.squakeplusplus.json b/src/main/resources/mixins.squakeplusplus.json index 6f08987..d60b91e 100644 --- a/src/main/resources/mixins.squakeplusplus.json +++ b/src/main/resources/mixins.squakeplusplus.json @@ -8,7 +8,8 @@ "client": [ "MixinPlayerEntity", "MixinEntity", - "MixinJump" + "MixinJump", + "MixinSpeedometer" ], "injectors": { "defaultRequire": 1 From f3c6ae6011316ad6a88cf8c45746c3aec2d4937c Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Mon, 28 Feb 2022 23:15:39 -0600 Subject: [PATCH 08/20] Speedometer work --- .../squakeplusplus/client/SpeedometerHud.java | 38 +++++++++++++++---- .../tlesis/squakeplusplus/config/Configs.java | 6 ++- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java index ced643e..6d08423 100644 --- a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java @@ -16,8 +16,11 @@ public class SpeedometerHud { private TextRenderer textRenderer; private int color = Speedometer.DEFAULT_COLOR.getColor().intValue; - private double lastFrameSpeed = 0.0; + private int lastColor; + private double lastSpeed = 0.0; + private int counter = 0; // Jank. don't worry about it. . . private float tickCounter = 0.0f; + private double currentSpeed; public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { @@ -28,24 +31,32 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { Vec3d playerPosVec = mc.player.getPos(); double travelledX = playerPosVec.x - mc.player.prevX; double travelledZ = playerPosVec.z - mc.player.prevZ; - double currentSpeed = (double)Math.sqrt((float)(travelledX * travelledX + travelledZ * travelledZ)); + // double travelledY = playerPosVec.y - mc.player.prevY; + this.currentSpeed = (double)Math.sqrt((float)(travelledX * travelledX + travelledZ * travelledZ)); if (Speedometer.USE_COLORS.getBooleanValue()) { tickCounter += tickDelta; + counter++; if (tickCounter >= (float)Speedometer.TICK_INTERVAL.getIntegerValue()) { - if (currentSpeed < lastFrameSpeed) { + if (currentSpeed < lastSpeed) { color = Speedometer.DECELERATING_COLOR.getColor().intValue; - } else if (currentSpeed > lastFrameSpeed) { + } else if (currentSpeed > lastSpeed) { color = Speedometer.ACCELERATING_COLOR.getColor().intValue; } else { color = Speedometer.DEFAULT_COLOR.getColor().intValue; } } - this.lastFrameSpeed = currentSpeed; + if (counter >= 15) { + this.counter = 0; + this.lastColor = color; + this.lastSpeed = currentSpeed; + } + } - String currentSpeedText = String.format("%.2f", currentSpeed / 0.05F); + String currentSpeedText = String.format("%.2f", currentSpeed / 0.05f); + String lastSpeedText = String.format("%.2f", lastSpeed / 0.05f); // Calculate text position int horizWidth = this.textRenderer.getWidth(currentSpeedText); @@ -64,6 +75,10 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { left += paddingX; top += paddingY; + + if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { + top -= 10; + } } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_RIGHT) { @@ -72,6 +87,10 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { left += paddingX; top += paddingY; + + if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { + top -= 10; + } } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_LEFT) { @@ -90,17 +109,20 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { left += mc.getWindow().getScaledWidth() / 2; top += mc.getWindow().getScaledHeight() / 2; - if (currentSpeed > 10) { + if ((this.currentSpeed / 0.05f) >= 10.0 && (this.currentSpeed / 0.05f) < 100.0) { left -= realHorizWidth - 13; top += 2; } else { - left -= realHorizWidth - 3; + left -= realHorizWidth - 10; top += 2; } } // Render the text this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); + if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { + this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, lastColor); + } return; } diff --git a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java index 34e238a..7c81912 100644 --- a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java @@ -63,14 +63,16 @@ public static class Options { public static class Speedometer { public static final ConfigInteger TICK_INTERVAL = new ConfigInteger ("Speedometer Update", 15, 0, 20, true, "How often the Speedometer should update in game ticks"); + public static final ConfigBoolean SHOW_LAST_SPEED = new ConfigBoolean ("Display Previous Speed", false, "Displays your previous jump's speed under your current speed\n§6Work In Progress"); public static final ConfigBoolean USE_COLORS = new ConfigBoolean ("Use Speedometer Colors", true, "Use the colors set below for the speedometer"); public static final ConfigColor DEFAULT_COLOR = new ConfigColor ("Default Color", "0xFFFFFFFF", "Default text color of the speedometer"); - public static final ConfigColor ACCELERATING_COLOR = new ConfigColor ("Accelerating Color", "0x0000FF05", "Color for when you are accelerating"); - public static final ConfigColor DECELERATING_COLOR = new ConfigColor ("Decelerating Color", "0x00FF0005", "Color for when you are decelerating"); + public static final ConfigColor ACCELERATING_COLOR = new ConfigColor ("Accelerating Color", "0x0000FF00", "Color for when you are accelerating"); + public static final ConfigColor DECELERATING_COLOR = new ConfigColor ("Decelerating Color", "0x00FF0000", "Color for when you are decelerating"); public static final ConfigOptionList POSITIONS = new ConfigOptionList ("Screen Position", ScreenPositions.CENTER, "Where the speedometer should be displayed"); public static final ImmutableList OPTIONS = ImmutableList.of( TICK_INTERVAL, + SHOW_LAST_SPEED, USE_COLORS, DEFAULT_COLOR, From 0b4da4dac1f17a798fe4e18e02f556049ee86dbe Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Mon, 28 Feb 2022 23:16:51 -0600 Subject: [PATCH 09/20] Mod version bump --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c39fa9f..b061424 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.18.1+build.22 loader_version=0.13.3 # Mod Properties -mod_version= 2.1.1 +mod_version= 2.1.4 maven_group=tlesis archives_base_name=squakeplusplus From 012464dad60b62d544948eab9ffe875a712dbcc4 Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Mon, 28 Feb 2022 23:17:27 -0600 Subject: [PATCH 10/20] Mod version bump --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b061424..3f3bb58 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.18.1+build.22 loader_version=0.13.3 # Mod Properties -mod_version= 2.1.4 +mod_version= 2.2.1 maven_group=tlesis archives_base_name=squakeplusplus From 9f24252e5b21404f5b0320161d59f3c76d1f28d5 Mon Sep 17 00:00:00 2001 From: Jack <90142572+Tlesis@users.noreply.github.com> Date: Tue, 1 Mar 2022 09:32:53 -0600 Subject: [PATCH 11/20] Made REEDME the same as main --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65fbff9..be7340f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Squake++ -Squake++ is client-side mod for Minecraft which adds bunnyhopping, strafe jumping, air control, trimping, and sharking to Minecraft. It also can disable the loss of speed when taking fall damage (needs to be installed server-side). +Squake++ is client-side Fabric mod for Minecraft which adds bunnyhopping, strafe jumping, air control, trimping, and sharking, as well as a spedometer. It also can disable the loss of speed when taking fall damage (needs to be installed server-side). All options are configurable with an ingame config GUI. The modified movement code is based on Quake and Half-Life's code, with the the goal to make the movement feel the same as Half-Life. Because of this, trimping and sharking, which are based off of Fortress Forever's movement (not Half-Life), are disabled by default. These are only included as they were features in the [original Squake](https://www.curseforge.com/minecraft/mc-mods/squake) by squeek502. From b71e895abed5f7ad983676abad5d6d97b1401b7c Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 1 Mar 2022 12:01:34 -0600 Subject: [PATCH 12/20] Removed warnings --- .../org/tlesis/squakeplusplus/compact/ModMenuImpl.java | 2 +- .../java/org/tlesis/squakeplusplus/gui/GuiConfigs.java | 6 +++--- .../java/org/tlesis/squakeplusplus/mixin/MixinJump.java | 8 +++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java b/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java index a1a348d..c2ddcd2 100644 --- a/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java +++ b/src/main/java/org/tlesis/squakeplusplus/compact/ModMenuImpl.java @@ -9,7 +9,7 @@ public class ModMenuImpl implements ModMenuApi { public ConfigScreenFactory getModConfigScreenFactory() { return (screen) -> { GuiConfigs gui = new GuiConfigs(); - gui.setParent(screen); + gui.setParentGui(screen); return gui; }; } diff --git a/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java b/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java index 04951ee..4a95d81 100644 --- a/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java +++ b/src/main/java/org/tlesis/squakeplusplus/gui/GuiConfigs.java @@ -6,7 +6,6 @@ import com.google.common.collect.ImmutableList; import fi.dy.masa.malilib.config.IConfigBase; -import fi.dy.masa.malilib.config.options.BooleanHotkeyGuiWrapper; import fi.dy.masa.malilib.gui.GuiConfigsBase; import fi.dy.masa.malilib.gui.button.ButtonBase; import fi.dy.masa.malilib.gui.button.ButtonGeneric; @@ -85,8 +84,9 @@ public List getConfigs() { return ConfigOptionWrapper.createFor(configs); } - protected BooleanHotkeyGuiWrapper wrapConfig(FeatureToggle config) { - return new BooleanHotkeyGuiWrapper(config.getName(), config, config.getKeybind()); + @SuppressWarnings("deprecation") + protected fi.dy.masa.malilib.config.options.BooleanHotkeyGuiWrapper wrapConfig(FeatureToggle config) { + return new fi.dy.masa.malilib.config.options.BooleanHotkeyGuiWrapper(config.getName(), config, config.getKeybind()); } @Override diff --git a/src/main/java/org/tlesis/squakeplusplus/mixin/MixinJump.java b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinJump.java index add540b..68a8acc 100644 --- a/src/main/java/org/tlesis/squakeplusplus/mixin/MixinJump.java +++ b/src/main/java/org/tlesis/squakeplusplus/mixin/MixinJump.java @@ -17,10 +17,8 @@ public abstract class MixinJump { @Inject(method = "tickMovement", at = @At(value = "HEAD")) public void tickMovement(CallbackInfo ci) { - - if (FeatureToggle.JUMP_SPAM.getBooleanValue()) - if (jumpingCooldown > 0) { - jumpingCooldown = 0; - } + if (FeatureToggle.JUMP_SPAM.getBooleanValue()) { + jumpingCooldown = 0; + } } } \ No newline at end of file From 3e3778216fdf68bbe3a2546a8cf84d399363bc2b Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 1 Mar 2022 12:32:40 -0600 Subject: [PATCH 13/20] Mod menu might work now --- src/main/resources/fabric.mod.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index f870deb..6627148 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -18,7 +18,10 @@ ], "main": [ "org.tlesis.squakeplusplus.SquakePlusPlus" - ] + ], + "modmenu": [ + "org.tlesis.squakeplusplus.compact.ModMenuImpl" + ] }, "mixins": [ "mixins.squakeplusplus.json" From adef152082a4f77b0d5fee2c860a15330f63c1c3 Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Tue, 1 Mar 2022 22:09:57 -0600 Subject: [PATCH 14/20] More Speedometer stuff (Difference isn't working) --- gradle.properties | 2 +- .../squakeplusplus/client/SpeedometerHud.java | 93 ++++++++++++++----- .../tlesis/squakeplusplus/config/Configs.java | 7 +- src/main/resources/fabric.mod.json | 69 ++++++++------ 4 files changed, 114 insertions(+), 57 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3f3bb58..c0a121f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.18.1+build.22 loader_version=0.13.3 # Mod Properties -mod_version= 2.2.1 +mod_version= 2.2.2 maven_group=tlesis archives_base_name=squakeplusplus diff --git a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java index 6d08423..b8be35f 100644 --- a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java @@ -1,6 +1,7 @@ package org.tlesis.squakeplusplus.client; import org.tlesis.squakeplusplus.config.Configs.Speedometer; +import org.tlesis.squakeplusplus.scheduler.ClientTickHandler; import org.tlesis.squakeplusplus.util.ScreenPositions; import net.minecraft.client.MinecraftClient; @@ -16,11 +17,14 @@ public class SpeedometerHud { private TextRenderer textRenderer; private int color = Speedometer.DEFAULT_COLOR.getColor().intValue; - private int lastColor; + private int lastColor = Speedometer.DEFAULT_COLOR.getColor().intValue; private double lastSpeed = 0.0; private int counter = 0; // Jank. don't worry about it. . . private float tickCounter = 0.0f; - private double currentSpeed; + private double currentSpeed = 0.0; + private String currentSpeedText = "0.0"; + private double speedDiffrence = 0.0; + private String lastSpeedText = "0.0"; public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { @@ -32,81 +36,98 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { double travelledX = playerPosVec.x - mc.player.prevX; double travelledZ = playerPosVec.z - mc.player.prevZ; // double travelledY = playerPosVec.y - mc.player.prevY; - this.currentSpeed = (double)Math.sqrt((float)(travelledX * travelledX + travelledZ * travelledZ)); + this.currentSpeed = Math.sqrt((travelledX * travelledX + travelledZ * travelledZ)); if (Speedometer.USE_COLORS.getBooleanValue()) { tickCounter += tickDelta; - counter++; if (tickCounter >= (float)Speedometer.TICK_INTERVAL.getIntegerValue()) { if (currentSpeed < lastSpeed) { color = Speedometer.DECELERATING_COLOR.getColor().intValue; } else if (currentSpeed > lastSpeed) { color = Speedometer.ACCELERATING_COLOR.getColor().intValue; - } else { + } else if (currentSpeed == lastSpeed && (!mc.player.isOnGround() || counter >= 20)) { + this.counter = 0; color = Speedometer.DEFAULT_COLOR.getColor().intValue; } } + } + + if (mc.player.isOnGround()) { + this.counter++; + this.lastColor = color; + this.lastSpeed = currentSpeed; + float fixedCurrentSpeed = (float)currentSpeed / 0.05f; + float fixedLastSpeed = (float)lastSpeed / 0.05f; + this.speedDiffrence = (fixedCurrentSpeed - fixedLastSpeed); + } - if (counter >= 15) { - this.counter = 0; - this.lastColor = color; - this.lastSpeed = currentSpeed; - } + this.currentSpeedText = String.format("%.2f", currentSpeed / 0.05f); + if (mc.player.isOnGround() && ClientTickHandler.isJumping) { + this.lastSpeedText = String.format("%.2f", lastSpeed / 0.05f); } - - String currentSpeedText = String.format("%.2f", currentSpeed / 0.05f); - String lastSpeedText = String.format("%.2f", lastSpeed / 0.05f); // Calculate text position int horizWidth = this.textRenderer.getWidth(currentSpeedText); - int height = this.textRenderer.fontHeight; - int paddingX = 2; - int paddingY = 2; - int marginX = 4; - int marginY = 4; + final int height = this.textRenderer.fontHeight; + final int paddingX = 2; + final int paddingY = 2; + final int marginX = 4; + final int marginY = 4; int left = 0 + marginX; + int leftDiff = 0 + marginX; int top = 0 + marginY; - int realHorizWidth = horizWidth + paddingX * 2 - 1; - int realHeight = height + paddingY * 2 - 1; + final int realHorizWidth = horizWidth + paddingX * 2 - 1; + final int realHeight = height + paddingY * 2 - 1; if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_LEFT) { top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; left += paddingX; + leftDiff += paddingX; top += paddingY; - if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { + if (Speedometer.SHOW_LAST_SPEED.getBooleanValue() ^ Speedometer.SHOW_DIF.getBooleanValue()) { top -= 10; + } else if (Speedometer.SHOW_DIF.getBooleanValue() || Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { + top -= 20; } } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_RIGHT) { top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; + leftDiff += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; left += paddingX; + leftDiff += paddingX; top += paddingY; - if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { + if (Speedometer.SHOW_LAST_SPEED.getBooleanValue() ^ Speedometer.SHOW_DIF.getBooleanValue()) { top -= 10; + } else if (Speedometer.SHOW_LAST_SPEED.getBooleanValue() || Speedometer.SHOW_DIF.getBooleanValue()) { + top -= 20; } } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_LEFT) { left += paddingX; + leftDiff += paddingX; top += paddingY; } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_RIGHT) { left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; + leftDiff += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; left += paddingX; + leftDiff += paddingX; top += paddingY; } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.CENTER) { left += mc.getWindow().getScaledWidth() / 2; + leftDiff = left; top += mc.getWindow().getScaledHeight() / 2; if ((this.currentSpeed / 0.05f) >= 10.0 && (this.currentSpeed / 0.05f) < 100.0) { @@ -116,12 +137,34 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { left -= realHorizWidth - 10; top += 2; } + + if (((currentSpeed / 0.05f) - (lastSpeed / 0.05f)) >= 0) { + leftDiff = left; + } else { + leftDiff = left - 2; + } } // Render the text - this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); - if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { - this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, lastColor); + if (Speedometer.WHEN_JUMPING.getBooleanValue() && ClientTickHandler.isJumping) { + + this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); + if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { + this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, lastColor); + } + if (Speedometer.SHOW_DIF.getBooleanValue()) { + this.textRenderer.drawWithShadow(matrixStack, String.format("%.2f", this.speedDiffrence), leftDiff, top + (!Speedometer.SHOW_LAST_SPEED.getBooleanValue() ? 10 : 20), Speedometer.DEFAULT_COLOR.getColor().intValue); + } + + } else { + + this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); + if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { + this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, lastColor); + } + if (Speedometer.SHOW_DIF.getBooleanValue()) { + this.textRenderer.drawWithShadow(matrixStack, String.format("%.2f", this.speedDiffrence), leftDiff, top + (!Speedometer.SHOW_LAST_SPEED.getBooleanValue() ? 10 : 20), Speedometer.DEFAULT_COLOR.getColor().intValue); + } } return; diff --git a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java index 7c81912..a0542d9 100644 --- a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java @@ -63,16 +63,20 @@ public static class Options { public static class Speedometer { public static final ConfigInteger TICK_INTERVAL = new ConfigInteger ("Speedometer Update", 15, 0, 20, true, "How often the Speedometer should update in game ticks"); - public static final ConfigBoolean SHOW_LAST_SPEED = new ConfigBoolean ("Display Previous Speed", false, "Displays your previous jump's speed under your current speed\n§6Work In Progress"); + public static final ConfigBoolean SHOW_LAST_SPEED = new ConfigBoolean ("Display Previous Speed", false, "Displays your previous jump's speed under your current speed"); public static final ConfigBoolean USE_COLORS = new ConfigBoolean ("Use Speedometer Colors", true, "Use the colors set below for the speedometer"); public static final ConfigColor DEFAULT_COLOR = new ConfigColor ("Default Color", "0xFFFFFFFF", "Default text color of the speedometer"); public static final ConfigColor ACCELERATING_COLOR = new ConfigColor ("Accelerating Color", "0x0000FF00", "Color for when you are accelerating"); public static final ConfigColor DECELERATING_COLOR = new ConfigColor ("Decelerating Color", "0x00FF0000", "Color for when you are decelerating"); public static final ConfigOptionList POSITIONS = new ConfigOptionList ("Screen Position", ScreenPositions.CENTER, "Where the speedometer should be displayed"); + public static final ConfigBoolean WHEN_JUMPING = new ConfigBoolean ("Only When Jumping", false, "Only display the speedometer while currently jumping"); + public static final ConfigBoolean SHOW_DIF = new ConfigBoolean ("Show Difference", false, "Show the diffrence between the current speed and the last speed\n§6Work In Progress"); public static final ImmutableList OPTIONS = ImmutableList.of( TICK_INTERVAL, SHOW_LAST_SPEED, + WHEN_JUMPING, + SHOW_DIF, USE_COLORS, DEFAULT_COLOR, @@ -80,6 +84,7 @@ public static class Speedometer { DECELERATING_COLOR, POSITIONS + ); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 6627148..7bf5381 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,35 +1,44 @@ { - "schemaVersion": 1, - "id": "squakeplusplus", - "version": "${mod_version}", - "name": "Squake++", - "description": "Squake++ is an improved version of Squake for Fabric", - "authors": [ - "He11crow", - "Tlesis", - "LeviOP"], - "contact": {}, - "license": "unlicense", - "icon": "assets/squakeplusplus/icon.png", - "environment": "*", - "entrypoints": { - "client": [ - "org.tlesis.squakeplusplus.client.SquakePlusPlusClient" + "schemaVersion": 1, + "id": "squakeplusplus", + "name": "Squake++", + "version": "2.2.2", + "description": "Squake++ is an improved version of Squake for Fabric", + "authors": [ + "He11crow", + "Tlesis", + "LeviOP" ], - "main": [ - "org.tlesis.squakeplusplus.SquakePlusPlus" - ], - "modmenu": [ + + "contact": { + "homepage": "https://tlesis.org/projects/SquakePlusPlus", + "issues": "https://github.com/Tlesis/SquakePlusPlus/issues", + "sources": "https://github.com/Tlesis/SquakePlusPlus" + }, + + "license": "unlicense", + "icon": "assets/squakeplusplus/icon.png", + "environment": "*", + "entrypoints": { + "client": [ + "org.tlesis.squakeplusplus.client.SquakePlusPlusClient" + ], + "main": [ + "org.tlesis.squakeplusplus.SquakePlusPlus" + ], + "modmenu": [ "org.tlesis.squakeplusplus.compact.ModMenuImpl" ] - }, - "mixins": [ - "mixins.squakeplusplus.json" - ], - "depends": { - "fabricloader": ">=0.12.12", - "fabric": "*", - "minecraft": "1.18.1", - "malilib": ">=0.11.3 <0.12" - } + }, + + "mixins": [ + "mixins.squakeplusplus.json" + ], + + "depends": { + "fabricloader": ">=0.12.12", + "fabric": "*", + "minecraft": "1.18.1", + "malilib": ">=0.11.3 <0.12" + } } \ No newline at end of file From 5377d20631ecec6dec7ee302bef59087651b203f Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Sat, 19 Mar 2022 19:07:37 -0500 Subject: [PATCH 15/20] Removed Difference cal --- .../squakeplusplus/client/SpeedometerHud.java | 59 ++++--------------- .../tlesis/squakeplusplus/config/Configs.java | 6 +- 2 files changed, 11 insertions(+), 54 deletions(-) diff --git a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java index b8be35f..7714fdb 100644 --- a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java @@ -17,13 +17,10 @@ public class SpeedometerHud { private TextRenderer textRenderer; private int color = Speedometer.DEFAULT_COLOR.getColor().intValue; - private int lastColor = Speedometer.DEFAULT_COLOR.getColor().intValue; private double lastSpeed = 0.0; - private int counter = 0; // Jank. don't worry about it. . . private float tickCounter = 0.0f; private double currentSpeed = 0.0; private String currentSpeedText = "0.0"; - private double speedDiffrence = 0.0; private String lastSpeedText = "0.0"; public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { @@ -38,28 +35,24 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { // double travelledY = playerPosVec.y - mc.player.prevY; this.currentSpeed = Math.sqrt((travelledX * travelledX + travelledZ * travelledZ)); - if (Speedometer.USE_COLORS.getBooleanValue()) { + if (Speedometer.USE_COLORS.getBooleanValue() && mc.player.isOnGround()) { tickCounter += tickDelta; if (tickCounter >= (float)Speedometer.TICK_INTERVAL.getIntegerValue()) { if (currentSpeed < lastSpeed) { color = Speedometer.DECELERATING_COLOR.getColor().intValue; } else if (currentSpeed > lastSpeed) { color = Speedometer.ACCELERATING_COLOR.getColor().intValue; - } else if (currentSpeed == lastSpeed && (!mc.player.isOnGround() || counter >= 20)) { - this.counter = 0; + } else if (currentSpeed == lastSpeed && (!mc.player.isOnGround())) { color = Speedometer.DEFAULT_COLOR.getColor().intValue; } } - } - - if (mc.player.isOnGround()) { - this.counter++; - this.lastColor = color; this.lastSpeed = currentSpeed; + } + + /* if (mc.player.isOnGround()) { float fixedCurrentSpeed = (float)currentSpeed / 0.05f; float fixedLastSpeed = (float)lastSpeed / 0.05f; - this.speedDiffrence = (fixedCurrentSpeed - fixedLastSpeed); - } + } */ this.currentSpeedText = String.format("%.2f", currentSpeed / 0.05f); @@ -75,7 +68,6 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { final int marginX = 4; final int marginY = 4; int left = 0 + marginX; - int leftDiff = 0 + marginX; int top = 0 + marginY; final int realHorizWidth = horizWidth + paddingX * 2 - 1; final int realHeight = height + paddingY * 2 - 1; @@ -84,50 +76,31 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; left += paddingX; - leftDiff += paddingX; top += paddingY; - - if (Speedometer.SHOW_LAST_SPEED.getBooleanValue() ^ Speedometer.SHOW_DIF.getBooleanValue()) { - top -= 10; - } else if (Speedometer.SHOW_DIF.getBooleanValue() || Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { - top -= 20; - } } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.BOTTOM_RIGHT) { top += mc.getWindow().getScaledHeight() - marginY * 2 - realHeight; left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; - leftDiff += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; left += paddingX; - leftDiff += paddingX; top += paddingY; - - if (Speedometer.SHOW_LAST_SPEED.getBooleanValue() ^ Speedometer.SHOW_DIF.getBooleanValue()) { - top -= 10; - } else if (Speedometer.SHOW_LAST_SPEED.getBooleanValue() || Speedometer.SHOW_DIF.getBooleanValue()) { - top -= 20; - } } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_LEFT) { left += paddingX; - leftDiff += paddingX; top += paddingY; } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.TOP_RIGHT) { left += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; - leftDiff += mc.getWindow().getScaledWidth() - marginX * 2 - realHorizWidth; left += paddingX; - leftDiff += paddingX; top += paddingY; } if (Speedometer.POSITIONS.getOptionListValue() == ScreenPositions.CENTER) { left += mc.getWindow().getScaledWidth() / 2; - leftDiff = left; top += mc.getWindow().getScaledHeight() / 2; if ((this.currentSpeed / 0.05f) >= 10.0 && (this.currentSpeed / 0.05f) < 100.0) { @@ -137,33 +110,21 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { left -= realHorizWidth - 10; top += 2; } - - if (((currentSpeed / 0.05f) - (lastSpeed / 0.05f)) >= 0) { - leftDiff = left; - } else { - leftDiff = left - 2; - } } // Render the text if (Speedometer.WHEN_JUMPING.getBooleanValue() && ClientTickHandler.isJumping) { - this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); + this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, Speedometer.DEFAULT_COLOR.getColor().intValue); if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { - this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, lastColor); - } - if (Speedometer.SHOW_DIF.getBooleanValue()) { - this.textRenderer.drawWithShadow(matrixStack, String.format("%.2f", this.speedDiffrence), leftDiff, top + (!Speedometer.SHOW_LAST_SPEED.getBooleanValue() ? 10 : 20), Speedometer.DEFAULT_COLOR.getColor().intValue); + this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, color); } } else { - this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, color); + this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, Speedometer.DEFAULT_COLOR.getColor().intValue); if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { - this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, lastColor); - } - if (Speedometer.SHOW_DIF.getBooleanValue()) { - this.textRenderer.drawWithShadow(matrixStack, String.format("%.2f", this.speedDiffrence), leftDiff, top + (!Speedometer.SHOW_LAST_SPEED.getBooleanValue() ? 10 : 20), Speedometer.DEFAULT_COLOR.getColor().intValue); + this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, color); } } diff --git a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java index a0542d9..ed928b7 100644 --- a/src/main/java/org/tlesis/squakeplusplus/config/Configs.java +++ b/src/main/java/org/tlesis/squakeplusplus/config/Configs.java @@ -51,9 +51,7 @@ public static class Options { SHARK_SURFACE_TENSION, SHARK_WATER_FRICTION, - TRIMP_MULTIPLIER/*, - - INCREASED_FALL_DISTANCE*/ + TRIMP_MULTIPLIER ); public static final List HOTKEY_LIST = ImmutableList.of( @@ -70,13 +68,11 @@ public static class Speedometer { public static final ConfigColor DECELERATING_COLOR = new ConfigColor ("Decelerating Color", "0x00FF0000", "Color for when you are decelerating"); public static final ConfigOptionList POSITIONS = new ConfigOptionList ("Screen Position", ScreenPositions.CENTER, "Where the speedometer should be displayed"); public static final ConfigBoolean WHEN_JUMPING = new ConfigBoolean ("Only When Jumping", false, "Only display the speedometer while currently jumping"); - public static final ConfigBoolean SHOW_DIF = new ConfigBoolean ("Show Difference", false, "Show the diffrence between the current speed and the last speed\n§6Work In Progress"); public static final ImmutableList OPTIONS = ImmutableList.of( TICK_INTERVAL, SHOW_LAST_SPEED, WHEN_JUMPING, - SHOW_DIF, USE_COLORS, DEFAULT_COLOR, From f5196461a124d33d08e2cbde2fda6c4014da429e Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Fri, 15 Apr 2022 15:30:01 -0500 Subject: [PATCH 16/20] Fixed the When jumping button --- .../squakeplusplus/client/SpeedometerHud.java | 2 +- .../squakeplusplus/util/ScreenPositions.java | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java index 7714fdb..29407dd 100644 --- a/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java +++ b/src/main/java/org/tlesis/squakeplusplus/client/SpeedometerHud.java @@ -120,7 +120,7 @@ public void speedometerDraw(MatrixStack matrixStack, float tickDelta) { this.textRenderer.drawWithShadow(matrixStack, lastSpeedText, left, top + 10, color); } - } else { + } else if (!Speedometer.WHEN_JUMPING.getBooleanValue()) { this.textRenderer.drawWithShadow(matrixStack, currentSpeedText, left, top, Speedometer.DEFAULT_COLOR.getColor().intValue); if (Speedometer.SHOW_LAST_SPEED.getBooleanValue()) { diff --git a/src/main/java/org/tlesis/squakeplusplus/util/ScreenPositions.java b/src/main/java/org/tlesis/squakeplusplus/util/ScreenPositions.java index 09eb635..c74f4ad 100644 --- a/src/main/java/org/tlesis/squakeplusplus/util/ScreenPositions.java +++ b/src/main/java/org/tlesis/squakeplusplus/util/ScreenPositions.java @@ -12,11 +12,11 @@ public enum ScreenPositions implements IConfigOptionListEntry { CENTER ("Center", "squake.label.screenpositions.center"); private final String configString; - private final String unlocName; + private final String unlockName; private ScreenPositions(String configString, String unlocName) { this.configString = configString; - this.unlocName = unlocName; + this.unlockName = unlocName; } @Override @@ -26,7 +26,7 @@ public String getStringValue() { @Override public String getDisplayName() { - return StringUtils.translate(this.unlocName); + return StringUtils.translate(this.unlockName); } @Override @@ -47,17 +47,13 @@ public IConfigOptionListEntry cycle(boolean forward) { } @Override - public ScreenPositions fromString(String name) - { + public ScreenPositions fromString(String name) { return fromStringStatic(name); } - public static ScreenPositions fromStringStatic(String name) - { - for (ScreenPositions aligment : ScreenPositions.values()) - { - if (aligment.configString.equalsIgnoreCase(name)) - { + public static ScreenPositions fromStringStatic(String name) { + for (ScreenPositions aligment : ScreenPositions.values()) { + if (aligment.configString.equalsIgnoreCase(name)) { return aligment; } } From 2b7af4884733de70291047c90793f647820fabac Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Fri, 15 Apr 2022 15:30:57 -0500 Subject: [PATCH 17/20] Fixed the When jumping button --- src/main/resources/fabric.mod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 7bf5381..cc2fafa 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "id": "squakeplusplus", "name": "Squake++", - "version": "2.2.2", + "version": "2.2.3", "description": "Squake++ is an improved version of Squake for Fabric", "authors": [ "He11crow", From 265cbddf15eda4e387ab0ce72b70acad9ce632bb Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Fri, 15 Apr 2022 15:33:02 -0500 Subject: [PATCH 18/20] Fixed the When jumping button --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c0a121f..18ac2ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.18.1+build.22 loader_version=0.13.3 # Mod Properties -mod_version= 2.2.2 +mod_version= 2.2.3 maven_group=tlesis archives_base_name=squakeplusplus From 491ef91521d053ccd40389868e2137cf618c0a4d Mon Sep 17 00:00:00 2001 From: "Jack_W()" Date: Fri, 15 Apr 2022 22:19:00 -0500 Subject: [PATCH 19/20] Updated to 1.18.2 --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 18ac2ed..0777411 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.18.1 -yarn_mappings=1.18.1+build.22 +minecraft_version=1.18.2 +yarn_mappings=1.18.2+build.3 loader_version=0.13.3 # Mod Properties @@ -18,6 +18,6 @@ malilib_version=0.11.4 # check this on https://modmuss50.me/fabric.html #Fabric api -fabric_version=0.46.4+1.18 +fabric_version=0.50.0+1.18.2 mod_menu_version=3.0.1 \ No newline at end of file From c910d3f5fe00dbe1720f67d90d41791a87fcdf40 Mon Sep 17 00:00:00 2001 From: TheWiznard Date: Fri, 6 Jan 2023 22:18:14 -0600 Subject: [PATCH 20/20] Updated to 1.19.3 --- build.gradle | 6 +- .../configuration/ide/RunConfigSettings.java | 320 +++++++++++++++ .../mappings/IntermediateMappingsService.java | 109 ++++++ .../ParchmentMappingsSpecBuilderImpl.java | 52 +++ .../loom/task/GenVsCodeProjectTask.java | 152 ++++++++ .../net/fabricmc/loom/util/ExceptionUtil.java | 47 +++ .../loom/util/download/DownloadException.java | 41 ++ .../gradle/ThreadedSimpleProgressLogger.java | 37 ++ .../java/net/fabricmc/example/ExampleMod.java | 28 ++ .../projects/localRuntime/settings.gradle | 2 + .../src/main/resources/fabric.mod.json | 35 ++ .../src/mixin1/resources/m1_2.mixins.json | 14 + .../projects/runconfigs/build.gradle | 37 ++ .../example/client/ExampleModClient.java | 19 + gradle.properties | 12 +- gradlew | 10 +- src/main/resources/fabric.mod.json | 6 +- .../fabricmc/filament/FilamentExtension.java | 35 ++ .../criterion/ImpossibleCriterion.mapping | 3 + .../criterion/RecipeUnlockedCriterion.mapping | 16 + .../criterion/StartedRidingCriterion.mapping | 11 + .../net/minecraft/block/JigsawBlock.mapping | 9 + .../net/minecraft/block/MyceliumBlock.mapping | 1 + .../net/minecraft/block/PlantBlock.mapping | 5 + .../block/entity/PistonBlockEntity.mapping | 73 ++++ .../block/enums/WireConnection.mapping | 5 + .../sapling/AzaleaSaplingGenerator.mapping | 1 + .../screen/ingame/CommandBlockScreen.mapping | 24 ++ .../ingame/HangingSignEditScreen.mapping | 4 + .../client/gui/widget/ButtonWidget.mapping | 56 +++ .../net/minecraft/client/model/Model.mapping | 20 + .../client/particle/GlowParticle.mapping | 36 ++ .../render/BufferVertexConsumer.mapping | 18 + .../entity/SignBlockEntityRenderer.mapping | 52 +++ .../debug/ChunkBorderDebugRenderer.mapping | 4 + .../debug/NeighborUpdateDebugRenderer.mapping | 10 + .../SpectralArrowEntityRenderer.mapping | 2 + .../feature/HeadFeatureRenderer.mapping | 20 + .../VillagerClothingFeatureRenderer.mapping | 26 ++ .../entity/model/BoatEntityModel.mapping | 67 ++++ .../entity/model/EntityModelLayers.mapping | 71 ++++ .../entity/model/RaftEntityModel.mapping | 19 + .../render/model/ModelBakeSettings.mapping | 3 + .../json/MultipartModelComponent.mapping | 26 ++ .../client/util/ProfileKeysImpl.mapping | 43 +++ .../ParticleEffectArgumentType.mapping | 27 ++ .../tag/AbstractItemTagProvider.mapping | 11 + .../minecraft/enchantment/Enchantment.mapping | 67 ++++ .../entity/ai/NoPenaltyTargeting.mapping | 44 +++ .../entity/ai/control/MoveControl.mapping | 34 ++ .../entity/ai/goal/IronGolemLookGoal.mapping | 8 + .../ai/goal/StopFollowingCustomerGoal.mapping | 4 + .../boss/dragon/EnderDragonSpawnState.mapping | 7 + .../boss/dragon/phase/TakeoffPhase.mapping | 6 + .../entity/decoration/LeashKnotEntity.mapping | 7 + .../entity/mob/IllusionerEntity.mapping | 5 + .../entity/mob/PillagerEntity.mapping | 7 + .../entity/passive/AllayBrain.mapping | 26 ++ .../entity/passive/CowEntity.mapping | 2 + .../minecraft/item/AliasedBlockItem.mapping | 1 + .../minecraft/item/ChorusFruitItem.mapping | 1 + .../item/PowderSnowBucketItem.mapping | 6 + .../net/minecraft/item/SkullItem.mapping | 8 + .../nbt/ContextLootNbtProvider.mapping | 20 + .../net/minecraft/nbt/NbtFloat.mapping | 15 + .../net/minecraft/nbt/NbtShort.mapping | 17 + .../s2c/query/QueryResponseS2CPacket.mapping | 8 + .../registry/tag/TagGroupLoader.mapping | 68 ++++ .../resource/featuretoggle/FeatureSet.mapping | 29 ++ .../server/command/CommandManager.mapping | 75 ++++ .../server/dedicated/DedicatedServer.mapping | 13 + .../StructurePiecesGenerator.mapping | 10 + .../minecraft/structure/StructureSet.mapping | 17 + .../structure/StructureTemplate.mapping | 211 ++++++++++ .../net/minecraft/test/TestContext.mapping | 363 ++++++++++++++++++ .../text/EntityNbtDataSource.mapping | 13 + .../minecraft/text/LiteralTextContent.mapping | 5 + .../packageinfo/PackageInfo5994.mapping | 1 + .../packageinfo/PackageInfo6004.mapping | 1 + .../packageinfo/PackageInfo6103.mapping | 1 + .../packageinfo/PackageInfo6188.mapping | 1 + .../packageinfo/PackageInfo6221.mapping | 1 + .../packageinfo/PackageInfo6311.mapping | 1 + .../net/minecraft/util/WorldSavePath.mapping | 6 + .../util/profiler/DummyRecorder.mapping | 2 + .../minecraft/world/WorldProperties.mapping | 18 + .../world/entity/EntityHandler.mapping | 32 ++ .../world/entity/EntityTrackingStatus.mapping | 13 + .../world/event/PositionSource.mapping | 11 + .../minecraft/world/gen/carver/Carver.mapping | 73 ++++ .../gen/chunk/ChunkGeneratorSettings.mapping | 52 +++ .../gen/chunk/NoiseChunkGenerator.mapping | 73 ++++ .../gen/feature/ChorusPlantFeature.mapping | 1 + .../gen/feature/util/FeatureContext.mapping | 20 + .../world/gen/noise/NoiseHelper.mapping | 13 + .../world/gen/noise/NoiseRouter.mapping | 7 + .../world/gen/root/MangroveRootPlacer.mapping | 27 ++ .../world/gen/trunk/TrunkPlacer.mapping | 67 ++++ .../world/timer/FunctionTimerCallback.mapping | 7 + .../net/minecraft/resource/package-info.java | 71 ++++ .../minecraft/util/registry/package-info.java | 10 + 101 files changed, 3215 insertions(+), 16 deletions(-) create mode 100644 fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/ide/RunConfigSettings.java create mode 100644 fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/providers/mappings/IntermediateMappingsService.java create mode 100644 fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/providers/mappings/parchment/ParchmentMappingsSpecBuilderImpl.java create mode 100644 fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/task/GenVsCodeProjectTask.java create mode 100644 fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/ExceptionUtil.java create mode 100644 fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/download/DownloadException.java create mode 100644 fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/gradle/ThreadedSimpleProgressLogger.java create mode 100644 fabric-loom-dev-1.0/src/test/resources/projects/localFileDependency/src/main/java/net/fabricmc/example/ExampleMod.java create mode 100644 fabric-loom-dev-1.0/src/test/resources/projects/localRuntime/settings.gradle create mode 100644 fabric-loom-dev-1.0/src/test/resources/projects/localRuntime/src/main/resources/fabric.mod.json create mode 100644 fabric-loom-dev-1.0/src/test/resources/projects/mixinApAutoRefmap/src/mixin1/resources/m1_2.mixins.json create mode 100644 fabric-loom-dev-1.0/src/test/resources/projects/runconfigs/build.gradle create mode 100644 fabric-loom-dev-1.0/src/test/resources/projects/splitSources/src/client/java/net/fabricmc/example/client/ExampleModClient.java create mode 100644 yarn-1.19.3/filament/src/main/java/net/fabricmc/filament/FilamentExtension.java create mode 100644 yarn-1.19.3/mappings/net/minecraft/advancement/criterion/ImpossibleCriterion.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/advancement/criterion/RecipeUnlockedCriterion.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/advancement/criterion/StartedRidingCriterion.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/block/JigsawBlock.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/block/MyceliumBlock.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/block/PlantBlock.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/block/entity/PistonBlockEntity.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/block/enums/WireConnection.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/block/sapling/AzaleaSaplingGenerator.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/gui/screen/ingame/CommandBlockScreen.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/gui/screen/ingame/HangingSignEditScreen.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/gui/widget/ButtonWidget.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/model/Model.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/particle/GlowParticle.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/BufferVertexConsumer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/block/entity/SignBlockEntityRenderer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/debug/ChunkBorderDebugRenderer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/debug/NeighborUpdateDebugRenderer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/entity/SpectralArrowEntityRenderer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/entity/feature/HeadFeatureRenderer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/entity/feature/VillagerClothingFeatureRenderer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/BoatEntityModel.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/EntityModelLayers.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/RaftEntityModel.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/model/ModelBakeSettings.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/render/model/json/MultipartModelComponent.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/client/util/ProfileKeysImpl.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/command/argument/ParticleEffectArgumentType.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/data/server/tag/AbstractItemTagProvider.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/enchantment/Enchantment.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/ai/NoPenaltyTargeting.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/ai/control/MoveControl.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/ai/goal/IronGolemLookGoal.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/ai/goal/StopFollowingCustomerGoal.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/boss/dragon/EnderDragonSpawnState.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/boss/dragon/phase/TakeoffPhase.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/decoration/LeashKnotEntity.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/mob/IllusionerEntity.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/mob/PillagerEntity.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/passive/AllayBrain.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/entity/passive/CowEntity.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/item/AliasedBlockItem.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/item/ChorusFruitItem.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/item/PowderSnowBucketItem.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/item/SkullItem.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/loot/provider/nbt/ContextLootNbtProvider.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/nbt/NbtFloat.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/nbt/NbtShort.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/network/packet/s2c/query/QueryResponseS2CPacket.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/registry/tag/TagGroupLoader.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/resource/featuretoggle/FeatureSet.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/server/command/CommandManager.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/server/dedicated/DedicatedServer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/structure/StructurePiecesGenerator.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/structure/StructureSet.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/structure/StructureTemplate.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/test/TestContext.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/text/EntityNbtDataSource.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/text/LiteralTextContent.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo5994.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6004.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6103.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6188.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6221.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6311.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/util/WorldSavePath.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/util/profiler/DummyRecorder.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/WorldProperties.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/entity/EntityHandler.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/entity/EntityTrackingStatus.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/event/PositionSource.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/carver/Carver.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/chunk/ChunkGeneratorSettings.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/chunk/NoiseChunkGenerator.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/feature/ChorusPlantFeature.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/feature/util/FeatureContext.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/noise/NoiseHelper.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/noise/NoiseRouter.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/root/MangroveRootPlacer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/gen/trunk/TrunkPlacer.mapping create mode 100644 yarn-1.19.3/mappings/net/minecraft/world/timer/FunctionTimerCallback.mapping create mode 100644 yarn-1.19.3/src/packageDocs/java/net/minecraft/resource/package-info.java create mode 100644 yarn-1.19.3/src/packageDocs/java/net/minecraft/util/registry/package-info.java diff --git a/build.gradle b/build.gradle index 0c1e958..7d78d64 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.11.30' + id 'fabric-loom' version '1.0-SNAPSHOT' id 'maven-publish' } @@ -23,7 +23,9 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modImplementation "fi.dy.masa.malilib:malilib-fabric-${project.minecraft_version}:${project.malilib_version}" + modImplementation "masa.dy.fi.malilib:malilib-fabric-${project.minecraft_version}:${project.malilib_version}" + implementation group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2" + modCompileOnly "com.terraformersmc:modmenu:${project.mod_menu_version}" } diff --git a/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/ide/RunConfigSettings.java b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/ide/RunConfigSettings.java new file mode 100644 index 0000000..babeca8 --- /dev/null +++ b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/ide/RunConfigSettings.java @@ -0,0 +1,320 @@ +/* + * This file is part of fabric-loom, licensed under the MIT License (MIT). + * + * Copyright (c) 2021 FabricMC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package net.fabricmc.loom.configuration.ide; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +import org.gradle.api.Named; +import org.gradle.api.Project; +import org.gradle.api.tasks.SourceSet; + +import net.fabricmc.loom.LoomGradleExtension; +import net.fabricmc.loom.configuration.providers.minecraft.MinecraftSourceSets; +import net.fabricmc.loom.util.Constants; +import net.fabricmc.loom.util.OperatingSystem; +import net.fabricmc.loom.util.gradle.SourceSetHelper; + +public final class RunConfigSettings implements Named { + /** + * Arguments for the JVM, such as system properties. + */ + private final List vmArgs = new ArrayList<>(); + + /** + * Arguments for the program's main class. + */ + private final List programArgs = new ArrayList<>(); + + /** + * The environment (or side) to run, usually client or server. + */ + private String environment; + + /** + * The full name of the run configuration, i.e. 'Minecraft Client'. + * + *

By default this is determined from the base name. + */ + private String name; + + /** + * The default main class of the run configuration. + * + *

This can be overwritten in {@code fabric_installer.[method].json}. Note that this doesn't take + * priority over the main class specified in the Fabric installer configuration. + */ + private String defaultMainClass; + + /** + * The source set getter, which obtains the source set from the given project. + */ + private Function source; + + /** + * The run directory for this configuration, relative to the root project directory. + */ + private String runDir; + + /** + * The base name of the run configuration, which is the name it is created with, i.e. 'client' + */ + private final String baseName; + + /** + * When true a run configuration file will be generated for IDE's. + * + *

By default only run configs on the root project will be generated. + */ + private boolean ideConfigGenerated; + + private final Map environmentVariables = new HashMap<>(); + + private final Project project; + private final LoomGradleExtension extension; + + public RunConfigSettings(Project project, String baseName) { + this.baseName = baseName; + this.project = project; + this.extension = LoomGradleExtension.get(project); + this.ideConfigGenerated = extension.isRootProject(); + + setSource(p -> { + final String sourceSetName = MinecraftSourceSets.get(p).getSourceSetForEnv(getEnvironment()); + return SourceSetHelper.getSourceSetByName(sourceSetName, p); + }); + + runDir("run"); + } + + public Project getProject() { + return project; + } + + public LoomGradleExtension getExtension() { + return extension; + } + + @Override + public String getName() { + return baseName; + } + + public List getVmArgs() { + return vmArgs; + } + + public List getProgramArgs() { + return programArgs; + } + + public String getEnvironment() { + return environment; + } + + public void setEnvironment(String environment) { + this.environment = environment; + } + + public String getConfigName() { + return name; + } + + public void setConfigName(String name) { + this.name = name; + } + + public String getDefaultMainClass() { + return defaultMainClass; + } + + public void setDefaultMainClass(String defaultMainClass) { + this.defaultMainClass = defaultMainClass; + } + + public String getRunDir() { + return runDir; + } + + public void setRunDir(String runDir) { + this.runDir = runDir; + } + + public SourceSet getSource(Project proj) { + return source.apply(proj); + } + + public void setSource(SourceSet source) { + this.source = proj -> source; + } + + public void setSource(Function sourceFn) { + this.source = sourceFn; + } + + public void environment(String environment) { + setEnvironment(environment); + } + + public void name(String name) { + setConfigName(name); + } + + public void defaultMainClass(String cls) { + setDefaultMainClass(cls); + } + + public void runDir(String dir) { + setRunDir(dir); + } + + public void vmArg(String arg) { + vmArgs.add(arg); + } + + public void vmArgs(String... args) { + vmArgs.addAll(Arrays.asList(args)); + } + + public void vmArgs(Collection args) { + vmArgs.addAll(args); + } + + public void property(String name, String value) { + vmArg("-D" + name + "=" + value); + } + + public void property(String name) { + vmArg("-D" + name); + } + + public void properties(Map props) { + props.forEach(this::property); + } + + public void programArg(String arg) { + programArgs.add(arg); + } + + public void programArgs(String... args) { + programArgs.addAll(Arrays.asList(args)); + } + + public void programArgs(Collection args) { + programArgs.addAll(args); + } + + public void source(SourceSet source) { + setSource(source); + } + + public void source(String source) { + setSource(proj -> SourceSetHelper.getSourceSetByName(source, proj)); + } + + public void ideConfigGenerated(boolean ideConfigGenerated) { + this.ideConfigGenerated = ideConfigGenerated; + } + + public Map getEnvironmentVariables() { + return environmentVariables; + } + + public void environmentVariable(String name, Object value) { + environmentVariables.put(name, value); + } + + /** + * Add the {@code -XstartOnFirstThread} JVM argument when on OSX. + */ + public void startFirstThread() { + if (OperatingSystem.CURRENT_OS.equals(OperatingSystem.MAC_OS)) { + vmArg("-XstartOnFirstThread"); + } + } + + /** + * Removes the {@code nogui} argument for the server configuration. By default {@code nogui} is specified, this is + * a convenient way to remove it if wanted. + */ + public void serverWithGui() { + programArgs.removeIf("nogui"::equals); + } + + /** + * Configure run config with the default client options. + */ + public void client() { + startFirstThread(); + environment("client"); + defaultMainClass(Constants.Knot.KNOT_CLIENT); + } + + /** + * Configure run config with the default server options. + */ + public void server() { + programArg("nogui"); + environment("server"); + defaultMainClass(Constants.Knot.KNOT_SERVER); + } + + /** + * Copies settings from another run configuration. + */ + public void inherit(RunConfigSettings parent) { + vmArgs.addAll(0, parent.vmArgs); + programArgs.addAll(0, parent.programArgs); + environmentVariables.putAll(parent.environmentVariables); + + environment = parent.environment; + name = parent.name; + defaultMainClass = parent.defaultMainClass; + source = parent.source; + ideConfigGenerated = parent.ideConfigGenerated; + } + + public void makeRunDir() { + File file = new File(getProject().getProjectDir(), runDir); + + if (!file.exists()) { + file.mkdir(); + } + } + + public boolean isIdeConfigGenerated() { + return ideConfigGenerated; + } + + public void setIdeConfigGenerated(boolean ideConfigGenerated) { + this.ideConfigGenerated = ideConfigGenerated; + } +} diff --git a/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/providers/mappings/IntermediateMappingsService.java b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/providers/mappings/IntermediateMappingsService.java new file mode 100644 index 0000000..13b1427 --- /dev/null +++ b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/providers/mappings/IntermediateMappingsService.java @@ -0,0 +1,109 @@ +/* + * This file is part of fabric-loom, licensed under the MIT License (MIT). + * + * Copyright (c) 2022 FabricMC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package net.fabricmc.loom.configuration.providers.mappings; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Collections; +import java.util.Objects; +import java.util.function.Supplier; + +import com.google.common.base.Suppliers; +import org.gradle.api.Project; +import org.jetbrains.annotations.VisibleForTesting; + +import net.fabricmc.loom.LoomGradleExtension; +import net.fabricmc.loom.api.mappings.intermediate.IntermediateMappingsProvider; +import net.fabricmc.loom.api.mappings.layered.MappingsNamespace; +import net.fabricmc.loom.configuration.providers.minecraft.MinecraftProvider; +import net.fabricmc.loom.util.service.SharedService; +import net.fabricmc.loom.util.service.SharedServiceManager; +import net.fabricmc.mappingio.adapter.MappingNsCompleter; +import net.fabricmc.mappingio.format.Tiny2Reader; +import net.fabricmc.mappingio.tree.MemoryMappingTree; + +public final class IntermediateMappingsService implements SharedService { + private final Path intermediaryTiny; + private final Supplier memoryMappingTree = Suppliers.memoize(this::createMemoryMappingTree); + + private IntermediateMappingsService(Path intermediaryTiny) { + this.intermediaryTiny = intermediaryTiny; + } + + public static synchronized IntermediateMappingsService getInstance(Project project, MinecraftProvider minecraftProvider) { + final LoomGradleExtension extension = LoomGradleExtension.get(project); + final IntermediateMappingsProvider intermediateProvider = extension.getIntermediateMappingsProvider(); + final String id = "IntermediateMappingsService:%s:%s".formatted(intermediateProvider.getName(), intermediateProvider.getMinecraftVersion().get()); + + return SharedServiceManager.get(project).getOrCreateService(id, () -> create(intermediateProvider, minecraftProvider)); + } + + @VisibleForTesting + public static IntermediateMappingsService create(IntermediateMappingsProvider intermediateMappingsProvider, MinecraftProvider minecraftProvider) { + final Path intermediaryTiny = minecraftProvider.file(intermediateMappingsProvider.getName() + ".tiny").toPath(); + + try { + intermediateMappingsProvider.provide(intermediaryTiny); + } catch (IOException e) { + try { + Files.deleteIfExists(intermediaryTiny); + } catch (IOException ex) { + ex.printStackTrace(); + } + + throw new UncheckedIOException("Failed to provide intermediate mappings", e); + } + + return new IntermediateMappingsService(intermediaryTiny); + } + + private MemoryMappingTree createMemoryMappingTree() { + final MemoryMappingTree tree = new MemoryMappingTree(); + + try { + MappingNsCompleter nsCompleter = new MappingNsCompleter(tree, Collections.singletonMap(MappingsNamespace.NAMED.toString(), MappingsNamespace.INTERMEDIARY.toString()), true); + + try (BufferedReader reader = Files.newBufferedReader(getIntermediaryTiny(), StandardCharsets.UTF_8)) { + Tiny2Reader.read(reader, nsCompleter); + } + } catch (IOException e) { + throw new UncheckedIOException("Failed to read intermediary mappings", e); + } + + return tree; + } + + public MemoryMappingTree getMemoryMappingTree() { + return memoryMappingTree.get(); + } + + public Path getIntermediaryTiny() { + return Objects.requireNonNull(intermediaryTiny, "Intermediary mappings have not been setup"); + } +} diff --git a/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/providers/mappings/parchment/ParchmentMappingsSpecBuilderImpl.java b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/providers/mappings/parchment/ParchmentMappingsSpecBuilderImpl.java new file mode 100644 index 0000000..4830cad --- /dev/null +++ b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/configuration/providers/mappings/parchment/ParchmentMappingsSpecBuilderImpl.java @@ -0,0 +1,52 @@ +/* + * This file is part of fabric-loom, licensed under the MIT License (MIT). + * + * Copyright (c) 2018-2021 FabricMC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package net.fabricmc.loom.configuration.providers.mappings.parchment; + +import net.fabricmc.loom.api.mappings.layered.spec.FileSpec; +import net.fabricmc.loom.api.mappings.layered.spec.ParchmentMappingsSpecBuilder; + +public class ParchmentMappingsSpecBuilderImpl implements ParchmentMappingsSpecBuilder { + private final FileSpec fileSpec; + + private boolean removePrefix; + + private ParchmentMappingsSpecBuilderImpl(FileSpec fileSpec) { + this.fileSpec = fileSpec; + } + + public static ParchmentMappingsSpecBuilderImpl builder(FileSpec fileSpec) { + return new ParchmentMappingsSpecBuilderImpl(fileSpec); + } + + @Override + public ParchmentMappingsSpecBuilder setRemovePrefix(boolean removePrefix) { + this.removePrefix = removePrefix; + return this; + } + + public ParchmentMappingsSpec build() { + return new ParchmentMappingsSpec(fileSpec, removePrefix); + } +} diff --git a/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/task/GenVsCodeProjectTask.java b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/task/GenVsCodeProjectTask.java new file mode 100644 index 0000000..e153916 --- /dev/null +++ b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/task/GenVsCodeProjectTask.java @@ -0,0 +1,152 @@ +/* + * This file is part of fabric-loom, licensed under the MIT License (MIT). + * + * Copyright (c) 2018-2021 FabricMC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package net.fabricmc.loom.task; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import org.gradle.api.tasks.TaskAction; + +import net.fabricmc.loom.LoomGradlePlugin; +import net.fabricmc.loom.configuration.ide.RunConfig; +import net.fabricmc.loom.configuration.ide.RunConfigSettings; + +// Recommended vscode plugin pack: +// https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack +public class GenVsCodeProjectTask extends AbstractLoomTask { + @TaskAction + public void genRuns() throws IOException { + final Path projectDir = getProject().getRootDir().toPath().resolve(".vscode"); + + if (Files.notExists(projectDir)) { + Files.createDirectories(projectDir); + } + + final Path launchJson = projectDir.resolve("launch.json"); + final JsonObject root; + + if (Files.exists(launchJson)) { + root = LoomGradlePlugin.GSON.fromJson(Files.readString(launchJson, StandardCharsets.UTF_8), JsonObject.class); + } else { + root = new JsonObject(); + root.addProperty("version", "0.2.0"); + } + + final JsonArray configurations; + + if (root.has("configurations")) { + configurations = root.getAsJsonArray("configurations"); + } else { + configurations = new JsonArray(); + root.add("configurations", configurations); + } + + for (RunConfigSettings settings : getExtension().getRunConfigs()) { + if (!settings.isIdeConfigGenerated()) { + continue; + } + + final VsCodeConfiguration configuration = new VsCodeConfiguration(RunConfig.runConfig(getProject(), settings)); + final JsonElement configurationJson = LoomGradlePlugin.GSON.toJsonTree(configuration); + + final List toRemove = new LinkedList<>(); + + // Remove any existing with the same name + for (JsonElement jsonElement : configurations) { + if (!jsonElement.isJsonObject()) { + continue; + } + + final JsonObject jsonObject = jsonElement.getAsJsonObject(); + + if (jsonObject.has("name")) { + if (jsonObject.get("name").getAsString().equalsIgnoreCase(configuration.name)) { + toRemove.add(jsonElement); + } + } + } + + toRemove.forEach(configurations::remove); + + configurations.add(configurationJson); + settings.makeRunDir(); + } + + final String json = LoomGradlePlugin.GSON.toJson(root); + Files.writeString(launchJson, json, StandardCharsets.UTF_8); + } + + private class VsCodeLaunch { + public String version = "0.2.0"; + public List configurations = new ArrayList<>(); + + public void add(RunConfig runConfig) { + configurations.add(new VsCodeConfiguration(runConfig)); + } + } + + @SuppressWarnings("unused") + private class VsCodeConfiguration { + public String type = "java"; + public String name; + public String request = "launch"; + public String cwd; + public String console = "internalConsole"; + public boolean stopOnEntry = false; + public String mainClass; + public String vmArgs; + public String args; + public Map env; + public String projectName; + + VsCodeConfiguration(RunConfig runConfig) { + this.name = runConfig.configName; + this.mainClass = runConfig.mainClass; + this.vmArgs = RunConfig.joinArguments(runConfig.vmArgs); + this.args = RunConfig.joinArguments(runConfig.programArgs); + this.cwd = "${workspaceFolder}/" + runConfig.runDir; + this.env = new HashMap<>(runConfig.environmentVariables); + this.projectName = runConfig.projectName; + + if (getProject().getRootProject() != getProject()) { + Path rootPath = getProject().getRootDir().toPath(); + Path projectPath = getProject().getProjectDir().toPath(); + String relativePath = rootPath.relativize(projectPath).toString(); + + this.cwd = "${workspaceFolder}/%s/%s".formatted(relativePath, runConfig.runDir); + } + } + } +} diff --git a/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/ExceptionUtil.java b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/ExceptionUtil.java new file mode 100644 index 0000000..3683301 --- /dev/null +++ b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/ExceptionUtil.java @@ -0,0 +1,47 @@ +/* + * This file is part of fabric-loom, licensed under the MIT License (MIT). + * + * Copyright (c) 2022 FabricMC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package net.fabricmc.loom.util; + +import java.util.function.BiFunction; + +public final class ExceptionUtil { + /** + * Creates a descriptive user-facing wrapper exception for an underlying cause. + * + *

The output format has a message like this: {@code [message], [cause class]: [cause message]}. + * For example: {@code Failed to remap, java.io.IOException: Access denied}. + * + * @param constructor the exception factory which takes in a message and a cause + * @param message the more general message for the resulting exception + * @param cause the causing exception + * @param the created exception type + * @param the cause type + * @return the created exception + */ + public static E createDescriptiveWrapper(BiFunction constructor, String message, C cause) { + String descriptiveMessage = "%s, %s: %s".formatted(message, cause.getClass().getName(), cause.getMessage()); + return constructor.apply(descriptiveMessage, cause); + } +} diff --git a/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/download/DownloadException.java b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/download/DownloadException.java new file mode 100644 index 0000000..993fa25 --- /dev/null +++ b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/download/DownloadException.java @@ -0,0 +1,41 @@ +/* + * This file is part of fabric-loom, licensed under the MIT License (MIT). + * + * Copyright (c) 2022 FabricMC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package net.fabricmc.loom.util.download; + +import java.io.IOException; + +public class DownloadException extends IOException { + public DownloadException(String message) { + super(message); + } + + public DownloadException(String message, Throwable cause) { + super(message, cause); + } + + public DownloadException(Throwable cause) { + super(cause); + } +} diff --git a/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/gradle/ThreadedSimpleProgressLogger.java b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/gradle/ThreadedSimpleProgressLogger.java new file mode 100644 index 0000000..f85e2ed --- /dev/null +++ b/fabric-loom-dev-1.0/src/main/java/net/fabricmc/loom/util/gradle/ThreadedSimpleProgressLogger.java @@ -0,0 +1,37 @@ +/* + * This file is part of fabric-loom, licensed under the MIT License (MIT). + * + * Copyright (c) 2021 FabricMC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package net.fabricmc.loom.util.gradle; + +import java.io.IOException; +import java.util.Locale; + +import net.fabricmc.loom.util.IOStringConsumer; + +public record ThreadedSimpleProgressLogger(IOStringConsumer parent) implements IOStringConsumer { + @Override + public void accept(String data) throws IOException { + parent.accept(String.format(Locale.ENGLISH, "%d::%s", Thread.currentThread().getId(), data)); + } +} diff --git a/fabric-loom-dev-1.0/src/test/resources/projects/localFileDependency/src/main/java/net/fabricmc/example/ExampleMod.java b/fabric-loom-dev-1.0/src/test/resources/projects/localFileDependency/src/main/java/net/fabricmc/example/ExampleMod.java new file mode 100644 index 0000000..6523c2b --- /dev/null +++ b/fabric-loom-dev-1.0/src/test/resources/projects/localFileDependency/src/main/java/net/fabricmc/example/ExampleMod.java @@ -0,0 +1,28 @@ +package net.fabricmc.example; + +import net.minecraft.block.Block; + +import net.fabricmc.api.ModInitializer; +import net.fabricmc.loom.LoomTestDataA; +import net.fabricmc.loom.LoomTestDataB; +import net.fabricmc.loom.LoomTestDataC; +import net.fabricmc.loom.LoomTestDataD; +import net.fabricmc.loom.LoomTestDataE; + +public class ExampleMod implements ModInitializer { + @Override + public void onInitialize() { + // This code runs as soon as Minecraft is in a mod-load-ready state. + // However, some things (like resources) may still be uninitialized. + // Proceed with mild caution. + + System.out.println("Hello Fabric world!"); + + // If this doesn't compile, remapping went wrong. + Block blockA = LoomTestDataA.referenceToMinecraft(); + Block blockB = LoomTestDataB.referenceToMinecraft(); + Block blockC = LoomTestDataC.referenceToMinecraft(); + Block blockD = LoomTestDataD.referenceToMinecraft(); + Block blockE = LoomTestDataE.referenceToMinecraft(); + } +} diff --git a/fabric-loom-dev-1.0/src/test/resources/projects/localRuntime/settings.gradle b/fabric-loom-dev-1.0/src/test/resources/projects/localRuntime/settings.gradle new file mode 100644 index 0000000..c162c36 --- /dev/null +++ b/fabric-loom-dev-1.0/src/test/resources/projects/localRuntime/settings.gradle @@ -0,0 +1,2 @@ +rootProject.name = "fabric-example-mod" + diff --git a/fabric-loom-dev-1.0/src/test/resources/projects/localRuntime/src/main/resources/fabric.mod.json b/fabric-loom-dev-1.0/src/test/resources/projects/localRuntime/src/main/resources/fabric.mod.json new file mode 100644 index 0000000..d3f1483 --- /dev/null +++ b/fabric-loom-dev-1.0/src/test/resources/projects/localRuntime/src/main/resources/fabric.mod.json @@ -0,0 +1,35 @@ +{ + "schemaVersion": 1, + "id": "modid", + "version": "1.0.0", + + "name": "Example Mod", + "description": "This is an example description! Tell everyone what your mod is about!", + "authors": [ + "Me!" + ], + "contact": { + "homepage": "https://fabricmc.net/", + "sources": "https://github.com/FabricMC/fabric-example-mod" + }, + + "license": "CC0-1.0", + + "environment": "*", + "entrypoints": { + "main": [ + "net.fabricmc.example.ExampleMod" + ] + }, + "mixins": [ + "modid.mixins.json" + ], + + "depends": { + "fabricloader": ">=0.7.4", + "minecraft": "1.16.x" + }, + "suggests": { + "another-mod": "*" + } +} diff --git a/fabric-loom-dev-1.0/src/test/resources/projects/mixinApAutoRefmap/src/mixin1/resources/m1_2.mixins.json b/fabric-loom-dev-1.0/src/test/resources/projects/mixinApAutoRefmap/src/mixin1/resources/m1_2.mixins.json new file mode 100644 index 0000000..74cac4b --- /dev/null +++ b/fabric-loom-dev-1.0/src/test/resources/projects/mixinApAutoRefmap/src/mixin1/resources/m1_2.mixins.json @@ -0,0 +1,14 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "net.fabricmc.example.mixin", + "compatibilityLevel": "JAVA_16", + "mixins": [ + ], + "client": [ + "ExampleMixin1_2" + ], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/fabric-loom-dev-1.0/src/test/resources/projects/runconfigs/build.gradle b/fabric-loom-dev-1.0/src/test/resources/projects/runconfigs/build.gradle new file mode 100644 index 0000000..a8e1f6b --- /dev/null +++ b/fabric-loom-dev-1.0/src/test/resources/projects/runconfigs/build.gradle @@ -0,0 +1,37 @@ +plugins { + id 'fabric-loom' +} + +loom { + runs { + testmodClient { + client() + ideConfigGenerated project.rootProject == project + name = "Testmod Client" + source sourceSets.main + } + testmodServer { + server() + ideConfigGenerated project.rootProject == project + name = "Testmod Server" + source sourceSets.main + } + autoTestServer { + inherit testmodServer + vmArg "-Dfabric.autoTest" + } + } + + runConfigs.configureEach { + vmArg "-Dfabric.loom.test.space=This contains a space" + } +} + +archivesBaseName = "fabric-example-mod" +version = "1.0.0" + +dependencies { + minecraft "com.mojang:minecraft:1.18.1" + mappings "net.fabricmc:yarn:1.18.1+build.12:v2" + modImplementation "net.fabricmc:fabric-loader:0.12.12" +} \ No newline at end of file diff --git a/fabric-loom-dev-1.0/src/test/resources/projects/splitSources/src/client/java/net/fabricmc/example/client/ExampleModClient.java b/fabric-loom-dev-1.0/src/test/resources/projects/splitSources/src/client/java/net/fabricmc/example/client/ExampleModClient.java new file mode 100644 index 0000000..9047ed6 --- /dev/null +++ b/fabric-loom-dev-1.0/src/test/resources/projects/splitSources/src/client/java/net/fabricmc/example/client/ExampleModClient.java @@ -0,0 +1,19 @@ +package net.fabricmc.example.client; + +import net.fabricmc.api.ClientModInitializer; + +import net.minecraft.client.MinecraftClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ExampleModClient implements ClientModInitializer { + public static final Logger LOGGER = LoggerFactory.getLogger(ExampleModClient.class); + + @Override + public void onInitializeClient() { + LOGGER.info("Hello Client"); + + // Check we can compile against the client. + MinecraftClient client; + } +} diff --git a/gradle.properties b/gradle.properties index 0777411..7ba1047 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,21 +3,21 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.18.2 -yarn_mappings=1.18.2+build.3 -loader_version=0.13.3 +minecraft_version=1.19.3 +yarn_mappings=1.19.3+build.5 +loader_version=0.14.12 # Mod Properties -mod_version= 2.2.3 +mod_version= 2.2.3.5 maven_group=tlesis archives_base_name=squakeplusplus # Dependencies # Required malilib version -malilib_version=0.11.4 +malilib_version=0.14.0 # check this on https://modmuss50.me/fabric.html #Fabric api -fabric_version=0.50.0+1.18.2 +fabric_version=0.72.0+1.19.3 mod_menu_version=3.0.1 \ No newline at end of file diff --git a/gradlew b/gradlew index 1b6c787..c53aefa 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions $var, ${var}, ${var:-default}, ${var+SET}, +# ${var#prefix}, ${var%suffix}, and $( cmd ); +# * compound commands having a testable exit status, especially case; +# * various built-in commands including command, set, and ulimit. # # Important for patching: # diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index cc2fafa..7949900 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -36,9 +36,9 @@ ], "depends": { - "fabricloader": ">=0.12.12", + "fabricloader": ">=0.14.12", "fabric": "*", - "minecraft": "1.18.1", - "malilib": ">=0.11.3 <0.12" + "minecraft": ">=1.19.2", + "malilib": ">=0.14.0" } } \ No newline at end of file diff --git a/yarn-1.19.3/filament/src/main/java/net/fabricmc/filament/FilamentExtension.java b/yarn-1.19.3/filament/src/main/java/net/fabricmc/filament/FilamentExtension.java new file mode 100644 index 0000000..8a91855 --- /dev/null +++ b/yarn-1.19.3/filament/src/main/java/net/fabricmc/filament/FilamentExtension.java @@ -0,0 +1,35 @@ +package net.fabricmc.filament; + +import java.io.File; + +import javax.inject.Inject; + +import org.gradle.api.Project; +import org.gradle.api.provider.Property; + +public abstract class FilamentExtension { + public static FilamentExtension get(Project project) { + return project.getExtensions().getByType(FilamentExtension.class); + } + + @Inject + protected abstract Project getProject(); + + public abstract Property getMinecraftVersion(); + + public abstract Property getMinecraftVersionManifestUrl(); + + @Inject + public FilamentExtension() { + getMinecraftVersion().finalizeValueOnRead(); + getMinecraftVersionManifestUrl().convention("https://piston-meta.mojang.com/mc/game/version_manifest_v2.json").finalizeValueOnRead(); + } + + public File getCacheDirectory() { + return new File(getProject().getRootDir(), ".gradle/filament"); + } + + public File getMinecraftDirectory() { + return new File(getCacheDirectory(), getMinecraftVersion().get()); + } +} diff --git a/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/ImpossibleCriterion.mapping b/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/ImpossibleCriterion.mapping new file mode 100644 index 0000000..0ee7207 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/ImpossibleCriterion.mapping @@ -0,0 +1,3 @@ +CLASS net/minecraft/class_2062 net/minecraft/advancement/criterion/ImpossibleCriterion + FIELD field_9624 ID Lnet/minecraft/class_2960; + CLASS class_2063 Conditions diff --git a/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/RecipeUnlockedCriterion.mapping b/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/RecipeUnlockedCriterion.mapping new file mode 100644 index 0000000..73a63cb --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/RecipeUnlockedCriterion.mapping @@ -0,0 +1,16 @@ +CLASS net/minecraft/class_2119 net/minecraft/advancement/criterion/RecipeUnlockedCriterion + FIELD field_9738 ID Lnet/minecraft/class_2960; + METHOD method_22508 (Lnet/minecraft/class_1860;Lnet/minecraft/class_2119$class_2121;)Z + ARG 1 conditions + METHOD method_27847 create (Lnet/minecraft/class_2960;)Lnet/minecraft/class_2119$class_2121; + ARG 0 id + METHOD method_9107 trigger (Lnet/minecraft/class_3222;Lnet/minecraft/class_1860;)V + ARG 1 player + ARG 2 recipe + CLASS class_2121 Conditions + FIELD field_9742 recipe Lnet/minecraft/class_2960; + METHOD (Lnet/minecraft/class_2048$class_5258;Lnet/minecraft/class_2960;)V + ARG 1 player + ARG 2 recipe + METHOD method_9112 matches (Lnet/minecraft/class_1860;)Z + ARG 1 recipe diff --git a/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/StartedRidingCriterion.mapping b/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/StartedRidingCriterion.mapping new file mode 100644 index 0000000..851ee1e --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/advancement/criterion/StartedRidingCriterion.mapping @@ -0,0 +1,11 @@ +CLASS net/minecraft/class_6407 net/minecraft/advancement/criterion/StartedRidingCriterion + FIELD field_33932 ID Lnet/minecraft/class_2960; + METHOD method_37257 trigger (Lnet/minecraft/class_3222;)V + ARG 1 player + METHOD method_37259 (Lnet/minecraft/class_6407$class_6408;)Z + ARG 0 conditions + CLASS class_6408 Conditions + METHOD (Lnet/minecraft/class_2048$class_5258;)V + ARG 1 player + METHOD method_37260 create (Lnet/minecraft/class_2048$class_2049;)Lnet/minecraft/class_6407$class_6408; + ARG 0 player diff --git a/yarn-1.19.3/mappings/net/minecraft/block/JigsawBlock.mapping b/yarn-1.19.3/mappings/net/minecraft/block/JigsawBlock.mapping new file mode 100644 index 0000000..8e17f5f --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/block/JigsawBlock.mapping @@ -0,0 +1,9 @@ +CLASS net/minecraft/class_3748 net/minecraft/block/JigsawBlock + FIELD field_23262 ORIENTATION Lnet/minecraft/class_2754; + METHOD method_16546 attachmentMatches (Lnet/minecraft/class_3499$class_3501;Lnet/minecraft/class_3499$class_3501;)Z + ARG 0 info1 + ARG 1 info2 + METHOD method_26378 getFacing (Lnet/minecraft/class_2680;)Lnet/minecraft/class_2350; + ARG 0 state + METHOD method_26379 getRotation (Lnet/minecraft/class_2680;)Lnet/minecraft/class_2350; + ARG 0 state diff --git a/yarn-1.19.3/mappings/net/minecraft/block/MyceliumBlock.mapping b/yarn-1.19.3/mappings/net/minecraft/block/MyceliumBlock.mapping new file mode 100644 index 0000000..b31d233 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/block/MyceliumBlock.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_2418 net/minecraft/block/MyceliumBlock diff --git a/yarn-1.19.3/mappings/net/minecraft/block/PlantBlock.mapping b/yarn-1.19.3/mappings/net/minecraft/block/PlantBlock.mapping new file mode 100644 index 0000000..8c127c4 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/block/PlantBlock.mapping @@ -0,0 +1,5 @@ +CLASS net/minecraft/class_2261 net/minecraft/block/PlantBlock + METHOD method_9695 canPlantOnTop (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Z + ARG 1 floor + ARG 2 world + ARG 3 pos diff --git a/yarn-1.19.3/mappings/net/minecraft/block/entity/PistonBlockEntity.mapping b/yarn-1.19.3/mappings/net/minecraft/block/entity/PistonBlockEntity.mapping new file mode 100644 index 0000000..af1cdd9 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/block/entity/PistonBlockEntity.mapping @@ -0,0 +1,73 @@ +CLASS net/minecraft/class_2669 net/minecraft/block/entity/PistonBlockEntity + COMMENT A piston block entity represents the block being pushed by a piston. + FIELD field_12201 facing Lnet/minecraft/class_2350; + FIELD field_12202 source Z + FIELD field_12203 extending Z + FIELD field_12204 pushedBlock Lnet/minecraft/class_2680; + FIELD field_12206 lastProgress F + FIELD field_12207 progress F + FIELD field_12208 savedWorldTime J + METHOD (Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V + ARG 1 pos + ARG 2 state + METHOD (Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;ZZ)V + ARG 1 pos + ARG 2 state + ARG 3 pushedBlock + ARG 4 facing + ARG 5 extending + ARG 6 source + METHOD method_11494 getRenderOffsetX (F)F + ARG 1 tickDelta + METHOD method_11495 getPushedBlock ()Lnet/minecraft/class_2680; + METHOD method_11496 getHeadBlockState ()Lnet/minecraft/class_2680; + METHOD method_11497 getIntersectionSize (Lnet/minecraft/class_238;Lnet/minecraft/class_2350;Lnet/minecraft/class_238;)D + METHOD method_11498 getFacing ()Lnet/minecraft/class_2350; + METHOD method_11499 getProgress (F)F + ARG 1 tickDelta + METHOD method_11500 offsetHeadBox (Lnet/minecraft/class_2338;Lnet/minecraft/class_238;Lnet/minecraft/class_2669;)Lnet/minecraft/class_238; + ARG 0 pos + ARG 1 box + ARG 2 blockEntity + METHOD method_11501 isExtending ()Z + METHOD method_11503 pushEntities (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;FLnet/minecraft/class_2669;)V + ARG 0 world + ARG 1 pos + ARG 3 blockEntity + METHOD method_11504 getAmountExtended (F)F + ARG 1 progress + METHOD method_11506 getMovementDirection ()Lnet/minecraft/class_2350; + METHOD method_11507 getRenderOffsetZ (F)F + ARG 1 tickDelta + METHOD method_11508 getSavedWorldTime ()J + METHOD method_11511 getRenderOffsetY (F)F + ARG 1 tickDelta + METHOD method_11512 getCollisionShape (Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265; + ARG 1 world + ARG 2 pos + METHOD method_11513 finish ()V + METHOD method_11514 push (Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;Lnet/minecraft/class_2350;D)V + ARG 0 pos + ARG 1 entity + ARG 2 direction + ARG 3 amount + METHOD method_11515 isSource ()Z + METHOD method_23364 isPushingHoneyBlock ()Z + METHOD method_23671 canMoveEntity (Lnet/minecraft/class_238;Lnet/minecraft/class_1297;)Z + ARG 0 box + ARG 1 entity + METHOD method_23672 moveEntity (Lnet/minecraft/class_2350;Lnet/minecraft/class_1297;DLnet/minecraft/class_2350;)V + ARG 0 direction + ARG 1 entity + ARG 4 movementDirection + METHOD method_23673 (Lnet/minecraft/class_238;Lnet/minecraft/class_1297;)Z + ARG 1 entity + METHOD method_23674 moveEntitiesInHoneyBlock (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;FLnet/minecraft/class_2669;)V + ARG 0 world + ARG 1 pos + ARG 3 blockEntity + METHOD method_31707 tick (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2669;)V + ARG 0 world + ARG 1 pos + ARG 2 state + ARG 3 blockEntity diff --git a/yarn-1.19.3/mappings/net/minecraft/block/enums/WireConnection.mapping b/yarn-1.19.3/mappings/net/minecraft/block/enums/WireConnection.mapping new file mode 100644 index 0000000..a639693 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/block/enums/WireConnection.mapping @@ -0,0 +1,5 @@ +CLASS net/minecraft/class_2773 net/minecraft/block/enums/WireConnection + FIELD field_12685 name Ljava/lang/String; + METHOD (Ljava/lang/String;ILjava/lang/String;)V + ARG 3 name + METHOD method_27855 isConnected ()Z diff --git a/yarn-1.19.3/mappings/net/minecraft/block/sapling/AzaleaSaplingGenerator.mapping b/yarn-1.19.3/mappings/net/minecraft/block/sapling/AzaleaSaplingGenerator.mapping new file mode 100644 index 0000000..c6ff2e8 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/block/sapling/AzaleaSaplingGenerator.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_6349 net/minecraft/block/sapling/AzaleaSaplingGenerator diff --git a/yarn-1.19.3/mappings/net/minecraft/client/gui/screen/ingame/CommandBlockScreen.mapping b/yarn-1.19.3/mappings/net/minecraft/client/gui/screen/ingame/CommandBlockScreen.mapping new file mode 100644 index 0000000..74be16b --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/gui/screen/ingame/CommandBlockScreen.mapping @@ -0,0 +1,24 @@ +CLASS net/minecraft/class_477 net/minecraft/client/gui/screen/ingame/CommandBlockScreen + FIELD field_2865 blockEntity Lnet/minecraft/class_2593; + FIELD field_2866 redstoneTriggerButton Lnet/minecraft/class_5676; + FIELD field_2867 autoActivate Z + FIELD field_2868 conditional Z + FIELD field_2869 modeButton Lnet/minecraft/class_5676; + FIELD field_2870 mode Lnet/minecraft/class_2593$class_2594; + FIELD field_2871 conditionalModeButton Lnet/minecraft/class_5676; + METHOD (Lnet/minecraft/class_2593;)V + ARG 1 blockEntity + METHOD method_2457 updateCommandBlock ()V + METHOD method_32643 (Lnet/minecraft/class_2593$class_2594;)Lnet/minecraft/class_2561; + ARG 0 value + METHOD method_32644 (Lnet/minecraft/class_5676;Lnet/minecraft/class_2593$class_2594;)V + ARG 1 button + ARG 2 mode + METHOD method_32645 (Lnet/minecraft/class_5676;Ljava/lang/Boolean;)V + ARG 1 button + ARG 2 autoActivate + METHOD method_32646 (Lnet/minecraft/class_5676;Ljava/lang/Boolean;)V + ARG 1 button + ARG 2 conditional + METHOD method_32647 setButtonsActive (Z)V + ARG 1 active diff --git a/yarn-1.19.3/mappings/net/minecraft/client/gui/screen/ingame/HangingSignEditScreen.mapping b/yarn-1.19.3/mappings/net/minecraft/client/gui/screen/ingame/HangingSignEditScreen.mapping new file mode 100644 index 0000000..44d5311 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/gui/screen/ingame/HangingSignEditScreen.mapping @@ -0,0 +1,4 @@ +CLASS net/minecraft/class_7744 net/minecraft/client/gui/screen/ingame/HangingSignEditScreen + FIELD field_40431 BACKGROUND_SCALE F + FIELD field_40432 TEXT_SCALE Lorg/joml/Vector3f; + FIELD field_40435 texture Lnet/minecraft/class_2960; diff --git a/yarn-1.19.3/mappings/net/minecraft/client/gui/widget/ButtonWidget.mapping b/yarn-1.19.3/mappings/net/minecraft/client/gui/widget/ButtonWidget.mapping new file mode 100644 index 0000000..edc706a --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/gui/widget/ButtonWidget.mapping @@ -0,0 +1,56 @@ +CLASS net/minecraft/class_4185 net/minecraft/client/gui/widget/ButtonWidget + FIELD field_22767 onPress Lnet/minecraft/class_4185$class_4241; + FIELD field_39499 DEFAULT_WIDTH_SMALL I + FIELD field_39500 DEFAULT_WIDTH I + FIELD field_39501 DEFAULT_HEIGHT I + FIELD field_40754 DEFAULT_NARRATION_SUPPLIER Lnet/minecraft/class_4185$class_7841; + FIELD field_40755 narrationSupplier Lnet/minecraft/class_4185$class_7841; + METHOD (IIIILnet/minecraft/class_2561;Lnet/minecraft/class_4185$class_4241;Lnet/minecraft/class_4185$class_7841;)V + ARG 1 x + ARG 2 y + ARG 3 width + ARG 4 height + ARG 5 message + ARG 6 onPress + ARG 7 narrationSupplier + METHOD method_46429 (Ljava/util/function/Supplier;)Lnet/minecraft/class_5250; + ARG 0 textSupplier + METHOD method_46430 builder (Lnet/minecraft/class_2561;Lnet/minecraft/class_4185$class_4241;)Lnet/minecraft/class_4185$class_7840; + ARG 0 message + ARG 1 onPress + CLASS class_4241 PressAction + METHOD onPress (Lnet/minecraft/class_4185;)V + ARG 1 button + CLASS class_7840 Builder + FIELD field_40756 message Lnet/minecraft/class_2561; + FIELD field_40757 onPress Lnet/minecraft/class_4185$class_4241; + FIELD field_40759 x I + FIELD field_40760 y I + FIELD field_40761 width I + FIELD field_40762 height I + FIELD field_40763 narrationSupplier Lnet/minecraft/class_4185$class_7841; + FIELD field_41099 tooltip Lnet/minecraft/class_7919; + METHOD (Lnet/minecraft/class_2561;Lnet/minecraft/class_4185$class_4241;)V + ARG 1 message + ARG 2 onPress + METHOD method_46431 build ()Lnet/minecraft/class_4185; + METHOD method_46432 width (I)Lnet/minecraft/class_4185$class_7840; + ARG 1 width + METHOD method_46433 position (II)Lnet/minecraft/class_4185$class_7840; + ARG 1 x + ARG 2 y + METHOD method_46434 dimensions (IIII)Lnet/minecraft/class_4185$class_7840; + ARG 1 x + ARG 2 y + ARG 3 width + ARG 4 height + METHOD method_46435 narrationSupplier (Lnet/minecraft/class_4185$class_7841;)Lnet/minecraft/class_4185$class_7840; + ARG 1 narrationSupplier + METHOD method_46436 tooltip (Lnet/minecraft/class_7919;)Lnet/minecraft/class_4185$class_7840; + ARG 1 tooltip + METHOD method_46437 size (II)Lnet/minecraft/class_4185$class_7840; + ARG 1 width + ARG 2 height + CLASS class_7841 NarrationSupplier + METHOD createNarrationMessage (Ljava/util/function/Supplier;)Lnet/minecraft/class_5250; + ARG 1 textSupplier diff --git a/yarn-1.19.3/mappings/net/minecraft/client/model/Model.mapping b/yarn-1.19.3/mappings/net/minecraft/client/model/Model.mapping new file mode 100644 index 0000000..76d3d8c --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/model/Model.mapping @@ -0,0 +1,20 @@ +CLASS net/minecraft/class_3879 net/minecraft/client/model/Model + COMMENT Represents a dynamic model which has its own render layers and custom rendering. + FIELD field_21343 layerFactory Ljava/util/function/Function; + METHOD (Ljava/util/function/Function;)V + ARG 1 layerFactory + METHOD method_23500 getLayer (Lnet/minecraft/class_2960;)Lnet/minecraft/class_1921; + COMMENT {@return the render layer for the corresponding texture} + ARG 1 texture + COMMENT the texture used for the render layer + METHOD method_2828 render (Lnet/minecraft/class_4587;Lnet/minecraft/class_4588;IIFFFF)V + COMMENT Renders the model. + ARG 1 matrices + ARG 2 vertices + ARG 3 light + COMMENT the lightmap coordinates used for this model rendering + ARG 4 overlay + ARG 5 red + ARG 6 green + ARG 7 blue + ARG 8 alpha diff --git a/yarn-1.19.3/mappings/net/minecraft/client/particle/GlowParticle.mapping b/yarn-1.19.3/mappings/net/minecraft/client/particle/GlowParticle.mapping new file mode 100644 index 0000000..3d90384 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/particle/GlowParticle.mapping @@ -0,0 +1,36 @@ +CLASS net/minecraft/class_5786 net/minecraft/client/particle/GlowParticle + FIELD field_28457 RANDOM Lnet/minecraft/class_5819; + FIELD field_28458 spriteProvider Lnet/minecraft/class_4002; + METHOD (Lnet/minecraft/class_638;DDDDDDLnet/minecraft/class_4002;)V + ARG 1 world + ARG 2 x + ARG 4 y + ARG 6 z + ARG 8 velocityX + ARG 10 velocityY + ARG 12 velocityZ + ARG 14 spriteProvider + CLASS class_5956 ElectricSparkFactory + FIELD field_29570 velocityMultiplier D + FIELD field_29571 spriteProvider Lnet/minecraft/class_4002; + METHOD (Lnet/minecraft/class_4002;)V + ARG 1 spriteProvider + CLASS class_5957 GlowFactory + FIELD field_29572 spriteProvider Lnet/minecraft/class_4002; + METHOD (Lnet/minecraft/class_4002;)V + ARG 1 spriteProvider + CLASS class_5958 ScrapeFactory + FIELD field_29573 velocityMultiplier D + FIELD field_29574 spriteProvider Lnet/minecraft/class_4002; + METHOD (Lnet/minecraft/class_4002;)V + ARG 1 spriteProvider + CLASS class_5959 WaxOffFactory + FIELD field_29575 velocityMultiplier D + FIELD field_29576 spriteProvider Lnet/minecraft/class_4002; + METHOD (Lnet/minecraft/class_4002;)V + ARG 1 spriteProvider + CLASS class_5960 WaxOnFactory + FIELD field_29577 velocityMultiplier D + FIELD field_29578 spriteProvider Lnet/minecraft/class_4002; + METHOD (Lnet/minecraft/class_4002;)V + ARG 1 spriteProvider diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/BufferVertexConsumer.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/BufferVertexConsumer.mapping new file mode 100644 index 0000000..008a16b --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/BufferVertexConsumer.mapping @@ -0,0 +1,18 @@ +CLASS net/minecraft/class_4584 net/minecraft/client/render/BufferVertexConsumer + METHOD method_1325 nextElement ()V + METHOD method_22896 putByte (IB)V + ARG 1 index + ARG 2 value + METHOD method_22897 putFloat (IF)V + ARG 1 index + ARG 2 value + METHOD method_22898 putShort (IS)V + ARG 1 index + ARG 2 value + METHOD method_22899 uv (SSI)Lnet/minecraft/class_4588; + ARG 1 u + ARG 2 v + ARG 3 index + METHOD method_22900 getCurrentElement ()Lnet/minecraft/class_296; + METHOD method_24212 packByte (F)B + ARG 0 f diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/block/entity/SignBlockEntityRenderer.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/block/entity/SignBlockEntityRenderer.mapping new file mode 100644 index 0000000..8bb7d81 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/block/entity/SignBlockEntityRenderer.mapping @@ -0,0 +1,52 @@ +CLASS net/minecraft/class_837 net/minecraft/client/render/block/entity/SignBlockEntityRenderer + FIELD field_27754 typeToModel Ljava/util/Map; + FIELD field_27755 textRenderer Lnet/minecraft/class_327; + FIELD field_32830 STICK Ljava/lang/String; + FIELD field_33962 GLOWING_BLACK_COLOR I + FIELD field_33963 RENDER_DISTANCE I + METHOD (Lnet/minecraft/class_5614$class_5615;)V + ARG 1 ctx + METHOD method_32154 getTexturedModelData ()Lnet/minecraft/class_5607; + METHOD method_32156 (Lnet/minecraft/class_4719;)Lnet/minecraft/class_4719; + ARG 0 signType + METHOD method_32157 createSignModel (Lnet/minecraft/class_5599;Lnet/minecraft/class_4719;)Lnet/minecraft/class_837$class_4702; + ARG 0 entityModelLoader + ARG 1 type + METHOD method_32158 (Lnet/minecraft/class_5614$class_5615;Lnet/minecraft/class_4719;)Lnet/minecraft/class_837$class_4702; + ARG 1 signType + METHOD method_37311 getColor (Lnet/minecraft/class_2625;)I + ARG 0 sign + METHOD method_37312 shouldRender (Lnet/minecraft/class_2625;I)Z + ARG 0 sign + ARG 1 signColor + METHOD method_45790 getTextOffset (F)Lnet/minecraft/class_243; + ARG 1 scale + METHOD method_45792 getTextureId (Lnet/minecraft/class_4719;)Lnet/minecraft/class_4730; + ARG 1 signType + METHOD method_45793 renderSignModel (Lnet/minecraft/class_4587;IILnet/minecraft/class_3879;Lnet/minecraft/class_4588;)V + ARG 1 matrices + ARG 2 light + ARG 3 overlay + ARG 4 model + ARG 5 vertices + METHOD method_45798 renderText (Lnet/minecraft/class_2625;Lnet/minecraft/class_4587;Lnet/minecraft/class_4597;IF)V + ARG 1 blockEntity + ARG 2 matrices + ARG 3 verticesProvider + ARG 4 light + ARG 5 scale + METHOD method_45799 (Lnet/minecraft/class_2625;Lnet/minecraft/class_2561;)Lnet/minecraft/class_5481; + ARG 2 text + METHOD method_45800 renderSign (Lnet/minecraft/class_4587;Lnet/minecraft/class_4597;IIFLnet/minecraft/class_4719;Lnet/minecraft/class_3879;)V + ARG 1 matrices + ARG 2 verticesProvider + ARG 3 light + ARG 4 overlay + ARG 5 scale + ARG 6 type + ARG 7 model + CLASS class_4702 SignModel + FIELD field_21531 stick Lnet/minecraft/class_630; + FIELD field_27756 root Lnet/minecraft/class_630; + METHOD (Lnet/minecraft/class_630;)V + ARG 1 root diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/debug/ChunkBorderDebugRenderer.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/debug/ChunkBorderDebugRenderer.mapping new file mode 100644 index 0000000..21e41de --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/debug/ChunkBorderDebugRenderer.mapping @@ -0,0 +1,4 @@ +CLASS net/minecraft/class_862 net/minecraft/client/render/debug/ChunkBorderDebugRenderer + FIELD field_4516 client Lnet/minecraft/class_310; + METHOD (Lnet/minecraft/class_310;)V + ARG 1 client diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/debug/NeighborUpdateDebugRenderer.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/debug/NeighborUpdateDebugRenderer.mapping new file mode 100644 index 0000000..9942e5a --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/debug/NeighborUpdateDebugRenderer.mapping @@ -0,0 +1,10 @@ +CLASS net/minecraft/class_869 net/minecraft/client/render/debug/NeighborUpdateDebugRenderer + FIELD field_4622 client Lnet/minecraft/class_310; + FIELD field_4623 neighborUpdates Ljava/util/Map; + METHOD (Lnet/minecraft/class_310;)V + ARG 1 client + METHOD method_30113 (Ljava/lang/Long;)Ljava/util/Map; + ARG 0 time2 + METHOD method_3870 addNeighborUpdate (JLnet/minecraft/class_2338;)V + ARG 1 time + ARG 3 pos diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/entity/SpectralArrowEntityRenderer.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/SpectralArrowEntityRenderer.mapping new file mode 100644 index 0000000..333a023 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/SpectralArrowEntityRenderer.mapping @@ -0,0 +1,2 @@ +CLASS net/minecraft/class_947 net/minecraft/client/render/entity/SpectralArrowEntityRenderer + FIELD field_4787 TEXTURE Lnet/minecraft/class_2960; diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/entity/feature/HeadFeatureRenderer.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/feature/HeadFeatureRenderer.mapping new file mode 100644 index 0000000..d9528f1 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/feature/HeadFeatureRenderer.mapping @@ -0,0 +1,20 @@ +CLASS net/minecraft/class_976 net/minecraft/client/render/entity/feature/HeadFeatureRenderer + FIELD field_24474 scaleX F + FIELD field_24475 scaleY F + FIELD field_24476 scaleZ F + FIELD field_27771 headModels Ljava/util/Map; + FIELD field_38897 heldItemRenderer Lnet/minecraft/class_759; + METHOD (Lnet/minecraft/class_3883;Lnet/minecraft/class_5599;FFFLnet/minecraft/class_759;)V + ARG 1 context + ARG 2 loader + ARG 3 scaleX + ARG 4 scaleY + ARG 5 scaleZ + ARG 6 heldItemRenderer + METHOD (Lnet/minecraft/class_3883;Lnet/minecraft/class_5599;Lnet/minecraft/class_759;)V + ARG 1 context + ARG 2 loader + ARG 3 heldItemRenderer + METHOD method_32798 translate (Lnet/minecraft/class_4587;Z)V + ARG 0 matrices + ARG 1 villager diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/entity/feature/VillagerClothingFeatureRenderer.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/feature/VillagerClothingFeatureRenderer.mapping new file mode 100644 index 0000000..24be54d --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/feature/VillagerClothingFeatureRenderer.mapping @@ -0,0 +1,26 @@ +CLASS net/minecraft/class_3885 net/minecraft/client/render/entity/feature/VillagerClothingFeatureRenderer + FIELD field_17148 LEVEL_TO_ID Lit/unimi/dsi/fastutil/ints/Int2ObjectMap; + FIELD field_17149 villagerTypeToHat Lit/unimi/dsi/fastutil/objects/Object2ObjectMap; + FIELD field_17150 professionToHat Lit/unimi/dsi/fastutil/objects/Object2ObjectMap; + FIELD field_17151 resourceManager Lnet/minecraft/class_3300; + FIELD field_17152 entityType Ljava/lang/String; + METHOD (Lnet/minecraft/class_3883;Lnet/minecraft/class_3300;Ljava/lang/String;)V + ARG 1 context + ARG 2 resourceManager + ARG 3 entityType + METHOD method_17152 (Lit/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap;)V + ARG 0 levelToId + METHOD method_17153 getHatType (Lit/unimi/dsi/fastutil/objects/Object2ObjectMap;Ljava/lang/String;Lnet/minecraft/class_7922;Ljava/lang/Object;)Lnet/minecraft/class_3888$class_3889; + ARG 1 hatLookUp + ARG 2 keyType + ARG 3 registry + ARG 4 key + METHOD method_17154 (Ljava/lang/String;Lnet/minecraft/class_7922;Ljava/lang/Object;Ljava/lang/Object;)Lnet/minecraft/class_3888$class_3889; + ARG 4 k + METHOD method_17155 findTexture (Ljava/lang/String;Lnet/minecraft/class_2960;)Lnet/minecraft/class_2960; + ARG 1 keyType + ARG 2 keyId + METHOD method_43211 (Lnet/minecraft/class_3298;)Ljava/util/Optional; + ARG 0 resource + METHOD method_45803 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; + ARG 2 path diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/BoatEntityModel.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/BoatEntityModel.mapping new file mode 100644 index 0000000..935bec7 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/BoatEntityModel.mapping @@ -0,0 +1,67 @@ +CLASS net/minecraft/class_554 net/minecraft/client/render/entity/model/BoatEntityModel + COMMENT Represents the model of a {@linkplain BoatEntity}. + COMMENT + COMMENT

+ COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT
Model parts of this model
Part NameParentCorresponding Field
{@value #BOTTOM}Root part
{@value #BACK}Root part
{@value #FRONT}Root part
{@value #RIGHT}Root part
{@value #LEFT}Root part
{@value #LEFT_PADDLE}Root part{@link #leftPaddle}
{@value #RIGHT_PADDLE}Root part{@link #rightPaddle}
{@value #WATER_PATCH}Root part{@link #waterPatch}
+ COMMENT
+ FIELD field_20922 parts Lcom/google/common/collect/ImmutableList; + FIELD field_27396 leftPaddle Lnet/minecraft/class_630; + FIELD field_27397 rightPaddle Lnet/minecraft/class_630; + FIELD field_32458 LEFT_PADDLE Ljava/lang/String; + COMMENT The key of the left paddle model part, whose value is {@value}. + FIELD field_32459 RIGHT_PADDLE Ljava/lang/String; + COMMENT The key of the right paddle model part, whose value is {@value}. + FIELD field_32460 WATER_PATCH Ljava/lang/String; + COMMENT The key of the water patch model part, whose value is {@value}. + FIELD field_32461 BOTTOM Ljava/lang/String; + COMMENT The key of the bottom model part, whose value is {@value}. + FIELD field_32462 BACK Ljava/lang/String; + COMMENT The key of the back model part, whose value is {@value}. + FIELD field_32463 FRONT Ljava/lang/String; + COMMENT The key of the front model part, whose value is {@value}. + FIELD field_32464 RIGHT Ljava/lang/String; + COMMENT The key of the right model part, whose value is {@value}. + FIELD field_32465 LEFT Ljava/lang/String; + COMMENT The key of the left model part, whose value is {@value}. + FIELD field_3326 waterPatch Lnet/minecraft/class_630; + METHOD (Lnet/minecraft/class_630;)V + ARG 1 root + METHOD method_2797 setPaddleAngle (Lnet/minecraft/class_1690;ILnet/minecraft/class_630;F)V + ARG 0 entity + ARG 1 sigma + ARG 2 part + ARG 3 angle + METHOD method_31985 getTexturedModelData ()Lnet/minecraft/class_5607; + METHOD method_45702 getParts (Lnet/minecraft/class_630;)Lcom/google/common/collect/ImmutableList$Builder; + ARG 1 root + METHOD method_45703 addParts (Lnet/minecraft/class_5610;)V + ARG 0 modelPartData diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/EntityModelLayers.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/EntityModelLayers.mapping new file mode 100644 index 0000000..863e9f7 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/EntityModelLayers.mapping @@ -0,0 +1,71 @@ +CLASS net/minecraft/class_5602 net/minecraft/client/render/entity/model/EntityModelLayers + FIELD field_27555 DROWNED_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27556 DROWNED_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27557 DROWNED_OUTER Lnet/minecraft/class_5601; + FIELD field_27570 GIANT_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27571 GIANT_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27574 PIGLIN_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27575 PIG_SADDLE Lnet/minecraft/class_5601; + FIELD field_27579 PLAYER_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27580 PLAYER_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27582 PLAYER_SLIM_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27583 PLAYER_SLIM_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27594 SHEEP_FUR Lnet/minecraft/class_5601; + FIELD field_27605 HUSK_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27606 HUSK_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27611 LLAMA_DECOR Lnet/minecraft/class_5601; + FIELD field_27624 PIGLIN_BRUTE_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27625 PIGLIN_BRUTE_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27626 PIGLIN_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27630 WITHER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27632 WITHER_SKELETON_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27633 WITHER_SKELETON_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27639 ARMOR_STAND_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27642 ZOMBIE_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27643 ZOMBIE_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27645 ZOMBIE_VILLAGER_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27646 ZOMBIE_VILLAGER_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27648 ZOMBIFIED_PIGLIN_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27649 ZOMBIFIED_PIGLIN_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27650 LAYERS Ljava/util/Set; + FIELD field_27651 SKELETON_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27652 SKELETON_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27655 SLIME_OUTER Lnet/minecraft/class_5601; + FIELD field_27661 STRAY_INNER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27662 STRAY_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27663 STRAY_OUTER Lnet/minecraft/class_5601; + FIELD field_27665 STRIDER_SADDLE Lnet/minecraft/class_5601; + FIELD field_27670 TROPICAL_FISH_LARGE_PATTERN Lnet/minecraft/class_5601; + FIELD field_27672 TROPICAL_FISH_SMALL_PATTERN Lnet/minecraft/class_5601; + FIELD field_27677 ARMOR_STAND_OUTER_ARMOR Lnet/minecraft/class_5601; + FIELD field_27687 CAT_COLLAR Lnet/minecraft/class_5601; + FIELD field_27695 CONDUIT_EYE Lnet/minecraft/class_5601; + FIELD field_27696 CONDUIT_SHELL Lnet/minecraft/class_5601; + FIELD field_27697 CONDUIT_WIND Lnet/minecraft/class_5601; + FIELD field_27700 CREEPER_ARMOR Lnet/minecraft/class_5601; + FIELD field_32582 MAIN Ljava/lang/String; + METHOD method_32076 getLayers ()Ljava/util/stream/Stream; + METHOD method_32077 createBoat (Lnet/minecraft/class_1690$class_1692;)Lnet/minecraft/class_5601; + ARG 0 type + METHOD method_32078 createSign (Lnet/minecraft/class_4719;)Lnet/minecraft/class_5601; + ARG 0 type + METHOD method_32079 registerMain (Ljava/lang/String;)Lnet/minecraft/class_5601; + ARG 0 id + METHOD method_32080 register (Ljava/lang/String;Ljava/lang/String;)Lnet/minecraft/class_5601; + ARG 0 id + ARG 1 layer + METHOD method_32081 createInnerArmor (Ljava/lang/String;)Lnet/minecraft/class_5601; + ARG 0 id + METHOD method_32082 create (Ljava/lang/String;Ljava/lang/String;)Lnet/minecraft/class_5601; + ARG 0 id + ARG 1 layer + METHOD method_32083 createOuterArmor (Ljava/lang/String;)Lnet/minecraft/class_5601; + ARG 0 id + METHOD method_42582 createChestBoat (Lnet/minecraft/class_1690$class_1692;)Lnet/minecraft/class_5601; + ARG 0 type + METHOD method_45717 createRaft (Lnet/minecraft/class_1690$class_1692;)Lnet/minecraft/class_5601; + ARG 0 type + METHOD method_45718 createChestRaft (Lnet/minecraft/class_1690$class_1692;)Lnet/minecraft/class_5601; + ARG 0 type + METHOD method_45719 createHangingSign (Lnet/minecraft/class_4719;)Lnet/minecraft/class_5601; + ARG 0 type diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/RaftEntityModel.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/RaftEntityModel.mapping new file mode 100644 index 0000000..a422bf7 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/entity/model/RaftEntityModel.mapping @@ -0,0 +1,19 @@ +CLASS net/minecraft/class_7754 net/minecraft/client/render/entity/model/RaftEntityModel + FIELD field_40473 LEFT_PADDLE Ljava/lang/String; + FIELD field_40474 RIGHT_PADDLE Ljava/lang/String; + FIELD field_40475 BOTTOM Ljava/lang/String; + FIELD field_40476 leftPaddle Lnet/minecraft/class_630; + FIELD field_40477 rightPaddle Lnet/minecraft/class_630; + FIELD field_40478 parts Lcom/google/common/collect/ImmutableList; + METHOD (Lnet/minecraft/class_630;)V + ARG 1 root + METHOD method_45710 getParts (Lnet/minecraft/class_630;)Lcom/google/common/collect/ImmutableList$Builder; + ARG 1 root + METHOD method_45712 setPaddleAngle (Lnet/minecraft/class_1690;ILnet/minecraft/class_630;F)V + ARG 0 entity + ARG 1 sigma + ARG 2 part + ARG 3 angle + METHOD method_45713 addParts (Lnet/minecraft/class_5610;)V + ARG 0 modelPartData + METHOD method_45714 getTexturedModelData ()Lnet/minecraft/class_5607; diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/model/ModelBakeSettings.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/model/ModelBakeSettings.mapping new file mode 100644 index 0000000..6861625 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/model/ModelBakeSettings.mapping @@ -0,0 +1,3 @@ +CLASS net/minecraft/class_3665 net/minecraft/client/render/model/ModelBakeSettings + METHOD method_3509 getRotation ()Lnet/minecraft/class_4590; + METHOD method_3512 isUvLocked ()Z diff --git a/yarn-1.19.3/mappings/net/minecraft/client/render/model/json/MultipartModelComponent.mapping b/yarn-1.19.3/mappings/net/minecraft/client/render/model/json/MultipartModelComponent.mapping new file mode 100644 index 0000000..df9e136 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/render/model/json/MultipartModelComponent.mapping @@ -0,0 +1,26 @@ +CLASS net/minecraft/class_819 net/minecraft/client/render/model/json/MultipartModelComponent + FIELD field_4335 selector Lnet/minecraft/class_815; + FIELD field_4336 model Lnet/minecraft/class_807; + METHOD (Lnet/minecraft/class_815;Lnet/minecraft/class_807;)V + ARG 1 selector + ARG 2 model + METHOD equals (Ljava/lang/Object;)Z + ARG 1 o + METHOD method_3529 getModel ()Lnet/minecraft/class_807; + METHOD method_3530 getPredicate (Lnet/minecraft/class_2689;)Ljava/util/function/Predicate; + ARG 1 stateFactory + CLASS class_820 Deserializer + METHOD deserialize (Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Ljava/lang/Object; + ARG 1 json + ARG 2 type + ARG 3 context + METHOD method_3531 deserializeSelectorOrDefault (Lcom/google/gson/JsonObject;)Lnet/minecraft/class_815; + ARG 1 object + METHOD method_3533 createStatePropertySelector (Ljava/util/Map$Entry;)Lnet/minecraft/class_815; + ARG 0 entry + METHOD method_3534 (Lcom/google/gson/JsonElement;)Lnet/minecraft/class_815; + ARG 0 json + METHOD method_3536 deserializeSelector (Lcom/google/gson/JsonObject;)Lnet/minecraft/class_815; + ARG 0 object + METHOD method_3537 (Lcom/google/gson/JsonElement;)Lnet/minecraft/class_815; + ARG 0 json diff --git a/yarn-1.19.3/mappings/net/minecraft/client/util/ProfileKeysImpl.mapping b/yarn-1.19.3/mappings/net/minecraft/client/util/ProfileKeysImpl.mapping new file mode 100644 index 0000000..1ee1d99 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/client/util/ProfileKeysImpl.mapping @@ -0,0 +1,43 @@ +CLASS net/minecraft/class_7434 net/minecraft/client/util/ProfileKeysImpl + COMMENT A class to fetch, load, and save the player's public and private keys. + FIELD field_39074 LOGGER Lorg/slf4j/Logger; + FIELD field_39075 PROFILE_KEYS_PATH Ljava/nio/file/Path; + FIELD field_39076 jsonPath Ljava/nio/file/Path; + FIELD field_39958 userApiService Lcom/mojang/authlib/minecraft/UserApiService; + FIELD field_39959 keyFuture Ljava/util/concurrent/CompletableFuture; + FIELD field_40797 TIME_UNTIL_FIRST_EXPIRY_CHECK Ljava/time/Duration; + FIELD field_40798 expiryCheckTime Ljava/time/Instant; + METHOD (Lcom/mojang/authlib/minecraft/UserApiService;Ljava/util/UUID;Ljava/nio/file/Path;)V + ARG 1 userApiService + ARG 2 uuid + ARG 3 root + METHOD method_43600 saveKeyPairToFile (Lnet/minecraft/class_7427;)V + COMMENT Saves the {@code keyPair} to the cache file if {@link + COMMENT net.minecraft.SharedConstants#isDevelopment} is {@code true}; + COMMENT otherwise, just deletes the cache file. + ARG 1 keyPair + METHOD method_43601 (Lcom/google/gson/JsonElement;)V + ARG 1 json + METHOD method_43602 getKeyPair (Ljava/util/Optional;)Ljava/util/concurrent/CompletableFuture; + COMMENT Gets the key pair from the file cache, or if it is unavailable or expired, + COMMENT the Mojang server. + ARG 1 currentKey + METHOD method_43605 fetchKeyPair (Lcom/mojang/authlib/minecraft/UserApiService;)Lnet/minecraft/class_7427; + COMMENT {@return the key pair fetched from Mojang's server} + COMMENT + COMMENT @throws NetworkEncryptionException when the fetched key is malformed + COMMENT @throws IOException when fetching fails + ARG 1 userApiService + METHOD method_43606 loadKeyPairFromFile ()Ljava/util/Optional; + COMMENT {@return the profile keys from the local cache} + COMMENT + COMMENT

This can return expired keys. + COMMENT + COMMENT @implNote The cache file is stored at {@code .minecraft/profilekeys/.json}. + METHOD method_44076 decodeKeyPairResponse (Lcom/mojang/authlib/yggdrasil/response/KeyPairResponse;)Lnet/minecraft/class_7428$class_7443; + COMMENT {@return {@code keyPairResponse} decoded to {@link PlayerPublicKey.PublicKeyData}} + COMMENT + COMMENT @throws NetworkEncryptionException when the response is malformed + ARG 0 keyPairResponse + METHOD method_45109 (Lnet/minecraft/class_7427;)Z + ARG 0 key diff --git a/yarn-1.19.3/mappings/net/minecraft/command/argument/ParticleEffectArgumentType.mapping b/yarn-1.19.3/mappings/net/minecraft/command/argument/ParticleEffectArgumentType.mapping new file mode 100644 index 0000000..c1f7e86 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/command/argument/ParticleEffectArgumentType.mapping @@ -0,0 +1,27 @@ +CLASS net/minecraft/class_2223 net/minecraft/command/argument/ParticleEffectArgumentType + FIELD field_40383 registryWrapper Lnet/minecraft/class_7225; + FIELD field_9935 EXAMPLES Ljava/util/Collection; + FIELD field_9936 UNKNOWN_PARTICLE_EXCEPTION Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType; + METHOD (Lnet/minecraft/class_7157;)V + ARG 1 registryAccess + METHOD listSuggestions (Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture; + ARG 1 context + ARG 2 builder + METHOD method_45583 getType (Lcom/mojang/brigadier/StringReader;Lnet/minecraft/class_7225;)Lnet/minecraft/class_2396; + ARG 0 reader + ARG 1 registryWrapper + METHOD method_9417 particleEffect (Lnet/minecraft/class_7157;)Lnet/minecraft/class_2223; + ARG 0 registryAccess + METHOD method_9418 readParameters (Lcom/mojang/brigadier/StringReader;Lnet/minecraft/class_7225;)Lnet/minecraft/class_2394; + ARG 0 reader + ARG 1 registryWrapper + METHOD method_9419 (Ljava/lang/Object;)Lcom/mojang/brigadier/Message; + ARG 0 id + METHOD method_9420 readParameters (Lcom/mojang/brigadier/StringReader;Lnet/minecraft/class_2396;)Lnet/minecraft/class_2394; + ARG 0 reader + ARG 1 type + METHOD method_9421 getParticle (Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Lnet/minecraft/class_2394; + ARG 0 context + ARG 1 name + METHOD parse (Lcom/mojang/brigadier/StringReader;)Ljava/lang/Object; + ARG 1 reader diff --git a/yarn-1.19.3/mappings/net/minecraft/data/server/tag/AbstractItemTagProvider.mapping b/yarn-1.19.3/mappings/net/minecraft/data/server/tag/AbstractItemTagProvider.mapping new file mode 100644 index 0000000..d2af171 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/data/server/tag/AbstractItemTagProvider.mapping @@ -0,0 +1,11 @@ +CLASS net/minecraft/class_7805 net/minecraft/data/server/tag/AbstractItemTagProvider + FIELD field_40664 blockTags Ljava/util/function/Function; + METHOD (Lnet/minecraft/class_7784;Ljava/util/concurrent/CompletableFuture;Lnet/minecraft/class_2474;)V + ARG 1 output + ARG 2 registryLookupFuture + ARG 3 blockTagProvider + METHOD method_46218 copy (Lnet/minecraft/class_6862;Lnet/minecraft/class_6862;)V + ARG 1 blockTag + ARG 2 itemTag + METHOD method_46831 (Lnet/minecraft/class_1792;)Lnet/minecraft/class_5321; + ARG 0 item diff --git a/yarn-1.19.3/mappings/net/minecraft/enchantment/Enchantment.mapping b/yarn-1.19.3/mappings/net/minecraft/enchantment/Enchantment.mapping new file mode 100644 index 0000000..19fcb7a --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/enchantment/Enchantment.mapping @@ -0,0 +1,67 @@ +CLASS net/minecraft/class_1887 net/minecraft/enchantment/Enchantment + FIELD field_9083 type Lnet/minecraft/class_1886; + FIELD field_9084 translationKey Ljava/lang/String; + FIELD field_9085 rarity Lnet/minecraft/class_1887$class_1888; + FIELD field_9086 slotTypes [Lnet/minecraft/class_1304; + METHOD (Lnet/minecraft/class_1887$class_1888;Lnet/minecraft/class_1886;[Lnet/minecraft/class_1304;)V + ARG 1 weight + ARG 2 type + ARG 3 slotTypes + METHOD method_20742 getMaxPower (I)I + ARG 1 level + METHOD method_25949 isAvailableForEnchantedBookOffer ()Z + COMMENT {@return whether this enchantment will appear in the enchanted book trade + COMMENT offers of librarian villagers} + METHOD method_25950 isAvailableForRandomSelection ()Z + COMMENT {@return whether this enchantment will appear in the enchanting table or + COMMENT loots with random enchant function} + METHOD method_8178 onUserDamaged (Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;I)V + ARG 1 user + ARG 2 attacker + ARG 3 level + METHOD method_8179 getName (I)Lnet/minecraft/class_2561; + ARG 1 level + METHOD method_8180 canAccept (Lnet/minecraft/class_1887;)Z + COMMENT {@return whether this enchantment can exist on an item stack with the + COMMENT {@code other} enchantment} + ARG 1 other + METHOD method_8181 getProtectionAmount (ILnet/minecraft/class_1282;)I + ARG 1 level + ARG 2 source + METHOD method_8182 getMinPower (I)I + ARG 1 level + METHOD method_8183 getMaxLevel ()I + METHOD method_8184 getTranslationKey ()Ljava/lang/String; + METHOD method_8185 getEquipment (Lnet/minecraft/class_1309;)Ljava/util/Map; + ARG 1 entity + METHOD method_8186 getRarity ()Lnet/minecraft/class_1887$class_1888; + METHOD method_8187 getMinLevel ()I + METHOD method_8188 canCombine (Lnet/minecraft/class_1887;)Z + COMMENT {@return whether this enchantment can exist on an item stack with the + COMMENT {@code other} enchantment and the {@code other} enchantment can exist + COMMENT with this enchantment} + ARG 1 other + METHOD method_8189 onTargetDamaged (Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;I)V + ARG 1 user + ARG 2 target + ARG 3 level + METHOD method_8190 getOrCreateTranslationKey ()Ljava/lang/String; + METHOD method_8191 byRawId (I)Lnet/minecraft/class_1887; + ARG 0 id + METHOD method_8192 isAcceptableItem (Lnet/minecraft/class_1799;)Z + ARG 1 stack + METHOD method_8193 isTreasure ()Z + METHOD method_8195 isCursed ()Z + METHOD method_8196 getAttackDamage (ILnet/minecraft/class_1310;)F + ARG 1 level + ARG 2 group + CLASS class_1888 Rarity + COMMENT The rarity is an attribute of an enchantment. + COMMENT + COMMENT

It affects the chance of getting an enchantment from enchanting or + COMMENT loots as well as the combination cost in anvil. + FIELD field_9089 weight I + METHOD (Ljava/lang/String;II)V + ARG 3 weight + METHOD method_8197 getWeight ()I + COMMENT {@return the weight of an enchantment in weighted pickers} diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/ai/NoPenaltyTargeting.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/ai/NoPenaltyTargeting.mapping new file mode 100644 index 0000000..f20b1c5 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/ai/NoPenaltyTargeting.mapping @@ -0,0 +1,44 @@ +CLASS net/minecraft/class_5532 net/minecraft/entity/ai/NoPenaltyTargeting + COMMENT Similar to {@link FuzzyTargeting}, but the positions this class' utility methods + COMMENT find never have pathfinding penalties. + METHOD method_31510 find (Lnet/minecraft/class_1314;II)Lnet/minecraft/class_243; + COMMENT Paths to a random reachable position with no penalty. + COMMENT + COMMENT @return the chosen end position or null if no valid positions could be found + ARG 0 entity + COMMENT the entity doing the pathing + ARG 1 horizontalRange + COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range) + ARG 2 verticalRange + COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range) + METHOD method_31511 findFrom (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;)Lnet/minecraft/class_243; + COMMENT Paths to a position leading away from a given starting point. + COMMENT + COMMENT @return the chosen end position or null if no valid positions could be found + ARG 0 entity + COMMENT the entity doing the pathing + ARG 1 horizontalRange + COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range) + ARG 2 verticalRange + COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range) + ARG 3 start + COMMENT the position to path away from + METHOD method_31512 findTo (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;D)Lnet/minecraft/class_243; + COMMENT Paths to a position leading towards a given end-point. + COMMENT + COMMENT @return the chosen end position or null if no valid positions could be found + ARG 0 entity + COMMENT the entity doing the pathing + ARG 1 horizontalRange + COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range) + ARG 2 verticalRange + COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range) + ARG 3 end + COMMENT the position to path towards + ARG 4 angleRange + COMMENT the minimum angle of approach + METHOD method_31516 tryMake (Lnet/minecraft/class_1314;IZLnet/minecraft/class_2338;)Lnet/minecraft/class_2338; + ARG 0 entity + ARG 1 horizontalRange + ARG 2 posTargetInRange + ARG 3 fuzz diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/ai/control/MoveControl.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/ai/control/MoveControl.mapping new file mode 100644 index 0000000..1ec67ec --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/ai/control/MoveControl.mapping @@ -0,0 +1,34 @@ +CLASS net/minecraft/class_1335 net/minecraft/entity/ai/control/MoveControl + FIELD field_30198 REACHED_DESTINATION_DISTANCE_SQUARED F + FIELD field_6367 targetZ D + FIELD field_6368 forwardMovement F + FIELD field_6369 targetY D + FIELD field_6370 targetX D + FIELD field_6371 entity Lnet/minecraft/class_1308; + FIELD field_6372 speed D + FIELD field_6373 sidewaysMovement F + FIELD field_6374 state Lnet/minecraft/class_1335$class_1336; + METHOD (Lnet/minecraft/class_1308;)V + ARG 1 entity + METHOD method_25946 isPosWalkable (FF)Z + ARG 1 x + ARG 2 z + METHOD method_6235 getTargetY ()D + METHOD method_6236 getTargetX ()D + METHOD method_6237 getTargetZ ()D + METHOD method_6238 wrapDegrees (FFF)F + ARG 1 from + ARG 2 to + ARG 3 max + METHOD method_6239 moveTo (DDDD)V + ARG 1 x + ARG 3 y + ARG 5 z + ARG 7 speed + METHOD method_6240 tick ()V + METHOD method_6241 isMoving ()Z + METHOD method_6242 getSpeed ()D + METHOD method_6243 strafeTo (FF)V + ARG 1 forward + ARG 2 sideways + CLASS class_1336 State diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/ai/goal/IronGolemLookGoal.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/ai/goal/IronGolemLookGoal.mapping new file mode 100644 index 0000000..e0b4e37 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/ai/goal/IronGolemLookGoal.mapping @@ -0,0 +1,8 @@ +CLASS net/minecraft/class_1372 net/minecraft/entity/ai/goal/IronGolemLookGoal + FIELD field_18089 CLOSE_VILLAGER_PREDICATE Lnet/minecraft/class_4051; + FIELD field_30224 MAX_LOOK_COOLDOWN I + FIELD field_6542 golem Lnet/minecraft/class_1439; + FIELD field_6543 lookCountdown I + FIELD field_6544 targetVillager Lnet/minecraft/class_1646; + METHOD (Lnet/minecraft/class_1439;)V + ARG 1 golem diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/ai/goal/StopFollowingCustomerGoal.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/ai/goal/StopFollowingCustomerGoal.mapping new file mode 100644 index 0000000..826e283 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/ai/goal/StopFollowingCustomerGoal.mapping @@ -0,0 +1,4 @@ +CLASS net/minecraft/class_1390 net/minecraft/entity/ai/goal/StopFollowingCustomerGoal + FIELD field_6610 merchant Lnet/minecraft/class_3988; + METHOD (Lnet/minecraft/class_3988;)V + ARG 1 merchant diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/boss/dragon/EnderDragonSpawnState.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/boss/dragon/EnderDragonSpawnState.mapping new file mode 100644 index 0000000..f75a771 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/boss/dragon/EnderDragonSpawnState.mapping @@ -0,0 +1,7 @@ +CLASS net/minecraft/class_2876 net/minecraft/entity/boss/dragon/EnderDragonSpawnState + METHOD method_12507 run (Lnet/minecraft/class_3218;Lnet/minecraft/class_2881;Ljava/util/List;ILnet/minecraft/class_2338;)V + ARG 1 world + ARG 2 fight + ARG 3 crystals + ARG 4 tick + ARG 5 pos diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/boss/dragon/phase/TakeoffPhase.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/boss/dragon/phase/TakeoffPhase.mapping new file mode 100644 index 0000000..ffe6a85 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/boss/dragon/phase/TakeoffPhase.mapping @@ -0,0 +1,6 @@ +CLASS net/minecraft/class_1524 net/minecraft/entity/boss/dragon/phase/TakeoffPhase + FIELD field_7054 path Lnet/minecraft/class_11; + FIELD field_7055 pathTarget Lnet/minecraft/class_243; + FIELD field_7056 shouldFindNewPath Z + METHOD method_6858 updatePath ()V + METHOD method_6859 followPath ()V diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/decoration/LeashKnotEntity.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/decoration/LeashKnotEntity.mapping new file mode 100644 index 0000000..bf78bf8 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/decoration/LeashKnotEntity.mapping @@ -0,0 +1,7 @@ +CLASS net/minecraft/class_1532 net/minecraft/entity/decoration/LeashKnotEntity + METHOD (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V + ARG 1 world + ARG 2 pos + METHOD method_6932 getOrCreate (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1532; + ARG 0 world + ARG 1 pos diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/mob/IllusionerEntity.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/mob/IllusionerEntity.mapping new file mode 100644 index 0000000..20e8e60 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/mob/IllusionerEntity.mapping @@ -0,0 +1,5 @@ +CLASS net/minecraft/class_1581 net/minecraft/entity/mob/IllusionerEntity + METHOD method_26916 createIllusionerAttributes ()Lnet/minecraft/class_5132$class_5133; + CLASS class_1582 BlindTargetGoal + FIELD field_7298 targetId I + CLASS class_1583 GiveInvisibilityGoal diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/mob/PillagerEntity.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/mob/PillagerEntity.mapping new file mode 100644 index 0000000..60f61ef --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/mob/PillagerEntity.mapping @@ -0,0 +1,7 @@ +CLASS net/minecraft/class_1604 net/minecraft/entity/mob/PillagerEntity + FIELD field_7334 CHARGING Lnet/minecraft/class_2940; + FIELD field_7335 inventory Lnet/minecraft/class_1277; + METHOD method_26919 createPillagerAttributes ()Lnet/minecraft/class_5132$class_5133; + METHOD method_7108 isCharging ()Z + METHOD method_7111 isRaidCaptain (Lnet/minecraft/class_1799;)Z + ARG 1 stack diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/passive/AllayBrain.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/passive/AllayBrain.mapping new file mode 100644 index 0000000..57f3b66 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/passive/AllayBrain.mapping @@ -0,0 +1,26 @@ +CLASS net/minecraft/class_7299 net/minecraft/entity/passive/AllayBrain + METHOD method_42657 getLookTarget (Lnet/minecraft/class_1309;)Ljava/util/Optional; + ARG 0 allay + METHOD method_42658 shouldGoTowardsNoteBlock (Lnet/minecraft/class_1309;Lnet/minecraft/class_4095;Lnet/minecraft/class_4208;)Z + ARG 0 allay + ARG 1 brain + ARG 2 pos + METHOD method_42659 rememberNoteBlock (Lnet/minecraft/class_1309;Lnet/minecraft/class_2338;)V + ARG 0 allay + ARG 1 pos + METHOD method_42660 create (Lnet/minecraft/class_4095;)Lnet/minecraft/class_4095; + ARG 0 brain + METHOD method_42661 updateActivities (Lnet/minecraft/class_7298;)V + ARG 0 allay + METHOD method_42662 getLikedLookTarget (Lnet/minecraft/class_1309;)Ljava/util/Optional; + ARG 0 allay + METHOD method_42663 addCoreActivities (Lnet/minecraft/class_4095;)V + ARG 0 brain + METHOD method_42664 (Lnet/minecraft/class_7298;)Z + ARG 0 allay + METHOD method_42666 addIdleActivities (Lnet/minecraft/class_4095;)V + ARG 0 brain + METHOD method_43092 (Lnet/minecraft/class_3222;)Lnet/minecraft/class_4115; + ARG 0 player + METHOD method_43093 getLikedPlayer (Lnet/minecraft/class_1309;)Ljava/util/Optional; + ARG 0 allay diff --git a/yarn-1.19.3/mappings/net/minecraft/entity/passive/CowEntity.mapping b/yarn-1.19.3/mappings/net/minecraft/entity/passive/CowEntity.mapping new file mode 100644 index 0000000..ac4d636 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/entity/passive/CowEntity.mapping @@ -0,0 +1,2 @@ +CLASS net/minecraft/class_1430 net/minecraft/entity/passive/CowEntity + METHOD method_26883 createCowAttributes ()Lnet/minecraft/class_5132$class_5133; diff --git a/yarn-1.19.3/mappings/net/minecraft/item/AliasedBlockItem.mapping b/yarn-1.19.3/mappings/net/minecraft/item/AliasedBlockItem.mapping new file mode 100644 index 0000000..c3d3774 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/item/AliasedBlockItem.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_1798 net/minecraft/item/AliasedBlockItem diff --git a/yarn-1.19.3/mappings/net/minecraft/item/ChorusFruitItem.mapping b/yarn-1.19.3/mappings/net/minecraft/item/ChorusFruitItem.mapping new file mode 100644 index 0000000..97538f8 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/item/ChorusFruitItem.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_1757 net/minecraft/item/ChorusFruitItem diff --git a/yarn-1.19.3/mappings/net/minecraft/item/PowderSnowBucketItem.mapping b/yarn-1.19.3/mappings/net/minecraft/item/PowderSnowBucketItem.mapping new file mode 100644 index 0000000..005c4d7 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/item/PowderSnowBucketItem.mapping @@ -0,0 +1,6 @@ +CLASS net/minecraft/class_5634 net/minecraft/item/PowderSnowBucketItem + FIELD field_27877 placeSound Lnet/minecraft/class_3414; + METHOD (Lnet/minecraft/class_2248;Lnet/minecraft/class_3414;Lnet/minecraft/class_1792$class_1793;)V + ARG 1 block + ARG 2 placeSound + ARG 3 settings diff --git a/yarn-1.19.3/mappings/net/minecraft/item/SkullItem.mapping b/yarn-1.19.3/mappings/net/minecraft/item/SkullItem.mapping new file mode 100644 index 0000000..ea0883a --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/item/SkullItem.mapping @@ -0,0 +1,8 @@ +CLASS net/minecraft/class_1809 net/minecraft/item/SkullItem + FIELD field_30916 SKULL_OWNER_KEY Ljava/lang/String; + METHOD (Lnet/minecraft/class_2248;Lnet/minecraft/class_2248;Lnet/minecraft/class_1792$class_1793;)V + ARG 1 block + ARG 2 wallBlock + ARG 3 settings + METHOD method_37231 (Lnet/minecraft/class_2487;Lcom/mojang/authlib/GameProfile;)V + ARG 1 profile diff --git a/yarn-1.19.3/mappings/net/minecraft/loot/provider/nbt/ContextLootNbtProvider.mapping b/yarn-1.19.3/mappings/net/minecraft/loot/provider/nbt/ContextLootNbtProvider.mapping new file mode 100644 index 0000000..848a081 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/loot/provider/nbt/ContextLootNbtProvider.mapping @@ -0,0 +1,20 @@ +CLASS net/minecraft/class_5646 net/minecraft/loot/provider/nbt/ContextLootNbtProvider + FIELD field_27914 BLOCK_ENTITY Lnet/minecraft/class_5646; + FIELD field_27915 BLOCK_ENTITY_TARGET Lnet/minecraft/class_5646$class_5648; + FIELD field_27916 target Lnet/minecraft/class_5646$class_5648; + FIELD field_31875 BLOCK_ENTITY_TARGET_NAME Ljava/lang/String; + METHOD (Lnet/minecraft/class_5646$class_5648;)V + ARG 1 target + METHOD method_32430 getTarget (Lnet/minecraft/class_47$class_50;)Lnet/minecraft/class_5646$class_5648; + ARG 0 entityTarget + METHOD method_32431 fromTarget (Ljava/lang/String;)Lnet/minecraft/class_5646; + ARG 0 target + METHOD method_35568 fromTarget (Lnet/minecraft/class_47$class_50;)Lnet/minecraft/class_5651; + ARG 0 target + CLASS class_5647 CustomSerializer + CLASS class_5648 Target + METHOD method_32434 getName ()Ljava/lang/String; + METHOD method_32435 getNbt (Lnet/minecraft/class_47;)Lnet/minecraft/class_2520; + ARG 1 context + METHOD method_32436 getRequiredParameters ()Ljava/util/Set; + CLASS class_5649 Serializer diff --git a/yarn-1.19.3/mappings/net/minecraft/nbt/NbtFloat.mapping b/yarn-1.19.3/mappings/net/minecraft/nbt/NbtFloat.mapping new file mode 100644 index 0000000..989da69 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/nbt/NbtFloat.mapping @@ -0,0 +1,15 @@ +CLASS net/minecraft/class_2494 net/minecraft/nbt/NbtFloat + COMMENT Represents an NBT 32-bit floating-point number. Its type is {@value NbtElement#FLOAT_TYPE}. + COMMENT Instances are immutable. + FIELD field_11523 value F + FIELD field_21034 ZERO Lnet/minecraft/class_2494; + COMMENT The NBT float representing {@code 0.0f}. + FIELD field_21035 TYPE Lnet/minecraft/class_4614; + FIELD field_41722 SIZE I + METHOD (F)V + ARG 1 value + METHOD equals (Ljava/lang/Object;)Z + ARG 1 o + METHOD method_23244 of (F)Lnet/minecraft/class_2494; + COMMENT {@return the NBT float from {@code value}} + ARG 0 value diff --git a/yarn-1.19.3/mappings/net/minecraft/nbt/NbtShort.mapping b/yarn-1.19.3/mappings/net/minecraft/nbt/NbtShort.mapping new file mode 100644 index 0000000..44c6bba --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/nbt/NbtShort.mapping @@ -0,0 +1,17 @@ +CLASS net/minecraft/class_2516 net/minecraft/nbt/NbtShort + COMMENT Represents an NBT 16-bit integer. Its type is {@value NbtElement#SHORT_TYPE}. + COMMENT Instances are immutable. + FIELD field_11588 value S + FIELD field_21043 TYPE Lnet/minecraft/class_4614; + FIELD field_41728 SIZE I + METHOD (S)V + ARG 1 value + METHOD equals (Ljava/lang/Object;)Z + ARG 1 o + METHOD method_23254 of (S)Lnet/minecraft/class_2516; + COMMENT {@return the NBT short from {@code value}} + ARG 0 value + CLASS class_4613 Cache + FIELD field_21044 VALUES [Lnet/minecraft/class_2516; + FIELD field_33232 MAX I + FIELD field_33233 MIN I diff --git a/yarn-1.19.3/mappings/net/minecraft/network/packet/s2c/query/QueryResponseS2CPacket.mapping b/yarn-1.19.3/mappings/net/minecraft/network/packet/s2c/query/QueryResponseS2CPacket.mapping new file mode 100644 index 0000000..28462ed --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/network/packet/s2c/query/QueryResponseS2CPacket.mapping @@ -0,0 +1,8 @@ +CLASS net/minecraft/class_2924 net/minecraft/network/packet/s2c/query/QueryResponseS2CPacket + FIELD field_13281 metadata Lnet/minecraft/class_2926; + FIELD field_13282 GSON Lcom/google/gson/Gson; + METHOD (Lnet/minecraft/class_2540;)V + ARG 1 buf + METHOD (Lnet/minecraft/class_2926;)V + ARG 1 metadata + METHOD method_12672 getServerMetadata ()Lnet/minecraft/class_2926; diff --git a/yarn-1.19.3/mappings/net/minecraft/registry/tag/TagGroupLoader.mapping b/yarn-1.19.3/mappings/net/minecraft/registry/tag/TagGroupLoader.mapping new file mode 100644 index 0000000..7de8e11 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/registry/tag/TagGroupLoader.mapping @@ -0,0 +1,68 @@ +CLASS net/minecraft/class_3503 net/minecraft/registry/tag/TagGroupLoader + FIELD field_15605 dataType Ljava/lang/String; + FIELD field_15607 LOGGER Lorg/slf4j/Logger; + FIELD field_15609 registryGetter Ljava/util/function/Function; + METHOD (Ljava/util/function/Function;Ljava/lang/String;)V + ARG 1 registryGetter + ARG 2 dataType + METHOD method_18242 buildGroup (Ljava/util/Map;)Ljava/util/Map; + ARG 1 tags + METHOD method_32835 (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Ljava/util/List;)V + ARG 1 tagId + ARG 2 entries + METHOD method_32836 hasCircularDependency (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)Z + ARG 0 referencedTagIdsByTagId + ARG 1 tagId + ARG 2 referencedTagId + METHOD method_32837 (Ljava/util/Map;Lcom/google/common/collect/Multimap;Ljava/util/Set;Ljava/util/function/BiConsumer;Lnet/minecraft/class_2960;)V + ARG 4 resolvedTagId + METHOD method_32838 (Ljava/util/Map;Lcom/google/common/collect/Multimap;Ljava/util/Set;Lnet/minecraft/class_3497$class_7474;Ljava/util/Map;Lnet/minecraft/class_2960;)V + ARG 6 tagId + METHOD method_32839 resolveAll (Ljava/util/Map;Lcom/google/common/collect/Multimap;Ljava/util/Set;Lnet/minecraft/class_2960;Ljava/util/function/BiConsumer;)V + ARG 0 tags + ARG 1 referencedTagIdsByTagId + ARG 2 alreadyResolved + ARG 3 tagId + ARG 4 resolver + METHOD method_32840 (Ljava/util/Map;Lnet/minecraft/class_2960;Ljava/util/Collection;)V + ARG 2 resolvedEntries + METHOD method_32841 (Lnet/minecraft/class_3497$class_7474;Ljava/util/Map;Lnet/minecraft/class_2960;Ljava/util/List;)V + ARG 3 tagId2 + ARG 4 entries + METHOD method_32843 (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Ljava/util/List;)V + ARG 1 tagId + ARG 2 entries + METHOD method_32844 addReference (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V + ARG 0 referencedTagIdsByTagId + ARG 1 tagId + ARG 2 referencedTagId + METHOD method_32847 (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)Z + ARG 2 id + METHOD method_33174 loadTags (Lnet/minecraft/class_3300;)Ljava/util/Map; + ARG 1 resourceManager + METHOD method_33175 (Lnet/minecraft/class_2960;Ljava/util/Collection;)V + ARG 1 missingReferences + METHOD method_33176 load (Lnet/minecraft/class_3300;)Ljava/util/Map; + ARG 1 manager + METHOD method_43951 (Lnet/minecraft/class_2960;)Ljava/util/List; + ARG 0 id + METHOD method_43952 resolveAll (Lnet/minecraft/class_3497$class_7474;Ljava/util/List;)Lcom/mojang/datafixers/util/Either; + ARG 1 valueGetter + ARG 2 entries + METHOD method_43953 (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Lnet/minecraft/class_3503$class_5145;)V + ARG 2 entry + METHOD method_43954 (Ljava/util/List;Ljava/lang/String;Lnet/minecraft/class_3497;)V + ARG 2 entry + METHOD method_43955 (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Lnet/minecraft/class_3503$class_5145;)V + ARG 2 entry + METHOD method_43956 (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V + ARG 2 referencedTagId + METHOD method_43957 (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V + ARG 2 referencedTagId + CLASS class_5145 TrackedEntry + FIELD comp_324 entry Lnet/minecraft/class_3497; + FIELD comp_325 source Ljava/lang/String; + METHOD (Lnet/minecraft/class_3497;Ljava/lang/String;)V + ARG 2 source + METHOD comp_324 entry ()Lnet/minecraft/class_3497; + METHOD comp_325 source ()Ljava/lang/String; diff --git a/yarn-1.19.3/mappings/net/minecraft/resource/featuretoggle/FeatureSet.mapping b/yarn-1.19.3/mappings/net/minecraft/resource/featuretoggle/FeatureSet.mapping new file mode 100644 index 0000000..1855ca5 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/resource/featuretoggle/FeatureSet.mapping @@ -0,0 +1,29 @@ +CLASS net/minecraft/class_7699 net/minecraft/resource/featuretoggle/FeatureSet + FIELD field_40172 MAX_FEATURE_FLAGS I + FIELD field_40173 EMPTY Lnet/minecraft/class_7699; + FIELD field_40174 universe Lnet/minecraft/class_7700; + FIELD field_40175 featuresMask J + METHOD (Lnet/minecraft/class_7700;J)V + ARG 1 universe + ARG 2 featuresMask + METHOD equals (Ljava/lang/Object;)Z + ARG 1 o + METHOD method_45397 empty ()Lnet/minecraft/class_7699; + METHOD method_45398 of (Lnet/minecraft/class_7696;)Lnet/minecraft/class_7699; + ARG 0 feature + METHOD method_45399 of (Lnet/minecraft/class_7696;[Lnet/minecraft/class_7696;)Lnet/minecraft/class_7699; + ARG 0 feature1 + ARG 1 features + METHOD method_45400 isSubsetOf (Lnet/minecraft/class_7699;)Z + ARG 1 features + METHOD method_45401 combineMask (Lnet/minecraft/class_7700;JLjava/lang/Iterable;)J + ARG 0 universe + ARG 1 featuresMask + ARG 3 newFeatures + METHOD method_45402 of (Lnet/minecraft/class_7700;Ljava/util/Collection;)Lnet/minecraft/class_7699; + ARG 0 universe + ARG 1 features + METHOD method_45403 contains (Lnet/minecraft/class_7696;)Z + ARG 1 feature + METHOD method_45404 combine (Lnet/minecraft/class_7699;)Lnet/minecraft/class_7699; + ARG 1 features diff --git a/yarn-1.19.3/mappings/net/minecraft/server/command/CommandManager.mapping b/yarn-1.19.3/mappings/net/minecraft/server/command/CommandManager.mapping new file mode 100644 index 0000000..9a6cba3 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/server/command/CommandManager.mapping @@ -0,0 +1,75 @@ +CLASS net/minecraft/class_2170 net/minecraft/server/command/CommandManager + FIELD field_9832 dispatcher Lcom/mojang/brigadier/CommandDispatcher; + FIELD field_9833 LOGGER Lorg/slf4j/Logger; + METHOD (Lnet/minecraft/class_2170$class_5364;Lnet/minecraft/class_7157;)V + ARG 1 environment + ARG 2 commandRegistryAccess + METHOD method_23917 getException (Lcom/mojang/brigadier/ParseResults;)Lcom/mojang/brigadier/exceptions/CommandSyntaxException; + ARG 0 parse + METHOD method_30851 (Lcom/mojang/brigadier/arguments/ArgumentType;)Ljava/lang/String; + ARG 0 type + METHOD method_30852 checkMissing ()V + METHOD method_30853 (Lcom/mojang/brigadier/arguments/ArgumentType;)Z + ARG 0 type + METHOD method_41710 (Lcom/mojang/brigadier/CommandDispatcher;Lcom/mojang/brigadier/tree/CommandNode;Lcom/mojang/brigadier/tree/CommandNode;Lcom/mojang/brigadier/tree/CommandNode;Ljava/util/Collection;)V + ARG 1 parent + ARG 2 child + ARG 3 sibling + ARG 4 inputs + METHOD method_44252 executeWithPrefix (Lnet/minecraft/class_2168;Ljava/lang/String;)I + COMMENT Executes {@code command}. Unlike {@link #execute} the command can be prefixed + COMMENT with a slash. + ARG 1 source + ARG 2 command + METHOD method_45018 withCommandSource (Lcom/mojang/brigadier/ParseResults;Ljava/util/function/UnaryOperator;)Lcom/mojang/brigadier/ParseResults; + COMMENT {@return {@code parseResults} with {@code sourceMapper} applied to the + COMMENT command source} + ARG 0 parseResults + ARG 1 sourceMapper + METHOD method_46732 createRegistryAccess (Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_7157; + ARG 0 registryLookup + METHOD method_9235 getDispatcher ()Lcom/mojang/brigadier/CommandDispatcher; + METHOD method_9236 (Ljava/lang/String;Lnet/minecraft/class_2583;)Lnet/minecraft/class_2583; + ARG 1 style + METHOD method_9238 getCommandValidator (Lnet/minecraft/class_2170$class_2171;)Ljava/util/function/Predicate; + ARG 0 parser + METHOD method_9239 makeTreeForSource (Lcom/mojang/brigadier/tree/CommandNode;Lcom/mojang/brigadier/tree/CommandNode;Lnet/minecraft/class_2168;Ljava/util/Map;)V + ARG 1 tree + ARG 2 result + ARG 3 source + ARG 4 resultNodes + METHOD method_9240 (Lnet/minecraft/class_2170$class_2171;Ljava/lang/String;)Z + ARG 1 string + METHOD method_9241 sendCommandTree (Lnet/minecraft/class_3222;)V + ARG 1 player + METHOD method_9242 (Lnet/minecraft/class_5250;Lnet/minecraft/class_2583;)Lnet/minecraft/class_2583; + ARG 1 style + METHOD method_9244 argument (Ljava/lang/String;Lcom/mojang/brigadier/arguments/ArgumentType;)Lcom/mojang/brigadier/builder/RequiredArgumentBuilder; + ARG 0 name + ARG 1 type + METHOD method_9245 (Lnet/minecraft/class_2172;)Z + ARG 0 source + METHOD method_9246 (Lcom/mojang/brigadier/context/CommandContext;)I + ARG 0 context + METHOD method_9247 literal (Ljava/lang/String;)Lcom/mojang/brigadier/builder/LiteralArgumentBuilder; + ARG 0 literal + METHOD method_9248 (Lcom/mojang/brigadier/context/CommandContext;ZI)V + ARG 0 context + ARG 1 success + ARG 2 result + METHOD method_9249 execute (Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;)I + COMMENT Executes {@code command}. The command cannot be prefixed with a slash. + COMMENT + COMMENT @see #executeWithPrefix(ServerCommandSource, String) + ARG 1 parseResults + ARG 2 command + CLASS class_2171 CommandParser + METHOD parse (Lcom/mojang/brigadier/StringReader;)V + ARG 1 reader + CLASS class_5364 RegistrationEnvironment + COMMENT Describes the environment in which commands are registered. + FIELD field_25422 integrated Z + FIELD field_25423 dedicated Z + METHOD (Ljava/lang/String;IZZ)V + ARG 3 integrated + ARG 4 dedicated diff --git a/yarn-1.19.3/mappings/net/minecraft/server/dedicated/DedicatedServer.mapping b/yarn-1.19.3/mappings/net/minecraft/server/dedicated/DedicatedServer.mapping new file mode 100644 index 0000000..f90ee45 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/server/dedicated/DedicatedServer.mapping @@ -0,0 +1,13 @@ +CLASS net/minecraft/class_2994 net/minecraft/server/dedicated/DedicatedServer + METHOD method_12916 getPlugins ()Ljava/lang/String; + METHOD method_12918 getPort ()I + METHOD method_12929 getHostname ()Ljava/lang/String; + METHOD method_12930 getMotd ()Ljava/lang/String; + METHOD method_12934 executeRconCommand (Ljava/lang/String;)Ljava/lang/String; + ARG 1 command + METHOD method_16705 getProperties ()Lnet/minecraft/class_3806; + METHOD method_3788 getCurrentPlayerCount ()I + METHOD method_3802 getMaxPlayerCount ()I + METHOD method_3827 getVersion ()Ljava/lang/String; + METHOD method_3858 getPlayerNames ()[Ljava/lang/String; + METHOD method_3865 getLevelName ()Ljava/lang/String; diff --git a/yarn-1.19.3/mappings/net/minecraft/structure/StructurePiecesGenerator.mapping b/yarn-1.19.3/mappings/net/minecraft/structure/StructurePiecesGenerator.mapping new file mode 100644 index 0000000..be4ba34 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/structure/StructurePiecesGenerator.mapping @@ -0,0 +1,10 @@ +CLASS net/minecraft/class_6622 net/minecraft/structure/StructurePiecesGenerator + COMMENT A structure pieces generator adds structure pieces for a structure, + COMMENT but does not yet realize those pieces into the world. It executes in the + COMMENT structure starts chunk status. + METHOD generatePieces (Lnet/minecraft/class_6626;Lnet/minecraft/class_6622$class_6623;)V + ARG 1 collector + ARG 2 context + CLASS class_6623 Context + FIELD comp_129 world Lnet/minecraft/class_5539; + METHOD comp_129 world ()Lnet/minecraft/class_5539; diff --git a/yarn-1.19.3/mappings/net/minecraft/structure/StructureSet.mapping b/yarn-1.19.3/mappings/net/minecraft/structure/StructureSet.mapping new file mode 100644 index 0000000..dfaeb74 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/structure/StructureSet.mapping @@ -0,0 +1,17 @@ +CLASS net/minecraft/class_7059 net/minecraft/structure/StructureSet + FIELD field_37195 CODEC Lcom/mojang/serialization/Codec; + FIELD field_37196 REGISTRY_CODEC Lcom/mojang/serialization/Codec; + METHOD (Lnet/minecraft/class_6880;Lnet/minecraft/class_6874;)V + ARG 1 structure + ARG 2 placement + METHOD method_41144 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_41145 createEntry (Lnet/minecraft/class_6880;)Lnet/minecraft/class_7059$class_7060; + ARG 0 structure + METHOD method_41146 createEntry (Lnet/minecraft/class_6880;I)Lnet/minecraft/class_7059$class_7060; + ARG 0 structure + ARG 1 weight + CLASS class_7060 WeightedEntry + FIELD field_37197 CODEC Lcom/mojang/serialization/Codec; + METHOD method_41147 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance diff --git a/yarn-1.19.3/mappings/net/minecraft/structure/StructureTemplate.mapping b/yarn-1.19.3/mappings/net/minecraft/structure/StructureTemplate.mapping new file mode 100644 index 0000000..44e4d75 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/structure/StructureTemplate.mapping @@ -0,0 +1,211 @@ +CLASS net/minecraft/class_3499 net/minecraft/structure/StructureTemplate + FIELD field_15586 blockInfoLists Ljava/util/List; + FIELD field_15587 size Lnet/minecraft/class_2382; + FIELD field_15588 author Ljava/lang/String; + FIELD field_15589 entities Ljava/util/List; + FIELD field_31687 PALETTE_KEY Ljava/lang/String; + FIELD field_31688 PALETTES_KEY Ljava/lang/String; + FIELD field_31689 ENTITIES_KEY Ljava/lang/String; + FIELD field_31690 BLOCKS_KEY Ljava/lang/String; + FIELD field_31691 BLOCKS_POS_KEY Ljava/lang/String; + FIELD field_31692 BLOCKS_STATE_KEY Ljava/lang/String; + FIELD field_31693 BLOCKS_NBT_KEY Ljava/lang/String; + FIELD field_31694 ENTITIES_POS_KEY Ljava/lang/String; + FIELD field_31695 ENTITIES_BLOCK_POS_KEY Ljava/lang/String; + FIELD field_31696 ENTITIES_NBT_KEY Ljava/lang/String; + FIELD field_31697 SIZE_KEY Ljava/lang/String; + METHOD method_15160 getSize ()Lnet/minecraft/class_2382; + METHOD method_15161 setAuthor (Ljava/lang/String;)V + ARG 1 author + METHOD method_15162 applyTransformedOffset (Lnet/minecraft/class_2338;Lnet/minecraft/class_2415;Lnet/minecraft/class_2470;II)Lnet/minecraft/class_2338; + ARG 0 pos + ARG 1 mirror + ARG 2 rotation + ARG 3 offsetX + ARG 4 offsetZ + METHOD method_15163 (Lnet/minecraft/class_1297;)Z + ARG 0 entity + METHOD method_15164 addEntitiesFromWorld (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)V + ARG 1 world + ARG 2 firstCorner + ARG 3 secondCorner + METHOD method_15165 getInfosForBlock (Lnet/minecraft/class_2338;Lnet/minecraft/class_3492;Lnet/minecraft/class_2248;Z)Lit/unimi/dsi/fastutil/objects/ObjectArrayList; + ARG 1 pos + ARG 2 placementData + ARG 3 block + ARG 4 transformed + METHOD method_15166 getRotatedSize (Lnet/minecraft/class_2470;)Lnet/minecraft/class_2382; + ARG 1 rotation + METHOD method_15167 offsetByTransformedSize (Lnet/minecraft/class_2338;Lnet/minecraft/class_2415;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2338; + ARG 1 pos + ARG 2 mirror + ARG 3 rotation + METHOD method_15168 transformAround (Lnet/minecraft/class_2338;Lnet/minecraft/class_2415;Lnet/minecraft/class_2470;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338; + ARG 0 pos + ARG 1 mirror + ARG 2 rotation + ARG 3 pivot + METHOD method_15169 createNbtIntList ([I)Lnet/minecraft/class_2499; + ARG 1 ints + METHOD method_15171 transform (Lnet/minecraft/class_3492;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338; + ARG 0 placementData + ARG 1 pos + METHOD method_15172 place (Lnet/minecraft/class_5425;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;Lnet/minecraft/class_3492;Lnet/minecraft/class_5819;I)Z + ARG 1 world + ARG 2 pos + ARG 3 pivot + ARG 4 placementData + ARG 5 random + ARG 6 flags + METHOD method_15173 (IIILnet/minecraft/class_1936;ILnet/minecraft/class_2350;III)V + ARG 5 direction + ARG 6 x + ARG 7 y + ARG 8 z + METHOD method_15174 saveFromWorld (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2382;ZLnet/minecraft/class_2248;)V + ARG 1 world + ARG 2 start + ARG 3 dimensions + ARG 4 includeEntities + ARG 5 ignoredBlock + METHOD method_15175 writeNbt (Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487; + ARG 1 nbt + METHOD method_15176 transformAround (Lnet/minecraft/class_243;Lnet/minecraft/class_2415;Lnet/minecraft/class_2470;Lnet/minecraft/class_2338;)Lnet/minecraft/class_243; + ARG 0 point + ARG 1 mirror + ARG 2 rotation + ARG 3 pivot + METHOD method_15177 loadPalettedBlockInfo (Lnet/minecraft/class_7871;Lnet/minecraft/class_2499;Lnet/minecraft/class_2499;)V + ARG 1 blockLookup + ARG 2 palette + ARG 3 blocks + METHOD method_15179 spawnEntities (Lnet/minecraft/class_5425;Lnet/minecraft/class_2338;Lnet/minecraft/class_2415;Lnet/minecraft/class_2470;Lnet/minecraft/class_2338;Lnet/minecraft/class_3341;Z)V + ARG 1 world + ARG 2 pos + ARG 3 mirror + ARG 4 rotation + ARG 5 pivot + ARG 6 area + ARG 7 initializeMobs + METHOD method_15180 transformBox (Lnet/minecraft/class_3492;Lnet/minecraft/class_2338;Lnet/minecraft/class_3492;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338; + ARG 1 placementData1 + ARG 2 pos1 + ARG 3 placementData2 + ARG 4 pos2 + METHOD method_15181 getAuthor ()Ljava/lang/String; + METHOD method_15183 readNbt (Lnet/minecraft/class_7871;Lnet/minecraft/class_2487;)V + ARG 1 blockLookup + ARG 2 nbt + METHOD method_15184 createNbtDoubleList ([D)Lnet/minecraft/class_2499; + ARG 1 doubles + METHOD method_16185 (Lnet/minecraft/class_3499$class_3501;)I + ARG 0 blockInfo + METHOD method_16187 calculateBoundingBox (Lnet/minecraft/class_3492;Lnet/minecraft/class_2338;)Lnet/minecraft/class_3341; + ARG 1 placementData + ARG 2 pos + METHOD method_16445 getInfosForBlock (Lnet/minecraft/class_2338;Lnet/minecraft/class_3492;Lnet/minecraft/class_2248;)Ljava/util/List; + ARG 1 pos + ARG 2 placementData + ARG 3 block + METHOD method_16446 process (Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;Lnet/minecraft/class_3492;Ljava/util/List;)Ljava/util/List; + ARG 0 world + ARG 1 pos + ARG 2 pivot + ARG 3 placementData + ARG 4 infos + METHOD method_17916 getEntity (Lnet/minecraft/class_5425;Lnet/minecraft/class_2487;)Ljava/util/Optional; + ARG 0 world + ARG 1 nbt + METHOD method_17917 (Lnet/minecraft/class_2470;Lnet/minecraft/class_2415;Lnet/minecraft/class_243;ZLnet/minecraft/class_5425;Lnet/minecraft/class_2487;Lnet/minecraft/class_1297;)V + ARG 6 entity + METHOD method_20532 updateCorner (Lnet/minecraft/class_1936;ILnet/minecraft/class_251;III)V + ARG 0 world + ARG 1 flags + ARG 2 set + ARG 3 startX + ARG 4 startY + ARG 5 startZ + METHOD method_27267 calculateBoundingBox (Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;Lnet/minecraft/class_2338;Lnet/minecraft/class_2415;)Lnet/minecraft/class_3341; + ARG 1 pos + ARG 2 rotation + ARG 3 pivot + ARG 4 mirror + METHOD method_28053 (Lnet/minecraft/class_3499$class_3501;)I + ARG 0 blockInfo + METHOD method_28054 categorize (Lnet/minecraft/class_3499$class_3501;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V + COMMENT Categorizes {@code blockInfo} based on its properties, modifying + COMMENT the passed lists in-place. + COMMENT + COMMENT

If the block has an NBT associated with it, then it will be + COMMENT put in {@code blocksWithNbt}. If the block does not have an NBT + COMMENT associated with it, but is always a full cube, then it will be + COMMENT put in {@code fullBlocks}. Otherwise, it will be put in + COMMENT {@code otherBlocks}. + COMMENT + COMMENT @apiNote After all blocks are categorized, {@link #combineSorted} + COMMENT should be called with the same parameters to get the final list. + ARG 0 blockInfo + ARG 1 fullBlocks + ARG 2 blocksWithNbt + ARG 3 otherBlocks + METHOD method_28055 combineSorted (Ljava/util/List;Ljava/util/List;Ljava/util/List;)Ljava/util/List; + COMMENT {@return the list that sorts and combines the passed block lists} + COMMENT + COMMENT @apiNote The parameters passed should be the same one that was passed + COMMENT to previous calls to {@link #categorize}. The returned value is meant to + COMMENT be passed to {@link PalettedBlockInfoList}. + COMMENT + COMMENT @implNote Each list passed will be sorted in-place using the items' + COMMENT Y, X, and Z coordinates. The returned list contains all items of + COMMENT {@code fullBlocks}, {@code otherBlocks}, and {@code blocksWithNbt} + COMMENT in this order. + ARG 0 fullBlocks + ARG 1 blocksWithNbt + ARG 2 otherBlocks + METHOD method_28056 (Lnet/minecraft/class_3499$class_3501;)I + ARG 0 blockInfo + METHOD method_34400 createBox (Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;Lnet/minecraft/class_2338;Lnet/minecraft/class_2415;Lnet/minecraft/class_2382;)Lnet/minecraft/class_3341; + ARG 0 pos + ARG 1 rotation + ARG 2 pivot + ARG 3 mirror + ARG 4 dimensions + CLASS class_3500 Palette + FIELD field_15590 AIR Lnet/minecraft/class_2680; + FIELD field_15591 ids Lnet/minecraft/class_2361; + FIELD field_15592 currentIndex I + METHOD method_15185 getState (I)Lnet/minecraft/class_2680; + ARG 1 id + METHOD method_15186 set (Lnet/minecraft/class_2680;I)V + ARG 1 state + ARG 2 id + METHOD method_15187 getId (Lnet/minecraft/class_2680;)I + ARG 1 state + CLASS class_3501 StructureBlockInfo + FIELD field_15595 nbt Lnet/minecraft/class_2487; + FIELD field_15596 state Lnet/minecraft/class_2680; + FIELD field_15597 pos Lnet/minecraft/class_2338; + METHOD (Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2487;)V + ARG 1 pos + ARG 2 state + ARG 3 nbt + CLASS class_3502 StructureEntityInfo + FIELD field_15598 nbt Lnet/minecraft/class_2487; + FIELD field_15599 pos Lnet/minecraft/class_243; + FIELD field_15600 blockPos Lnet/minecraft/class_2338; + METHOD (Lnet/minecraft/class_243;Lnet/minecraft/class_2338;Lnet/minecraft/class_2487;)V + ARG 1 pos + ARG 2 blockPos + ARG 3 nbt + CLASS class_5162 PalettedBlockInfoList + FIELD field_23913 infos Ljava/util/List; + FIELD field_23914 blockToInfos Ljava/util/Map; + METHOD (Ljava/util/List;)V + ARG 1 infos + METHOD method_27125 getAll ()Ljava/util/List; + METHOD method_27126 getAllOf (Lnet/minecraft/class_2248;)Ljava/util/List; + ARG 1 block + METHOD method_27127 (Lnet/minecraft/class_2248;Lnet/minecraft/class_3499$class_3501;)Z + ARG 1 info + METHOD method_27128 (Lnet/minecraft/class_2248;)Ljava/util/List; + ARG 1 block2 diff --git a/yarn-1.19.3/mappings/net/minecraft/test/TestContext.mapping b/yarn-1.19.3/mappings/net/minecraft/test/TestContext.mapping new file mode 100644 index 0000000..1139173 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/test/TestContext.mapping @@ -0,0 +1,363 @@ +CLASS net/minecraft/class_4516 net/minecraft/test/TestContext + FIELD field_20558 test Lnet/minecraft/class_4517; + FIELD field_33146 hasFinalClause Z + METHOD (Lnet/minecraft/class_4517;)V + ARG 1 test + METHOD method_35943 getWorld ()Lnet/minecraft/class_3218; + METHOD method_35944 setTime (I)V + ARG 1 timeOfDay + METHOD method_35945 pushButton (III)V + ARG 1 x + ARG 2 y + ARG 3 z + METHOD method_35946 setBlockState (IIILnet/minecraft/class_2248;)V + ARG 1 x + ARG 2 y + ARG 3 z + ARG 4 block + METHOD method_35947 setBlockState (IIILnet/minecraft/class_2680;)V + ARG 1 x + ARG 2 y + ARG 3 z + ARG 4 state + METHOD method_35948 addFinalTaskWithDuration (ILjava/lang/Runnable;)V + ARG 1 duration + ARG 2 runnable + METHOD method_35949 expectEmptyContainer (JLnet/minecraft/class_2338;)V + ARG 1 delay + ARG 3 pos + METHOD method_35950 expectContainerWith (JLnet/minecraft/class_2338;Lnet/minecraft/class_1792;)V + ARG 1 delay + ARG 3 pos + ARG 4 item + METHOD method_35951 runAtTick (JLjava/lang/Runnable;)V + ARG 1 tick + ARG 3 runnable + METHOD method_35952 (Lnet/minecraft/class_1297;)Z + ARG 0 entity + METHOD method_35953 expectEntityAt (Lnet/minecraft/class_1297;III)V + ARG 1 entity + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35954 (Lnet/minecraft/class_1297;Lnet/minecraft/class_1297;)Z + ARG 1 e + METHOD method_35955 expectEntityAt (Lnet/minecraft/class_1297;Lnet/minecraft/class_2338;)V + ARG 1 entity + ARG 2 pos + METHOD method_35957 testEntityProperty (Lnet/minecraft/class_1297;Ljava/util/function/Function;Ljava/lang/String;Ljava/lang/Object;)V + ARG 1 entity + ARG 2 propertyGetter + ARG 3 propertyName + ARG 4 expectedValue + METHOD method_35958 testEntity (Lnet/minecraft/class_1297;Ljava/util/function/Predicate;Ljava/lang/String;)V + ARG 1 entity + ARG 2 predicate + ARG 3 testName + METHOD method_35959 expectEntity (Lnet/minecraft/class_1299;)V + ARG 1 type + METHOD method_35960 expectEntityToTouch (Lnet/minecraft/class_1299;DDD)V + ARG 1 type + ARG 2 x + ARG 4 y + ARG 6 z + METHOD method_35961 spawnEntity (Lnet/minecraft/class_1299;FFF)Lnet/minecraft/class_1297; + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35962 spawnEntity (Lnet/minecraft/class_1299;III)Lnet/minecraft/class_1297; + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35963 spawnEntity (Lnet/minecraft/class_1299;Lnet/minecraft/class_243;)Lnet/minecraft/class_1297; + ARG 1 type + ARG 2 pos + METHOD method_35964 spawnEntity (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1297; + ARG 1 type + ARG 2 pos + METHOD method_35965 expectEntityAround (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;D)V + ARG 1 type + ARG 2 pos + ARG 3 radius + METHOD method_35966 drown (Lnet/minecraft/class_1309;)Lnet/minecraft/class_1309; + ARG 1 entity + METHOD method_35967 startMovingTowards (Lnet/minecraft/class_1308;Lnet/minecraft/class_2338;F)Lnet/minecraft/class_4693; + ARG 1 entity + ARG 2 pos + ARG 3 speed + METHOD method_35968 spawnItem (Lnet/minecraft/class_1792;FFF)Lnet/minecraft/class_1542; + ARG 1 item + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35969 expectItemAt (Lnet/minecraft/class_1792;Lnet/minecraft/class_2338;D)V + ARG 1 item + ARG 2 pos + ARG 3 radius + METHOD method_35970 expectItemsAt (Lnet/minecraft/class_1792;Lnet/minecraft/class_2338;DI)V + ARG 1 item + ARG 2 pos + ARG 3 radius + ARG 5 amount + METHOD method_35971 expectBlock (Lnet/minecraft/class_2248;III)V + ARG 1 block + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_35972 expectBlock (Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;)V + ARG 1 block + ARG 2 pos + METHOD method_35973 (Lnet/minecraft/class_2680;)Z + ARG 0 state + METHOD method_35974 (Lnet/minecraft/class_2680;Lnet/minecraft/class_2248;Lnet/minecraft/class_2248;)Z + ARG 2 block1 + METHOD method_35977 expectSameStates (Lnet/minecraft/class_3341;Lnet/minecraft/class_2338;)V + ARG 1 checkedBlockBox + ARG 2 correctStatePos + METHOD method_35978 getAbsolute (Lnet/minecraft/class_243;)Lnet/minecraft/class_243; + ARG 1 pos + METHOD method_35979 (Lnet/minecraft/class_243;Lnet/minecraft/class_1297;)Z + ARG 1 entity + METHOD method_35980 getBlockState (Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680; + ARG 1 pos + METHOD method_35981 putAndRemoveRedstoneBlock (Lnet/minecraft/class_2338;J)V + ARG 1 pos + ARG 2 delay + METHOD method_35982 expectEntityWithData (Lnet/minecraft/class_2338;Lnet/minecraft/class_1299;Ljava/util/function/Function;Ljava/lang/Object;)V + ARG 1 pos + ARG 2 type + ARG 3 entityDataGetter + ARG 4 data + METHOD method_35983 expectContainerWith (Lnet/minecraft/class_2338;Lnet/minecraft/class_1792;)V + ARG 1 pos + ARG 2 item + METHOD method_35984 setBlockState (Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;)V + ARG 1 pos + ARG 2 block + METHOD method_35985 (Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2248;)Z + ARG 3 block1 + METHOD method_35986 setBlockState (Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V + ARG 1 pos + ARG 2 state + METHOD method_35987 expectBlockProperty (Lnet/minecraft/class_2338;Lnet/minecraft/class_2769;Ljava/lang/Comparable;)V + ARG 1 pos + ARG 2 property + ARG 3 value + METHOD method_35988 checkBlockProperty (Lnet/minecraft/class_2338;Lnet/minecraft/class_2769;Ljava/util/function/Predicate;Ljava/lang/String;)V + ARG 1 pos + ARG 2 property + ARG 3 predicate + ARG 4 errorMessage + METHOD method_35989 (Lnet/minecraft/class_2338;Lnet/minecraft/class_3341;Lnet/minecraft/class_2338;)V + ARG 3 checkedPos + METHOD method_35990 expectSameStates (Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)V + ARG 1 checkedPos + ARG 2 correctStatePos + METHOD method_35991 checkBlock (Lnet/minecraft/class_2338;Ljava/util/function/Predicate;Ljava/lang/String;)V + ARG 1 pos + ARG 2 predicate + ARG 3 errorMessage + METHOD method_35992 checkBlock (Lnet/minecraft/class_2338;Ljava/util/function/Predicate;Ljava/util/function/Supplier;)V + ARG 1 pos + ARG 2 predicate + ARG 3 errorMessageSupplier + METHOD method_35993 addFinalTask (Ljava/lang/Runnable;)V + ARG 1 runnable + METHOD method_35994 (Ljava/lang/Runnable;J)V + ARG 2 tick + METHOD method_35995 throwGameTestException (Ljava/lang/String;)V + ARG 1 message + METHOD method_35996 throwPositionedException (Ljava/lang/String;Lnet/minecraft/class_1297;)V + ARG 1 message + ARG 2 entity + METHOD method_35997 throwPositionedException (Ljava/lang/String;Lnet/minecraft/class_2338;)V + ARG 1 message + ARG 2 pos + METHOD method_35998 forEachRelativePos (Ljava/util/function/Consumer;)V + ARG 1 posConsumer + METHOD method_35999 (Ljava/util/function/Predicate;Lnet/minecraft/class_2680;)Z + ARG 1 state + METHOD method_36000 (Ljava/util/function/Predicate;Lnet/minecraft/class_2769;Lnet/minecraft/class_2680;)Z + ARG 2 state + METHOD method_36001 killAllEntities ()V + METHOD method_36002 toggleLever (III)V + ARG 1 x + ARG 2 y + ARG 3 z + METHOD method_36003 waitAndRun (JLjava/lang/Runnable;)V + ARG 1 ticks + ARG 3 runnable + METHOD method_36004 dontExpectEntity (Lnet/minecraft/class_1299;)V + ARG 1 type + METHOD method_36005 dontExpectEntityToTouch (Lnet/minecraft/class_1299;DDD)V + ARG 1 type + ARG 2 x + ARG 4 y + ARG 6 z + METHOD method_36006 spawnMob (Lnet/minecraft/class_1299;FFF)Lnet/minecraft/class_1308; + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36007 spawnMob (Lnet/minecraft/class_1299;III)Lnet/minecraft/class_1308; + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36008 spawnMob (Lnet/minecraft/class_1299;Lnet/minecraft/class_243;)Lnet/minecraft/class_1308; + ARG 1 type + ARG 2 pos + METHOD method_36009 spawnMob (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1308; + ARG 1 type + ARG 2 pos + METHOD method_36011 dontExpectBlock (Lnet/minecraft/class_2248;III)V + ARG 1 block + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36012 dontExpectBlock (Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;)V + ARG 1 block + ARG 2 pos + METHOD method_36013 (Lnet/minecraft/class_243;Lnet/minecraft/class_1297;)Z + ARG 1 entity + METHOD method_36014 getBlockEntity (Lnet/minecraft/class_2338;)Lnet/minecraft/class_2586; + ARG 1 pos + METHOD method_36015 expectEntityWithDataEnd (Lnet/minecraft/class_2338;Lnet/minecraft/class_1299;Ljava/util/function/Function;Ljava/lang/Object;)V + ARG 1 pos + ARG 2 type + ARG 3 entityDataGetter + ARG 4 data + METHOD method_36017 checkBlockState (Lnet/minecraft/class_2338;Ljava/util/function/Predicate;Ljava/util/function/Supplier;)V + ARG 1 pos + ARG 2 predicate + ARG 3 errorMessageSupplier + METHOD method_36018 addInstantFinalTask (Ljava/lang/Runnable;)V + ARG 1 runnable + METHOD method_36019 (Ljava/lang/Runnable;J)V + ARG 2 tick + METHOD method_36021 createMockCreativePlayer ()Lnet/minecraft/class_1657; + METHOD method_36022 expectEntityAt (Lnet/minecraft/class_1299;III)V + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36023 expectEntityAt (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)V + ARG 1 type + ARG 2 pos + METHOD method_36024 expectBlockAtEnd (Lnet/minecraft/class_2248;III)V + ARG 1 block + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36025 expectBlockAtEnd (Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;)V + ARG 1 block + ARG 2 pos + METHOD method_36026 pushButton (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36028 addTask (Ljava/lang/Runnable;)V + ARG 1 task + METHOD method_36030 useNightTime ()V + METHOD method_36031 dontExpectEntityAt (Lnet/minecraft/class_1299;III)V + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36032 dontExpectEntityAt (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)V + ARG 1 type + ARG 2 pos + METHOD method_36034 useBlock (Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)V + ARG 1 pos + ARG 2 player + METHOD method_36035 runAtEveryTick (Ljava/lang/Runnable;)V + ARG 1 task + METHOD method_36036 complete ()V + METHOD method_36037 expectEntityAtEnd (Lnet/minecraft/class_1299;III)V + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36038 expectEntityAtEnd (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)V + ARG 1 type + ARG 2 pos + METHOD method_36039 toggleLever (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36040 forEachRemainingTick (Ljava/lang/Runnable;)V + ARG 1 runnable + METHOD method_36041 createTimedTaskRunner ()Lnet/minecraft/class_4693; + METHOD method_36042 dontExpectEntityAtEnd (Lnet/minecraft/class_1299;III)V + ARG 1 type + ARG 2 x + ARG 3 y + ARG 4 z + METHOD method_36043 dontExpectEntityAtEnd (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;)V + ARG 1 type + ARG 2 pos + METHOD method_36044 removeBlock (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36045 getTick ()J + METHOD method_36047 expectEmptyContainer (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36048 markFinalCause ()V + METHOD method_36050 forceRandomTick (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_36051 getTestBox ()Lnet/minecraft/class_238; + METHOD method_36052 getAbsolutePos (Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338; + ARG 1 pos + METHOD method_36053 getRelativeTestBox ()Lnet/minecraft/class_238; + METHOD method_36054 getRelativePos (Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338; + ARG 1 pos + METHOD method_42063 getRelativeTopY (Lnet/minecraft/class_2902$class_2903;II)I + ARG 1 heightmap + ARG 2 x + ARG 3 z + METHOD method_42762 dontExpectItemAt (Lnet/minecraft/class_1792;Lnet/minecraft/class_2338;D)V + ARG 1 item + ARG 2 pos + ARG 3 radius + METHOD method_44335 getEntitiesAround (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;D)Ljava/util/List; + ARG 1 type + ARG 2 pos + ARG 3 radius + METHOD method_44606 expectEntitiesAround (Lnet/minecraft/class_1299;Lnet/minecraft/class_2338;ID)V + ARG 1 type + ARG 2 pos + ARG 3 amount + ARG 4 radius + METHOD method_46224 expectEntityInside (Lnet/minecraft/class_1299;Lnet/minecraft/class_243;Lnet/minecraft/class_243;)V + ARG 1 type + ARG 2 pos1 + ARG 3 pos2 + METHOD method_46225 spawnItem (Lnet/minecraft/class_1792;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1542; + ARG 1 item + ARG 2 pos + METHOD method_46226 assertTrue (ZLjava/lang/String;)V + ARG 1 condition + ARG 2 message + METHOD method_46227 getRelative (Lnet/minecraft/class_243;)Lnet/minecraft/class_243; + ARG 1 pos + METHOD method_46228 createMockSurvivalPlayer ()Lnet/minecraft/class_1657; + METHOD method_46229 useBlock (Lnet/minecraft/class_2338;)V + ARG 1 pos + METHOD method_47816 useStackOnBlock (Lnet/minecraft/class_1657;Lnet/minecraft/class_1799;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)V + ARG 1 player + ARG 2 stack + ARG 3 pos + ARG 4 direction + METHOD method_47817 useBlock (Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)V + ARG 1 pos + ARG 2 player + ARG 3 result + METHOD method_48000 (Lnet/minecraft/class_1792;Lnet/minecraft/class_1799;)Z + ARG 1 stack + METHOD method_48001 expectEntityHoldingItem (Lnet/minecraft/class_2338;Lnet/minecraft/class_1299;Lnet/minecraft/class_1792;)V + ARG 1 pos + ARG 2 entityType + ARG 3 item + METHOD method_48002 (Ljava/lang/Object;)Z + ARG 0 entity + METHOD method_48003 expectEntityWithItem (Lnet/minecraft/class_2338;Lnet/minecraft/class_1299;Lnet/minecraft/class_1792;)V + ARG 1 pos + ARG 2 entityType + ARG 3 item diff --git a/yarn-1.19.3/mappings/net/minecraft/text/EntityNbtDataSource.mapping b/yarn-1.19.3/mappings/net/minecraft/text/EntityNbtDataSource.mapping new file mode 100644 index 0000000..fae1fc8 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/text/EntityNbtDataSource.mapping @@ -0,0 +1,13 @@ +CLASS net/minecraft/class_2576 net/minecraft/text/EntityNbtDataSource + FIELD comp_735 rawSelector Ljava/lang/String; + FIELD comp_736 selector Lnet/minecraft/class_2300; + METHOD (Ljava/lang/String;)V + ARG 1 rawPath + METHOD (Ljava/lang/String;Lnet/minecraft/class_2300;)V + ARG 1 rawPath + METHOD comp_735 rawSelector ()Ljava/lang/String; + METHOD comp_736 selector ()Lnet/minecraft/class_2300; + METHOD equals (Ljava/lang/Object;)Z + ARG 1 o + METHOD method_10923 parseSelector (Ljava/lang/String;)Lnet/minecraft/class_2300; + ARG 0 rawSelector diff --git a/yarn-1.19.3/mappings/net/minecraft/text/LiteralTextContent.mapping b/yarn-1.19.3/mappings/net/minecraft/text/LiteralTextContent.mapping new file mode 100644 index 0000000..fed35de --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/text/LiteralTextContent.mapping @@ -0,0 +1,5 @@ +CLASS net/minecraft/class_2585 net/minecraft/text/LiteralTextContent + FIELD comp_737 string Ljava/lang/String; + METHOD (Ljava/lang/String;)V + ARG 1 string + METHOD comp_737 string ()Ljava/lang/String; diff --git a/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo5994.mapping b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo5994.mapping new file mode 100644 index 0000000..46097dd --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo5994.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_5994 net/minecraft/unused/packageinfo/PackageInfo5994 diff --git a/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6004.mapping b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6004.mapping new file mode 100644 index 0000000..a14e303 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6004.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_6004 net/minecraft/unused/packageinfo/PackageInfo6004 diff --git a/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6103.mapping b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6103.mapping new file mode 100644 index 0000000..54199bf --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6103.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_6103 net/minecraft/unused/packageinfo/PackageInfo6103 diff --git a/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6188.mapping b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6188.mapping new file mode 100644 index 0000000..4761cde --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6188.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_6188 net/minecraft/unused/packageinfo/PackageInfo6188 diff --git a/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6221.mapping b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6221.mapping new file mode 100644 index 0000000..c63dd68 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6221.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_6221 net/minecraft/unused/packageinfo/PackageInfo6221 diff --git a/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6311.mapping b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6311.mapping new file mode 100644 index 0000000..73f8f7c --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/unused/packageinfo/PackageInfo6311.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_6311 net/minecraft/unused/packageinfo/PackageInfo6311 diff --git a/yarn-1.19.3/mappings/net/minecraft/util/WorldSavePath.mapping b/yarn-1.19.3/mappings/net/minecraft/util/WorldSavePath.mapping new file mode 100644 index 0000000..8ace145 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/util/WorldSavePath.mapping @@ -0,0 +1,6 @@ +CLASS net/minecraft/class_5218 net/minecraft/util/WorldSavePath + FIELD field_24188 ROOT Lnet/minecraft/class_5218; + FIELD field_24189 relativePath Ljava/lang/String; + METHOD (Ljava/lang/String;)V + ARG 1 relativePath + METHOD method_27423 getRelativePath ()Ljava/lang/String; diff --git a/yarn-1.19.3/mappings/net/minecraft/util/profiler/DummyRecorder.mapping b/yarn-1.19.3/mappings/net/minecraft/util/profiler/DummyRecorder.mapping new file mode 100644 index 0000000..0b21702 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/util/profiler/DummyRecorder.mapping @@ -0,0 +1,2 @@ +CLASS net/minecraft/class_5963 net/minecraft/util/profiler/DummyRecorder + FIELD field_29594 INSTANCE Lnet/minecraft/class_5962; diff --git a/yarn-1.19.3/mappings/net/minecraft/world/WorldProperties.mapping b/yarn-1.19.3/mappings/net/minecraft/world/WorldProperties.mapping new file mode 100644 index 0000000..e9e0e97 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/WorldProperties.mapping @@ -0,0 +1,18 @@ +CLASS net/minecraft/class_5217 net/minecraft/world/WorldProperties + METHOD method_144 getSpawnY ()I + METHOD method_146 getGameRules ()Lnet/minecraft/class_1928; + METHOD method_151 populateCrashReport (Lnet/minecraft/class_129;Lnet/minecraft/class_5539;)V + ARG 1 reportSection + ARG 2 world + METHOD method_152 isHardcore ()Z + METHOD method_156 isRaining ()Z + METHOD method_157 setRaining (Z)V + ARG 1 raining + METHOD method_166 getSpawnZ ()I + METHOD method_188 getTime ()J + METHOD method_197 isDifficultyLocked ()Z + METHOD method_203 isThundering ()Z + METHOD method_207 getDifficulty ()Lnet/minecraft/class_1267; + METHOD method_215 getSpawnX ()I + METHOD method_217 getTimeOfDay ()J + METHOD method_30656 getSpawnAngle ()F diff --git a/yarn-1.19.3/mappings/net/minecraft/world/entity/EntityHandler.mapping b/yarn-1.19.3/mappings/net/minecraft/world/entity/EntityHandler.mapping new file mode 100644 index 0000000..3012b8e --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/entity/EntityHandler.mapping @@ -0,0 +1,32 @@ +CLASS net/minecraft/class_5576 net/minecraft/world/entity/EntityHandler + COMMENT The entity handler exposes world's entity handling to entity managers. + COMMENT + COMMENT

Each handler is usually associated with a {@link net.minecraft.world.World}. + COMMENT + COMMENT @param the type of entity handled + METHOD method_31797 stopTracking (Ljava/lang/Object;)V + COMMENT Unregisters an entity for tracking. + ARG 1 entity + COMMENT the tracked entity + METHOD method_31798 startTracking (Ljava/lang/Object;)V + COMMENT Registers an entity for tracking. + ARG 1 entity + COMMENT the entity to track + METHOD method_31799 stopTicking (Ljava/lang/Object;)V + COMMENT Unregisters an entity for ticking. + ARG 1 entity + COMMENT the ticked entity + METHOD method_31800 startTicking (Ljava/lang/Object;)V + COMMENT Registers an entity for ticking. + ARG 1 entity + COMMENT the entity to tick + METHOD method_31801 destroy (Ljava/lang/Object;)V + COMMENT Called when an entity is permanently destroyed. + ARG 1 entity + COMMENT the destroyed entity + METHOD method_31802 create (Ljava/lang/Object;)V + COMMENT Called when an entity is newly created. + ARG 1 entity + COMMENT the created entity + METHOD method_43029 updateLoadStatus (Ljava/lang/Object;)V + ARG 1 entity diff --git a/yarn-1.19.3/mappings/net/minecraft/world/entity/EntityTrackingStatus.mapping b/yarn-1.19.3/mappings/net/minecraft/world/entity/EntityTrackingStatus.mapping new file mode 100644 index 0000000..3b582e2 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/entity/EntityTrackingStatus.mapping @@ -0,0 +1,13 @@ +CLASS net/minecraft/class_5584 net/minecraft/world/entity/EntityTrackingStatus + COMMENT The status of entity tracking sections within entity managers. + COMMENT + COMMENT @see EntityTrackingSection + FIELD field_27292 tracked Z + FIELD field_27293 tick Z + METHOD (Ljava/lang/String;IZZ)V + ARG 3 tracked + ARG 4 tick + METHOD method_31883 shouldTick ()Z + METHOD method_31884 fromLevelType (Lnet/minecraft/class_3193$class_3194;)Lnet/minecraft/class_5584; + ARG 0 levelType + METHOD method_31885 shouldTrack ()Z diff --git a/yarn-1.19.3/mappings/net/minecraft/world/event/PositionSource.mapping b/yarn-1.19.3/mappings/net/minecraft/world/event/PositionSource.mapping new file mode 100644 index 0000000..cc87ae8 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/event/PositionSource.mapping @@ -0,0 +1,11 @@ +CLASS net/minecraft/class_5716 net/minecraft/world/event/PositionSource + COMMENT A position source is a property of a game event listener. + COMMENT + COMMENT @see net.minecraft.world.event.listener.GameEventListener#getPositionSource() + FIELD field_28184 CODEC Lcom/mojang/serialization/Codec; + COMMENT A codec for encoding and decoding any position source whose {@link #getType() type} + COMMENT is in the {@link net.minecraft.registry.Registries#POSITION_SOURCE_TYPE registry}. + METHOD method_32955 getType ()Lnet/minecraft/class_5717; + COMMENT Returns the type of this position source. + METHOD method_32956 getPos (Lnet/minecraft/class_1937;)Ljava/util/Optional; + ARG 1 world diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/carver/Carver.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/carver/Carver.mapping new file mode 100644 index 0000000..ab8639d --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/carver/Carver.mapping @@ -0,0 +1,73 @@ +CLASS net/minecraft/class_2939 net/minecraft/world/gen/carver/Carver + FIELD field_13294 CAVE_AIR Lnet/minecraft/class_2680; + FIELD field_13295 RAVINE Lnet/minecraft/class_2939; + FIELD field_13296 LAVA Lnet/minecraft/class_3610; + FIELD field_13298 carvableFluids Ljava/util/Set; + FIELD field_13301 AIR Lnet/minecraft/class_2680; + FIELD field_13305 WATER Lnet/minecraft/class_3610; + FIELD field_24831 codec Lcom/mojang/serialization/Codec; + METHOD (Lcom/mojang/serialization/Codec;)V + ARG 1 configCodec + METHOD method_12702 carve (Lnet/minecraft/class_5873;Lnet/minecraft/class_5871;Lnet/minecraft/class_2791;Ljava/util/function/Function;Lnet/minecraft/class_5819;Lnet/minecraft/class_6350;Lnet/minecraft/class_1923;Lnet/minecraft/class_6643;)Z + ARG 1 context + ARG 2 config + ARG 3 chunk + ARG 4 posToBiome + ARG 5 random + ARG 6 aquiferSampler + ARG 7 pos + ARG 8 mask + METHOD method_12704 register (Ljava/lang/String;Lnet/minecraft/class_2939;)Lnet/minecraft/class_2939; + ARG 0 name + ARG 1 carver + METHOD method_12705 shouldCarve (Lnet/minecraft/class_5871;Lnet/minecraft/class_5819;)Z + ARG 1 config + ARG 2 random + METHOD method_12709 canAlwaysCarveBlock (Lnet/minecraft/class_5871;Lnet/minecraft/class_2680;)Z + ARG 1 config + ARG 2 state + METHOD method_12710 getBranchFactor ()I + METHOD method_16581 carveAtPoint (Lnet/minecraft/class_5873;Lnet/minecraft/class_5871;Lnet/minecraft/class_2791;Ljava/util/function/Function;Lnet/minecraft/class_6643;Lnet/minecraft/class_2338$class_2339;Lnet/minecraft/class_2338$class_2339;Lnet/minecraft/class_6350;Lorg/apache/commons/lang3/mutable/MutableBoolean;)Z + ARG 1 context + ARG 2 config + ARG 3 chunk + ARG 4 posToBiome + ARG 5 mask + ARG 8 aquiferSampler + METHOD method_28614 configure (Lnet/minecraft/class_5871;)Lnet/minecraft/class_2922; + ARG 1 config + METHOD method_28616 getCodec ()Lcom/mojang/serialization/Codec; + METHOD method_33976 canCarveBranch (Lnet/minecraft/class_1923;DDIIF)Z + ARG 0 pos + ARG 1 x + ARG 3 z + ARG 5 branchIndex + ARG 6 branchCount + ARG 7 baseWidth + METHOD method_33978 carveRegion (Lnet/minecraft/class_5873;Lnet/minecraft/class_5871;Lnet/minecraft/class_2791;Ljava/util/function/Function;Lnet/minecraft/class_6350;DDDDDLnet/minecraft/class_6643;Lnet/minecraft/class_2939$class_5874;)Z + ARG 1 context + ARG 2 config + ARG 3 chunk + ARG 4 posToBiome + ARG 5 aquiferSampler + ARG 16 mask + ARG 17 skipPredicate + METHOD method_33980 isDebug (Lnet/minecraft/class_5871;)Z + ARG 0 config + METHOD method_36417 getDebugState (Lnet/minecraft/class_5871;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680; + ARG 0 config + ARG 1 state + METHOD method_36418 getState (Lnet/minecraft/class_5873;Lnet/minecraft/class_5871;Lnet/minecraft/class_2338;Lnet/minecraft/class_6350;)Lnet/minecraft/class_2680; + ARG 1 context + ARG 2 config + ARG 3 pos + ARG 4 sampler + METHOD method_39116 (Lnet/minecraft/class_2791;Lnet/minecraft/class_2338$class_2339;Lnet/minecraft/class_2680;)V + ARG 2 state + CLASS class_5874 SkipPredicate + METHOD shouldSkip (Lnet/minecraft/class_5873;DDDI)Z + ARG 1 context + ARG 2 scaledRelativeX + ARG 4 scaledRelativeY + ARG 6 scaledRelativeZ + ARG 8 y diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/chunk/ChunkGeneratorSettings.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/chunk/ChunkGeneratorSettings.mapping new file mode 100644 index 0000000..49a05aa --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/chunk/ChunkGeneratorSettings.mapping @@ -0,0 +1,52 @@ +CLASS net/minecraft/class_5284 net/minecraft/world/gen/chunk/ChunkGeneratorSettings + FIELD comp_474 generationShapeConfig Lnet/minecraft/class_5309; + FIELD comp_475 defaultBlock Lnet/minecraft/class_2680; + FIELD comp_476 defaultFluid Lnet/minecraft/class_2680; + FIELD comp_478 surfaceRule Lnet/minecraft/class_6686$class_6708; + FIELD comp_479 seaLevel I + FIELD comp_480 mobGenerationDisabled Z + FIELD comp_481 aquifers Z + FIELD comp_482 oreVeins Z + FIELD comp_483 usesLegacyRandom Z + FIELD field_24780 CODEC Lcom/mojang/serialization/Codec; + FIELD field_24781 REGISTRY_CODEC Lcom/mojang/serialization/Codec; + FIELD field_26355 OVERWORLD Lnet/minecraft/class_5321; + FIELD field_26356 AMPLIFIED Lnet/minecraft/class_5321; + FIELD field_26357 NETHER Lnet/minecraft/class_5321; + FIELD field_26358 END Lnet/minecraft/class_5321; + FIELD field_26359 CAVES Lnet/minecraft/class_5321; + FIELD field_26360 FLOATING_ISLANDS Lnet/minecraft/class_5321; + FIELD field_35051 LARGE_BIOMES Lnet/minecraft/class_5321; + METHOD (Lnet/minecraft/class_5309;Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_6953;Lnet/minecraft/class_6686$class_6708;Ljava/util/List;IZZZZ)V + ARG 5 surfaceRule + METHOD comp_474 generationShapeConfig ()Lnet/minecraft/class_5309; + METHOD comp_475 defaultBlock ()Lnet/minecraft/class_2680; + METHOD comp_476 defaultFluid ()Lnet/minecraft/class_2680; + METHOD comp_478 surfaceRule ()Lnet/minecraft/class_6686$class_6708; + METHOD comp_479 seaLevel ()I + METHOD comp_480 mobGenerationDisabled ()Z + COMMENT Whether entities will be generated during chunk population. + COMMENT + COMMENT

It does not control whether spawns will occur during gameplay. + METHOD comp_481 aquifers ()Z + METHOD comp_482 oreVeins ()Z + METHOD comp_483 usesLegacyRandom ()Z + METHOD method_28558 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_30641 createNetherSettings (Lnet/minecraft/class_7891;)Lnet/minecraft/class_5284; + ARG 0 registerable + METHOD method_30642 createEndSettings (Lnet/minecraft/class_7891;)Lnet/minecraft/class_5284; + ARG 0 registerable + METHOD method_30643 createSurfaceSettings (Lnet/minecraft/class_7891;ZZ)Lnet/minecraft/class_5284; + ARG 0 registerable + ARG 1 amplified + ARG 2 largeBiomes + METHOD method_31111 bootstrap (Lnet/minecraft/class_7891;)V + ARG 0 chunkGenerationSettingsRegisterable + METHOD method_33757 hasAquifers ()Z + METHOD method_38999 getRandomProvider ()Lnet/minecraft/class_2919$class_6675; + METHOD method_39901 createCavesSettings (Lnet/minecraft/class_7891;)Lnet/minecraft/class_5284; + ARG 0 registerable + METHOD method_39902 createFloatingIslandsSettings (Lnet/minecraft/class_7891;)Lnet/minecraft/class_5284; + ARG 0 registerable + METHOD method_44323 createMissingSettings ()Lnet/minecraft/class_5284; diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/chunk/NoiseChunkGenerator.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/chunk/NoiseChunkGenerator.mapping new file mode 100644 index 0000000..7529466 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/chunk/NoiseChunkGenerator.mapping @@ -0,0 +1,73 @@ +CLASS net/minecraft/class_3754 net/minecraft/world/gen/chunk/NoiseChunkGenerator + FIELD field_16648 AIR Lnet/minecraft/class_2680; + FIELD field_24773 CODEC Lcom/mojang/serialization/Codec; + FIELD field_24774 settings Lnet/minecraft/class_6880; + FIELD field_34591 fluidLevelSampler Ljava/util/function/Supplier; + METHOD (Lnet/minecraft/class_1966;Lnet/minecraft/class_6880;)V + ARG 1 biomeSource + ARG 2 settings + METHOD method_26263 sampleHeightmap (Lnet/minecraft/class_5539;Lnet/minecraft/class_7138;IILorg/apache/commons/lang3/mutable/MutableObject;Ljava/util/function/Predicate;)Ljava/util/OptionalInt; + ARG 1 world + ARG 2 noiseConfig + ARG 3 x + ARG 4 z + ARG 5 columnSample + ARG 6 stopPredicate + METHOD method_28548 matchesSettings (Lnet/minecraft/class_5321;)Z + ARG 1 settings + METHOD method_28549 (Lnet/minecraft/class_3754;)Lnet/minecraft/class_6880; + ARG 0 generator + METHOD method_28550 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_28554 (Lnet/minecraft/class_3754;)Lnet/minecraft/class_1966; + ARG 0 generator + METHOD method_33754 populateNoise (Lnet/minecraft/class_6748;Lnet/minecraft/class_5138;Lnet/minecraft/class_7138;Lnet/minecraft/class_2791;II)Lnet/minecraft/class_2791; + ARG 1 blender + ARG 2 structureAccessor + ARG 3 noiseConfig + ARG 4 chunk + ARG 5 minimumCellY + ARG 6 cellHeight + METHOD method_38322 (Lnet/minecraft/class_7138;III)Lnet/minecraft/class_6880; + ARG 2 biomeX + ARG 3 biomeY + ARG 4 biomeZ + METHOD method_38323 getBlockState (Lnet/minecraft/class_6568;IIILnet/minecraft/class_2680;)Lnet/minecraft/class_2680; + ARG 1 chunkNoiseSampler + ARG 2 x + ARG 3 y + ARG 4 z + ARG 5 state + METHOD method_38327 populateBiomes (Lnet/minecraft/class_6748;Lnet/minecraft/class_7138;Lnet/minecraft/class_5138;Lnet/minecraft/class_2791;)V + ARG 1 blender + ARG 2 noiseConfig + ARG 3 structureAccessor + ARG 4 chunk + METHOD method_41535 (Lnet/minecraft/class_5138;Lnet/minecraft/class_3233;Lnet/minecraft/class_7138;Lnet/minecraft/class_2791;)Lnet/minecraft/class_6568; + ARG 4 chunk + METHOD method_41536 (Lnet/minecraft/class_5138;Lnet/minecraft/class_6748;Lnet/minecraft/class_7138;Lnet/minecraft/class_2791;)Lnet/minecraft/class_6568; + ARG 4 chunk + METHOD method_41537 createChunkNoiseSampler (Lnet/minecraft/class_2791;Lnet/minecraft/class_5138;Lnet/minecraft/class_6748;Lnet/minecraft/class_7138;)Lnet/minecraft/class_6568; + ARG 1 chunk + ARG 2 world + ARG 3 blender + ARG 4 noiseConfig + METHOD method_41538 buildSurface (Lnet/minecraft/class_2791;Lnet/minecraft/class_5868;Lnet/minecraft/class_7138;Lnet/minecraft/class_5138;Lnet/minecraft/class_4543;Lnet/minecraft/class_2378;Lnet/minecraft/class_6748;)V + ARG 1 chunk + ARG 2 heightContext + ARG 3 noiseConfig + ARG 4 structureAccessor + ARG 5 biomeAccess + ARG 6 biomeRegistry + ARG 7 blender + METHOD method_41539 (Lnet/minecraft/class_5138;Lnet/minecraft/class_6748;Lnet/minecraft/class_7138;Lnet/minecraft/class_2791;)Lnet/minecraft/class_6568; + ARG 4 chunk + METHOD method_41540 (Lnet/minecraft/class_5138;Lnet/minecraft/class_6748;Lnet/minecraft/class_7138;Lnet/minecraft/class_2791;)Lnet/minecraft/class_6568; + ARG 4 chunk + METHOD method_41541 getSettings ()Lnet/minecraft/class_6880; + METHOD method_45509 (Lnet/minecraft/class_6350$class_6351;ILnet/minecraft/class_6350$class_6351;Lnet/minecraft/class_6350$class_6351;III)Lnet/minecraft/class_6350$class_6351; + ARG 4 x + ARG 5 y + ARG 6 z + METHOD method_45510 createFluidLevelSampler (Lnet/minecraft/class_5284;)Lnet/minecraft/class_6350$class_6565; + ARG 0 settings diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/feature/ChorusPlantFeature.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/feature/ChorusPlantFeature.mapping new file mode 100644 index 0000000..845a388 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/feature/ChorusPlantFeature.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_2964 net/minecraft/world/gen/feature/ChorusPlantFeature diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/feature/util/FeatureContext.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/feature/util/FeatureContext.mapping new file mode 100644 index 0000000..236f8ea --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/feature/util/FeatureContext.mapping @@ -0,0 +1,20 @@ +CLASS net/minecraft/class_5821 net/minecraft/world/gen/feature/util/FeatureContext + FIELD field_28769 world Lnet/minecraft/class_5281; + FIELD field_28770 generator Lnet/minecraft/class_2794; + FIELD field_28771 random Lnet/minecraft/class_5819; + FIELD field_28772 origin Lnet/minecraft/class_2338; + FIELD field_28773 config Lnet/minecraft/class_3037; + FIELD field_34697 feature Ljava/util/Optional; + METHOD (Ljava/util/Optional;Lnet/minecraft/class_5281;Lnet/minecraft/class_2794;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_3037;)V + ARG 1 feature + ARG 2 world + ARG 3 generator + ARG 4 random + ARG 5 origin + ARG 6 config + METHOD method_33652 getWorld ()Lnet/minecraft/class_5281; + METHOD method_33653 getGenerator ()Lnet/minecraft/class_2794; + METHOD method_33654 getRandom ()Lnet/minecraft/class_5819; + METHOD method_33655 getOrigin ()Lnet/minecraft/class_2338; + METHOD method_33656 getConfig ()Lnet/minecraft/class_3037; + METHOD method_38427 getFeature ()Ljava/util/Optional; diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/noise/NoiseHelper.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/noise/NoiseHelper.mapping new file mode 100644 index 0000000..41b1bab --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/noise/NoiseHelper.mapping @@ -0,0 +1,13 @@ +CLASS net/minecraft/class_5836 net/minecraft/world/gen/noise/NoiseHelper + METHOD method_39119 appendDebugInfo (Ljava/lang/StringBuilder;DDD[B)V + ARG 0 builder + ARG 1 originX + ARG 3 originY + ARG 5 originZ + ARG 7 permutation + METHOD method_39120 appendDebugInfo (Ljava/lang/StringBuilder;DDD[I)V + ARG 0 builder + ARG 1 originX + ARG 3 originY + ARG 5 originZ + ARG 7 permutation diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/noise/NoiseRouter.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/noise/NoiseRouter.mapping new file mode 100644 index 0000000..6a792be --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/noise/NoiseRouter.mapping @@ -0,0 +1,7 @@ +CLASS net/minecraft/class_6953 net/minecraft/world/gen/noise/NoiseRouter + FIELD field_37683 CODEC Lcom/mojang/serialization/Codec; + METHOD method_41544 apply (Lnet/minecraft/class_6910$class_6915;)Lnet/minecraft/class_6953; + ARG 1 visitor + METHOD method_41545 field (Ljava/lang/String;Ljava/util/function/Function;)Lcom/mojang/serialization/codecs/RecordCodecBuilder; + ARG 0 name + ARG 1 getter diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/root/MangroveRootPlacer.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/root/MangroveRootPlacer.mapping new file mode 100644 index 0000000..0a7bfc1 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/root/MangroveRootPlacer.mapping @@ -0,0 +1,27 @@ +CLASS net/minecraft/class_7386 net/minecraft/world/gen/root/MangroveRootPlacer + FIELD field_38771 CODEC Lcom/mojang/serialization/Codec; + FIELD field_38867 mangroveRootPlacement Lnet/minecraft/class_7399; + METHOD (Lnet/minecraft/class_6017;Lnet/minecraft/class_4651;Ljava/util/Optional;Lnet/minecraft/class_7399;)V + ARG 1 trunkOffsetY + ARG 2 rootProvider + ARG 3 aboveRootPlacement + ARG 4 mangroveRootPlacement + METHOD method_43166 canGrow (Lnet/minecraft/class_3746;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_2338;Ljava/util/List;I)Z + ARG 1 world + ARG 2 random + ARG 3 pos + ARG 4 direction + ARG 5 origin + ARG 6 offshootPositions + ARG 7 rootLength + METHOD method_43169 (Lnet/minecraft/class_2680;)Z + ARG 1 state + METHOD method_43171 getOffshootPositions (Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;)Ljava/util/List; + ARG 1 pos + ARG 2 direction + ARG 3 random + ARG 4 origin + METHOD method_43174 (Lnet/minecraft/class_2680;)Z + ARG 1 state + METHOD method_43180 (Lnet/minecraft/class_7386;)Lnet/minecraft/class_7399; + ARG 0 rootPlacer diff --git a/yarn-1.19.3/mappings/net/minecraft/world/gen/trunk/TrunkPlacer.mapping b/yarn-1.19.3/mappings/net/minecraft/world/gen/trunk/TrunkPlacer.mapping new file mode 100644 index 0000000..589dfc9 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/gen/trunk/TrunkPlacer.mapping @@ -0,0 +1,67 @@ +CLASS net/minecraft/class_5141 net/minecraft/world/gen/trunk/TrunkPlacer + FIELD field_23760 baseHeight I + FIELD field_23761 firstRandomHeight I + FIELD field_23762 secondRandomHeight I + FIELD field_24972 TYPE_CODEC Lcom/mojang/serialization/Codec; + FIELD field_31528 MAX_BASE_HEIGHT I + FIELD field_31529 MAX_RANDOM_HEIGHT I + METHOD (III)V + ARG 1 baseHeight + ARG 2 firstRandomHeight + ARG 3 secondRandomHeight + METHOD method_26991 generate (Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;ILnet/minecraft/class_2338;Lnet/minecraft/class_4643;)Ljava/util/List; + COMMENT Generates the trunk blocks and return a list of tree nodes to place foliage around + ARG 1 world + ARG 2 replacer + ARG 3 random + ARG 4 height + ARG 5 startPos + ARG 6 config + METHOD method_26993 getHeight (Lnet/minecraft/class_5819;)I + ARG 1 random + METHOD method_27400 setToDirt (Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;)V + ARG 0 world + ARG 1 replacer + ARG 2 random + ARG 3 pos + ARG 4 config + METHOD method_27401 trySetState (Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338$class_2339;Lnet/minecraft/class_4643;)V + ARG 1 world + ARG 2 replacer + ARG 3 random + ARG 4 pos + ARG 5 config + METHOD method_27402 getAndSetState (Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;Ljava/util/function/Function;)Z + ARG 1 world + ARG 2 replacer + ARG 3 random + ARG 4 pos + ARG 5 config + METHOD method_27403 canGenerate (Lnet/minecraft/class_3746;Lnet/minecraft/class_2338;)Z + ARG 0 world + ARG 1 pos + METHOD method_27405 (Lnet/minecraft/class_2680;)Z + ARG 0 state + METHOD method_28903 getType ()Lnet/minecraft/class_5142; + METHOD method_28904 fillTrunkPlacerFields (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P3; + ARG 0 instance + METHOD method_28905 (Lnet/minecraft/class_5141;)Ljava/lang/Integer; + ARG 0 placer + METHOD method_28906 (Lnet/minecraft/class_5141;)Ljava/lang/Integer; + ARG 0 placer + METHOD method_28907 (Lnet/minecraft/class_5141;)Ljava/lang/Integer; + ARG 0 placer + METHOD method_35375 getAndSetState (Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;)Z + ARG 1 world + ARG 2 replacer + ARG 3 random + ARG 4 pos + ARG 5 config + METHOD method_43196 canReplace (Lnet/minecraft/class_3746;Lnet/minecraft/class_2338;)Z + ARG 1 world + ARG 2 pos + METHOD method_43197 (Lnet/minecraft/class_2680;)Z + ARG 0 state + METHOD method_43198 canReplaceOrIsLog (Lnet/minecraft/class_3746;Lnet/minecraft/class_2338;)Z + ARG 1 world + ARG 2 pos diff --git a/yarn-1.19.3/mappings/net/minecraft/world/timer/FunctionTimerCallback.mapping b/yarn-1.19.3/mappings/net/minecraft/world/timer/FunctionTimerCallback.mapping new file mode 100644 index 0000000..e93c1d5 --- /dev/null +++ b/yarn-1.19.3/mappings/net/minecraft/world/timer/FunctionTimerCallback.mapping @@ -0,0 +1,7 @@ +CLASS net/minecraft/class_231 net/minecraft/world/timer/FunctionTimerCallback + FIELD field_1304 name Lnet/minecraft/class_2960; + METHOD (Lnet/minecraft/class_2960;)V + ARG 1 name + METHOD method_17938 (Lnet/minecraft/class_2991;Lnet/minecraft/class_2158;)V + ARG 1 function + CLASS class_232 Serializer diff --git a/yarn-1.19.3/src/packageDocs/java/net/minecraft/resource/package-info.java b/yarn-1.19.3/src/packageDocs/java/net/minecraft/resource/package-info.java new file mode 100644 index 0000000..0b64110 --- /dev/null +++ b/yarn-1.19.3/src/packageDocs/java/net/minecraft/resource/package-info.java @@ -0,0 +1,71 @@ +/* + * This file is free for everyone to use under the Creative Commons Zero license. + */ + +/** + * Provides resources to Minecraft, including resource access, provision, and reloading. + * + *

"Data" as in "Data Packs" is considered resource as well. + * + *

Here is a quick overview on the resource access and provision APIs of Minecraft: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Resource Access APIs
ClassUsage
{@link Resource}Accesses to binary data.
{@link ResourceFactory}Provides a resource given an {@link net.minecraft.util.Identifier}.
{@link ResourceManager}Exposes more resource access in addition to being a {@link ResourceFactory}.
{@link LifecycledResourceManager}A resource manager with a specific lifecycle, to fine-grain resource access.
{@link ResourceReloader}The most common accessor to resources, acting during {@linkplain + * SimpleResourceReload#start reloads} to set up in-game contents. + *
This is usually implemented by mods using resources.
+ * + *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Resource Provision APIs
ClassUsage
{@link ResourcePack}Provides binary data based on queries. + *
They are usually single-use, created by {@link ResourcePackManager} and provided + * to the resource manager in each reload.
{@link ResourcePackProfile}A user-friendly, persistent form of {@link ResourcePack}. Used to create resource + * packs in reloads.
{@link ResourcePackProvider}Provides {@link ResourcePackProfile}s, so they are taken account of during reloads. + *
This is usually implemented by mods providing resources.
{@link ResourcePackManager}Keeps track of {@link ResourcePackProvider}s and uses the profiles from the providers + * to create {@link ResourcePack}s to send to resource managers in each reload.
+ * + *

In addition to these APIs, this package includes implementation details of the resource system. + */ + +package net.minecraft.resource; diff --git a/yarn-1.19.3/src/packageDocs/java/net/minecraft/util/registry/package-info.java b/yarn-1.19.3/src/packageDocs/java/net/minecraft/util/registry/package-info.java new file mode 100644 index 0000000..9404653 --- /dev/null +++ b/yarn-1.19.3/src/packageDocs/java/net/minecraft/util/registry/package-info.java @@ -0,0 +1,10 @@ +/* + * This file is free for everyone to use under the Creative Commons Zero license. + */ + +/** + * Contains the registry, used to register various in-game components, and related classes. + * + * @see Registry + */ +package net.minecraft.util.registry;