Skip to content

Commit

Permalink
Merge pull request #64 from mayabyte/latest
Browse files Browse the repository at this point in the history
Support 1.20.4
  • Loading branch information
KrisCris committed Jan 21, 2024
2 parents 8329247 + f27138c commit 3ff2aef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
org.gradle.jvmargs=-Xmx1G

#Fabric
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.15.0
fabric_version=0.91.1+1.20.2
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.6
fabric_version=0.94.1+1.20.4

# Mod Properties
mod_version = 2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.util.Map;

@Mixin(AbstractCauldronBlock.class)
public class MixinCauldronBlock {

@Shadow
Map<Item, CauldronBehavior> behaviorMap;
CauldronBehavior.CauldronBehaviorMap behaviorMap;


CauldronBehavior CLEAN_STACKED_SHULKER_BOX = (state, world, pos, player, hand, stack) -> {
Expand All @@ -50,7 +48,7 @@ public class MixinCauldronBlock {
private void cleanStackedShulkerBox(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit, CallbackInfoReturnable<ActionResult> cir){
ItemStack itemStack = player.getStackInHand(hand);
if (ItemsHelper.isModified(itemStack) && itemStack.getCount() > 1) {
if(behaviorMap.get(itemStack.getItem()) == CauldronBehavior.CLEAN_SHULKER_BOX){
if(behaviorMap.map().get(itemStack.getItem()) == CauldronBehavior.CLEAN_SHULKER_BOX){
cir.setReturnValue(CLEAN_STACKED_SHULKER_BOX.interact(state, world, pos, player, hand, itemStack));
}
}
Expand Down

0 comments on commit 3ff2aef

Please sign in to comment.