Skip to content

Commit

Permalink
1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
LieOnLion committed Mar 30, 2024
1 parent 10b00da commit 1f8dd83
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/io/github/lieonlion/quad/mixin/PiglinAiMixin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.github.lieonlion.quad.mixin;

import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import io.github.lieonlion.quad.tags.QuadItemTags;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.monster.piglin.PiglinAi;
import net.minecraft.world.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

@Mixin(PiglinAi.class)
public abstract class PiglinAiMixin {
@ModifyReturnValue(method = "isWearingGold", at = @At(value = "RETURN"))
private static boolean wearsGoldArmor(boolean original, LivingEntity entity) {
for (ItemStack stack: entity.getArmorSlots()) {
if (stack.is(QuadItemTags.PIGLIN_ARMOUR)) {
return true;
}
} return original;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class QuadItemTags {

public static final TagKey<Item> IRON_GOLEM_HEAL = createTag("iron_golem_heal");
public static final TagKey<Item> ENDER_MASK = createTag("ender_mask");
public static final TagKey<Item> PIGLIN_ARMOUR = createTag("piglin_armour");
public static final TagKey<Item> TNT_IGNITERS = createTag("tnt_igniters");

private static TagKey<Item> createTag(String name) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"parent": "minecraft:adventure/sleep_in_bed",
"criteria": {
"walk_on_powder_snow_with_leather_boots": {
"conditions": {
"player": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"feet": {
"tag": "quad:snow_boots"
}
},
"stepping_on": {
"block": {
"blocks": [
"minecraft:powder_snow"
]
}
}
}
}
]
},
"trigger": "minecraft:location"
}
},
"display": {
"announce_to_chat": true,
"description": {
"translate": "advancements.adventure.walk_on_powder_snow_with_leather_boots.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:leather_boots",
"nbt": "{Damage:0}"
},
"show_toast": true,
"title": {
"translate": "advancements.adventure.walk_on_powder_snow_with_leather_boots.title"
}
},
"requirements": [
[
"walk_on_powder_snow_with_leather_boots"
]
],
"sends_telemetry_event": true
}
4 changes: 4 additions & 0 deletions src/main/resources/data/quad/tags/items/fuel_wood.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
{
"id": "#lolmct:table_is_fuel",
"required": false
},
{
"id": "#lolmbv:bookshelf_is_fuel",
"required": false
}
]
}
4 changes: 4 additions & 0 deletions src/main/resources/data/quad/tags/items/immune_fire.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"id": "#lolmct:table_fire_immune",
"required": false
},
{
"id": "#lolmbv:bookshelf_fire_immune",
"required": false
},
"minecraft:wither_skeleton_skull",
"minecraft:crimson_stem",
"minecraft:crimson_hyphae",
Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/data/quad/tags/items/piglin_armour.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"minecraft:golden_helmet",
"minecraft:golden_chestplate",
"minecraft:golden_leggings",
"minecraft:golden_boots"
]
}
1 change: 1 addition & 0 deletions src/main/resources/quad.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"EnderManMixin",
"IronGolemMixin",
"ItemEntityMixin",
"PiglinAiMixin",
"PowderedSnowBlockMixin",
"TntBlockMixin"
],
Expand Down

0 comments on commit 1f8dd83

Please sign in to comment.