0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-19 17:02:13 +02:00

Update to 24w19b

This commit is contained in:
Alexander01998 2024-05-10 19:22:38 +02:00
parent e0971f9fc7
commit f067b85a9a
4 changed files with 14 additions and 11 deletions

View File

@ -195,13 +195,13 @@ public final class AutoArmorHack extends Hack
.map(entry -> EnchantmentHelper.getLevel(entry, stack))
.orElse(0);
// TODO: Only the server can calculate protection amount as of
// 24w18a. Might change back in later snapshots.
// ClientPlayerEntity player = MC.player;
// DamageSource dmgSource =
// player.getDamageSources().playerAttack(player);
// prtPoints = protection.getProtectionAmount(prtLvl, dmgSource);
// Only the server can calculate protection amount as of
// 24w18a (1.21). Related bug: MC-196250
prtPoints = prtLvl;
}

View File

@ -7,15 +7,17 @@
*/
package net.wurstclient.hacks;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockWithEntity;
import net.minecraft.block.CraftingTableBlock;
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.TameableEntity;
import net.minecraft.entity.passive.VillagerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.StewItem;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.util.hit.HitResult;
@ -122,11 +124,14 @@ public final class AutoSoupHack extends Hack implements UpdateListener
private int findSoup(int startSlot, int endSlot)
{
List<Item> stews = List.of(Items.MUSHROOM_STEW, Items.RABBIT_STEW,
Items.BEETROOT_SOUP);
for(int i = startSlot; i < endSlot; i++)
{
ItemStack stack = MC.player.getInventory().getStack(i);
if(stack != null && stack.getItem() instanceof StewItem)
if(stack != null && stews.contains(stack.getItem()))
return i;
}

View File

@ -154,10 +154,8 @@ public final class AutoSwordHack extends Hack implements UpdateListener
.getAttribute(item, EntityAttributes.GENERIC_ATTACK_SPEED)
.orElseThrow();
// TODO: Client-side item-specific attack damage calculation no
// longer exists as of 24w18a. Seems to be a bug, as this would make
// the damage tooltip inaccurate. Check if they add it back in later
// snapshots.
// Client-side item-specific attack damage calculation no
// longer exists as of 24w18a (1.21). Related bug: MC-196250
case DAMAGE:
// EntityType<?> group = entity.getType();
float dmg = (float)ItemUtils

View File

@ -30,8 +30,8 @@
"depends": {
"fabricloader": ">=0.15.9",
"fabric-api": ">=0.97.9",
"minecraft": "~1.21-alpha.24.18.a",
"fabric-api": ">=0.98.1",
"minecraft": "~1.21-alpha.24.19.a",
"java": ">=21"
},
"suggests": {