Skip to content

Commit

Permalink
Burlap Armor prevents freezing in powder snow, boots can be used to w…
Browse files Browse the repository at this point in the history
…alk on it

Close #102
  • Loading branch information
elifoster committed Jan 5, 2024
1 parent acf3db0 commit 87a347c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
@@ -0,0 +1,8 @@
{
"values": [
"veganoption:burlap_boots",
"veganoption:burlap_leggings",
"veganoption:burlap_chestplate",
"veganoption:burlap_helmet"
]
}
16 changes: 15 additions & 1 deletion java/squeek/veganoption/content/modules/Burlap.java
Expand Up @@ -3,6 +3,8 @@
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.data.recipes.RecipeOutput;
import net.minecraft.data.recipes.ShapedRecipeBuilder;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.*;
import net.minecraft.world.item.crafting.Ingredient;
import net.neoforged.api.distmarker.Dist;
Expand Down Expand Up @@ -35,7 +37,13 @@ public class Burlap implements IContentModule
public void create()
{
burlap = REGISTER_ITEMS.register("burlap", () -> new Item(new Item.Properties()));
burlapBoots = REGISTER_ITEMS.register("burlap_boots", () -> new DyeableArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.BOOTS, new Item.Properties()));
burlapBoots = REGISTER_ITEMS.register("burlap_boots", () -> new DyeableArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.BOOTS, new Item.Properties()) {
@Override
public boolean canWalkOnPowderedSnow(ItemStack stack, LivingEntity wearer)
{
return true;
}
});
burlapLeggings = REGISTER_ITEMS.register("burlap_leggings", () -> new DyeableArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.LEGGINGS, new Item.Properties()));
burlapChestplate = REGISTER_ITEMS.register("burlap_chestplate", () -> new DyeableArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.CHESTPLATE, new Item.Properties()));
burlapHelmet = REGISTER_ITEMS.register("burlap_helmet", () -> new DyeableArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.HELMET, new Item.Properties()));
Expand Down Expand Up @@ -63,6 +71,12 @@ public void datagenItemTags(DataGenProviders.ItemTags provider)
provider.tagW(ContentHelper.ItemTags.LEATHER_HELMETS)
.add(burlapHelmet.get())
.add(Items.LEATHER_HELMET);

provider.tagW(ItemTags.FREEZE_IMMUNE_WEARABLES)
.add(burlapBoots.get())
.add(burlapLeggings.get())
.add(burlapChestplate.get())
.add(burlapHelmet.get());
}

@Override
Expand Down

0 comments on commit 87a347c

Please sign in to comment.