fuck it we ball

1.21.3 for 0.4.0
This commit is contained in:
KawaiiZenbo 2024-11-09 18:09:27 -08:00 committed by GitHub
commit 75c83f0ca7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 32 additions and 36 deletions

View file

@ -1,8 +1,3 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.
name: build
on: [pull_request, push]
@ -10,12 +5,11 @@ jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS & minimum supported by Minecraft
21, # java version used since 1.20.5
]
# and run on both Linux and Windows
os: [ubuntu-22.04]
# only linux
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
@ -28,12 +22,10 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v3
with:
name: Artifacts

View file

@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
}

View file

@ -4,9 +4,9 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.3
minecraft_version=1.21.3
yarn_mappings=1.21.3+build.2
loader_version=0.16.9
# Mod Properties
mod_version = 0.4.0
@ -14,4 +14,4 @@ org.gradle.parallel=true
archives_base_name = moonlight
# Dependencies
fabric_version=0.103.0+1.21.1
fabric_version=0.107.3+1.21.3

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View file

@ -14,6 +14,6 @@ public class NoFall extends Module
@Override
public void tick()
{
if(mc.player.fallDistance >= 2.5) mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
if(mc.player.fallDistance >= 2.5) mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true, false));
}
}

View file

@ -23,22 +23,22 @@ public class Reach extends Module
public void onEnable()
{
super.onEnable();
oldBe = mc.player.getAttributeInstance(EntityAttributes.PLAYER_BLOCK_INTERACTION_RANGE).getBaseValue();
oldEe = mc.player.getAttributeInstance(EntityAttributes.PLAYER_ENTITY_INTERACTION_RANGE).getBaseValue();
oldBe = mc.player.getAttributeInstance(EntityAttributes.BLOCK_INTERACTION_RANGE).getBaseValue();
oldEe = mc.player.getAttributeInstance(EntityAttributes.ENTITY_INTERACTION_RANGE).getBaseValue();
}
@Override
public void tick()
{
mc.player.getAttributeInstance(EntityAttributes.PLAYER_BLOCK_INTERACTION_RANGE).setBaseValue(blockRange.value);
mc.player.getAttributeInstance(EntityAttributes.PLAYER_ENTITY_INTERACTION_RANGE).setBaseValue(entityRange.value);
mc.player.getAttributeInstance(EntityAttributes.BLOCK_INTERACTION_RANGE).setBaseValue(blockRange.value);
mc.player.getAttributeInstance(EntityAttributes.ENTITY_INTERACTION_RANGE).setBaseValue(entityRange.value);
}
@Override
public void onDisable()
{
super.onDisable();
mc.player.getAttributeInstance(EntityAttributes.PLAYER_BLOCK_INTERACTION_RANGE).setBaseValue(oldBe);
mc.player.getAttributeInstance(EntityAttributes.PLAYER_ENTITY_INTERACTION_RANGE).setBaseValue(oldEe);
mc.player.getAttributeInstance(EntityAttributes.BLOCK_INTERACTION_RANGE).setBaseValue(oldBe);
mc.player.getAttributeInstance(EntityAttributes.ENTITY_INTERACTION_RANGE).setBaseValue(oldEe);
}
}

View file

@ -20,20 +20,20 @@ public class Speed extends Module
public void onEnable()
{
super.onEnable();
old = mc.player.getAttributeInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED).getBaseValue();
old = mc.player.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED).getBaseValue();
}
@Override
public void tick()
{
mc.player.getAttributeInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED).setBaseValue(speed.value/10d);
mc.player.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED).setBaseValue(speed.value/10d);
}
@Override
public void onDisable()
{
super.onDisable();
mc.player.getAttributeInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED).setBaseValue(old);
mc.player.getAttributeInstance(EntityAttributes.MOVEMENT_SPEED).setBaseValue(old);
}
}

View file

@ -20,19 +20,19 @@ public class Step extends Module
public void onEnable()
{
super.onEnable();
old = mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).getBaseValue();
old = mc.player.getAttributeInstance(EntityAttributes.STEP_HEIGHT).getBaseValue();
}
@Override
public void tick()
{
mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).setBaseValue(stepHeight.value);
mc.player.getAttributeInstance(EntityAttributes.STEP_HEIGHT).setBaseValue(stepHeight.value);
}
@Override
public void onDisable()
{
super.onDisable();
mc.player.getAttributeInstance(EntityAttributes.GENERIC_STEP_HEIGHT).setBaseValue(old);
mc.player.getAttributeInstance(EntityAttributes.STEP_HEIGHT).setBaseValue(old);
}
}

