1.20.4 (#325)
This commit is contained in:
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
@@ -34,9 +34,9 @@ jobs:
|
|||||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
automatic_release_tag: "latest-1.20.2"
|
automatic_release_tag: "latest-1.20.4"
|
||||||
prerelease: false
|
prerelease: false
|
||||||
title: "1.20.2 Build"
|
title: "1.20.4 Build"
|
||||||
files: |
|
files: |
|
||||||
./build/libs/*.jar
|
./build/libs/*.jar
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ dependencies {
|
|||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
|
|
||||||
modImplementation("meteordevelopment:meteor-client:${project.meteor_version}-SNAPSHOT")
|
modImplementation("meteordevelopment:meteor-client:${project.meteor_version}-SNAPSHOT")
|
||||||
modImplementation "baritone:fabric:${project.minecraft_version}-SNAPSHOT"
|
modImplementation "meteordevelopment:baritone:${project.minecraft_version}-SNAPSHOT"
|
||||||
|
|
||||||
// seed .locate and ore sim
|
// seed .locate and ore sim
|
||||||
extraLibs('com.seedfinding:mc_math:ffd2edcfcc0d18147549c88cc7d8ec6cf21b5b91') { transitive = false }
|
extraLibs('com.seedfinding:mc_math:ffd2edcfcc0d18147549c88cc7d8ec6cf21b5b91') { transitive = false }
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
minecraft_version=1.20.2
|
minecraft_version=1.20.4
|
||||||
yarn_version=1.20.2+build.4
|
yarn_version=1.20.4+build.3
|
||||||
loader_version=0.14.24
|
loader_version=0.15.2
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 0.3
|
mod_version = 0.3
|
||||||
maven_group = anticope.rejects
|
maven_group = anticope.rejects
|
||||||
archives_base_name = meteor-rejects-addon
|
archives_base_name = meteor-rejects-addon
|
||||||
|
|
||||||
meteor_version=0.5.5
|
meteor_version=0.5.6
|
||||||
@@ -77,7 +77,7 @@ public class GiveCommand extends Command {
|
|||||||
tag.putBoolean("Interpret", true);
|
tag.putBoolean("Interpret", true);
|
||||||
tag.putBoolean("NoGravity", true);
|
tag.putBoolean("NoGravity", true);
|
||||||
tag.putBoolean("CustomNameVisible", true);
|
tag.putBoolean("CustomNameVisible", true);
|
||||||
tag.putString("CustomName", Text.Serializer.toJson(Text.literal(message)));
|
tag.putString("CustomName", Text.Serialization.toJsonString(Text.literal(message)));
|
||||||
tag.put("Pos", NbtList);
|
tag.put("Pos", NbtList);
|
||||||
stack.setSubNbt("EntityTag", tag);
|
stack.setSubNbt("EntityTag", tag);
|
||||||
GiveUtils.giveItem(stack);
|
GiveUtils.giveItem(stack);
|
||||||
@@ -88,7 +88,7 @@ public class GiveCommand extends Command {
|
|||||||
String message = ctx.getArgument("message", String.class).replace("&", "\247");
|
String message = ctx.getArgument("message", String.class).replace("&", "\247");
|
||||||
ItemStack stack = new ItemStack(Items.BAT_SPAWN_EGG);
|
ItemStack stack = new ItemStack(Items.BAT_SPAWN_EGG);
|
||||||
NbtCompound tag = new NbtCompound();
|
NbtCompound tag = new NbtCompound();
|
||||||
tag.putString("CustomName", Text.Serializer.toJson(Text.literal(message)));
|
tag.putString("CustomName", Text.Serialization.toJsonString(Text.literal(message)));
|
||||||
tag.putBoolean("NoAI", true);
|
tag.putBoolean("NoAI", true);
|
||||||
tag.putBoolean("Silent", true);
|
tag.putBoolean("Silent", true);
|
||||||
tag.putBoolean("PersistenceRequired", true);
|
tag.putBoolean("PersistenceRequired", true);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package anticope.rejects.commands;
|
|||||||
|
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import meteordevelopment.meteorclient.commands.Command;
|
import meteordevelopment.meteorclient.commands.Command;
|
||||||
import net.minecraft.client.gui.screen.ConnectScreen;
|
import net.minecraft.client.gui.screen.multiplayer.ConnectScreen;
|
||||||
import net.minecraft.client.gui.screen.TitleScreen;
|
import net.minecraft.client.gui.screen.TitleScreen;
|
||||||
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
|
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
|
||||||
import net.minecraft.client.network.ServerAddress;
|
import net.minecraft.client.network.ServerAddress;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import net.minecraft.util.math.Box;
|
|||||||
import meteordevelopment.orbit.EventHandler;
|
import meteordevelopment.orbit.EventHandler;
|
||||||
import meteordevelopment.meteorclient.MeteorClient;
|
import meteordevelopment.meteorclient.MeteorClient;
|
||||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||||
|
import meteordevelopment.meteorclient.utils.world.TickRate;
|
||||||
import meteordevelopment.meteorclient.gui.GuiTheme;
|
import meteordevelopment.meteorclient.gui.GuiTheme;
|
||||||
import meteordevelopment.meteorclient.gui.GuiThemes;
|
import meteordevelopment.meteorclient.gui.GuiThemes;
|
||||||
import meteordevelopment.meteorclient.gui.WindowScreen;
|
import meteordevelopment.meteorclient.gui.WindowScreen;
|
||||||
@@ -48,10 +49,11 @@ public class StatsScreen extends WindowScreen {
|
|||||||
effectList.action = () -> effectListExpanded = effectList.isExpanded();
|
effectList.action = () -> effectListExpanded = effectList.isExpanded();
|
||||||
liv.getActiveStatusEffects().forEach((effect, instance) -> {
|
liv.getActiveStatusEffects().forEach((effect, instance) -> {
|
||||||
String status = lang.get(effect.getTranslationKey());
|
String status = lang.get(effect.getTranslationKey());
|
||||||
|
float tps = TickRate.INSTANCE.getTickRate();
|
||||||
if (instance.getAmplifier() != 0) {
|
if (instance.getAmplifier() != 0) {
|
||||||
status += (String.format(" %d (%s)", instance.getAmplifier()+1, StatusEffectUtil.getDurationText(instance, 1)));
|
status += (String.format(" %d (%s)", instance.getAmplifier()+1, StatusEffectUtil.getDurationText(instance, 1, tps)));
|
||||||
} else {
|
} else {
|
||||||
status += (String.format(" (%s)", StatusEffectUtil.getDurationText(instance, 1)));
|
status += (String.format(" (%s)", StatusEffectUtil.getDurationText(instance, 1, tps)));
|
||||||
}
|
}
|
||||||
effectList.add(theme.label(status)).expandX();
|
effectList.add(theme.label(status)).expandX();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -270,19 +270,20 @@ public class AutoFarm extends Module {
|
|||||||
|
|
||||||
private boolean bonemealFilter(Block block) {
|
private boolean bonemealFilter(Block block) {
|
||||||
return block instanceof CropBlock ||
|
return block instanceof CropBlock ||
|
||||||
block instanceof CocoaBlock ||
|
|
||||||
block instanceof StemBlock ||
|
block instanceof StemBlock ||
|
||||||
block instanceof MushroomPlantBlock ||
|
block instanceof MushroomPlantBlock ||
|
||||||
block instanceof SweetBerryBushBlock ||
|
|
||||||
block instanceof AzaleaBlock ||
|
block instanceof AzaleaBlock ||
|
||||||
block instanceof SaplingBlock;
|
block instanceof SaplingBlock ||
|
||||||
|
block == Blocks.COCOA ||
|
||||||
|
block == Blocks.SWEET_BERRY_BUSH;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean harvestFilter(Block block) {
|
private boolean harvestFilter(Block block) {
|
||||||
return block instanceof CropBlock ||
|
return block instanceof CropBlock ||
|
||||||
block instanceof GourdBlock ||
|
block == Blocks.PUMPKIN ||
|
||||||
block instanceof NetherWartBlock ||
|
block == Blocks.MELON ||
|
||||||
block instanceof SweetBerryBushBlock;
|
block == Blocks.NETHER_WART ||
|
||||||
|
block == Blocks.SWEET_BERRY_BUSH;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean plantFilter(Item item) {
|
private boolean plantFilter(Item item) {
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public class CoordLogger extends Module {
|
|||||||
Vec3d playerPosition = entity.getPos();
|
Vec3d playerPosition = entity.getPos();
|
||||||
|
|
||||||
if (playerPosition.distanceTo(packetPosition) >= minDistance.get()) {
|
if (playerPosition.distanceTo(packetPosition) >= minDistance.get()) {
|
||||||
info(formatMessage("Player '" + entity.getEntityName() + "' has teleported to ", packetPosition));
|
info(formatMessage("Player '" + entity.getNameForScoreboard() + "' has teleported to ", packetPosition));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import net.minecraft.network.packet.s2c.play.ChunkDeltaUpdateS2CPacket;
|
|||||||
import net.minecraft.util.math.Box;
|
import net.minecraft.util.math.Box;
|
||||||
import net.minecraft.util.math.ChunkPos;
|
import net.minecraft.util.math.ChunkPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.chunk.WorldChunk;
|
import net.minecraft.world.chunk.WorldChunk;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -112,7 +113,7 @@ public class NewChunks extends Module {
|
|||||||
synchronized (newChunks) {
|
synchronized (newChunks) {
|
||||||
for (ChunkPos c : newChunks) {
|
for (ChunkPos c : newChunks) {
|
||||||
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), 1024)) {
|
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), 1024)) {
|
||||||
render(new Box(c.getStartPos(), c.getStartPos().add(16, renderHeight.get(), 16)), newChunksSideColor.get(), newChunksLineColor.get(), shapeMode.get(), event);
|
render(new Box(Vec3d.of(c.getStartPos()), Vec3d.of(c.getStartPos().add(16, renderHeight.get(), 16))), newChunksSideColor.get(), newChunksLineColor.get(), shapeMode.get(), event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,7 +123,7 @@ public class NewChunks extends Module {
|
|||||||
synchronized (oldChunks) {
|
synchronized (oldChunks) {
|
||||||
for (ChunkPos c : oldChunks) {
|
for (ChunkPos c : oldChunks) {
|
||||||
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), 1024)) {
|
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), 1024)) {
|
||||||
render(new Box(c.getStartPos(), c.getStartPos().add(16, renderHeight.get(), 16)), oldChunksSideColor.get(), oldChunksLineColor.get(), shapeMode.get(), event);
|
render(new Box(Vec3d.of(c.getStartPos()), Vec3d.of(c.getStartPos().add(16, renderHeight.get(), 16))), oldChunksSideColor.get(), oldChunksLineColor.get(), shapeMode.get(), event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class TreeAura extends Module {
|
|||||||
|
|
||||||
private boolean canPlant(BlockPos pos) {
|
private boolean canPlant(BlockPos pos) {
|
||||||
Block b = mc.world.getBlockState(pos).getBlock();
|
Block b = mc.world.getBlockState(pos).getBlock();
|
||||||
if (b.equals(Blocks.GRASS) || b.equals(Blocks.GRASS_BLOCK) || b.equals(Blocks.DIRT) || b.equals(Blocks.COARSE_DIRT)) {
|
if (b.equals(Blocks.SHORT_GRASS) || b.equals(Blocks.GRASS_BLOCK) || b.equals(Blocks.DIRT) || b.equals(Blocks.COARSE_DIRT)) {
|
||||||
final AtomicBoolean plant = new AtomicBoolean(true);
|
final AtomicBoolean plant = new AtomicBoolean(true);
|
||||||
IntStream.rangeClosed(1, 5).forEach(i -> {
|
IntStream.rangeClosed(1, 5).forEach(i -> {
|
||||||
// Check above
|
// Check above
|
||||||
|
|||||||
@@ -6,12 +6,17 @@ import com.google.common.collect.Iterables;
|
|||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
import com.mojang.authlib.Environment;
|
import com.mojang.authlib.Environment;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
import com.mojang.authlib.SignatureState;
|
||||||
import com.mojang.authlib.exceptions.AuthenticationException;
|
import com.mojang.authlib.exceptions.AuthenticationException;
|
||||||
import com.mojang.authlib.minecraft.InsecurePublicKeyException;
|
import com.mojang.authlib.minecraft.InsecurePublicKeyException;
|
||||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||||
|
import com.mojang.authlib.minecraft.MinecraftProfileTextures;
|
||||||
import com.mojang.authlib.properties.Property;
|
import com.mojang.authlib.properties.Property;
|
||||||
|
import com.mojang.authlib.yggdrasil.TextureUrlChecker;
|
||||||
|
import com.mojang.authlib.yggdrasil.ServicesKeyInfo;
|
||||||
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
||||||
import com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService;
|
import com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService;
|
||||||
|
import com.mojang.authlib.yggdrasil.YggdrasilServicesKeyInfo;
|
||||||
import com.mojang.authlib.yggdrasil.response.MinecraftTexturesPayload;
|
import com.mojang.authlib.yggdrasil.response.MinecraftTexturesPayload;
|
||||||
import com.mojang.util.UUIDTypeAdapter;
|
import com.mojang.util.UUIDTypeAdapter;
|
||||||
import meteordevelopment.meteorclient.utils.network.Http;
|
import meteordevelopment.meteorclient.utils.network.Http;
|
||||||
@@ -31,7 +36,7 @@ import java.util.*;
|
|||||||
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||||
|
|
||||||
public class CustomYggdrasilLogin {
|
public class CustomYggdrasilLogin {
|
||||||
public static Environment localYggdrasilApi = new Environment("/api", "/sessionserver", "/minecraftservices", "Custom-Yggdrasil");
|
public static Environment localYggdrasilApi = new Environment("/sessionserver", "/minecraftservices", "Custom-Yggdrasil");
|
||||||
|
|
||||||
public static Session login(String name, String password, String server) throws AuthenticationException {
|
public static Session login(String name, String password, String server) throws AuthenticationException {
|
||||||
try {
|
try {
|
||||||
@@ -61,7 +66,7 @@ public class CustomYggdrasilLogin {
|
|||||||
|
|
||||||
public static class LocalYggdrasilMinecraftSessionService extends YggdrasilMinecraftSessionService {
|
public static class LocalYggdrasilMinecraftSessionService extends YggdrasilMinecraftSessionService {
|
||||||
private static final Logger LOGGER = LogManager.getLogger();
|
private static final Logger LOGGER = LogManager.getLogger();
|
||||||
private final PublicKey publicKey;
|
private final ServicesKeyInfo publicKey;
|
||||||
private final Gson gson = new GsonBuilder().registerTypeAdapter(UUID.class, new UUIDTypeAdapter()).create();
|
private final Gson gson = new GsonBuilder().registerTypeAdapter(UUID.class, new UUIDTypeAdapter()).create();
|
||||||
|
|
||||||
public LocalYggdrasilMinecraftSessionService(YggdrasilAuthenticationService service, String serverUrl) {
|
public LocalYggdrasilMinecraftSessionService(YggdrasilAuthenticationService service, String serverUrl) {
|
||||||
@@ -71,50 +76,53 @@ public class CustomYggdrasilLogin {
|
|||||||
this.publicKey = getPublicKey(json.get("signaturePublickey").getAsString());
|
this.publicKey = getPublicKey(json.get("signaturePublickey").getAsString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static PublicKey getPublicKey(String key) {
|
private static ServicesKeyInfo getPublicKey(String key) {
|
||||||
key = key.replace("-----BEGIN PUBLIC KEY-----", "").replace("-----END PUBLIC KEY-----", "");
|
key = key.replace("-----BEGIN PUBLIC KEY-----", "").replace("-----END PUBLIC KEY-----", "");
|
||||||
try {
|
try {
|
||||||
byte[] byteKey = Base64.getDecoder().decode(key.replace("\n", ""));
|
byte[] byteKey = Base64.getDecoder().decode(key.replace("\n", ""));
|
||||||
X509EncodedKeySpec spec = new X509EncodedKeySpec(byteKey);
|
return YggdrasilServicesKeyInfo.parse(byteKey);
|
||||||
KeyFactory factory = KeyFactory.getInstance("RSA");
|
} catch (IllegalArgumentException e) {
|
||||||
return factory.generatePublic(spec);
|
|
||||||
} catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private SignatureState getPropertySignatureState(final Property property) {
|
||||||
public Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> getTextures(final GameProfile profile, final boolean requireSecure) {
|
if (!property.hasSignature()) {
|
||||||
final Property textureProperty = Iterables.getFirst(profile.getProperties().get("textures"), null);
|
return SignatureState.UNSIGNED;
|
||||||
|
|
||||||
if (textureProperty == null)
|
|
||||||
return new HashMap<>();
|
|
||||||
|
|
||||||
if (requireSecure) {
|
|
||||||
if (!textureProperty.hasSignature()) {
|
|
||||||
LOGGER.error("Signature is missing from textures payload");
|
|
||||||
throw new InsecurePublicKeyException("Signature is missing from textures payload");
|
|
||||||
}
|
|
||||||
if (!textureProperty.isSignatureValid(publicKey)) {
|
|
||||||
LOGGER.error("Textures payload has been tampered with (signature invalid)");
|
|
||||||
throw new InsecurePublicKeyException("Textures payload has been tampered with (signature invalid)");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (!publicKey.validateProperty(property)) {
|
||||||
|
return SignatureState.INVALID;
|
||||||
|
}
|
||||||
|
return SignatureState.SIGNED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MinecraftProfileTextures unpackTextures(final Property packedTextures) {
|
||||||
|
final String value = packedTextures.value();
|
||||||
|
final SignatureState signatureState = getPropertySignatureState(packedTextures);
|
||||||
|
|
||||||
final MinecraftTexturesPayload result;
|
final MinecraftTexturesPayload result;
|
||||||
try {
|
try {
|
||||||
final String json = new String(org.apache.commons.codec.binary.Base64.decodeBase64(textureProperty.value()), StandardCharsets.UTF_8);
|
final String json = new String(Base64.getDecoder().decode(value), StandardCharsets.UTF_8);
|
||||||
result = gson.fromJson(json, MinecraftTexturesPayload.class);
|
result = gson.fromJson(json, MinecraftTexturesPayload.class);
|
||||||
} catch (final JsonParseException e) {
|
} catch (final JsonParseException | IllegalArgumentException e) {
|
||||||
LOGGER.error("Could not decode textures payload", e);
|
LOGGER.error("Could not decode textures payload", e);
|
||||||
return new HashMap<>();
|
return MinecraftProfileTextures.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == null || result.textures() == null)
|
if (result == null || result.textures() == null || result.textures().isEmpty()) {
|
||||||
return new HashMap<>();
|
return MinecraftProfileTextures.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
return result.textures();
|
final Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> textures = result.textures();
|
||||||
|
|
||||||
|
return new MinecraftProfileTextures(
|
||||||
|
textures.get(MinecraftProfileTexture.Type.SKIN),
|
||||||
|
textures.get(MinecraftProfileTexture.Type.CAPE),
|
||||||
|
textures.get(MinecraftProfileTexture.Type.ELYTRA),
|
||||||
|
signatureState
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user