1.18-pre7

This commit is contained in:
modmuss50 2021-11-23 17:33:00 +00:00
parent 6b21378a26
commit 7de09f55c6
2 changed files with 6 additions and 6 deletions

View file

@ -44,13 +44,13 @@ public class LivingEntityMixin {
@Nullable
@Unique private EquipmentSlot slotContext = null;
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/attribute/AttributeContainer;removeModifiers(Lcom/google/common/collect/Multimap;)V"), method = "getEquipment", locals = LocalCapture.CAPTURE_FAILHARD)
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/attribute/AttributeContainer;removeModifiers(Lcom/google/common/collect/Multimap;)V"), method = "getEquipmentChanges", locals = LocalCapture.CAPTURE_FAILHARD)
private void storeRemoveStackContext(CallbackInfoReturnable<Map> cir, Map map, EquipmentSlot[] var2, int var3, int var4, EquipmentSlot equipmentSlot, ItemStack oldStack, ItemStack newStack) {
stackContext = oldStack;
slotContext = equipmentSlot;
}
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/attribute/AttributeContainer;removeModifiers(Lcom/google/common/collect/Multimap;)V"), method = "getEquipment")
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/attribute/AttributeContainer;removeModifiers(Lcom/google/common/collect/Multimap;)V"), method = "getEquipmentChanges")
private void setupRemoveModifierContext(AttributeContainer attributeContainer, Multimap<EntityAttribute, EntityAttributeModifier> oldModifiers) {
((ItemStackContext) (Object) stackContext).fabricToolAttributes_setContext((LivingEntity) (Object) this);
Multimap<EntityAttribute, EntityAttributeModifier> attributeModifiers = stackContext.getAttributeModifiers(slotContext);
@ -58,13 +58,13 @@ public class LivingEntityMixin {
attributeContainer.removeModifiers(attributeModifiers);
}
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/attribute/AttributeContainer;addTemporaryModifiers(Lcom/google/common/collect/Multimap;)V"), method = "getEquipment", locals = LocalCapture.CAPTURE_FAILHARD)
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/attribute/AttributeContainer;addTemporaryModifiers(Lcom/google/common/collect/Multimap;)V"), method = "getEquipmentChanges", locals = LocalCapture.CAPTURE_FAILHARD)
private void storeAddStackContext(CallbackInfoReturnable<Map> cir, Map map, EquipmentSlot[] var2, int var3, int var4, EquipmentSlot equipmentSlot, ItemStack oldStack, ItemStack newStack) {
stackContext = newStack;
slotContext = equipmentSlot;
}
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/attribute/AttributeContainer;addTemporaryModifiers(Lcom/google/common/collect/Multimap;)V"), method = "getEquipment")
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/attribute/AttributeContainer;addTemporaryModifiers(Lcom/google/common/collect/Multimap;)V"), method = "getEquipmentChanges")
private void setupAddModifierContext(AttributeContainer attributeContainer, Multimap<EntityAttribute, EntityAttributeModifier> oldModifiers) {
((ItemStackContext) (Object) stackContext).fabricToolAttributes_setContext((LivingEntity) (Object) this);
Multimap<EntityAttribute, EntityAttributeModifier> attributeModifiers = stackContext.getAttributeModifiers(slotContext);

View file

@ -1,8 +1,8 @@
org.gradle.jvmargs=-Xmx2560M
version=0.42.9
minecraft_version=1.18-pre6
yarn_version=+build.1
minecraft_version=1.18-pre7
yarn_version=+build.2
loader_version=0.12.5
prerelease=true