Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hide bundle #493

Draft
wants to merge 1 commit into
base: 1.21.4-develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/generated/resources/assets/aether_ii/items/hide_bundle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"model": {
"type": "minecraft:select",
"cases": [
{
"model": {
"type": "minecraft:condition",
"on_false": {
"type": "minecraft:model",
"model": "aether_ii:item/hide_bundle"
},
"on_true": {
"type": "minecraft:composite",
"models": [
{
"type": "minecraft:model",
"model": "aether_ii:item/hide_bundle_open_back"
},
{
"type": "minecraft:bundle/selected_item"
},
{
"type": "minecraft:model",
"model": "aether_ii:item/hide_bundle_open_front"
}
]
},
"property": "minecraft:bundle/has_selected_item"
},
"when": "gui"
}
],
"fallback": {
"type": "minecraft:model",
"model": "aether_ii:item/hide_bundle"
},
"property": "minecraft:display_context"
}
}
1 change: 1 addition & 0 deletions src/generated/resources/assets/aether_ii/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@
"item.aether_ii.green_swet_gel": "Green Swet Gel",
"item.aether_ii.green_swet_jelly": "Green Swet Jelly",
"item.aether_ii.healing_stone": "Healing Stone",
"item.aether_ii.hide_bundle": "Hide Bundle",
"item.aether_ii.highfields_burrukai_spawn_egg": "Burrukai Spawn Egg",
"item.aether_ii.highfields_kirrid_spawn_egg": "Kirrid Spawn Egg",
"item.aether_ii.highfields_taegore_spawn_egg": "Taegore Spawn Egg",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "aether_ii:item/hide_bundle"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/template_bundle_open_back",
"textures": {
"layer0": "aether_ii:item/hide_bundle_open_back"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/template_bundle_open_front",
"textures": {
"layer0": "aether_ii:item/hide_bundle_open_front"
}
}
5 changes: 5 additions & 0 deletions src/generated/resources/data/minecraft/tags/item/bundles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"aether_ii:hide_bundle"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ protected void addTranslations() {
this.addItem(AetherIIItems.SKEPHID_SPAWN_EGG, "Skephid Spawn Egg");

// Misc
this.addItem(AetherIIItems.HIDE_BUNDLE, "Hide Bundle");
this.addItem(AetherIIItems.MOA_EGG, "Moa Egg");
this.addItem(AetherIIItems.MOA_FEED, "Moa Feed");
this.addItem(AetherIIItems.BLUEBERRY_MOA_FEED, "Blueberry Moa Feed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void run() {
this.generateGliderItem(AetherIIItems.GOLDEN_AERCLOUD_GLIDER.get(), false);
this.generateGliderItem(AetherIIItems.BLUE_AERCLOUD_GLIDER.get(), true);
this.generateGliderItem(AetherIIItems.PURPLE_AERCLOUD_GLIDER.get(), true);
//

// Skyroot Buckets
this.generateFlatItem(AetherIIItems.SKYROOT_BUCKET.get(), ModelTemplates.FLAT_ITEM);
this.generateFlatItem(AetherIIItems.SKYROOT_WATER_BUCKET.get(), ModelTemplates.FLAT_ITEM);
Expand Down Expand Up @@ -235,6 +235,7 @@ public void run() {
this.generateSpawnEgg(AetherIIItems.SKEPHID_SPAWN_EGG.get(), 0x7D96AB, 0xF7CC94);

// Misc
this.generateBundleModels(AetherIIItems.HIDE_BUNDLE.get());
this.generateMoaEggItem(AetherIIItems.MOA_EGG.get());
this.generateFlatItem(AetherIIItems.MOA_FEED.get(), ModelTemplates.FLAT_ITEM);
this.generateFlatItem(AetherIIItems.BLUEBERRY_MOA_FEED.get(), ModelTemplates.FLAT_ITEM);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ public void addTags(HolderLookup.Provider provider) {
AetherIIItems.ARKENIUM_PICKAXE.get(),
AetherIIItems.GRAVITITE_PICKAXE.get()
);
this.tag(ItemTags.BUNDLES).add(AetherIIItems.HIDE_BUNDLE.get());
this.tag(ItemTags.SWORDS).addTag(AetherIITags.Items.TOOLS_SHORTSWORDS);
this.tag(ItemTags.AXES).add(
AetherIIItems.SKYROOT_AXE.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ public class AetherIICreativeTabs {
output.accept(AetherIIItems.GOLDEN_AERCLOUD_GLIDER.get());
output.accept(AetherIIItems.BLUE_AERCLOUD_GLIDER.get());
output.accept(AetherIIItems.PURPLE_AERCLOUD_GLIDER.get());
output.accept(AetherIIItems.HIDE_BUNDLE.get());
output.accept(AetherIIItems.MOA_SADDLE.get());
output.accept(AetherIIItems.IRRADIATED_ARMOR.get());
output.accept(AetherIIItems.IRRADIATED_WEAPON.get());
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/aetherteam/aetherii/item/AetherIIItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.*;
import net.minecraft.world.item.component.BundleContents;
import net.minecraft.world.item.component.Consumables;
import net.minecraft.world.item.equipment.ArmorType;
import net.minecraft.world.level.block.Blocks;
Expand Down Expand Up @@ -324,6 +325,7 @@ public class AetherIIItems {
public static final DeferredItem<SpawnEggItem> SKEPHID_SPAWN_EGG = register("skephid_spawn_egg", (properties) -> new SpawnEggItem(AetherIIEntityTypes.SKEPHID.get(), properties));

// Misc
public static final DeferredItem<Item> HIDE_BUNDLE = register("hide_bundle", BundleItem::new, () -> new Item.Properties().stacksTo(1).component(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY));
public static final DeferredItem<Item> MOA_EGG = register("moa_egg", MoaEggItem::new, () -> new Item.Properties().stacksTo(1).component(AetherIIDataComponents.MOA_EGG_TYPE.get(), MoaEggType.defaultType()));
public static final DeferredItem<Item> MOA_FEED = register("moa_feed");
public static final DeferredItem<Item> BLUEBERRY_MOA_FEED = register("blueberry_moa_feed");
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.