Skip to content

Commit

Permalink
remove the bad mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
eerussianguy committed Dec 4, 2023
1 parent 9474416 commit aad9d10
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 29 deletions.
11 changes: 2 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@

### Changes
### Fixes

- Added two types of sushi rolls
- Added sherd drops from breaking jugs and molds
- Added chiseled and polished sealed bricks
- Added chocolate chip cookies, sugar cookies, and cookie dough ice cream.
- Changed strawberry ice cream to just require strawberries and ice cream.
- Fix a crash when being attacked by bees or an oven.
- Fix stovetop grills not damaging the player (Closes #153)
- Fix some desyncs with ovens.
- Temporarily rolled back the sherd changes as they are crashing the mod on load. You can still obtain sherds via crafting.
16 changes: 8 additions & 8 deletions src/main/java/com/eerussianguy/firmalife/mixin/JugItemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
@Mixin(JugItem.class)
public abstract class JugItemMixin
{
@Inject(method = "finishUsingItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;shrink(I)V"))
private void inject$finishUsingItem(ItemStack stack, Level level, LivingEntity entity, CallbackInfoReturnable<ItemStack> cir)
{
if (entity instanceof Player player)
{
ItemHandlerHelper.giveItemToPlayer(player, FLItems.POTTERY_SHERD.get().getDefaultInstance());
}
}
// @Inject(method = "finishUsingItem", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;shrink(I)V"))
// private void inject$finishUsingItem(ItemStack stack, Level level, LivingEntity entity, CallbackInfoReturnable<ItemStack> cir)
// {
// if (entity instanceof Player player)
// {
// ItemHandlerHelper.giveItemToPlayer(player, FLItems.POTTERY_SHERD.get().getDefaultInstance());
// }
// }

}
22 changes: 11 additions & 11 deletions src/main/java/com/eerussianguy/firmalife/mixin/MoldItemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
@Mixin(MoldItem.class)
public abstract class MoldItemMixin
{
@Inject(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;shrink(I)V"), remap = false)
private void inject$use(Level level, Player player, InteractionHand hand, CallbackInfoReturnable<InteractionResultHolder<ItemStack>> cir)
{
ItemHandlerHelper.giveItemToPlayer(player, FLItems.POTTERY_SHERD.get().getDefaultInstance());
}

@Inject(method = "overrideOtherStackedOnMe", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;shrink(I)V"), remap = false)
private void inject$overrideOtherStackedOnMe(ItemStack stack, ItemStack carried, Slot slot, ClickAction action, Player player, SlotAccess carriedSlot, CallbackInfoReturnable<Boolean> cir)
{
ItemHandlerHelper.giveItemToPlayer(player, FLItems.POTTERY_SHERD.get().getDefaultInstance());
}
// @Inject(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;shrink(I)V"))
// private void inject$use(Level level, Player player, InteractionHand hand, CallbackInfoReturnable<InteractionResultHolder<ItemStack>> cir)
// {
// ItemHandlerHelper.giveItemToPlayer(player, FLItems.POTTERY_SHERD.get().getDefaultInstance());
// }
//
// @Inject(method = "overrideOtherStackedOnMe", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;shrink(I)V"))
// private void inject$overrideOtherStackedOnMe(ItemStack stack, ItemStack carried, Slot slot, ClickAction action, Player player, SlotAccess carriedSlot, CallbackInfoReturnable<Boolean> cir)
// {
// ItemHandlerHelper.giveItemToPlayer(player, FLItems.POTTERY_SHERD.get().getDefaultInstance());
// }

}
2 changes: 1 addition & 1 deletion src/main/resources/firmalife.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"injectors": {
"defaultRequire": 1
},
"mixins": ["JugItemMixin", "MoldItemMixin"],
"mixins": [],
"refmap": "firmalife.refmap.json"
}

0 comments on commit aad9d10

Please sign in to comment.