View file

@ -9,6 +9,7 @@ import me.kawaiizenbo.moonlight.util.DrawUtils;
import me.kawaiizenbo.moonlight.module.Module;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.util.Identifier;
public class CategoryPane
@ -46,7 +47,7 @@ public class CategoryPane
}
drawContext.fill(x, y, x+width, collapsed ? y+16 : y+height, Moonlight.THEME.themedWindowBorders ? Moonlight.THEME.border.getRGB() : category.color);
//drawContext.fill(x+2, y+2, x+(width-2), y+14, hovered(mouseX, mouseY) ? Moonlight.THEME.hover.getRGB() : Moonlight.THEME.background.getRGB());
drawContext.drawGuiTexture(icon, x+2, y+2, 12, 12);
drawContext.drawGuiTexture(RenderLayer::getGuiTextured, icon, x+2, y+2, 12, 12);
drawContext.drawText(textRenderer, category.name, x+16, y+4, Moonlight.THEME.headerText.getRGB(), false);
if (!collapsed)
{

View file

@ -5,6 +5,7 @@ import me.kawaiizenbo.moonlight.ui.hud.HUDModule;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.util.Identifier;
public class HUDModuleButton
@ -25,7 +26,7 @@ public class HUDModuleButton
this.y = y;
drawContext.fill(x, y, x + width, y + height, hovered(mouseX, mouseY) ? Moonlight.THEME.hover.getRGB() : Moonlight.THEME.background.getRGB());
drawContext.drawText(textRenderer, module.name, x+2, y+2, module.enabled ? Moonlight.THEME.accent.getRGB() : Moonlight.THEME.text.getRGB(), false);
if (!module.settings.isEmpty()) drawContext.drawGuiTexture(Identifier.of("moonlight", "settings"), x+width-12, y, 12, 12);
if (!module.settings.isEmpty()) drawContext.drawGuiTexture(RenderLayer::getGuiTextured, Identifier.of("moonlight", "settings"), x+width-12, y, 12, 12);
}
public boolean hovered(int mouseX, int mouseY)

View file

@ -8,6 +8,8 @@ import me.kawaiizenbo.moonlight.ui.hud.HUDModuleManager;
import me.kawaiizenbo.moonlight.util.DrawUtils;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.util.Identifier;
public class HUDModuleList
{
@ -40,7 +42,7 @@ public class HUDModuleList
}
drawContext.fill(x, y, x+width, collapsed ? y+16 : y+height, Moonlight.THEME.themedWindowBorders ? Moonlight.THEME.border.getRGB() : Moonlight.THEME.accent.getRGB());
//drawContext.fill(x+2, y+2, x+(width-2), y+14, hovered(mouseX, mouseY) ? Moonlight.THEME.hover.getRGB() : Moonlight.THEME.background.getRGB());
drawContext.drawGuiTexture(DrawUtils.getThemedGUIIcon("hud"), x+2, y+2, 12, 12);
drawContext.drawGuiTexture(RenderLayer::getGuiTextured, DrawUtils.getThemedGUIIcon("hud"), x+2, y+2, 12, 12);
drawContext.drawText(textRenderer, "HUD Modules", x+16, y+4, Moonlight.THEME.headerText.getRGB(), false);
if (!collapsed)
{

View file

@ -24,7 +24,7 @@ public class ArmorDisplay extends HUDModule
{
ItemStack piece = mc.player.getInventory().getStack(i);
drawContext.drawItem(piece, x, y+yOffset);
drawContext.drawItemInSlot(textRenderer, piece, x, y+yOffset);
drawContext.drawStackOverlay(textRenderer, piece, x, y+yOffset);
yOffset += 16;
}
}

View file

@ -29,9 +29,9 @@
],
"depends": {
"fabricloader": ">=0.16.3",
"fabricloader": ">=0.16.9",
"fabric-api": "*",
"minecraft": "~1.21.1",
"minecraft": "~1.21.3",
"java": ">=21"
}
}