-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from stefexec/1.21
1.21
- Loading branch information
Showing
33 changed files
with
635 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
org.gradle.jvmargs=-Xmx2G | ||
|
||
# Fabric (https://fabricmc.net/develop) | ||
minecraft_version=1.20.1 | ||
yarn_mappings=1.20.1+build.1 | ||
loader_version=0.14.21 | ||
minecraft_version=1.21 | ||
yarn_mappings=1.21+build.2 | ||
loader_version=0.15.11 | ||
fapi_version=0.100.3+1.21 | ||
|
||
# Mod Properties | ||
mod_version=1.3.2 | ||
mod_version=1.4.0 | ||
maven_group=de.gurkenwerfer | ||
archives_base_name=gurkens-gadgetry | ||
|
||
# Dependencies | ||
|
||
# Meteor (https://maven.meteordev.org/) | ||
meteor_version=0.5.3 | ||
meteor_version=0.5.8-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
...urkenwerfer/toolkit/commands/CamClip.java → ...fer/gurkensgadgetry/commands/CamClip.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
142 changes: 142 additions & 0 deletions
142
src/main/java/de/gurkenwerfer/gurkensgadgetry/mixins/WorldBorderMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
/* | ||
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). | ||
* Copyright (c) Meteor Development. | ||
*/ | ||
|
||
package de.gurkenwerfer.gurkensgadgetry.mixins; | ||
|
||
import de.gurkenwerfer.gurkensgadgetry.modules.NoCollision; | ||
import de.gurkenwerfer.gurkensgadgetry.modules.NoWorldBorder; | ||
import meteordevelopment.meteorclient.systems.modules.Modules; | ||
import meteordevelopment.meteorclient.systems.modules.world.Collisions; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.util.math.Box; | ||
import net.minecraft.util.math.MathHelper; | ||
import net.minecraft.util.shape.VoxelShape; | ||
import net.minecraft.util.shape.VoxelShapes; | ||
import net.minecraft.world.border.WorldBorder; | ||
import net.minecraft.world.border.WorldBorderListener; | ||
import net.minecraft.world.border.WorldBorderStage; | ||
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.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
import java.util.List; | ||
|
||
@Mixin(WorldBorder.class) | ||
public abstract class WorldBorderMixin { | ||
@Inject(method = "canCollide", at = @At("HEAD"), cancellable = true) | ||
private void canCollide(CallbackInfoReturnable<Boolean> info) { | ||
if (Modules.get().get(Collisions.class).ignoreBorder()) info.setReturnValue(false); | ||
} | ||
|
||
@Inject(method = "contains(Lnet/minecraft/util/math/BlockPos;)Z", at = @At("HEAD"), cancellable = true) | ||
private void contains(CallbackInfoReturnable<Boolean> info) { | ||
if (Modules.get().get(Collisions.class).ignoreBorder()) info.setReturnValue(true); | ||
} | ||
|
||
@Shadow | ||
private double centerX; | ||
@Shadow private double centerZ; | ||
|
||
@Shadow private WorldBorder.Area area; | ||
@Shadow protected abstract List<WorldBorderListener> getListeners(); | ||
|
||
@Inject(method = "asVoxelShape", at = @At("HEAD"), cancellable = true) | ||
private void onAsVoxelShape(CallbackInfoReturnable<VoxelShape> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class) || Modules.get().isActive(NoCollision.class) && Modules.get().get(NoCollision.class).shouldCancelBorderCollision()) { | ||
info.setReturnValue(VoxelShapes.empty()); | ||
} | ||
} | ||
|
||
@Inject(method = "canCollide", at = @At("HEAD"), cancellable = true) | ||
private void onCanCollide(Entity entity, Box box, CallbackInfoReturnable<Boolean> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class) || Modules.get().isActive(NoCollision.class) && Modules.get().get(NoCollision.class).shouldCancelBorderCollision()) { | ||
info.setReturnValue(false); | ||
} else if (Modules.get().get(Collisions.class).ignoreBorder()) { | ||
info.setReturnValue(false); | ||
} | ||
} | ||
|
||
// No World Border | ||
|
||
@Inject(method = "getCenterX", at = @At("HEAD"), cancellable = true) | ||
private void onGetCenterX(CallbackInfoReturnable<Double> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
info.setReturnValue(0.0D); | ||
} | ||
} | ||
|
||
@Inject(method = "getCenterZ", at = @At("HEAD"), cancellable = true) | ||
private void onGetCenterZ(CallbackInfoReturnable<Double> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
info.setReturnValue(0.0D); | ||
} | ||
} | ||
|
||
@Inject(method = "setCenter", at = @At("HEAD"), cancellable = true) | ||
private void onSetCenter(double x, double z, CallbackInfo info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
this.centerX = 0.0D; | ||
this.centerZ = 0.0D; | ||
|
||
this.area.onCenterChanged(); | ||
|
||
for (WorldBorderListener listener : this.getListeners()) { | ||
listener.onCenterChanged(MinecraftClient.getInstance().world.getWorldBorder(), 0.0D, 0.0D); | ||
} | ||
|
||
info.cancel(); | ||
} | ||
} | ||
|
||
// Size & Stage | ||
|
||
@Inject(method = "getSize", at = @At("HEAD"), cancellable = true) | ||
private void onGetSize(CallbackInfoReturnable<Double> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
info.setReturnValue(Double.MAX_VALUE); | ||
} | ||
} | ||
|
||
@Inject(method = "getStage", at = @At("HEAD"), cancellable = true) | ||
private void onGetStage(CallbackInfoReturnable<WorldBorderStage> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
info.setReturnValue(WorldBorderStage.STATIONARY); | ||
} | ||
} | ||
|
||
// Bounds | ||
|
||
@Inject(method = "getBoundWest", at = @At("HEAD"), cancellable = true) | ||
private void onGetBoundsWest(CallbackInfoReturnable<Double> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
info.setReturnValue(MathHelper.clamp(-Double.MAX_VALUE / 2.0, -Double.MAX_VALUE, Double.MAX_VALUE)); | ||
} | ||
} | ||
|
||
@Inject(method = "getBoundNorth", at = @At("HEAD"), cancellable = true) | ||
private void onGetBoundsNorth(CallbackInfoReturnable<Double> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
info.setReturnValue(MathHelper.clamp(-Double.MAX_VALUE / 2.0, -Double.MAX_VALUE, Double.MAX_VALUE)); | ||
} | ||
} | ||
|
||
@Inject(method = "getBoundEast", at = @At("HEAD"), cancellable = true) | ||
private void onGetBoundsEast(CallbackInfoReturnable<Double> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
info.setReturnValue(MathHelper.clamp(Double.MAX_VALUE / 2.0, -Double.MAX_VALUE, Double.MAX_VALUE)); | ||
} | ||
} | ||
|
||
@Inject(method = "getBoundSouth", at = @At("HEAD"), cancellable = true) | ||
private void onGetBoundsSouth(CallbackInfoReturnable<Double> info) { | ||
if (Modules.get().isActive(NoWorldBorder.class)) { | ||
info.setReturnValue(MathHelper.clamp(Double.MAX_VALUE / 2.0, -Double.MAX_VALUE, Double.MAX_VALUE)); | ||
} | ||
} | ||
} |
Oops, something went wrong.