-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update(1.21-pre1): `ItemStack#damage` update * update(1.21-pre1): `attachmentPos`->`attachedBlockPos` * update(1.21-pre1): auto crafting update & fix dupe it was possible to dupe when using a positioned recipe not in the first slot of dropper * update(1.21-pre1): `addToFirstFreeSlot` return type changed * update(1.21-pre1): fix crash for `dispensersStripBlocks` minecraft would invoke methods on `null` player. also, reorganized carpet-extra.mixins.json, so that it's alphabetically ordered. * Update gradle.properties and fabric.mod.json to 1.21 This also Syncronizes the mod version to carpets current version (1.4.147) --------- Co-authored-by: Benjamin Konrad Dawkins <[email protected]>
- Loading branch information
1 parent
717a579
commit 80298cc
Showing
12 changed files
with
68 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/carpetextra/mixins/AxeItem_allowStripMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package carpetextra.mixins; | ||
|
||
import net.minecraft.item.AxeItem; | ||
import net.minecraft.item.ItemUsageContext; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(AxeItem.class) | ||
public class AxeItem_allowStripMixin { | ||
/** | ||
* Fixes crash when invoking {@code #shouldCancelStripAttempt(ItemUsageContext)} | ||
* with {@code null} player in the context | ||
*/ | ||
@Inject(method = "shouldCancelStripAttempt", at = @At(value = "HEAD"), cancellable=true) | ||
private static void allowStripWithoutPlayer(ItemUsageContext context, CallbackInfoReturnable<Boolean> cir) { | ||
if (context.getPlayer() == null) { | ||
cir.setReturnValue(false); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters