Skip to content

Commit

Permalink
Add elytra_repair_ingredients tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur-GYT committed Jul 18, 2024
1 parent 143648c commit 0f79787
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 16 deletions.
12 changes: 2 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
## Additions


## Modifications

- **Update to Minecraft 1.21**
- Update to QFAPI 11.0.0-alpha.3
- Update to Gradle 8.6

## Removals

- Remove `animal_breeding` tag
- Add `elytra_repair_ingredients` tag which controls which blocks azalea's can be placed on
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This can be usefull for compatibility (this avoids possible conflicts with Mixin

**Item Tags are located in `data/quilt_tag_plus/tags/item` folder**

- `elytra_repair_ingredients` which controls which items can be used to repair elytra
- `iron_golem_healing` which controls which items can be used to heal Iron Golem
- `minecart_furnace_fuel` which controls which items can be used for Minecart with Furnace
- `respawn_anchor_charges` which controls which items can be used to fill respawn anchor
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package fr.mysteriousdev.quilt_tag_plus.mixin;

import fr.mysteriousdev.quilt_tag_plus.utils.ModItemTags;
import net.minecraft.item.ElytraItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(ElytraItem.class)
public class ElytraItemMixin {
@Redirect(method = "canRepair", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isOf(Lnet/minecraft/item/Item;)Z", ordinal = 0))
private boolean canRepair(ItemStack instance, Item item) {
return instance.isIn(ModItemTags.ELYTRA_REPAIR_INGREDIENTS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ public class ModItemTags {
public static final TagKey<Item> MINECART_FURNACE_FUEL = TagKey.of(RegistryKeys.ITEM, Identifier.of(Main.MODID, "minecart_furnace_fuel"));
public static final TagKey<Item> RESPAWN_ANCHOR_CHARGES = TagKey.of(RegistryKeys.ITEM, Identifier.of(Main.MODID, "respawn_anchor_charges"));
public static final TagKey<Item> TNT_IGNITERS = TagKey.of(RegistryKeys.ITEM, Identifier.of(Main.MODID, "tnt_igniters"));
public static final TagKey<Item> ELYTRA_REPAIR_INGREDIENTS = TagKey.of(RegistryKeys.ITEM, Identifier.of(Main.MODID, "elytra_repair_ingredients"));

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:phantom_membrane"
]
}
3 changes: 2 additions & 1 deletion src/main/resources/quilt_tag_plus.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"RespawnAnchorBlockMixin",
"SugarCaneBlockMixin",
"TntBlockMixin",
"WitherRoseBlockMixin"
"WitherRoseBlockMixin",
"ElytraItemMixin"
],
"client": [],
"injectors": {
Expand Down

0 comments on commit 0f79787

Please sign in to comment.