diff --git a/.gitignore b/.gitignore index b777c76..26ddeba 100644 --- a/.gitignore +++ b/.gitignore @@ -38,5 +38,6 @@ bin/ run/ !**/src/**/run/ **/src/generated/**/.cache/ +**/src/hfas/resources/.cache/ repo/ !**/src/**/repo/ diff --git a/CHANGE_LOG.MD b/CHANGE_LOG.MD index e2262ac..dc7416a 100644 --- a/CHANGE_LOG.MD +++ b/CHANGE_LOG.MD @@ -41,7 +41,7 @@ All notable changes to the Wild Wind Module project will be documented in this f #### 5. 木质方块功能 - **去皮功能** - 使用斧头可将原木/木头去皮 - **堆肥功能** - 树叶和树苗可用于堆肥(30%概率) -- **燃料功能** - 木质方块可作为熔炉燃料(300 tick) +- **燃料功能** - 木质方块可作为熔炉燃料(由 NeoForge `furnace_fuels` 数据地图提供) ### 技术实现 @@ -71,7 +71,6 @@ All notable changes to the Wild Wind Module project will be documented in this f |--------------------------------|------------| | `FletchingTableReplaceHandler` | 区块加载时替换制箭台 | | `BlockFeaturesHandler` | 方块功能(堆肥等) | -| `FuelHandler` | 燃料事件处理 | #### Mixin 注入 | 类 | 功能 | @@ -110,8 +109,7 @@ src/hfas/java/org/polaris2023/wildwind/hfas/ │ ├── ModDataMapsProvider.java ├── event/ # 事件处理 │ ├── FletchingTableReplaceHandler.java -│ ├── BlockFeaturesHandler.java -│ └── FuelHandler.java +│ └── BlockFeaturesHandler.java ├── mixin/ # Mixin 注入 │ └── AzaleaBlockMixin.java ├── config/ # 配置文件 @@ -182,3 +180,52 @@ src/hfas/java/org/polaris2023/wildwind/hfas/ - [ ] 更多下界植物 - [ ] 制箭台配方系统 - [ ] 成就系统 + +--- + +## [Unreleased] - 2026.10.23 + +### Added +- **木材家族聚合** - 新增 `WoodFamily` 与 `ModWoodFamilies`,模型、战利品、标签、数据地图、创造物品栏统一遍历,不再各写一份 13~15 参数列表 +- **方块战利品表** - 注册 `BlockLoot`,`ModLootProvider` 此前只挂了实体战利品,方块战利品表完全缺失 +- **燃料数据地图** - 使用 NeoForge `furnace_fuels` 数据地图注册燃料(原木/木头/去皮/木板/楼梯/栅栏/栅栏门/压力板 300 tick,台阶 150,按钮与树苗 100) +- **补全方块标签** - `logs_that_burn`、`c:stripped_logs`、`c:stripped_woods`、`fences`、`fence_gates`、`wooden_fences`,原先只写在手写 JSON 里 + +### Changed +- 模型、战利品、标签、创造物品栏提供器改为遍历 `ModWoodFamilies.ALL` +- `ModItemTagsProvider` 改继承 `net.neoforged.neoforge.common.data.ItemTagsProvider` +- 创造物品栏的 62 行 `insertAfter` 链收敛为 `appendWoodSet()` +- 燃料由 `FurnaceFuelBurnTimeEvent` 事件改为数据地图驱动,移除 `FuelHandler` + +### Fixed +- **活板门不掉落** - 原先误用 `createDoorTable`(带 `half=lower` 条件),天花板上的活板门破坏后无掉落,改为 `dropSelf`,与 `VanillaBlockLoot` 一致 +- **木质方块被误加入 `needs_stone_tool`** - 导致木板、门、按钮等必须石级工具才能挖掘掉落,已移除该标签注册 +- **Gradle 9 下资源重复项报错** - 原 `.cache` 排除模式相对 srcDir 根无效,已修正并显式设置 `duplicatesStrategy` + +### Removed +- **回滚 PR #29 的资源污染** - 删除 438 个与 datagen 产物同名的手写 `blockstates` / `models` / `items` / `data` 文件,以及 130 个未注册方块(sign / boat / potted sapling)的孤儿资源,仅保留 80 个 datagen 无法重建的文件 +- **被提交进 `src` 的 datagen HashCache** - 删除 `src/hfas/resources/.cache/`(9 个文件),它会令 datagen 误判"已生成"而跳过重写 +- **重复的标签与语言文件** - 删除 15 个与 datagen 输出同名的 JSON(datagen 每次重新生成,无信息丢失) +- **改名前的重复贴图** - 删除 26 张与 `blaze_*` / `soul_*` 逐字节相同的 `cinder_*` / `ember_*`(含 `.mcmeta`),无信息丢失;另有 28 张没有对应新命名版本的贴图(船 / 箱船 / 告示牌 / 悬挂告示牌的实体贴图与物品图标、`gui/hanging_signs`、`screens`)全部保留,作为后续船与告示牌开发的素材 +- **`ModBlockTagsProvider.INSTANCE`** - 无人使用的静态单例 + +--- + +## [Unreleased] - 2026.10.25 + +### Added +- **树苗花盆方块** - 注册 `potted_blaze_sapling` / `potted_soul_sapling`,使用原版 `FlowerPotBlock(树苗, props)` 构造器,构造时自动把树苗登记进原版空花盆的可放入映射表,无需额外的手工 `addPlant` +- **花盆模型与战利品表** - `ModModelProvider` 用 `createPlant()` 一次生成树苗交叉模型 + 花盆模型(含 blockstate),`BlockLoot` 用 `dropPottedContents()` 生成「花盆 + 树苗」两池掉落,与原版 `potted_oak_sapling` 一致 +- **花盆方块本地化** - `block.ww_hfas.potted_blaze_sapling` / `potted_soul_sapling`,en_us 为 `Potted Blaze Sapling` / `Potted Soul Sapling`,zh_cn 为 `焚烬木树苗盆栽` / `灵焰木树苗盆栽` +- **食人鱼拍打音效** - 新增 `entity.piranha.flop` SoundEvent(`createVariableRangeEvent`)与 `subtitles.entity.piranha.flop` 字幕(en_us `Piranha flops` / zh_cn `食人鱼拍打`) + +### Changed +- **食人鱼 `getFlopSound()`** - 由原版 `SoundEvents.SALMON_FLOP` 改为自有 `ModSoundEvents.PIRANHA_FLOP`,移除遗留的 `// WIP SOUND` 标记 +- **`sounds.json` 暂借原版音源** - `entity.piranha.flop` 以 `sounds: [{ "type": "event", "name": "minecraft:entity.salmon.flop" }]` 引用原版鲑鱼拍打声;待有独立 `.ogg` 后把该条目替换为文件列表即可,事件 ID 与字幕键均无需变动 + +### Fixed +- **`minecraft:flower_pots` 标签加载失败** - 标签内引用的 `ww_hfas:potted_blaze_sapling` / `ww_hfas:potted_soul_sapling` 此前没有对应注册,`TagLoader` 报 `Couldn't load tag minecraft:flower_pots as it is missing following references`;现两个方块均已注册(BUG-TG-001) +- **杜鹃木 / 焚烬木 / 灵焰木木板无法合成** - `azalea_planks` / `blaze_planks` / `soul_planks` 的 `ingredients` 误写为单个方块 id(`ww_hfas:blaze_log` 等),改为物品标签 `#ww_hfas:azalea_logs` / `#ww_hfas:blaze_logs` / `#ww_hfas:soul_logs`,原木、木头与两种去皮变体都能参与合成(BUG-TG-002) +- **食人鱼 flop 无声音且字幕不显示** - `sounds.json` 曾把 `type` / `name` 写在事件层级并缺少 `sounds` 数组,`SoundEventRegistrationSerializer.getSounds()` 解析出空音源,事件播放被丢弃;已改为把 `type: "event"` 内嵌在 sound 条目中 + + diff --git a/build.gradle.kts b/build.gradle.kts index 1688d3b..909236c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ +import org.gradle.api.file.DuplicatesStrategy import org.slf4j.event.Level.INFO import java.util.Locale @@ -71,7 +72,10 @@ allprojects { srcDir(rootProject.file("src/${project.name}/resources")) exclude("**/*.bbmodel") - exclude("build/generated/**/.cache") + // datagen 的 hash 缓存目录,位于 client/server 两个 srcDir 根下, + // 同名 entry 会在 processResources 里触发 duplicate 错误,必须排除 + exclude("**/.cache/**") + exclude(".cache/**") } } } @@ -93,6 +97,11 @@ allprojects { java.toolchain.languageVersion = JavaLanguageVersion.of(25) + // Gradle 9 对资源重复项默认报错;保持既有语义:先生成的 srcDir(build/generated)优先 + tasks.withType().configureEach { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + } + neoForge { version = neoVersion diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/HFASMod.java b/src/hfas/java/org/polaris2023/wildwind/hfas/HFASMod.java index 44d9621..e2fb67f 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/HFASMod.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/HFASMod.java @@ -33,6 +33,13 @@ public HFASMod(IEventBus bus, ModContainer container) { // 注册属性 ModAttributes.register(bus); + // 注册状态效果、药水 + ModMobEffects.register(bus); + ModPotions.register(bus); + + // 注册食人鱼音效 + ModSoundEvents.register(bus); + // 注册配置文件 container.registerConfig(net.neoforged.fml.config.ModConfig.Type.COMMON, ModCommonConfig.SPEC); diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/block/ModBlocks.java b/src/hfas/java/org/polaris2023/wildwind/hfas/block/ModBlocks.java index 03ee298..cdf108e 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/block/ModBlocks.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/block/ModBlocks.java @@ -192,6 +192,16 @@ public class ModBlocks { .randomTicks()) ); + // 焚烬木树苗花盆(原版构造器,会自动把树苗登记进原版花盆的映射表) + @SuppressWarnings("deprecation") + public static final DeferredBlock POTTED_BLAZE_SAPLING = BLOCKS.registerBlock( + "potted_blaze_sapling", + p -> new FlowerPotBlock(BLAZE_SAPLING.get(), p + .instabreak() + .noOcclusion() + .pushReaction(PushReaction.DESTROY)) + ); + // ==================== 灵焰木套件 (soul_wood) ==================== // 灵焰木原木 @@ -333,6 +343,16 @@ public class ModBlocks { .randomTicks()) ); + // 灵焰木树苗花盆(原版构造器,会自动把树苗登记进原版花盆的映射表) + @SuppressWarnings("deprecation") + public static final DeferredBlock POTTED_SOUL_SAPLING = BLOCKS.registerBlock( + "potted_soul_sapling", + p -> new FlowerPotBlock(SOUL_SAPLING.get(), p + .instabreak() + .noOcclusion() + .pushReaction(PushReaction.DESTROY)) + ); + // ==================== 杜鹃木套件 (azalea_wood) ==================== // 杜鹃木原木 diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/block/ModWoodFamilies.java b/src/hfas/java/org/polaris2023/wildwind/hfas/block/ModWoodFamilies.java new file mode 100644 index 0000000..8993636 --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/block/ModWoodFamilies.java @@ -0,0 +1,80 @@ +package org.polaris2023.wildwind.hfas.block; + +import java.util.List; + +/** + * 模组木材家族清单。 + *

+ * 各 datagen provider 统一遍历 {@link #ALL},避免同一条 13 参数列表在多个文件里重复维护。 + * 这里只是对 {@link ModBlocks} 已注册方块的聚合,不参与注册。 + */ +public final class ModWoodFamilies { + + private ModWoodFamilies() { + } + + /** 焚烬木(blaze) */ + public static final WoodFamily BLAZE = new WoodFamily( + "blaze", + 0xFF8000, + ModBlocks.BLAZE_LOG, + ModBlocks.BLAZE_WOOD, + ModBlocks.STRIPPED_BLAZE_LOG, + ModBlocks.STRIPPED_BLAZE_WOOD, + ModBlocks.BLAZE_PLANKS, + ModBlocks.BLAZE_STAIRS, + ModBlocks.BLAZE_SLAB, + ModBlocks.BLAZE_FENCE, + ModBlocks.BLAZE_FENCE_GATE, + ModBlocks.BLAZE_DOOR, + ModBlocks.BLAZE_TRAPDOOR, + ModBlocks.BLAZE_PRESSURE_PLATE, + ModBlocks.BLAZE_BUTTON, + ModBlocks.BLAZE_LEAVES, + ModBlocks.BLAZE_SAPLING + ); + + /** 灵焰木(soul) */ + public static final WoodFamily SOUL = new WoodFamily( + "soul", + 0x00FFFF, + ModBlocks.SOUL_LOG, + ModBlocks.SOUL_WOOD, + ModBlocks.STRIPPED_SOUL_LOG, + ModBlocks.STRIPPED_SOUL_WOOD, + ModBlocks.SOUL_PLANKS, + ModBlocks.SOUL_STAIRS, + ModBlocks.SOUL_SLAB, + ModBlocks.SOUL_FENCE, + ModBlocks.SOUL_FENCE_GATE, + ModBlocks.SOUL_DOOR, + ModBlocks.SOUL_TRAPDOOR, + ModBlocks.SOUL_PRESSURE_PLATE, + ModBlocks.SOUL_BUTTON, + ModBlocks.SOUL_LEAVES, + ModBlocks.SOUL_SAPLING + ); + + /** 杜鹃木(azalea):沿用原版树叶 / 树苗,没有自成套的树叶 */ + public static final WoodFamily AZALEA = new WoodFamily( + "azalea", + 0, + ModBlocks.AZALEA_LOG, + ModBlocks.AZALEA_WOOD, + ModBlocks.STRIPPED_AZALEA_LOG, + ModBlocks.STRIPPED_AZALEA_WOOD, + ModBlocks.AZALEA_PLANKS, + ModBlocks.AZALEA_STAIRS, + ModBlocks.AZALEA_SLAB, + ModBlocks.AZALEA_FENCE, + ModBlocks.AZALEA_FENCE_GATE, + ModBlocks.AZALEA_DOOR, + ModBlocks.AZALEA_TRAPDOOR, + ModBlocks.AZALEA_PRESSURE_PLATE, + ModBlocks.AZALEA_BUTTON, + null, + null + ); + + public static final List ALL = List.of(BLAZE, SOUL, AZALEA); +} diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/block/WoodFamily.java b/src/hfas/java/org/polaris2023/wildwind/hfas/block/WoodFamily.java new file mode 100644 index 0000000..fa05bd1 --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/block/WoodFamily.java @@ -0,0 +1,64 @@ +package org.polaris2023.wildwind.hfas.block; + +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.ButtonBlock; +import net.minecraft.world.level.block.DoorBlock; +import net.minecraft.world.level.block.FenceBlock; +import net.minecraft.world.level.block.FenceGateBlock; +import net.minecraft.world.level.block.LeavesBlock; +import net.minecraft.world.level.block.PressurePlateBlock; +import net.minecraft.world.level.block.RotatedPillarBlock; +import net.minecraft.world.level.block.SaplingBlock; +import net.minecraft.world.level.block.SlabBlock; +import net.minecraft.world.level.block.StairBlock; +import net.minecraft.world.level.block.TrapDoorBlock; +import net.neoforged.neoforge.registries.DeferredBlock; +import org.jspecify.annotations.Nullable; + +import java.util.List; + +/** + * 一种木材(方块家族)的聚合视图。 + *

+ * 方块注册仍由 {@link ModBlocks} 以显式字段完成,这里只做聚合, + * 让模型 / 战利品 / 标签 / 数据地图 / 物品栏等 provider 只需遍历一次, + * 不用在每个文件里重复抄 13~15 个参数。 + * + * @param name 木材名(blaze / soul / azalea),用于拼接翻译与自建标签 + * @param leavesTint 树叶物品图标的常数染色(无树叶时忽略) + */ +public record WoodFamily( + String name, + int leavesTint, + DeferredBlock log, + DeferredBlock wood, + DeferredBlock strippedLog, + DeferredBlock strippedWood, + DeferredBlock planks, + DeferredBlock stairs, + DeferredBlock slab, + DeferredBlock fence, + DeferredBlock fenceGate, + DeferredBlock door, + DeferredBlock trapdoor, + DeferredBlock pressurePlate, + DeferredBlock button, + @Nullable DeferredBlock leaves, + @Nullable DeferredBlock sapling +) { + + /** + * 建筑套件方块(不含树叶 / 树苗),顺序即物品栏与标签的常规顺序。 + */ + public List> buildingBlocks() { + return List.of(log, wood, strippedLog, strippedWood, planks, + stairs, slab, fence, fenceGate, door, trapdoor, pressurePlate, button); + } + + /** + * 是否带树叶与树苗(杜鹃木沿用原版,没有自成套的树叶)。 + */ + public boolean hasLeaves() { + return leaves != null && sapling != null; + } +} diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/model/PiranhaModel.java b/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/model/PiranhaModel.java new file mode 100644 index 0000000..00e35fb --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/model/PiranhaModel.java @@ -0,0 +1,28 @@ +package org.polaris2023.wildwind.hfas.client.entity.model; + +import com.geckolib.model.DefaultedEntityGeoModel; +import com.geckolib.renderer.base.GeoRenderState; +import net.minecraft.resources.Identifier; +import org.polaris2023.wildwind.hfas.HFASMod; +import org.polaris2023.wildwind.hfas.entity.animal.Piranha; + +/** + * 食人鱼实体的几何模型定义喵~ + */ +public class PiranhaModel extends DefaultedEntityGeoModel { + + /** + * 创建食人鱼模型实例喵~ + */ + public PiranhaModel() { + super(HFASMod.id("piranha")); + } + + /** + * 获取当前食人鱼对应的材质资源喵~ + */ + @Override + public Identifier getTextureResource(GeoRenderState state) { + return HFASMod.id("textures/entity/piranha.png"); + } +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/renderer/PiranhaRenderer.java b/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/renderer/PiranhaRenderer.java new file mode 100644 index 0000000..46dd5da --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/renderer/PiranhaRenderer.java @@ -0,0 +1,24 @@ +package org.polaris2023.wildwind.hfas.client.entity.renderer; + +import com.geckolib.renderer.GeoEntityRenderer; +import net.minecraft.client.renderer.entity.EntityRendererProvider; +import org.polaris2023.wildwind.hfas.client.entity.model.PiranhaModel; +import org.polaris2023.wildwind.hfas.client.entity.renderstate.PiranhaRenderState; +import org.polaris2023.wildwind.hfas.entity.animal.Piranha; + +import javax.annotation.Nullable; + +/** + * 食人鱼渲染器 + * @author huimanman + */ +public class PiranhaRenderer extends GeoEntityRenderer { + public PiranhaRenderer(EntityRendererProvider.Context renderManager) { + super(renderManager, new PiranhaModel()); + } + + @Override + public PiranhaRenderState createRenderState(Piranha animatable, @Nullable Void relatedObject) { + return new PiranhaRenderState(); + } +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/renderstate/PiranhaRenderState.java b/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/renderstate/PiranhaRenderState.java new file mode 100644 index 0000000..5c7b419 --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/client/entity/renderstate/PiranhaRenderState.java @@ -0,0 +1,9 @@ +package org.polaris2023.wildwind.hfas.client.entity.renderstate; + +import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; + +/** + * 食人鱼渲染状态喵~ + */ +public class PiranhaRenderState extends LivingEntityRenderState { +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/client/eventsub/EntitiesClientHandler.java b/src/hfas/java/org/polaris2023/wildwind/hfas/client/eventsub/EntitiesClientHandler.java index 1ddcc3a..6d4d87e 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/client/eventsub/EntitiesClientHandler.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/client/eventsub/EntitiesClientHandler.java @@ -5,12 +5,14 @@ import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.neoforge.client.event.EntityRenderersEvent; import org.polaris2023.wildwind.hfas.client.entity.renderer.MudcrabRenderer; +import org.polaris2023.wildwind.hfas.client.entity.renderer.PiranhaRenderer; import org.polaris2023.wildwind.hfas.registry.ModEntities; @EventBusSubscriber(value = Dist.CLIENT) public class EntitiesClientHandler { @SubscribeEvent static void registerRenderers(EntityRenderersEvent.RegisterRenderers event) { + event.registerEntityRenderer(ModEntities.PIRANHA.get(), PiranhaRenderer::new); event.registerEntityRenderer(ModEntities.MUDCRAB.get(), MudcrabRenderer::new); } } \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModDataMapsProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModDataMapsProvider.java index 05d0b5b..4b6e505 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModDataMapsProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModDataMapsProvider.java @@ -2,10 +2,16 @@ import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; import net.neoforged.neoforge.common.data.DataMapProvider; +import net.neoforged.neoforge.registries.datamaps.builtin.FurnaceFuel; import net.neoforged.neoforge.registries.datamaps.builtin.NeoForgeDataMaps; import net.neoforged.neoforge.registries.datamaps.builtin.Strippable; import org.polaris2023.wildwind.hfas.block.ModBlocks; +import org.polaris2023.wildwind.hfas.block.ModWoodFamilies; +import org.polaris2023.wildwind.hfas.block.WoodFamily; import java.util.concurrent.CompletableFuture; @@ -30,5 +36,29 @@ protected void gather(HolderLookup.Provider provider) { .add(ModBlocks.SOUL_LOG.getKey(), new Strippable(ModBlocks.STRIPPED_SOUL_LOG.get()), false) .add(ModBlocks.SOUL_WOOD.getKey(), new Strippable(ModBlocks.STRIPPED_SOUL_WOOD.get()), false) ; + + // 燃料:走 NeoForge 数据地图(neoforge/data_maps/item/furnace_fuels.json), + // 不再用 FurnaceFuelBurnTimeEvent 硬判。燃烧时间对齐原版木质方块。 + var fuels = builder(NeoForgeDataMaps.FURNACE_FUELS); + for (WoodFamily family : ModWoodFamilies.ALL) { + fuels.add(itemKey(family.log().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.wood().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.strippedLog().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.strippedWood().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.planks().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.stairs().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.slab().get()), new FurnaceFuel(150), false); + fuels.add(itemKey(family.fence().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.fenceGate().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.pressurePlate().get()), new FurnaceFuel(300), false); + fuels.add(itemKey(family.button().get()), new FurnaceFuel(100), false); + if (family.sapling() != null) { + fuels.add(itemKey(family.sapling().get()), new FurnaceFuel(100), false); + } + } + } + + private static ResourceKey itemKey(Block block) { + return block.asItem().builtInRegistryHolder().getKey(); } } diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModLootProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModLootProvider.java index 8cd0c41..dc79a5f 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModLootProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModLootProvider.java @@ -19,6 +19,7 @@ import net.neoforged.neoforge.registries.DeferredHolder; import org.polaris2023.wildwind.hfas.datagen.provider.loot.BlockLoot; import org.polaris2023.wildwind.hfas.registry.ModEntities; +import org.polaris2023.wildwind.hfas.registry.ModItems; import java.util.List; import java.util.Set; @@ -31,7 +32,9 @@ public ModLootProvider(PackOutput output, CompletableFuture> getKnownEntityTypes() { @Override public void generate() { this.emptyLoot(ModEntities.MUDCRAB); + this.add( + ModEntities.PIRANHA.get(), + LootTable.lootTable() + .withPool( + LootPool.lootPool() + .setRolls(ConstantValue.exactly(1.0F)) + .add(LootItem.lootTableItem(ModItems.PIRANHA.get()) + .apply(SmeltItemFunction.smelted().when(this.shouldSmeltLoot()))) + ) + .withPool( + LootPool.lootPool() + .setRolls(ConstantValue.exactly(1.0F)) + .add(LootItem.lootTableItem(Items.BONE_MEAL)) + .when(LootItemRandomChanceCondition.randomChance(0.05F)) + ) + .withPool( + LootPool.lootPool() + .setRolls(ConstantValue.exactly(1.0F)) + .add(LootItem.lootTableItem(ModItems.FANG.get())) + .when(LootItemRandomChanceCondition.randomChance(0.05F)) + ) + ); } private void emptyLoot(DeferredHolder, EntityType> entityType) { diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModModelProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModModelProvider.java index e6196de..0b2812e 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModModelProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModModelProvider.java @@ -13,6 +13,8 @@ import net.minecraft.world.level.block.Block; import org.polaris2023.wildwind.hfas.HFASMod; import org.polaris2023.wildwind.hfas.block.ModBlocks; +import org.polaris2023.wildwind.hfas.block.ModWoodFamilies; +import org.polaris2023.wildwind.hfas.block.WoodFamily; import org.polaris2023.wildwind.hfas.registry.ModItems; import java.util.function.Supplier; @@ -32,64 +34,14 @@ public ModModelProvider(PackOutput output) { @Override protected void registerModels(BlockModelGenerators blockModels, ItemModelGenerators itemModels) { - // ==================== 焚烬木套件 ==================== - registerWoodModels(blockModels, itemModels, - ModBlocks.BLAZE_LOG.get(), - ModBlocks.BLAZE_WOOD.get(), - ModBlocks.STRIPPED_BLAZE_LOG.get(), - ModBlocks.STRIPPED_BLAZE_WOOD.get(), - ModBlocks.BLAZE_PLANKS.get(), - ModBlocks.BLAZE_STAIRS.get(), - ModBlocks.BLAZE_SLAB.get(), - ModBlocks.BLAZE_FENCE.get(), - ModBlocks.BLAZE_FENCE_GATE.get(), - ModBlocks.BLAZE_DOOR.get(), - ModBlocks.BLAZE_TRAPDOOR.get(), - ModBlocks.BLAZE_PRESSURE_PLATE.get(), - ModBlocks.BLAZE_BUTTON.get() - ); - // 焚烬木树叶 - 橙色染色 - blockModels.createTintedLeaves(ModBlocks.BLAZE_LEAVES.get(), TexturedModel.LEAVES, 0xFF8000); - // 焚烬木树苗 - blockModels.createCrossBlock(ModBlocks.BLAZE_SAPLING.get(), BlockModelGenerators.PlantType.NOT_TINTED); - - // ==================== 灵焰木套件 ==================== - registerWoodModels(blockModels, itemModels, - ModBlocks.SOUL_LOG.get(), - ModBlocks.SOUL_WOOD.get(), - ModBlocks.STRIPPED_SOUL_LOG.get(), - ModBlocks.STRIPPED_SOUL_WOOD.get(), - ModBlocks.SOUL_PLANKS.get(), - ModBlocks.SOUL_STAIRS.get(), - ModBlocks.SOUL_SLAB.get(), - ModBlocks.SOUL_FENCE.get(), - ModBlocks.SOUL_FENCE_GATE.get(), - ModBlocks.SOUL_DOOR.get(), - ModBlocks.SOUL_TRAPDOOR.get(), - ModBlocks.SOUL_PRESSURE_PLATE.get(), - ModBlocks.SOUL_BUTTON.get() - ); - // 灵焰木树叶 - 青色染色 - blockModels.createTintedLeaves(ModBlocks.SOUL_LEAVES.get(), TexturedModel.LEAVES, 0x00FFFF); - // 灵焰木树苗 - blockModels.createCrossBlock(ModBlocks.SOUL_SAPLING.get(), BlockModelGenerators.PlantType.NOT_TINTED); - - // ==================== 杜鹃木套件 ==================== - registerWoodModels(blockModels, itemModels, - ModBlocks.AZALEA_LOG.get(), - ModBlocks.AZALEA_WOOD.get(), - ModBlocks.STRIPPED_AZALEA_LOG.get(), - ModBlocks.STRIPPED_AZALEA_WOOD.get(), - ModBlocks.AZALEA_PLANKS.get(), - ModBlocks.AZALEA_STAIRS.get(), - ModBlocks.AZALEA_SLAB.get(), - ModBlocks.AZALEA_FENCE.get(), - ModBlocks.AZALEA_FENCE_GATE.get(), - ModBlocks.AZALEA_DOOR.get(), - ModBlocks.AZALEA_TRAPDOOR.get(), - ModBlocks.AZALEA_PRESSURE_PLATE.get(), - ModBlocks.AZALEA_BUTTON.get() - ); + // ==================== 三种木材套件 ==================== + for (WoodFamily family : ModWoodFamilies.ALL) { + registerWoodModels(blockModels, family); + } + + // 树苗 + 花盆:createPlant 一次生成树苗交叉模型与花盆模型 + blockModels.createPlant(ModBlocks.BLAZE_SAPLING.get(), ModBlocks.POTTED_BLAZE_SAPLING.get(), BlockModelGenerators.PlantType.NOT_TINTED); + blockModels.createPlant(ModBlocks.SOUL_SAPLING.get(), ModBlocks.POTTED_SOUL_SAPLING.get(), BlockModelGenerators.PlantType.NOT_TINTED); // ==================== 其他方块 ==================== // 焦灰草方块 - 使用简单的方块模型 @@ -120,38 +72,40 @@ protected void registerModels(BlockModelGenerators blockModels, ItemModelGenerat ); simpleItem(itemModels, ModItems.MUDCRAB_BUCKET); simpleItem(itemModels, ModItems.MUDCRAB_SPAWN_EGG); + + // ==================== 食人鱼 ==================== + registerPiranhaModels(itemModels); } /** - * 注册木质方块模型 + * 注册一种木材的方块模型(含树叶与树苗) */ - private void registerWoodModels(BlockModelGenerators blockModels, ItemModelGenerators itemModels, - Block log, Block wood, - Block strippedLog, Block strippedWood, - Block planks, Block stairs, Block slab, - Block fence, Block fenceGate, - Block door, Block trapdoor, - Block pressurePlate, Block button) { - // 原木 - 使用 WoodProvider(自动生成物品模型) - blockModels.woodProvider(log).logWithHorizontal(log).wood(wood); + private void registerWoodModels(BlockModelGenerators blockModels, WoodFamily family) { + // 原木(自动生成物品模型) + blockModels.woodProvider(family.log().get()).logWithHorizontal(family.log().get()).wood(family.wood().get()); // 去皮原木(自动生成物品模型) - blockModels.woodProvider(strippedLog).logWithHorizontal(strippedLog).wood(strippedWood); - - // 使用 family 创建木质方块套件(包括木板,自动生成物品模型) - blockModels.family(planks) - .stairs(stairs) - .slab(slab) - .fence(fence) - .fenceGate(fenceGate) - .pressurePlate(pressurePlate) - .button(button); - - // 门(自动生成物品模型) - blockModels.createDoor(door); - - // 活板门(自动生成物品模型) - blockModels.createTrapdoor(trapdoor); + blockModels.woodProvider(family.strippedLog().get()) + .logWithHorizontal(family.strippedLog().get()) + .wood(family.strippedWood().get()); + + // 木质方块套件(包括木板,自动生成物品模型) + blockModels.family(family.planks().get()) + .stairs(family.stairs().get()) + .slab(family.slab().get()) + .fence(family.fence().get()) + .fenceGate(family.fenceGate().get()) + .pressurePlate(family.pressurePlate().get()) + .button(family.button().get()); + + // 门 / 活板门(自动生成物品模型) + blockModels.createDoor(family.door().get()); + blockModels.createTrapdoor(family.trapdoor().get()); + + // 树叶(物品图标使用常数染色),杜鹃木沿用原版,没有自成套的树叶 + if (family.hasLeaves()) { + blockModels.createTintedLeaves(family.leaves().get(), TexturedModel.LEAVES, family.leavesTint()); + } } /** @@ -171,4 +125,12 @@ private void createCrossBlock(BlockModelGenerators blockModels, Block block) { private void simpleItem(ItemModelGenerators itemModels, Supplier item){ itemModels.generateFlatItem(item.get(), ModelTemplates.FLAT_ITEM); } + + private void registerPiranhaModels(ItemModelGenerators itemModels) { + simpleItem(itemModels, ModItems.PIRANHA); + simpleItem(itemModels, ModItems.COOKED_PIRANHA); + simpleItem(itemModels, ModItems.PIRANHA_BUCKET); + simpleItem(itemModels, ModItems.PIRANHA_SPAWN_EGG); + simpleItem(itemModels, ModItems.FANG); + } } diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModRecipeProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModRecipeProvider.java index 7af14cc..d8acd8f 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModRecipeProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/ModRecipeProvider.java @@ -4,10 +4,12 @@ import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.data.recipes.ShapedRecipeBuilder; +import net.minecraft.data.recipes.SimpleCookingRecipeBuilder; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.resources.ResourceKey; import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.CookingBookCategory; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; @@ -37,6 +39,10 @@ protected ModRecipeProvider(HolderLookup.Provider registries, RecipeOutput outpu protected void buildRecipes() { // 生成所有箭矢组合配方 generateArrowRecipes(); + // 生食人鱼 -> 熟食人鱼(熔炉) + SimpleCookingRecipeBuilder.smelting(Ingredient.of(ModItems.PIRANHA.get()), RecipeCategory.FOOD, CookingBookCategory.FOOD, ModItems.COOKED_PIRANHA.get(), 0.35F, 200) + .unlockedBy("has_" + ModItems.PIRANHA.getId().getPath(), this.has(ModItems.PIRANHA.get())) + .save(this.output); // 万用蟹钳:铜锭x6 + 蟹钳x3 ShapedRecipeBuilder.shaped(this.items, RecipeCategory.TOOLS, ModItems.OMNI_CLAW.get()) .define('I', Items.COPPER_INGOT) diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/EnUsLanguageProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/EnUsLanguageProvider.java index ea00fa7..6bd22f8 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/EnUsLanguageProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/EnUsLanguageProvider.java @@ -35,6 +35,7 @@ protected void addTranslations() { addBlock(ModBlocks.BLAZE_BUTTON, "Blaze Button"); addBlock(ModBlocks.BLAZE_LEAVES, "Blaze Leaves"); addBlock(ModBlocks.BLAZE_SAPLING, "Blaze Sapling"); + addBlock(ModBlocks.POTTED_BLAZE_SAPLING, "Potted Blaze Sapling"); // 灵焰木套件 addBlock(ModBlocks.SOUL_LOG, "Soul Log"); @@ -52,6 +53,7 @@ protected void addTranslations() { addBlock(ModBlocks.SOUL_BUTTON, "Soul Button"); addBlock(ModBlocks.SOUL_LEAVES, "Soul Leaves"); addBlock(ModBlocks.SOUL_SAPLING, "Soul Sapling"); + addBlock(ModBlocks.POTTED_SOUL_SAPLING, "Potted Soul Sapling"); // 杜鹃木套件 addBlock(ModBlocks.AZALEA_LOG, "Azalea Log"); @@ -81,6 +83,22 @@ protected void addTranslations() { // 属性 add("attributes.ww_hfas.extra_item_pickup_range", "Extra Item Pickup Range"); + // Reach effect & potions + add("effect.ww_hfas.reach", "Reach"); + add("item.minecraft.potion.effect.reach", "Potion of Reach"); + add("item.minecraft.splash_potion.effect.reach", "Splash Potion of Reach"); + add("item.minecraft.lingering_potion.effect.reach", "Lingering Potion of Reach"); + add("item.minecraft.tipped_arrow.effect.reach", "Arrow of Reach"); + add("item.minecraft.potion.effect.long_reach", "Potion of Reach"); + add("item.minecraft.splash_potion.effect.long_reach", "Splash Potion of Reach"); + add("item.minecraft.lingering_potion.effect.long_reach", "Lingering Potion of Reach"); + add("item.minecraft.tipped_arrow.effect.long_reach", "Arrow of Reach"); + + // Piranha sound subtitles + add("subtitles.entity.piranha.attack", "Piranha attacks"); + add("subtitles.entity.piranha.death", "Piranha dies"); + add("subtitles.entity.piranha.flop", "Piranha flops"); + //创造模式物品栏 add("mod.wild_wind.name", "Wild Wind"); diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/ZhCnLanguageProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/ZhCnLanguageProvider.java index 85b60e7..5e529b1 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/ZhCnLanguageProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/ZhCnLanguageProvider.java @@ -36,6 +36,7 @@ protected void addTranslations() { addBlock(ModBlocks.BLAZE_BUTTON, "焚烬木按钮"); addBlock(ModBlocks.BLAZE_LEAVES, "焚烬木树叶"); addBlock(ModBlocks.BLAZE_SAPLING, "焚烬木树苗"); + addBlock(ModBlocks.POTTED_BLAZE_SAPLING, "焚烬木树苗盆栽"); // 灵焰木套件 addBlock(ModBlocks.SOUL_LOG, "灵焰木原木"); @@ -53,6 +54,7 @@ protected void addTranslations() { addBlock(ModBlocks.SOUL_BUTTON, "灵焰木按钮"); addBlock(ModBlocks.SOUL_LEAVES, "灵焰木树叶"); addBlock(ModBlocks.SOUL_SAPLING, "灵焰木树苗"); + addBlock(ModBlocks.POTTED_SOUL_SAPLING, "灵焰木树苗盆栽"); // 杜鹃木套件 addBlock(ModBlocks.AZALEA_LOG, "杜鹃木原木"); @@ -82,6 +84,22 @@ protected void addTranslations() { // 属性 add("attributes.ww_hfas.extra_item_pickup_range", "额外物品拾取距离"); + // 延展(reach)效果与药水 + add("effect.ww_hfas.reach", "延展"); + add("item.minecraft.potion.effect.reach", "延展药水"); + add("item.minecraft.splash_potion.effect.reach", "喷溅型延展药水"); + add("item.minecraft.lingering_potion.effect.reach", "滞留型延展药水"); + add("item.minecraft.tipped_arrow.effect.reach", "延展之箭"); + add("item.minecraft.potion.effect.long_reach", "延展药水"); + add("item.minecraft.splash_potion.effect.long_reach", "喷溅型延展药水"); + add("item.minecraft.lingering_potion.effect.long_reach", "滞留型延展药水"); + add("item.minecraft.tipped_arrow.effect.long_reach", "延展之箭"); + + // 食人鱼音效字幕 + add("subtitles.entity.piranha.attack", "食人鱼袭击"); + add("subtitles.entity.piranha.death", "食人鱼死亡"); + add("subtitles.entity.piranha.flop", "食人鱼拍打"); + //创造模式物品栏 add("mod.wild_wind.name", "原野之风"); diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/ZhEnCombineLangProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/ZhEnCombineLangProvider.java index 1520ede..a2b98e8 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/ZhEnCombineLangProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/lang/ZhEnCombineLangProvider.java @@ -40,6 +40,11 @@ private static void addItems() { addItem(ModItems.MUDCRAB_BUCKET, "Bucket of Mudcrab", "泥沼蟹桶"); addItem(ModItems.CRAB_CLAW, "Crab Claw", "蟹钳"); addItem(ModItems.OMNI_CLAW, "Omni Craw", "万用蟹钳"); + addItem(ModItems.PIRANHA_SPAWN_EGG, "Piranha Spawn Egg", "食人鱼刷怪蛋"); + addItem(ModItems.PIRANHA, "Raw Piranha", "生食人鱼"); + addItem(ModItems.COOKED_PIRANHA, "Cooked Piranha", "熟食人鱼"); + addItem(ModItems.FANG, "Fang", "尖牙"); + addItem(ModItems.PIRANHA_BUCKET, "Bucket of Piranha", "食人鱼桶"); } private static void addBlocks() { @@ -47,6 +52,7 @@ private static void addBlocks() { private static void addEntities() { addEntity(ModEntities.MUDCRAB, "Mudcrab", "泥沼蟹"); + addEntity(ModEntities.PIRANHA, "Piranha", "食人鱼"); } private static void addItem(Supplier s, String en, String zh){ diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/loot/BlockLoot.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/loot/BlockLoot.java index 81fc0f7..bcd37a8 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/loot/BlockLoot.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/loot/BlockLoot.java @@ -7,6 +7,8 @@ import net.minecraft.world.level.block.Block; import org.jspecify.annotations.NonNull; import org.polaris2023.wildwind.hfas.block.ModBlocks; +import org.polaris2023.wildwind.hfas.block.ModWoodFamilies; +import org.polaris2023.wildwind.hfas.block.WoodFamily; import java.util.Set; @@ -22,59 +24,14 @@ public BlockLoot(HolderLookup.Provider registries) { @Override protected void generate() { - // 焚烬木套件 - dropSelf(ModBlocks.BLAZE_LOG.get()); - dropSelf(ModBlocks.BLAZE_WOOD.get()); - dropSelf(ModBlocks.STRIPPED_BLAZE_LOG.get()); - dropSelf(ModBlocks.STRIPPED_BLAZE_WOOD.get()); - dropSelf(ModBlocks.BLAZE_PLANKS.get()); - dropSelf(ModBlocks.BLAZE_STAIRS.get()); - dropSelf(ModBlocks.BLAZE_SLAB.get()); - dropSelf(ModBlocks.BLAZE_FENCE.get()); - dropSelf(ModBlocks.BLAZE_FENCE_GATE.get()); - dropSelf(ModBlocks.BLAZE_PRESSURE_PLATE.get()); - dropSelf(ModBlocks.BLAZE_BUTTON.get()); - // 树叶 - 使用树叶掉落逻辑 - add(ModBlocks.BLAZE_LEAVES.get(), createLeavesDrops(ModBlocks.BLAZE_LEAVES.get(), ModBlocks.BLAZE_SAPLING.get(), 0.05F)); - dropSelf(ModBlocks.BLAZE_SAPLING.get()); - // 门需要特殊处理 - add(ModBlocks.BLAZE_DOOR.get(), createDoorTable(ModBlocks.BLAZE_DOOR.get())); - add(ModBlocks.BLAZE_TRAPDOOR.get(), createDoorTable(ModBlocks.BLAZE_TRAPDOOR.get())); + // 三种木材质统一按家族生成 + for (WoodFamily family : ModWoodFamilies.ALL) { + generateWood(family); + } - // 灵焰木套件 - dropSelf(ModBlocks.SOUL_LOG.get()); - dropSelf(ModBlocks.SOUL_WOOD.get()); - dropSelf(ModBlocks.STRIPPED_SOUL_LOG.get()); - dropSelf(ModBlocks.STRIPPED_SOUL_WOOD.get()); - dropSelf(ModBlocks.SOUL_PLANKS.get()); - dropSelf(ModBlocks.SOUL_STAIRS.get()); - dropSelf(ModBlocks.SOUL_SLAB.get()); - dropSelf(ModBlocks.SOUL_FENCE.get()); - dropSelf(ModBlocks.SOUL_FENCE_GATE.get()); - dropSelf(ModBlocks.SOUL_PRESSURE_PLATE.get()); - dropSelf(ModBlocks.SOUL_BUTTON.get()); - // 树叶 - 使用树叶掉落逻辑 - add(ModBlocks.SOUL_LEAVES.get(), createLeavesDrops(ModBlocks.SOUL_LEAVES.get(), ModBlocks.SOUL_SAPLING.get(), 0.05F)); - dropSelf(ModBlocks.SOUL_SAPLING.get()); - // 门需要特殊处理 - add(ModBlocks.SOUL_DOOR.get(), createDoorTable(ModBlocks.SOUL_DOOR.get())); - add(ModBlocks.SOUL_TRAPDOOR.get(), createDoorTable(ModBlocks.SOUL_TRAPDOOR.get())); - - // 杜鹃木套件 - dropSelf(ModBlocks.AZALEA_LOG.get()); - dropSelf(ModBlocks.AZALEA_WOOD.get()); - dropSelf(ModBlocks.STRIPPED_AZALEA_LOG.get()); - dropSelf(ModBlocks.STRIPPED_AZALEA_WOOD.get()); - dropSelf(ModBlocks.AZALEA_PLANKS.get()); - dropSelf(ModBlocks.AZALEA_STAIRS.get()); - dropSelf(ModBlocks.AZALEA_SLAB.get()); - dropSelf(ModBlocks.AZALEA_FENCE.get()); - dropSelf(ModBlocks.AZALEA_FENCE_GATE.get()); - dropSelf(ModBlocks.AZALEA_PRESSURE_PLATE.get()); - dropSelf(ModBlocks.AZALEA_BUTTON.get()); - // 门需要特殊处理 - add(ModBlocks.AZALEA_DOOR.get(), createDoorTable(ModBlocks.AZALEA_DOOR.get())); - add(ModBlocks.AZALEA_TRAPDOOR.get(), createDoorTable(ModBlocks.AZALEA_TRAPDOOR.get())); + // 树苗花盆:掉落花盆 + 里面的树苗(与原版一致) + dropPottedContents(ModBlocks.POTTED_BLAZE_SAPLING.get()); + dropPottedContents(ModBlocks.POTTED_SOUL_SAPLING.get()); // 其他方块 dropSelf(ModBlocks.SCORCHED_GRASS_BLOCK.get()); @@ -84,4 +41,33 @@ protected void generate() { dropSelf(ModBlocks.TINY_CACTUS.get()); dropOther(ModBlocks.FLETCHING_TABLE.get(), Items.FLETCHING_TABLE); } + + /** + * 一种木材的战利品表。 + *

+ * 只有「门」需要 {@code createDoorTable}(按 half=lower 去重掉落); + * 活板门是单方块、可挂在天花板(half=top),必须用 {@code dropSelf}, + * 否则天花板上的活板门破坏后不掉落。原版 VanillaBlockLoot 亦如此。 + */ + private void generateWood(WoodFamily family) { + dropSelf(family.log().get()); + dropSelf(family.wood().get()); + dropSelf(family.strippedLog().get()); + dropSelf(family.strippedWood().get()); + dropSelf(family.planks().get()); + dropSelf(family.stairs().get()); + dropSelf(family.slab().get()); + dropSelf(family.fence().get()); + dropSelf(family.fenceGate().get()); + dropSelf(family.pressurePlate().get()); + dropSelf(family.button().get()); + dropSelf(family.trapdoor().get()); + add(family.door().get(), createDoorTable(family.door().get())); + + if (family.hasLeaves()) { + Block leaves = family.leaves().get(); + add(leaves, createLeavesDrops(leaves, family.sapling().get(), 0.05F)); + dropSelf(family.sapling().get()); + } + } } diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModBiomeTagsProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModBiomeTagsProvider.java index 20f33fb..8aa647e 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModBiomeTagsProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModBiomeTagsProvider.java @@ -47,5 +47,8 @@ protected void addTags(HolderLookup.Provider provider) { .add(Biomes.SNOWY_TAIGA) .add(Biomes.SNOWY_BEACH) .addTag(BiomeTags.IS_END); + tag(ModBiomeTags.EntityGen.PIRANHA_SPAWNS) + .add(Biomes.JUNGLE) + .addTag(Tags.Biomes.IS_SWAMP); } } diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModBlockTagsProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModBlockTagsProvider.java index 84c03cb..0b70933 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModBlockTagsProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModBlockTagsProvider.java @@ -13,6 +13,8 @@ import net.neoforged.neoforge.common.data.BlockTagsProvider; import org.polaris2023.wildwind.hfas.HFASMod; import org.polaris2023.wildwind.hfas.block.ModBlocks; +import org.polaris2023.wildwind.hfas.block.ModWoodFamilies; +import org.polaris2023.wildwind.hfas.block.WoodFamily; import org.polaris2023.wildwind.hfas.tag.ModBlockTags; import java.util.Arrays; @@ -27,71 +29,16 @@ */ public class ModBlockTagsProvider extends BlockTagsProvider { - public static ModBlockTagsProvider INSTANCE; - public ModBlockTagsProvider(PackOutput output, CompletableFuture lookupProvider) { super(output, lookupProvider, HFASMod.MOD_ID); - INSTANCE = this; } @Override protected void addTags(HolderLookup.Provider provider) { - // ==================== 焚烬木标签 ==================== - registerWoodTags( - ModBlocks.BLAZE_LOG.get(), - ModBlocks.BLAZE_WOOD.get(), - ModBlocks.STRIPPED_BLAZE_LOG.get(), - ModBlocks.STRIPPED_BLAZE_WOOD.get(), - ModBlocks.BLAZE_PLANKS.get(), - ModBlocks.BLAZE_STAIRS.get(), - ModBlocks.BLAZE_SLAB.get(), - ModBlocks.BLAZE_FENCE.get(), - ModBlocks.BLAZE_FENCE_GATE.get(), - ModBlocks.BLAZE_DOOR.get(), - ModBlocks.BLAZE_TRAPDOOR.get(), - ModBlocks.BLAZE_PRESSURE_PLATE.get(), - ModBlocks.BLAZE_BUTTON.get(), - ModBlocks.BLAZE_LEAVES.get(), - ModBlocks.BLAZE_SAPLING.get() - ); - - // ==================== 灵焰木标签 ==================== - registerWoodTags( - ModBlocks.SOUL_LOG.get(), - ModBlocks.SOUL_WOOD.get(), - ModBlocks.STRIPPED_SOUL_LOG.get(), - ModBlocks.STRIPPED_SOUL_WOOD.get(), - ModBlocks.SOUL_PLANKS.get(), - ModBlocks.SOUL_STAIRS.get(), - ModBlocks.SOUL_SLAB.get(), - ModBlocks.SOUL_FENCE.get(), - ModBlocks.SOUL_FENCE_GATE.get(), - ModBlocks.SOUL_DOOR.get(), - ModBlocks.SOUL_TRAPDOOR.get(), - ModBlocks.SOUL_PRESSURE_PLATE.get(), - ModBlocks.SOUL_BUTTON.get(), - ModBlocks.SOUL_LEAVES.get(), - ModBlocks.SOUL_SAPLING.get() - ); - - // ==================== 杜鹃木标签 ==================== - registerWoodTags( - ModBlocks.AZALEA_LOG.get(), - ModBlocks.AZALEA_WOOD.get(), - ModBlocks.STRIPPED_AZALEA_LOG.get(), - ModBlocks.STRIPPED_AZALEA_WOOD.get(), - ModBlocks.AZALEA_PLANKS.get(), - ModBlocks.AZALEA_STAIRS.get(), - ModBlocks.AZALEA_SLAB.get(), - ModBlocks.AZALEA_FENCE.get(), - ModBlocks.AZALEA_FENCE_GATE.get(), - ModBlocks.AZALEA_DOOR.get(), - ModBlocks.AZALEA_TRAPDOOR.get(), - ModBlocks.AZALEA_PRESSURE_PLATE.get(), - ModBlocks.AZALEA_BUTTON.get(), - null, // 杜鹃木使用原版树叶 - null // 杜鹃木使用原版树苗 - ); + // ==================== 三种木材标签 ==================== + for (WoodFamily family : ModWoodFamilies.ALL) { + registerWoodTags(family); + } // ==================== 其他方块标签 ==================== // 焦灰草方块 - 泥土类 @@ -113,19 +60,30 @@ protected void addTags(HolderLookup.Provider provider) { } /** - * 注册木质方块标签 + * 注册一种木材的方块标签 */ - private void registerWoodTags( - Block log, Block wood, - Block strippedLog, Block strippedWood, - Block planks, Block stairs, Block slab, - Block fence, Block fenceGate, - Block door, Block trapdoor, - Block pressurePlate, Block button, - Block leaves, Block sapling) { + private void registerWoodTags(WoodFamily family) { + Block log = family.log().get(); + Block wood = family.wood().get(); + Block strippedLog = family.strippedLog().get(); + Block strippedWood = family.strippedWood().get(); + Block planks = family.planks().get(); + Block stairs = family.stairs().get(); + Block slab = family.slab().get(); + Block fence = family.fence().get(); + Block fenceGate = family.fenceGate().get(); + Block door = family.door().get(); + Block trapdoor = family.trapdoor().get(); + Block pressurePlate = family.pressurePlate().get(); + Block button = family.button().get(); // 原木标签 - 用于原木类方块 addToTag(BlockTags.LOGS, log, wood, strippedLog, strippedWood); + // 可燃原木(木炭配方等依赖) + addToTag(BlockItemTags.LOGS_THAT_BURN.block(), log, wood, strippedLog, strippedWood); + // 去皮原木 / 去皮木(跨模组通用) + addToTag(Tags.Blocks.STRIPPED_LOGS, strippedLog); + addToTag(Tags.Blocks.STRIPPED_WOODS, strippedWood); // 木板标签 addToTag(BlockTags.PLANKS, planks); @@ -137,25 +95,20 @@ private void registerWoodTags( addToTag(BlockTags.WOODEN_SLABS, slab); // 木质栅栏 + addToTag(BlockTags.WOODEN_FENCES, fence); addToTag(Tags.Blocks.FENCES_WOODEN, fence); - // 栅栏标签(所有栅栏) - // 已默认含有引用"#c:fences/wooden" -// addToTag(Tags.Blocks.FENCES, fence); + addToTag(BlockTags.FENCES, fence); + // 木质栅栏门 addToTag(Tags.Blocks.FENCE_GATES_WOODEN, fenceGate); - // 栅栏门标签(所有栅栏门) - // 已默认含有引用"#c:fence_gates/wooden" - // bugjump你真是个尤物物品tag不引用方块又想起来了 -// addToTag(BlockTags.FENCE_GATES) -// .add(fenceGate); + addToTag(BlockTags.FENCE_GATES, fenceGate); // 木质门 addToTag(BlockTags.WOODEN_DOORS, door); // 门标签(所有门) - // byd这又不引用了 addToTag(BlockTags.DOORS, door); // 活板门 @@ -165,40 +118,24 @@ private void registerWoodTags( addToTag(BlockTags.WOODEN_TRAPDOORS, trapdoor); // 木质压力板 - // 压力板tag已引用 addToTag(BlockTags.WOODEN_PRESSURE_PLATES, pressurePlate); // 木质按钮 addToTag(BlockTags.WOODEN_BUTTONS, button); - // 按钮标签(所有按钮) - // 已引用"#minecraft:wooden_buttons" -// addToTag(BlockTags.BUTTONS) -// .add(button); - - // 树叶 - if (leaves != null) { - addToTag(BlockTags.LEAVES, leaves); + // 树叶 / 树苗(杜鹃木沿用原版,没有自成套的树叶) + if (family.leaves() != null) { + addToTag(BlockTags.LEAVES, family.leaves().get()); } - - // 树苗 - if (sapling != null) { - /* - 由addToTag方法桥接。 - TODO_FINISHED: 该block tag key存在缺失问题,已模仿原版行为进行处理,但无法确定这种缺失是否系系统性删除,无法确保对应功能一定可以正常工作。请求测试阶段重点检查。 - ——landis, 2026/9/1 - */ - addToTag(BlockItemTags.SAPLINGS.block(), sapling); + if (family.sapling() != null) { + addToTag(BlockItemTags.SAPLINGS.block(), family.sapling().get()); } // 挖掘工具标签 addToTag(BlockTags.MINEABLE_WITH_AXE, log, wood, strippedLog, strippedWood, planks, stairs, slab, fence, fenceGate, door, trapdoor, pressurePlate, button); - // 站立信号(原木可以站立) + // 自然原木(用于世界生成相关判断) addToTag(BlockTags.OVERWORLD_NATURAL_LOGS, log); - - // 需要工具 - addToTag(BlockTags.NEEDS_STONE_TOOL, log, wood, strippedLog, strippedWood, planks, stairs, slab, fence, fenceGate, door, trapdoor, pressurePlate, button); } @SuppressWarnings("all") diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModEntityTypeTagsProvider.java b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModEntityTypeTagsProvider.java index bc8ed4f..74ee2d1 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModEntityTypeTagsProvider.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/datagen/provider/tag/ModEntityTypeTagsProvider.java @@ -27,10 +27,15 @@ public ModEntityTypeTagsProvider(PackOutput output, CompletableFuture { +public class ModItemTagsProvider extends ItemTagsProvider { public ModItemTagsProvider(PackOutput output, CompletableFuture lookupProvider) { -// super(output, Registries.ITEM, lookupProvider, item -> item.builtInRegistryHolder().key(), HFASMod.MOD_ID); - super(output, Registries.ITEM, lookupProvider, HFASMod.MOD_ID); + super(output, lookupProvider, HFASMod.MOD_ID); } @Override protected void addTags(HolderLookup.Provider provider) { - // ==================== 焚烬木物品标签 ==================== - registerWoodItemTags( - ModBlocks.BLAZE_LOG.get(), - ModBlocks.BLAZE_WOOD.get(), - ModBlocks.STRIPPED_BLAZE_LOG.get(), - ModBlocks.STRIPPED_BLAZE_WOOD.get(), - ModBlocks.BLAZE_PLANKS.get(), - ModBlocks.BLAZE_STAIRS.get(), - ModBlocks.BLAZE_SLAB.get(), - ModBlocks.BLAZE_FENCE.get(), - ModBlocks.BLAZE_FENCE_GATE.get(), - ModBlocks.BLAZE_DOOR.get(), - ModBlocks.BLAZE_TRAPDOOR.get(), - ModBlocks.BLAZE_PRESSURE_PLATE.get(), - ModBlocks.BLAZE_BUTTON.get(), - ModBlocks.BLAZE_LEAVES.get(), - ModBlocks.BLAZE_SAPLING.get() - ); - - // ==================== 灵焰木物品标签 ==================== - registerWoodItemTags( - ModBlocks.SOUL_LOG.get(), - ModBlocks.SOUL_WOOD.get(), - ModBlocks.STRIPPED_SOUL_LOG.get(), - ModBlocks.STRIPPED_SOUL_WOOD.get(), - ModBlocks.SOUL_PLANKS.get(), - ModBlocks.SOUL_STAIRS.get(), - ModBlocks.SOUL_SLAB.get(), - ModBlocks.SOUL_FENCE.get(), - ModBlocks.SOUL_FENCE_GATE.get(), - ModBlocks.SOUL_DOOR.get(), - ModBlocks.SOUL_TRAPDOOR.get(), - ModBlocks.SOUL_PRESSURE_PLATE.get(), - ModBlocks.SOUL_BUTTON.get(), - ModBlocks.SOUL_LEAVES.get(), - ModBlocks.SOUL_SAPLING.get() - ); - - // ==================== 杜鹃木物品标签 ==================== - registerWoodItemTags( - ModBlocks.AZALEA_LOG.get(), - ModBlocks.AZALEA_WOOD.get(), - ModBlocks.STRIPPED_AZALEA_LOG.get(), - ModBlocks.STRIPPED_AZALEA_WOOD.get(), - ModBlocks.AZALEA_PLANKS.get(), - ModBlocks.AZALEA_STAIRS.get(), - ModBlocks.AZALEA_SLAB.get(), - ModBlocks.AZALEA_FENCE.get(), - ModBlocks.AZALEA_FENCE_GATE.get(), - ModBlocks.AZALEA_DOOR.get(), - ModBlocks.AZALEA_TRAPDOOR.get(), - ModBlocks.AZALEA_PRESSURE_PLATE.get(), - ModBlocks.AZALEA_BUTTON.get(), - null, // 杜鹃木使用原版树叶 - null // 杜鹃木使用原版树苗 - ); + // ==================== 三种木材物品标签 ==================== + for (WoodFamily family : ModWoodFamilies.ALL) { + registerWoodLogItemTag(family); + registerWoodItemTags(family); + } tag(Tags.Items.ANIMAL_FOODS) .addTag(ModItemTags.MUDCRAB_FOOD); addToTag(ModItemTags.MUDCRAB_FOOD, Items.SPIDER_EYE); + + // ==================== 食人鱼相关物品标签 ==================== + // 猫、豹猫以生食人鱼为食 + addToTag(ItemTags.CAT_FOOD, ModItems.PIRANHA.get()); + addToTag(ItemTags.OCELOT_FOOD, ModItems.PIRANHA.get()); + // 狼以生/熟食人鱼为食 + addToTag(ItemTags.WOLF_FOOD, ModItems.PIRANHA.get(), ModItems.COOKED_PIRANHA.get()); + // 原版鱼类标签 + addToTag(ItemTags.FISHES, ModItems.PIRANHA.get(), ModItems.COOKED_PIRANHA.get()); + // 熟鱼食物标签 + addToTag(Tags.Items.FOODS_COOKED_FISH, ModItems.COOKED_PIRANHA.get()); } /** - * 注册木质物品标签 + * 注册一种木材的物品标签 */ - private void registerWoodItemTags( - Block log, Block wood, - Block strippedLog, Block strippedWood, - Block planks, Block stairs, Block slab, - Block fence, Block fenceGate, - Block door, Block trapdoor, - Block pressurePlate, Block button, - Block leaves, Block sapling) { + private void registerWoodItemTags(WoodFamily family) { + Block log = family.log().get(); + Block wood = family.wood().get(); + Block strippedLog = family.strippedLog().get(); + Block strippedWood = family.strippedWood().get(); + Block planks = family.planks().get(); + Block stairs = family.stairs().get(); + Block slab = family.slab().get(); + Block fence = family.fence().get(); + Block fenceGate = family.fenceGate().get(); + Block door = family.door().get(); + Block trapdoor = family.trapdoor().get(); + Block pressurePlate = family.pressurePlate().get(); + Block button = family.button().get(); + Block leaves = family.leaves() == null ? null : family.leaves().get(); + Block sapling = family.sapling() == null ? null : family.sapling().get(); // 原木物品标签 addToTag(ItemTags.LOGS, log, wood, strippedLog, strippedWood); + addToTag(ItemTags.LOGS_THAT_BURN, log, wood, strippedLog, strippedWood); + addToTag(Tags.Items.STRIPPED_LOGS, strippedLog); + addToTag(Tags.Items.STRIPPED_WOODS, strippedWood); // tag(ItemTags.LOGS) // .add(log.asItem()) // .add(wood.asItem()) @@ -134,6 +109,7 @@ private void registerWoodItemTags( addToTag(ItemTags.WOODEN_SLABS, slab); // 木质栅栏物品标签 + addToTag(ItemTags.WOODEN_FENCES, fence); addToTag(Tags.Items.FENCES_WOODEN, fence); // 栅栏物品标签 @@ -185,6 +161,16 @@ private void registerWoodItemTags( } } + private void registerWoodLogItemTag(WoodFamily family) { + TagKey logsTag = TagKey.create( + Registries.ITEM, + Identifier.fromNamespaceAndPath(HFASMod.MOD_ID, family.name() + "_logs") + ); + addToTag(logsTag, + family.log().get(), family.wood().get(), + family.strippedLog().get(), family.strippedWood().get()); + } + @SuppressWarnings("all") public void addToTag(TagKey tag, Block... items){ if(items.length == 0) return; diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/effect/WildWindMobEffect.java b/src/hfas/java/org/polaris2023/wildwind/hfas/effect/WildWindMobEffect.java new file mode 100644 index 0000000..0b45d30 --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/effect/WildWindMobEffect.java @@ -0,0 +1,31 @@ +package org.polaris2023.wildwind.hfas.effect; + +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectCategory; + +/** + * 用于拓宽 {@link MobEffect} 构造方法的访问权限 + */ +public class WildWindMobEffect extends MobEffect { + /** + * 创建一个基础生物效果喵~ + * + * @param category 效果分类喵~ + * @param color 效果颜色喵~ + */ + public WildWindMobEffect(MobEffectCategory category, int color) { + super(category, color); + } + + /** + * 创建一个带粒子效果的生物效果喵~ + * + * @param category 效果分类喵~ + * @param color 效果颜色喵~ + * @param particle 粒子效果喵~ + */ + public WildWindMobEffect(MobEffectCategory category, int color, ParticleOptions particle) { + super(category, color, particle); + } +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/entity/ai/goal/AlertOthersNearestAttackableTargetGoal.java b/src/hfas/java/org/polaris2023/wildwind/hfas/entity/ai/goal/AlertOthersNearestAttackableTargetGoal.java new file mode 100644 index 0000000..9559a74 --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/entity/ai/goal/AlertOthersNearestAttackableTargetGoal.java @@ -0,0 +1,91 @@ +package org.polaris2023.wildwind.hfas.entity.ai.goal; + +import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +import net.minecraft.world.entity.EntitySelector; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.TamableAnimal; +import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; +import net.minecraft.world.entity.ai.targeting.TargetingConditions; +import net.minecraft.world.phys.AABB; + +import javax.annotation.Nullable; +import java.util.Set; + +/** + * 警告最近可攻击对象的目标 + * @param 实体类型 + * @author huimanman + */ +public class AlertOthersNearestAttackableTargetGoal extends NearestAttackableTargetGoal { + @Nullable + private Set> toIgnoreAlert; + private double overrideFindEntityFollowDistance = -1.0; + + public AlertOthersNearestAttackableTargetGoal(Mob mob, Class targetType, boolean mustSee) { + super(mob, targetType, mustSee); + } + + public AlertOthersNearestAttackableTargetGoal(Mob mob, Class targetType, boolean mustSee, TargetingConditions.Selector targetPredicate) { + super(mob, targetType, mustSee, targetPredicate); + } + + public AlertOthersNearestAttackableTargetGoal(Mob mob, Class targetType, boolean mustSee, boolean mustReach) { + super(mob, targetType, mustSee, mustReach); + } + + public AlertOthersNearestAttackableTargetGoal(Mob mob, Class targetType, int randomInterval, boolean mustSee, boolean mustReach, @Nullable TargetingConditions.Selector targetPredicate) { + super(mob, targetType, randomInterval, mustSee, mustReach, targetPredicate); + } + + /** + * 覆写跟随距离 + * @param followDistance 跟随距离 + * @return 当前目标,用于链式修改 + */ + public AlertOthersNearestAttackableTargetGoal overrideFindEntityFollowDistance(double followDistance) { + this.overrideFindEntityFollowDistance = followDistance; + return this; + } + + @Override + public void start() { + super.start(); + if (this.target != null) this.alertOthers(); + } + + public AlertOthersNearestAttackableTargetGoal ignoreAlertOthers(Class... reinforcementTypes) { + this.toIgnoreAlert = new ObjectOpenHashSet<>(reinforcementTypes); + return this; + } + + protected void alertOthers() { + double followDistance = super.getFollowDistance(); + AABB alertBox = AABB.unitCubeFromLowerCorner(this.mob.position()).inflate(followDistance, 10.0, followDistance); + for (Mob mob : this.mob.level().getEntitiesOfClass(this.mob.getClass(), alertBox, EntitySelector.NO_SPECTATORS)) { + if (this.mob != mob && this.shouldAlert(mob)) { + if (this.toIgnoreAlert != null && this.toIgnoreAlert.contains(mob.getClass())) continue; + } + + this.alertOther(mob, this.target); + } + } + + protected boolean shouldAlert(Mob other) { + LivingEntity target = mob.getTarget(); + return target != null + && (!(this.mob instanceof TamableAnimal selfMob) || (selfMob.getOwner() == ((TamableAnimal) other).getOwner()) + && !this.mob.isAlliedTo(target)); + } + + protected void alertOther(Mob mob, @Nullable LivingEntity target) { + mob.setTarget(target); + } + + @Override + protected double getFollowDistance() { + return this.overrideFindEntityFollowDistance != -1.0 + ? this.overrideFindEntityFollowDistance + : super.getFollowDistance(); + } +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/entity/animal/Piranha.java b/src/hfas/java/org/polaris2023/wildwind/hfas/entity/animal/Piranha.java new file mode 100644 index 0000000..1b2d7c2 --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/entity/animal/Piranha.java @@ -0,0 +1,154 @@ +package org.polaris2023.wildwind.hfas.entity.animal; + +import com.geckolib.animatable.GeoEntity; +import com.geckolib.animatable.instance.AnimatableInstanceCache; +import com.geckolib.animatable.manager.AnimatableManager; +import com.geckolib.animation.AnimationController; +import com.geckolib.animation.object.PlayState; +import com.geckolib.animation.state.AnimationTest; +import com.geckolib.constant.DefaultAnimations; +import com.geckolib.util.GeckoLibUtil; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.ai.attributes.AttributeSupplier; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; +import net.minecraft.world.entity.animal.fish.AbstractFish; +import net.minecraft.world.entity.animal.fish.AbstractSchoolingFish; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.Level; +import org.polaris2023.wildwind.hfas.entity.WindupAttackMob; +import org.polaris2023.wildwind.hfas.entity.ai.goal.AlertOthersNearestAttackableTargetGoal; +import org.polaris2023.wildwind.hfas.entity.ai.goal.ChargingMeleeAttackGoal; +import org.polaris2023.wildwind.hfas.registry.ModItems; +import org.polaris2023.wildwind.hfas.registry.ModSoundEvents; + +import javax.annotation.Nullable; + +public class Piranha extends AbstractSchoolingFish implements WindupAttackMob, GeoEntity { + private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this); + private int preparingToAttack; + + public Piranha(EntityType entityType, Level level) { + super(entityType, level); + } + + public static AttributeSupplier.Builder createAttributes() { + return AbstractFish.createAttributes() + .add(Attributes.MOVEMENT_SPEED, 0.95) + .add(Attributes.FOLLOW_RANGE, 35.0) + .add(Attributes.MAX_HEALTH, 6.0) + .add(Attributes.ATTACK_DAMAGE, 3.0); + } + + @Override + protected void registerGoals() { + this.goalSelector.addGoal(1, new PiranhaAttackGoal(this, 2.0f, false)); + super.registerGoals(); + this.targetSelector.addGoal(0, new HurtByTargetGoal(this).setAlertOthers()); + this.targetSelector.addGoal(1, new AlertOthersNearestAttackableTargetGoal<>(this, Mob.class, true, + (entity, level) -> !(entity instanceof Piranha) && (entity.getHealth() <= entity.getMaxHealth() * 0.25)) + .overrideFindEntityFollowDistance(15.0) + ); + this.targetSelector.addGoal(1, new AlertOthersNearestAttackableTargetGoal<>(this, Player.class, true, + (entity, level) -> entity.getHealth() <= entity.getMaxHealth() * 0.25) + .overrideFindEntityFollowDistance(15.0) + ); + } + + @Override + public int getMaxSchoolSize() { + return 5; + } + + @Override + protected SoundEvent getFlopSound() { + return ModSoundEvents.PIRANHA_FLOP.get(); + } + + @Override + protected @Nullable SoundEvent getDeathSound() { + return ModSoundEvents.PIRANHA_DEATH.get(); + } + + protected SoundEvent getAttackSound() { + return ModSoundEvents.PIRANHA_ATTACK.get(); + } + + @Override + public ItemStack getBucketItemStack() { + return new ItemStack((ItemLike) ModItems.PIRANHA_BUCKET); + } + + @Override + public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { + controllers.add(new AnimationController<>("Move", 3, this::moveAnimController)); + controllers.add(new AnimationController<>("Attack", state -> PlayState.STOP) + .triggerableAnim("attack", DefaultAnimations.ATTACK_SWING) + ); + } + + protected PlayState moveAnimController(final AnimationTest state) { + return state.setAndContinue(this.isInWater() ? DefaultAnimations.SWIM : DefaultAnimations.IDLE); + } + + @Override + public AnimatableInstanceCache getAnimatableInstanceCache() { + return this.geoCache; + } + + @Override + public void setPreparingToAttackTick(int tick) { + this.preparingToAttack = tick; + } + + @Override + public int getPreparingToAttackTick() { + return this.preparingToAttack; + } + + @Override + public int getPreparationToAttackDuration() { + return 6; + } + + @Override + public boolean prepareAttack(LivingEntity entity) { + boolean result = WindupAttackMob.super.prepareAttack(entity); + if (result) { + this.triggerAnim("Attack", "attack"); + this.makeSound(this.getAttackSound()); + } + return result; + } + + @Override + public boolean canContinuePreparingAttack() { + return this.isInWater(); + } + + @Override + public void aiStep() { + super.aiStep(); + if (!this.level().isClientSide() && this.isAlive()) { + processPreparingAttack((ServerLevel) this.level(), this); + } + } + + protected static class PiranhaAttackGoal extends ChargingMeleeAttackGoal { + public PiranhaAttackGoal(Piranha mob, double speedModifier, boolean followingTargetEvenIfNotSeen) { + super(mob, speedModifier, followingTargetEvenIfNotSeen); + } + + @Override + public boolean canUse() { + return this.mob.isInWater() && super.canUse(); + } + } +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/event/EntitiesHandler.java b/src/hfas/java/org/polaris2023/wildwind/hfas/event/EntitiesHandler.java index 7d1db27..851bfd9 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/event/EntitiesHandler.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/event/EntitiesHandler.java @@ -1,17 +1,21 @@ package org.polaris2023.wildwind.hfas.event; import net.minecraft.world.level.levelgen.Heightmap; +import net.minecraft.world.entity.SpawnPlacementTypes; +import net.minecraft.world.entity.animal.fish.WaterAnimal; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.neoforge.event.entity.EntityAttributeCreationEvent; import net.neoforged.neoforge.event.entity.RegisterSpawnPlacementsEvent; import org.polaris2023.wildwind.hfas.entity.animal.Mudcrab; +import org.polaris2023.wildwind.hfas.entity.animal.Piranha; import org.polaris2023.wildwind.hfas.registry.ModEntities; @EventBusSubscriber public class EntitiesHandler { @SubscribeEvent static void onAttributeCreate(EntityAttributeCreationEvent event) { + event.put(ModEntities.PIRANHA.get(), Piranha.createAttributes().build()); event.put(ModEntities.MUDCRAB.get(), Mudcrab.createAttributes().build()); } @@ -19,5 +23,6 @@ static void onAttributeCreate(EntityAttributeCreationEvent event) { static void registerSpawnPlacements(RegisterSpawnPlacementsEvent event) { event.register(ModEntities.MUDCRAB.get(), Mudcrab.SPAWN_PLACEMENT, Heightmap.Types.OCEAN_FLOOR, Mudcrab::checkMudcrabInWaterGroundSpawnRules, RegisterSpawnPlacementsEvent.Operation.REPLACE); event.register(ModEntities.MUDCRAB.get(), Mudcrab::checkMudcrabOnGroundSpawnRules); + event.register(ModEntities.PIRANHA.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, WaterAnimal::checkSurfaceWaterAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.REPLACE); } } diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/event/FuelHandler.java b/src/hfas/java/org/polaris2023/wildwind/hfas/event/FuelHandler.java deleted file mode 100644 index d72eacb..0000000 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/event/FuelHandler.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.polaris2023.wildwind.hfas.event; - -import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; -import net.neoforged.bus.api.SubscribeEvent; -import net.neoforged.fml.common.EventBusSubscriber; -import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent; -import net.neoforged.neoforge.event.furnace.FurnaceFuelBurnTimeEvent; -import org.polaris2023.wildwind.hfas.HFASMod; -import org.polaris2023.wildwind.hfas.block.ModBlocks; - -/** - * 燃料事件处理器 - * 为木质方块添加燃料功能 - * - * @author baka4n - * @since 2026/04/15 - */ -@EventBusSubscriber(modid = HFASMod.MOD_ID) -public class FuelHandler { - - /** - * 燃料燃烧时间事件 - * 木质方块可作为燃料,燃烧300 tick(与原版木板相同) - */ - @SubscribeEvent - public static void onFuelBurnTime(FurnaceFuelBurnTimeEvent event) { - Item item = event.getItemStack().getItem(); - - // 检查是否是木质方块物品 - int burnTime = getWoodBurnTime(item); - if (burnTime > 0) { - event.setBurnTime(burnTime); - } - } - - /** - * 获取木质方块的燃烧时间 - */ - private static int getWoodBurnTime(Item item) { - // 焚烬木 - 300 tick(15秒) - if (isBlazeWoodItem(item)) return 300; - // 灵焰木 - 300 tick - if (isSoulWoodItem(item)) return 300; - // 杜鹃木 - 300 tick - if (isAzaleaWoodItem(item)) return 300; - - return 0; - } - - private static boolean isBlazeWoodItem(Item item) { - return item == ModBlocks.BLAZE_LOG.get().asItem() - || item == ModBlocks.BLAZE_WOOD.get().asItem() - || item == ModBlocks.STRIPPED_BLAZE_LOG.get().asItem() - || item == ModBlocks.STRIPPED_BLAZE_WOOD.get().asItem() - || item == ModBlocks.BLAZE_PLANKS.get().asItem() - || item == ModBlocks.BLAZE_SLAB.get().asItem() - || item == ModBlocks.BLAZE_FENCE.get().asItem() - || item == ModBlocks.BLAZE_FENCE_GATE.get().asItem(); - } - - private static boolean isSoulWoodItem(Item item) { - return item == ModBlocks.SOUL_LOG.get().asItem() - || item == ModBlocks.SOUL_WOOD.get().asItem() - || item == ModBlocks.STRIPPED_SOUL_LOG.get().asItem() - || item == ModBlocks.STRIPPED_SOUL_WOOD.get().asItem() - || item == ModBlocks.SOUL_PLANKS.get().asItem() - || item == ModBlocks.SOUL_SLAB.get().asItem() - || item == ModBlocks.SOUL_FENCE.get().asItem() - || item == ModBlocks.SOUL_FENCE_GATE.get().asItem(); - } - - private static boolean isAzaleaWoodItem(Item item) { - return item == ModBlocks.AZALEA_LOG.get().asItem() - || item == ModBlocks.AZALEA_WOOD.get().asItem() - || item == ModBlocks.STRIPPED_AZALEA_LOG.get().asItem() - || item == ModBlocks.STRIPPED_AZALEA_WOOD.get().asItem() - || item == ModBlocks.AZALEA_PLANKS.get().asItem() - || item == ModBlocks.AZALEA_SLAB.get().asItem() - || item == ModBlocks.AZALEA_FENCE.get().asItem() - || item == ModBlocks.AZALEA_FENCE_GATE.get().asItem(); - } -} diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/groups/ModCreativeTabs.java b/src/hfas/java/org/polaris2023/wildwind/hfas/groups/ModCreativeTabs.java index ac957bb..0ce2c1f 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/groups/ModCreativeTabs.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/groups/ModCreativeTabs.java @@ -4,12 +4,16 @@ import net.minecraft.world.item.CreativeModeTabs; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent; +import net.neoforged.neoforge.registries.DeferredBlock; import org.polaris2023.wildwind.hfas.HFASMod; import org.polaris2023.wildwind.hfas.block.ModBlocks; +import org.polaris2023.wildwind.hfas.block.ModWoodFamilies; +import org.polaris2023.wildwind.hfas.block.WoodFamily; /** * 创造模式物品栏配置 @@ -27,85 +31,10 @@ public static void buildCreativeTabContents(BuildCreativeModeTabContentsEvent ev // 建筑方块物品栏 if (event.getTabKey() == CreativeModeTabs.BUILDING_BLOCKS) { - // 杜鹃系列 - { - ItemStack logStack = ModBlocks.AZALEA_LOG.toStack(); - event.insertAfter(new ItemStack(Blocks.CHERRY_BUTTON), logStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack woodStack = ModBlocks.AZALEA_WOOD.toStack(); - event.insertAfter(logStack, woodStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack strippedLogStack = ModBlocks.STRIPPED_AZALEA_LOG.toStack(); - event.insertAfter(woodStack, strippedLogStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack strippedWoodStack = ModBlocks.STRIPPED_AZALEA_WOOD.toStack(); - event.insertAfter(strippedLogStack, strippedWoodStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack planksStack = ModBlocks.AZALEA_PLANKS.toStack(); - event.insertAfter(strippedWoodStack, planksStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack stairsStack = ModBlocks.AZALEA_STAIRS.toStack(); - event.insertAfter(planksStack, stairsStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack slabStack = ModBlocks.AZALEA_SLAB.toStack(); - event.insertAfter(stairsStack, slabStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack fenceStack = ModBlocks.AZALEA_FENCE.toStack(); - event.insertAfter(slabStack, fenceStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack fenceGateStack = ModBlocks.AZALEA_FENCE_GATE.toStack(); - event.insertAfter(fenceStack, fenceGateStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack doorStack = ModBlocks.AZALEA_DOOR.toStack(); - event.insertAfter(fenceGateStack, doorStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack trapdoorStack = ModBlocks.AZALEA_TRAPDOOR.toStack(); - event.insertAfter(doorStack, trapdoorStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - event.insertAfter(trapdoorStack, ModBlocks.AZALEA_PRESSURE_PLATE.toStack(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - } - // 焚烬系列 - { - ItemStack logStack = ModBlocks.BLAZE_LOG.toStack(); - event.insertAfter(new ItemStack(Blocks.BAMBOO_BUTTON), logStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack woodStack = ModBlocks.BLAZE_WOOD.toStack(); - event.insertAfter(logStack, woodStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack strippedLogStack = ModBlocks.STRIPPED_BLAZE_LOG.toStack(); - event.insertAfter(woodStack, strippedLogStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack strippedWoodStack = ModBlocks.STRIPPED_BLAZE_WOOD.toStack(); - event.insertAfter(strippedLogStack, strippedWoodStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack planksStack = ModBlocks.BLAZE_PLANKS.toStack(); - event.insertAfter(strippedWoodStack, planksStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack stairsStack = ModBlocks.BLAZE_STAIRS.toStack(); - event.insertAfter(planksStack, stairsStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack slabStack = ModBlocks.BLAZE_SLAB.toStack(); - event.insertAfter(stairsStack, slabStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack fenceStack = ModBlocks.BLAZE_FENCE.toStack(); - event.insertAfter(slabStack, fenceStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack fenceGateStack = ModBlocks.BLAZE_FENCE_GATE.toStack(); - event.insertAfter(fenceStack, fenceGateStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack doorStack = ModBlocks.BLAZE_DOOR.toStack(); - event.insertAfter(fenceGateStack, doorStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack trapdoorStack = ModBlocks.BLAZE_TRAPDOOR.toStack(); - event.insertAfter(doorStack, trapdoorStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - event.insertAfter(trapdoorStack, ModBlocks.BLAZE_PRESSURE_PLATE.toStack(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - } - // 灵焰系列 - { - ItemStack logStack = ModBlocks.SOUL_LOG.toStack(); - event.insertAfter(ModBlocks.BLAZE_PRESSURE_PLATE.toStack(), logStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack woodStack = ModBlocks.SOUL_WOOD.toStack(); - event.insertAfter(logStack, woodStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack strippedLogStack = ModBlocks.STRIPPED_SOUL_LOG.toStack(); - event.insertAfter(woodStack, strippedLogStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack strippedWoodStack = ModBlocks.STRIPPED_SOUL_WOOD.toStack(); - event.insertAfter(strippedLogStack, strippedWoodStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack planksStack = ModBlocks.SOUL_PLANKS.toStack(); - event.insertAfter(strippedWoodStack, planksStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack stairsStack = ModBlocks.SOUL_STAIRS.toStack(); - event.insertAfter(planksStack, stairsStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack slabStack = ModBlocks.SOUL_SLAB.toStack(); - event.insertAfter(stairsStack, slabStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack fenceStack = ModBlocks.SOUL_FENCE.toStack(); - event.insertAfter(slabStack, fenceStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack fenceGateStack = ModBlocks.SOUL_FENCE_GATE.toStack(); - event.insertAfter(fenceStack, fenceGateStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack doorStack = ModBlocks.SOUL_DOOR.toStack(); - event.insertAfter(fenceGateStack, doorStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - ItemStack trapdoorStack = ModBlocks.SOUL_TRAPDOOR.toStack(); - event.insertAfter(doorStack, trapdoorStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - event.insertAfter(trapdoorStack, ModBlocks.SOUL_PRESSURE_PLATE.toStack(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); - } - + // 三种木材:按家族顺序插入(以原版/本模组方块作锚点) + appendWoodSet(event, new ItemStack(Blocks.CHERRY_BUTTON), ModWoodFamilies.AZALEA); + appendWoodSet(event, new ItemStack(Blocks.BAMBOO_BUTTON), ModWoodFamilies.BLAZE); + appendWoodSet(event, ModBlocks.BLAZE_BUTTON.toStack(), ModWoodFamilies.SOUL); // 焦灰草方块 // event.accept(ModBlocks.SCORCHED_GRASS_BLOCK.get()); @@ -120,6 +49,10 @@ public static void buildCreativeTabContents(BuildCreativeModeTabContentsEvent ev ItemStack blazeLogStack = ModBlocks.BLAZE_LOG.toStack(); event.insertAfter(azaleaLogStack, blazeLogStack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); event.insertAfter(blazeLogStack, ModBlocks.SOUL_LOG.toStack(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); + event.insertAfter(ModBlocks.SOUL_LOG.toStack(), ModBlocks.BLAZE_LEAVES.toStack(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); + event.insertAfter(ModBlocks.BLAZE_LEAVES.toStack(), ModBlocks.SOUL_LEAVES.toStack(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); + event.insertAfter(ModBlocks.SOUL_LEAVES.toStack(), ModBlocks.BLAZE_SAPLING.toStack(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); + event.insertAfter(ModBlocks.BLAZE_SAPLING.toStack(), ModBlocks.SOUL_SAPLING.toStack(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS); // 焦灰草丛 // event.accept(ModBlocks.SCORCHED_GRASS.get()); // // 焦灰枝条 @@ -133,4 +66,23 @@ public static void buildCreativeTabContents(BuildCreativeModeTabContentsEvent ev } } + + /** 物品栏可见性:主标签页 + 搜索页 */ + private static final CreativeModeTab.TabVisibility VISIBILITY = CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS; + + /** + * 将一个木材家族的建筑套件按顺序插到 {@code anchor} 之后。 + *

+ * 每插一个就把新 stack 当作下一个锚点,这样整段在标签页里保持连续。 + * + * @param anchor 该家族第一个方块的前一个位置(须已存在于标签页中,否则 {@code insertAfter} 会抛异常) + */ + private static void appendWoodSet(BuildCreativeModeTabContentsEvent event, ItemStack anchor, WoodFamily family) { + ItemStack previous = anchor; + for (DeferredBlock block : family.buildingBlocks()) { + ItemStack stack = block.toStack(); + event.insertAfter(previous, stack, VISIBILITY); + previous = stack; + } + } } diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/item/ModFoods.java b/src/hfas/java/org/polaris2023/wildwind/hfas/item/ModFoods.java new file mode 100644 index 0000000..ac63de6 --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/item/ModFoods.java @@ -0,0 +1,31 @@ +package org.polaris2023.wildwind.hfas.item; + +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.food.FoodProperties; +import net.minecraft.world.item.component.Consumable; +import net.minecraft.world.item.consume_effects.ApplyStatusEffectsConsumeEffect; + +public class ModFoods { + public static final FoodProperties PIRANHA = new FoodProperties.Builder() + .nutrition(2) + .saturationModifier(0.1F) + .build(); + + public static final Consumable PIRANHA_CONSUMABLE = Consumable.builder() + .onConsume(new ApplyStatusEffectsConsumeEffect(new MobEffectInstance(MobEffects.HUNGER, 600), 0.8f)) + .onConsume(new ApplyStatusEffectsConsumeEffect(new MobEffectInstance(MobEffects.UNLUCK, 600), 0.5f)) + .build(); + + public static final FoodProperties COOKED_PIRANHA = new FoodProperties.Builder() + .nutrition(6) + .saturationModifier(0.8F) + .build(); + + public static final Consumable COOKED_PIRANHA_CONSUMABLE = Consumable.builder() + .onConsume(new ApplyStatusEffectsConsumeEffect(new MobEffectInstance(MobEffects.UNLUCK, 300), 0.3f)) + .build(); + + private ModFoods() { + } +} diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModCreativeTabs.java b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModCreativeTabs.java index a89ef9d..fbaeac5 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModCreativeTabs.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModCreativeTabs.java @@ -4,9 +4,11 @@ import net.minecraft.network.chat.Component; import net.minecraft.world.item.CreativeModeTab; import net.neoforged.bus.api.IEventBus; +import net.neoforged.neoforge.registries.DeferredBlock; import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredRegister; import org.polaris2023.wildwind.hfas.HFASMod; +import org.polaris2023.wildwind.hfas.block.ModBlocks; public class ModCreativeTabs { public static final DeferredRegister CREATIVE_TABS = @@ -17,8 +19,7 @@ public class ModCreativeTabs { public static final DeferredHolder WILD_WIND = CREATIVE_TABS.register("wild_wind", () -> CreativeModeTab.builder() .title(Component.translatable("mod.wild_wind.name")) -// .icon(() -> ModItems.CINDER.log().get().getDefaultInstance()) TODO 换成对应的物品 - .icon(() -> ModItems.MUDCRAB_BUCKET.get().getDefaultInstance()) + .icon(() -> ModBlocks.BLAZE_LOG.toStack()) .displayItems((params, output) -> addStacks(output)) .build() ); @@ -33,9 +34,48 @@ public static void register(IEventBus modBus) { } private static void addStacks(CreativeModeTab.Output output){ + // 三种木材的建筑套装(顺序与旧仓库一致) + addWoodBuildingSet(output, + ModBlocks.AZALEA_LOG, ModBlocks.AZALEA_WOOD, + ModBlocks.STRIPPED_AZALEA_LOG, ModBlocks.STRIPPED_AZALEA_WOOD, + ModBlocks.AZALEA_PLANKS, ModBlocks.AZALEA_STAIRS, ModBlocks.AZALEA_SLAB, + ModBlocks.AZALEA_FENCE, ModBlocks.AZALEA_FENCE_GATE, ModBlocks.AZALEA_DOOR, + ModBlocks.AZALEA_TRAPDOOR, ModBlocks.AZALEA_PRESSURE_PLATE, ModBlocks.AZALEA_BUTTON); + + addWoodBuildingSet(output, + ModBlocks.BLAZE_LOG, ModBlocks.BLAZE_WOOD, + ModBlocks.STRIPPED_BLAZE_LOG, ModBlocks.STRIPPED_BLAZE_WOOD, + ModBlocks.BLAZE_PLANKS, ModBlocks.BLAZE_STAIRS, ModBlocks.BLAZE_SLAB, + ModBlocks.BLAZE_FENCE, ModBlocks.BLAZE_FENCE_GATE, ModBlocks.BLAZE_DOOR, + ModBlocks.BLAZE_TRAPDOOR, ModBlocks.BLAZE_PRESSURE_PLATE, ModBlocks.BLAZE_BUTTON); + + addWoodBuildingSet(output, + ModBlocks.SOUL_LOG, ModBlocks.SOUL_WOOD, + ModBlocks.STRIPPED_SOUL_LOG, ModBlocks.STRIPPED_SOUL_WOOD, + ModBlocks.SOUL_PLANKS, ModBlocks.SOUL_STAIRS, ModBlocks.SOUL_SLAB, + ModBlocks.SOUL_FENCE, ModBlocks.SOUL_FENCE_GATE, ModBlocks.SOUL_DOOR, + ModBlocks.SOUL_TRAPDOOR, ModBlocks.SOUL_PRESSURE_PLATE, ModBlocks.SOUL_BUTTON); + + // 焚烬木/灵焰木的树叶与树苗(杜鹃木无对应物品) + output.accept(ModBlocks.BLAZE_LEAVES.get()); + output.accept(ModBlocks.SOUL_LEAVES.get()); + output.accept(ModBlocks.BLAZE_SAPLING.get()); + output.accept(ModBlocks.SOUL_SAPLING.get()); + output.accept(ModItems.MUDCRAB_BUCKET); output.accept(ModItems.MUDCRAB_SPAWN_EGG); output.accept(ModItems.CRAB_CLAW); output.accept(ModItems.OMNI_CLAW); + output.accept(ModItems.PIRANHA_BUCKET); + output.accept(ModItems.PIRANHA); + output.accept(ModItems.COOKED_PIRANHA); + output.accept(ModItems.FANG); + output.accept(ModItems.PIRANHA_SPAWN_EGG); + } + + private static void addWoodBuildingSet(CreativeModeTab.Output output, DeferredBlock... blocks) { + for (DeferredBlock block : blocks) { + output.accept(block.get()); + } } } diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModEntities.java b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModEntities.java index 1f08a6c..7ea1385 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModEntities.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModEntities.java @@ -8,6 +8,7 @@ import org.polaris2023.wildwind.hfas.HFASMod; import org.polaris2023.wildwind.hfas.client.eventsub.EntitiesClientHandler; import org.polaris2023.wildwind.hfas.entity.animal.Mudcrab; +import org.polaris2023.wildwind.hfas.entity.animal.Piranha; public class ModEntities { @@ -23,6 +24,12 @@ private ModEntities() { builder -> builder.sized(0.5F, 0.55F).clientTrackingRange(8) ); + //食人鱼实体类型 + public static final DeferredHolder, EntityType> PIRANHA = + ENTITY_TYPES.registerEntityType("piranha", Piranha::new, MobCategory.WATER_AMBIENT, + builder -> builder.sized(0.7F, 0.4F).eyeHeight(0.26F) + ); + /** * 向模组事件总线注册实体类型喵~ * diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModItems.java b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModItems.java index c8622f3..266b9f8 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModItems.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModItems.java @@ -12,6 +12,7 @@ import net.neoforged.neoforge.registries.DeferredRegister; import org.polaris2023.wildwind.hfas.HFASMod; import org.polaris2023.wildwind.hfas.component.OmniClawTools; +import org.polaris2023.wildwind.hfas.item.ModFoods; import org.polaris2023.wildwind.hfas.item.OmniClawItem; import java.util.function.Function; @@ -28,6 +29,17 @@ public class ModItems { //蟹钳 public static final DeferredItem CRAB_CLAW = register("crab_claw"); + //食人鱼 + public static final DeferredItem PIRANHA = register("piranha", p -> new Item(p.food(ModFoods.PIRANHA, ModFoods.PIRANHA_CONSUMABLE))); + public static final DeferredItem COOKED_PIRANHA = register("cooked_piranha", p -> new Item(p.food(ModFoods.COOKED_PIRANHA, ModFoods.COOKED_PIRANHA_CONSUMABLE))); + public static final DeferredItem PIRANHA_SPAWN_EGG = registerMobEgg("piranha_spawn_egg", ModEntities.PIRANHA); + + //食人鱼桶 + public static final DeferredItem PIRANHA_BUCKET = register("piranha_bucket", p -> new MobBucketItem(ModEntities.PIRANHA.get(), Fluids.WATER, SoundEvents.BUCKET_EMPTY_FISH, p)); + + //尖牙(食人鱼掉落物) + public static final DeferredItem FANG = register("fang"); + //万用蟹钳 public static final DeferredItem OMNI_CLAW = diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModMobEffects.java b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModMobEffects.java new file mode 100644 index 0000000..7cf7b3d --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModMobEffects.java @@ -0,0 +1,62 @@ +package org.polaris2023.wildwind.hfas.registry; + +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectCategory; +import net.minecraft.world.entity.ai.attributes.AttributeModifier; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; +import org.polaris2023.wildwind.hfas.HFASMod; +import org.polaris2023.wildwind.hfas.registry.ModAttributes; +import org.polaris2023.wildwind.hfas.effect.WildWindMobEffect; + +/** + * 注册模组状态效果喵~ + */ +public class ModMobEffects { + /** + * 状态效果延迟注册器喵~ + */ + public static final DeferredRegister MOB_EFFECTS = + DeferredRegister.create(BuiltInRegistries.MOB_EFFECT, HFASMod.MOD_ID); + + /** + * 延展状态效果喵~ + */ + public static final DeferredHolder REACH = + MOB_EFFECTS.register("reach", + () -> new WildWindMobEffect(MobEffectCategory.BENEFICIAL, 0xFF3F7E8E) + .addAttributeModifier( + Attributes.BLOCK_INTERACTION_RANGE, + HFASMod.id("effect.reach"), + 2.0, + AttributeModifier.Operation.ADD_VALUE + ) + .addAttributeModifier( + Attributes.ENTITY_INTERACTION_RANGE, + HFASMod.id("effect.reach"), + 2.0, + AttributeModifier.Operation.ADD_VALUE + ) + .addAttributeModifier( + ModAttributes.EXTRA_ITEM_PICKUP_RANGE, + HFASMod.id("effect.reach"), + 2.0, + AttributeModifier.Operation.ADD_VALUE + ) + ); + + /** + * 向模组事件总线注册状态效果喵~ + * + * @param modBus 模组事件总线喵~ + */ + public static void register(IEventBus modBus) { + MOB_EFFECTS.register(modBus); + } + + private ModMobEffects() { + } +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModPotions.java b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModPotions.java new file mode 100644 index 0000000..0d27a65 --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModPotions.java @@ -0,0 +1,72 @@ +package org.polaris2023.wildwind.hfas.registry; + +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.alchemy.Potion; +import net.minecraft.world.item.alchemy.PotionBrewing; +import net.minecraft.world.item.alchemy.Potions; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.common.EventBusSubscriber; +import net.neoforged.neoforge.event.brewing.RegisterBrewingRecipesEvent; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; +import org.polaris2023.wildwind.hfas.HFASMod; + +/** + * 注册模组药水并处理酿造配方喵~ + */ +@EventBusSubscriber(modid = HFASMod.MOD_ID) +public class ModPotions { + /** + * 药水延迟注册器喵~ + */ + public static final DeferredRegister POTIONS = + DeferredRegister.create(BuiltInRegistries.POTION, HFASMod.MOD_ID); + + /** + * 延展药水喵~ + */ + public static final DeferredHolder REACH = + POTIONS.register("reach", () -> new Potion("reach", new MobEffectInstance(ModMobEffects.REACH, 3600))); + /** + * 长效延展药水喵~ + */ + public static final DeferredHolder LONG_REACH = + POTIONS.register("long_reach", () -> new Potion("long_reach", new MobEffectInstance(ModMobEffects.REACH, 9600))); + + /** + * 向模组事件总线注册药水喵~ + * + * @param modBus 模组事件总线喵~ + */ + public static void register(IEventBus modBus) { + POTIONS.register(modBus); + } + + /** + * 注册药水酿造配方喵~ + * + * @param event 酿造配方注册事件喵~ + */ + @SubscribeEvent + static void registerBrewingRecipes(RegisterBrewingRecipesEvent event) { + PotionBrewing.Builder builder = event.getBuilder(); + + builder.addMix( + Potions.AWKWARD, + ModItems.CRAB_CLAW.get(), + ModPotions.REACH + ); + + builder.addMix( + ModPotions.REACH, + Items.REDSTONE, + ModPotions.LONG_REACH + ); + } + + private ModPotions() { + } +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModSoundEvents.java b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModSoundEvents.java new file mode 100644 index 0000000..cd96f1f --- /dev/null +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/registry/ModSoundEvents.java @@ -0,0 +1,35 @@ +package org.polaris2023.wildwind.hfas.registry; + +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.sounds.SoundEvent; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; +import org.polaris2023.wildwind.hfas.HFASMod; + +public class ModSoundEvents { + public static final DeferredRegister SOUND_EVENTS = + DeferredRegister.create(BuiltInRegistries.SOUND_EVENT, HFASMod.MOD_ID); + + public static final DeferredHolder PIRANHA_ATTACK = SOUND_EVENTS.register( + "entity.piranha.attack", + SoundEvent::createVariableRangeEvent + ); + + public static final DeferredHolder PIRANHA_DEATH = SOUND_EVENTS.register( + "entity.piranha.death", + SoundEvent::createVariableRangeEvent + ); + + public static final DeferredHolder PIRANHA_FLOP = SOUND_EVENTS.register( + "entity.piranha.flop", + SoundEvent::createVariableRangeEvent + ); + + public static void register(IEventBus modEventBus) { + SOUND_EVENTS.register(modEventBus); + } + + private ModSoundEvents() { + } +} \ No newline at end of file diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/tag/ModBiomeTags.java b/src/hfas/java/org/polaris2023/wildwind/hfas/tag/ModBiomeTags.java index 500c841..26259d8 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/tag/ModBiomeTags.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/tag/ModBiomeTags.java @@ -19,6 +19,10 @@ interface EntityGen{ * 会生成冷色变种泥沼蟹的群系标签喵~ */ TagKey MUDCRABS_COLD = create("entity_spawn/mudcrab/cold"); + /** + * 会生成食人鱼的群系标签喵~ + */ + TagKey PIRANHA_SPAWNS = create("entity_spawn/piranha"); } /** diff --git a/src/hfas/java/org/polaris2023/wildwind/hfas/worldgen/ModBiomeModifiers.java b/src/hfas/java/org/polaris2023/wildwind/hfas/worldgen/ModBiomeModifiers.java index b78d09f..afd0051 100644 --- a/src/hfas/java/org/polaris2023/wildwind/hfas/worldgen/ModBiomeModifiers.java +++ b/src/hfas/java/org/polaris2023/wildwind/hfas/worldgen/ModBiomeModifiers.java @@ -19,6 +19,7 @@ import net.neoforged.neoforge.registries.NeoForgeRegistries; import org.polaris2023.wildwind.hfas.HFASMod; import org.polaris2023.wildwind.hfas.registry.ModEntities; +import org.polaris2023.wildwind.hfas.tag.ModBiomeTags; /** * 生物群系修改器 @@ -41,6 +42,9 @@ public class ModBiomeModifiers { //那啥蟹生成 public static final ResourceKey ADD_MUDCRAB_SPAWNS = createKey("add_mudcrab_spawns"); + //食人鱼生成 + public static final ResourceKey ADD_PIRANHA_SPAWNS = createKey("add_piranha_spawns"); + public static void bootstrap(BootstrapContext context) { var placedFeatures = context.lookup(Registries.PLACED_FEATURE); var biomes = context.lookup(Registries.BIOME); @@ -80,6 +84,15 @@ public static void bootstrap(BootstrapContext context) { ) ) ); + + // 食人鱼生成 - 丛林与沼泽群系 + context.register(ADD_PIRANHA_SPAWNS, new BiomeModifiers.AddSpawnsBiomeModifier( + biomes.getOrThrow(ModBiomeTags.EntityGen.PIRANHA_SPAWNS), + WeightedList.builder() + .add(new MobSpawnSettings.SpawnerData(ModEntities.PIRANHA.get(), 1, 5), 8) + .build() + ) + ); } private static ResourceKey createKey(String name) { diff --git a/src/hfas/resources/assets/ww_hfas/geckolib/models/entity/piranha.geo.json b/src/hfas/resources/assets/ww_hfas/geckolib/models/entity/piranha.geo.json new file mode 100644 index 0000000..a562bad --- /dev/null +++ b/src/hfas/resources/assets/ww_hfas/geckolib/models/entity/piranha.geo.json @@ -0,0 +1,175 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.unknown", + "texture_width": 32, + "texture_height": 32, + "visible_bounds_width": 2, + "visible_bounds_height": 1.5, + "visible_bounds_offset": [0, 0.25, 0] + }, + "bones": [ + { + "name": "root", + "pivot": [0, 3, 0] + }, + { + "name": "bone", + "parent": "root", + "pivot": [-0.25, 3, -1], + "cubes": [ + { + "origin": [-1, 2, -4], + "size": [2, 4, 3], + "uv": { + "north": {"uv": [6, 18], "uv_size": [2, 4]}, + "east": {"uv": [4, 0], "uv_size": [3, 4]}, + "south": {"uv": [18, 6], "uv_size": [2, 4]}, + "west": {"uv": [0, 5], "uv_size": [3, 4]}, + "up": {"uv": [0, 14], "uv_size": [2, 3]}, + "down": {"uv": [3, 17], "uv_size": [2, -3]} + } + }, + { + "origin": [-1, 0, -2], + "size": [2, 2, 1], + "uv": { + "north": {"uv": [12, 18], "uv_size": [2, 2]}, + "east": {"uv": [20, 14], "uv_size": [1, 2]}, + "south": {"uv": [20, 0], "uv_size": [2, 2]}, + "west": {"uv": [16, 17], "uv_size": [1, 2]}, + "up": {"uv": [0, 22], "uv_size": [2, 1]}, + "down": {"uv": [3, 23], "uv_size": [2, -1]} + } + }, + { + "origin": [-0.75, 1, -3.5], + "size": [0, 1, 1], + "uv": { + "east": {"uv": [0, 24], "uv_size": [1, 1]} + } + }, + { + "origin": [0.75, 1, -3.5], + "size": [0, 1, 1], + "uv": { + "west": {"uv": [1, 24], "uv_size": [-1, 1]} + } + } + ] + }, + { + "name": "mouth", + "parent": "bone", + "pivot": [0, 1.5, -2], + "cubes": [ + { + "origin": [-0.5, 0, -4], + "size": [1, 2, 2], + "uv": { + "north": {"uv": [6, 10], "uv_size": [1, 2]}, + "east": {"uv": [9, 18], "uv_size": [2, 2]}, + "south": {"uv": [20, 3], "uv_size": [1, 2]}, + "west": {"uv": [18, 11], "uv_size": [2, 2]}, + "up": {"uv": [15, 20], "uv_size": [1, 2]}, + "down": {"uv": [17, 22], "uv_size": [1, -2]} + } + } + ] + }, + { + "name": "bone2", + "parent": "root", + "pivot": [0, 3, -1], + "cubes": [ + { + "origin": [0, 6, -2], + "size": [0, 2, 6], + "uv": { + "north": {"uv": [10, 21], "uv_size": [0, 2]}, + "east": {"uv": [13, 0], "uv_size": [6, 2]}, + "south": {"uv": [11, 21], "uv_size": [0, 2]}, + "west": {"uv": [13, 3], "uv_size": [6, 2]}, + "up": {"uv": [12, 21], "uv_size": [0, 6]}, + "down": {"uv": [13, 27], "uv_size": [0, -6]} + } + }, + { + "origin": [-1, 2, -1], + "size": [2, 4, 4], + "uv": { + "north": {"uv": [6, 18], "uv_size": [2, 4]}, + "east": {"uv": [0, 0], "uv_size": [4, 4]}, + "south": {"uv": [18, 6], "uv_size": [2, 4]}, + "west": {"uv": [3, 5], "uv_size": [4, 4]}, + "up": {"uv": [0, 10], "uv_size": [2, 4]}, + "down": {"uv": [3, 14], "uv_size": [2, -4]} + } + }, + { + "origin": [-1, 0, -1], + "size": [0, 3, 4], + "pivot": [-1, 2, -1], + "rotation": [0, -15, 0], + "uv": { + "north": {"uv": [22, 13], "uv_size": [0, 3]}, + "east": {"uv": [6, 14], "uv_size": [4, 3]}, + "south": {"uv": [22, 17], "uv_size": [0, 3]}, + "west": {"uv": [11, 14], "uv_size": [4, 3]}, + "up": {"uv": [22, 21], "uv_size": [0, 4]}, + "down": {"uv": [23, 4], "uv_size": [0, -4]} + } + }, + { + "origin": [-1, 0, -1], + "size": [2, 2, 4], + "uv": { + "north": {"uv": [12, 18], "uv_size": [2, 2]}, + "east": {"uv": [16, 14], "uv_size": [4, 2]}, + "south": {"uv": [20, 0], "uv_size": [2, 2]}, + "west": {"uv": [17, 17], "uv_size": [4, 2]}, + "up": {"uv": [0, 18], "uv_size": [2, 4]}, + "down": {"uv": [3, 22], "uv_size": [2, -4]} + } + }, + { + "origin": [1, 0, -1], + "size": [0, 3, 4], + "pivot": [1, 2, -1], + "rotation": [0, 15, 0], + "uv": { + "north": {"uv": [14, 21], "uv_size": [0, 3]}, + "east": {"uv": [13, 6], "uv_size": [4, 3]}, + "south": {"uv": [21, 20], "uv_size": [0, 3]}, + "west": {"uv": [13, 10], "uv_size": [4, 3]}, + "up": {"uv": [22, 3], "uv_size": [0, 4]}, + "down": {"uv": [22, 12], "uv_size": [0, -4]} + } + } + ] + }, + { + "name": "tail", + "parent": "bone2", + "pivot": [0, 3, 3], + "cubes": [ + { + "origin": [0, 0, 3], + "size": [0, 6, 4], + "uv": { + "north": {"uv": [19, 20], "uv_size": [0, 6]}, + "east": {"uv": [8, 0], "uv_size": [4, 6]}, + "south": {"uv": [20, 20], "uv_size": [0, 6]}, + "west": {"uv": [8, 7], "uv_size": [4, 6]}, + "up": {"uv": [21, 6], "uv_size": [0, 4]}, + "down": {"uv": [9, 25], "uv_size": [0, -4]} + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/hfas/resources/assets/ww_hfas/models/item/blaze_sapling.json b/src/hfas/resources/assets/ww_hfas/models/item/blaze_sapling.json new file mode 100644 index 0000000..4485e6e --- /dev/null +++ b/src/hfas/resources/assets/ww_hfas/models/item/blaze_sapling.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "ww_hfas:block/blaze_sapling" + } +} \ No newline at end of file diff --git a/src/hfas/resources/assets/ww_hfas/models/item/soul_sapling.json b/src/hfas/resources/assets/ww_hfas/models/item/soul_sapling.json new file mode 100644 index 0000000..e7a9b11 --- /dev/null +++ b/src/hfas/resources/assets/ww_hfas/models/item/soul_sapling.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "ww_hfas:block/soul_sapling" + } +} \ No newline at end of file diff --git a/src/hfas/resources/assets/ww_hfas/sounds.json b/src/hfas/resources/assets/ww_hfas/sounds.json new file mode 100644 index 0000000..12f2a2c --- /dev/null +++ b/src/hfas/resources/assets/ww_hfas/sounds.json @@ -0,0 +1,25 @@ +{ + "entity.piranha.attack": { + "subtitle": "subtitles.entity.piranha.attack", + "sounds": [ + "ww_hfas:entity_piranha_attack_1", + "ww_hfas:entity_piranha_attack_2", + "ww_hfas:entity_piranha_attack_3" + ] + }, + "entity.piranha.death": { + "subtitle": "subtitles.entity.piranha.death", + "sounds": [ + "ww_hfas:entity_piranha_death" + ] + }, + "entity.piranha.flop": { + "subtitle": "subtitles.entity.piranha.flop", + "sounds": [ + { + "type": "event", + "name": "minecraft:entity.salmon.flop" + } + ] + } +} diff --git a/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_1.ogg b/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_1.ogg new file mode 100644 index 0000000..697e693 Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_1.ogg differ diff --git a/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_2.ogg b/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_2.ogg new file mode 100644 index 0000000..3140acb Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_2.ogg differ diff --git a/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_3.ogg b/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_3.ogg new file mode 100644 index 0000000..47e7504 Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_attack_3.ogg differ diff --git a/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_death.ogg b/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_death.ogg new file mode 100644 index 0000000..ef9bef8 Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/sounds/entity_piranha_death.ogg differ diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_door_bottom.png b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_door_bottom.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_door_bottom.png rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_door_bottom.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_door_top.png b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_door_top.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_door_top.png rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_door_top.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_leaves.png b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_leaves.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_leaves.png rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_leaves.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_log.png b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_log.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_log.png rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_log.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_log.png.mcmeta b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_log.png.mcmeta similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_log.png.mcmeta rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_log.png.mcmeta diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_log_top.png b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_log_top.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_log_top.png rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_log_top.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_log_top.png.mcmeta b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_log_top.png.mcmeta similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_log_top.png.mcmeta rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_log_top.png.mcmeta diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_planks.png b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_planks.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_planks.png rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_planks.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_sapling.png b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_sapling.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_sapling.png rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_sapling.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/cinder_trapdoor.png b/src/hfas/resources/assets/ww_hfas/textures/block/blaze_trapdoor.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/cinder_trapdoor.png rename to src/hfas/resources/assets/ww_hfas/textures/block/blaze_trapdoor.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_door_bottom.png b/src/hfas/resources/assets/ww_hfas/textures/block/soul_door_bottom.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_door_bottom.png rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_door_bottom.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_door_top.png b/src/hfas/resources/assets/ww_hfas/textures/block/soul_door_top.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_door_top.png rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_door_top.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_leaves.png b/src/hfas/resources/assets/ww_hfas/textures/block/soul_leaves.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_leaves.png rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_leaves.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_log.png b/src/hfas/resources/assets/ww_hfas/textures/block/soul_log.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_log.png rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_log.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_log.png.mcmeta b/src/hfas/resources/assets/ww_hfas/textures/block/soul_log.png.mcmeta similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_log.png.mcmeta rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_log.png.mcmeta diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_log_top.png b/src/hfas/resources/assets/ww_hfas/textures/block/soul_log_top.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_log_top.png rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_log_top.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_log_top.png.mcmeta b/src/hfas/resources/assets/ww_hfas/textures/block/soul_log_top.png.mcmeta similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_log_top.png.mcmeta rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_log_top.png.mcmeta diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_planks.png b/src/hfas/resources/assets/ww_hfas/textures/block/soul_planks.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_planks.png rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_planks.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_sapling.png b/src/hfas/resources/assets/ww_hfas/textures/block/soul_sapling.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_sapling.png rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_sapling.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/ember_trapdoor.png b/src/hfas/resources/assets/ww_hfas/textures/block/soul_trapdoor.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/ember_trapdoor.png rename to src/hfas/resources/assets/ww_hfas/textures/block/soul_trapdoor.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/stripped_cinder_log.png b/src/hfas/resources/assets/ww_hfas/textures/block/stripped_blaze_log.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/stripped_cinder_log.png rename to src/hfas/resources/assets/ww_hfas/textures/block/stripped_blaze_log.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/stripped_cinder_log_top.png b/src/hfas/resources/assets/ww_hfas/textures/block/stripped_blaze_log_top.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/stripped_cinder_log_top.png rename to src/hfas/resources/assets/ww_hfas/textures/block/stripped_blaze_log_top.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/stripped_ember_log.png b/src/hfas/resources/assets/ww_hfas/textures/block/stripped_soul_log.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/stripped_ember_log.png rename to src/hfas/resources/assets/ww_hfas/textures/block/stripped_soul_log.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/block/stripped_ember_log_top.png b/src/hfas/resources/assets/ww_hfas/textures/block/stripped_soul_log_top.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/block/stripped_ember_log_top.png rename to src/hfas/resources/assets/ww_hfas/textures/block/stripped_soul_log_top.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/entity/piranha.png b/src/hfas/resources/assets/ww_hfas/textures/entity/piranha.png new file mode 100644 index 0000000..c34e5e6 Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/textures/entity/piranha.png differ diff --git a/src/hfas/resources/assets/ww_hfas/textures/item/cinder_door.png b/src/hfas/resources/assets/ww_hfas/textures/item/blaze_door.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/item/cinder_door.png rename to src/hfas/resources/assets/ww_hfas/textures/item/blaze_door.png diff --git a/src/hfas/resources/assets/ww_hfas/textures/item/cooked_piranha.png b/src/hfas/resources/assets/ww_hfas/textures/item/cooked_piranha.png new file mode 100644 index 0000000..fcb0a7f Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/textures/item/cooked_piranha.png differ diff --git a/src/hfas/resources/assets/ww_hfas/textures/item/fang.png b/src/hfas/resources/assets/ww_hfas/textures/item/fang.png new file mode 100644 index 0000000..897b5d9 Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/textures/item/fang.png differ diff --git a/src/hfas/resources/assets/ww_hfas/textures/item/piranha.png b/src/hfas/resources/assets/ww_hfas/textures/item/piranha.png new file mode 100644 index 0000000..ea972cf Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/textures/item/piranha.png differ diff --git a/src/hfas/resources/assets/ww_hfas/textures/item/piranha_bucket.png b/src/hfas/resources/assets/ww_hfas/textures/item/piranha_bucket.png new file mode 100644 index 0000000..eee644b Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/textures/item/piranha_bucket.png differ diff --git a/src/hfas/resources/assets/ww_hfas/textures/item/piranha_spawn_egg.png b/src/hfas/resources/assets/ww_hfas/textures/item/piranha_spawn_egg.png new file mode 100644 index 0000000..1748094 Binary files /dev/null and b/src/hfas/resources/assets/ww_hfas/textures/item/piranha_spawn_egg.png differ diff --git a/src/hfas/resources/assets/ww_hfas/textures/item/ember_door.png b/src/hfas/resources/assets/ww_hfas/textures/item/soul_door.png similarity index 100% rename from src/hfas/resources/assets/ww_hfas/textures/item/ember_door.png rename to src/hfas/resources/assets/ww_hfas/textures/item/soul_door.png diff --git a/src/hfas/resources/data/c/tags/block/fences.json b/src/hfas/resources/data/c/tags/block/fences.json new file mode 100644 index 0000000..c52925f --- /dev/null +++ b/src/hfas/resources/data/c/tags/block/fences.json @@ -0,0 +1,7 @@ +{ + "values": [ + "ww_hfas:blaze_fence", + "ww_hfas:soul_fence", + "ww_hfas:azalea_fence" + ] +} \ No newline at end of file diff --git a/src/hfas/resources/data/minecraft/tags/block/flower_pots.json b/src/hfas/resources/data/minecraft/tags/block/flower_pots.json new file mode 100644 index 0000000..4d8d167 --- /dev/null +++ b/src/hfas/resources/data/minecraft/tags/block/flower_pots.json @@ -0,0 +1,6 @@ +{ + "values": [ + "ww_hfas:potted_blaze_sapling", + "ww_hfas:potted_soul_sapling" + ] +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_planks.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_planks.json new file mode 100644 index 0000000..da67a8e --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_planks.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_log": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_log" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_planks" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_log" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_planks" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_slab.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_slab.json new file mode 100644 index 0000000..ab61f14 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_slab.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_slab" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_slab" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_stairs.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_stairs.json new file mode 100644 index 0000000..531589f --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_stairs.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_stairs" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_stairs" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_wood.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_wood.json new file mode 100644 index 0000000..803e1ce --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/azalea_wood.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_log": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_log" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_wood" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_log" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_wood" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_planks.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_planks.json new file mode 100644 index 0000000..df7917b --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_planks.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_log": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_log" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_planks" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_log" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_planks" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_slab.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_slab.json new file mode 100644 index 0000000..09eacd2 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_slab.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_slab" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_slab" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_stairs.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_stairs.json new file mode 100644 index 0000000..64c7771 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_stairs.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_stairs" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_stairs" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_wood.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_wood.json new file mode 100644 index 0000000..9d0a0cf --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/blaze_wood.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_log": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_log" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_wood" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_log" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_wood" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_planks.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_planks.json new file mode 100644 index 0000000..d70d43e --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_planks.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_log": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_log" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_planks" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_log" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_planks" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_slab.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_slab.json new file mode 100644 index 0000000..df8ae9c --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_slab.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_slab" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_slab" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_stairs.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_stairs.json new file mode 100644 index 0000000..9fd2421 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_stairs.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_stairs" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_stairs" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_wood.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_wood.json new file mode 100644 index 0000000..ffb1150 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/building_blocks/soul_wood.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_log": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_log" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_wood" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_log" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_wood" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/azalea_fence.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/azalea_fence.json new file mode 100644 index 0000000..735c7d1 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/azalea_fence.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_fence" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_fence" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/blaze_fence.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/blaze_fence.json new file mode 100644 index 0000000..59597f8 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/blaze_fence.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_fence" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_fence" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/soul_fence.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/soul_fence.json new file mode 100644 index 0000000..ac66a91 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/decorations/soul_fence.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_fence" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_fence" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_button.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_button.json new file mode 100644 index 0000000..d9905e1 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_button.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_button" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_button" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_door.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_door.json new file mode 100644 index 0000000..eef4172 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_door.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_door" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_door" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_fence_gate.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_fence_gate.json new file mode 100644 index 0000000..c8f2e7f --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_fence_gate.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_fence_gate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_fence_gate" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_pressure_plate.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_pressure_plate.json new file mode 100644 index 0000000..a65b524 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_pressure_plate.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_pressure_plate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_pressure_plate" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_trapdoor.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_trapdoor.json new file mode 100644 index 0000000..916dba0 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/azalea_trapdoor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_azalea_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:azalea_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:azalea_trapdoor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_azalea_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:azalea_trapdoor" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_button.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_button.json new file mode 100644 index 0000000..3e2a199 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_button.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_button" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_button" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_door.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_door.json new file mode 100644 index 0000000..7644748 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_door.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_door" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_door" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_fence_gate.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_fence_gate.json new file mode 100644 index 0000000..f5ce8fa --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_fence_gate.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_fence_gate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_fence_gate" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_pressure_plate.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_pressure_plate.json new file mode 100644 index 0000000..9ad5c50 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_pressure_plate.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_pressure_plate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_pressure_plate" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_trapdoor.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_trapdoor.json new file mode 100644 index 0000000..c368c32 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/blaze_trapdoor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_blaze_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:blaze_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:blaze_trapdoor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_blaze_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:blaze_trapdoor" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_button.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_button.json new file mode 100644 index 0000000..dc8c182 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_button.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_button" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_button" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_door.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_door.json new file mode 100644 index 0000000..9da37a6 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_door.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_door" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_door" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_fence_gate.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_fence_gate.json new file mode 100644 index 0000000..cc68c82 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_fence_gate.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_fence_gate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_fence_gate" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_pressure_plate.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_pressure_plate.json new file mode 100644 index 0000000..fc8585b --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_pressure_plate.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_pressure_plate" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_pressure_plate" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_trapdoor.json b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_trapdoor.json new file mode 100644 index 0000000..5e18497 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/advancement/recipes/redstone/soul_trapdoor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_soul_planks": { + "conditions": { + "items": [ + { + "items": "ww_hfas:soul_planks" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ww_hfas:soul_trapdoor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_soul_planks" + ] + ], + "rewards": { + "recipes": [ + "ww_hfas:soul_trapdoor" + ] + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_button.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_button.json new file mode 100644 index 0000000..cc6de8d --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_button.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "redstone", + "ingredients": [ + "ww_hfas:azalea_planks" + ], + "result": { + "id": "ww_hfas:azalea_button" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_door.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_door.json new file mode 100644 index 0000000..4e86a42 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_door.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:azalea_planks" + }, + "pattern": [ + "##", + "##", + "##" + ], + "result": { + "count": 3, + "id": "ww_hfas:azalea_door" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_fence.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_fence.json new file mode 100644 index 0000000..bc4b764 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_fence.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": "minecraft:stick", + "W": "ww_hfas:azalea_planks" + }, + "pattern": [ + "W#W", + "W#W" + ], + "result": { + "count": 3, + "id": "ww_hfas:azalea_fence" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_fence_gate.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_fence_gate.json new file mode 100644 index 0000000..df68448 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_fence_gate.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "minecraft:stick", + "W": "ww_hfas:azalea_planks" + }, + "pattern": [ + "#W#", + "#W#" + ], + "result": { + "id": "ww_hfas:azalea_fence_gate" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_planks.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_planks.json new file mode 100644 index 0000000..71e2a32 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_planks.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "group": "planks", + "ingredients": [ + "#ww_hfas:azalea_logs" + ], + "result": { + "count": 4, + "id": "ww_hfas:azalea_planks" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_pressure_plate.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_pressure_plate.json new file mode 100644 index 0000000..cf2bdf3 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_pressure_plate.json @@ -0,0 +1,13 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:azalea_planks" + }, + "pattern": [ + "##" + ], + "result": { + "id": "ww_hfas:azalea_pressure_plate" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_slab.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_slab.json new file mode 100644 index 0000000..2d8e2cd --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_slab.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:azalea_planks" + }, + "pattern": [ + "###" + ], + "result": { + "count": 6, + "id": "ww_hfas:azalea_slab" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_stairs.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_stairs.json new file mode 100644 index 0000000..4d7f01b --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_stairs.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:azalea_planks" + }, + "pattern": [ + "# ", + "## ", + "###" + ], + "result": { + "count": 4, + "id": "ww_hfas:azalea_stairs" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_trapdoor.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_trapdoor.json new file mode 100644 index 0000000..ad70711 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_trapdoor.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:azalea_planks" + }, + "pattern": [ + "###", + "###" + ], + "result": { + "count": 2, + "id": "ww_hfas:azalea_trapdoor" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/azalea_wood.json b/src/hfas/resources/data/ww_hfas/recipe/azalea_wood.json new file mode 100644 index 0000000..61e1629 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/azalea_wood.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:azalea_log" + }, + "pattern": [ + "##", + "##" + ], + "result": { + "count": 3, + "id": "ww_hfas:azalea_wood" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_button.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_button.json new file mode 100644 index 0000000..dc32b34 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_button.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "redstone", + "ingredients": [ + "ww_hfas:blaze_planks" + ], + "result": { + "id": "ww_hfas:blaze_button" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_door.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_door.json new file mode 100644 index 0000000..76213fa --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_door.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:blaze_planks" + }, + "pattern": [ + "##", + "##", + "##" + ], + "result": { + "count": 3, + "id": "ww_hfas:blaze_door" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_fence.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_fence.json new file mode 100644 index 0000000..4504271 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_fence.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": "minecraft:stick", + "W": "ww_hfas:blaze_planks" + }, + "pattern": [ + "W#W", + "W#W" + ], + "result": { + "count": 3, + "id": "ww_hfas:blaze_fence" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_fence_gate.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_fence_gate.json new file mode 100644 index 0000000..745475a --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_fence_gate.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "minecraft:stick", + "W": "ww_hfas:blaze_planks" + }, + "pattern": [ + "#W#", + "#W#" + ], + "result": { + "id": "ww_hfas:blaze_fence_gate" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_planks.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_planks.json new file mode 100644 index 0000000..457e670 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_planks.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "group": "planks", + "ingredients": [ + "#ww_hfas:blaze_logs" + ], + "result": { + "count": 4, + "id": "ww_hfas:blaze_planks" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_pressure_plate.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_pressure_plate.json new file mode 100644 index 0000000..3245696 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_pressure_plate.json @@ -0,0 +1,13 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:blaze_planks" + }, + "pattern": [ + "##" + ], + "result": { + "id": "ww_hfas:blaze_pressure_plate" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_slab.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_slab.json new file mode 100644 index 0000000..69b4720 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_slab.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:blaze_planks" + }, + "pattern": [ + "###" + ], + "result": { + "count": 6, + "id": "ww_hfas:blaze_slab" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_stairs.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_stairs.json new file mode 100644 index 0000000..52a15d9 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_stairs.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:blaze_planks" + }, + "pattern": [ + "# ", + "## ", + "###" + ], + "result": { + "count": 4, + "id": "ww_hfas:blaze_stairs" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_trapdoor.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_trapdoor.json new file mode 100644 index 0000000..8f0f059 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_trapdoor.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:blaze_planks" + }, + "pattern": [ + "###", + "###" + ], + "result": { + "count": 2, + "id": "ww_hfas:blaze_trapdoor" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/blaze_wood.json b/src/hfas/resources/data/ww_hfas/recipe/blaze_wood.json new file mode 100644 index 0000000..00cfa11 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/blaze_wood.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:blaze_log" + }, + "pattern": [ + "##", + "##" + ], + "result": { + "count": 3, + "id": "ww_hfas:blaze_wood" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_button.json b/src/hfas/resources/data/ww_hfas/recipe/soul_button.json new file mode 100644 index 0000000..127d543 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_button.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "redstone", + "ingredients": [ + "ww_hfas:soul_planks" + ], + "result": { + "id": "ww_hfas:soul_button" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_door.json b/src/hfas/resources/data/ww_hfas/recipe/soul_door.json new file mode 100644 index 0000000..4a3515f --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_door.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:soul_planks" + }, + "pattern": [ + "##", + "##", + "##" + ], + "result": { + "count": 3, + "id": "ww_hfas:soul_door" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_fence.json b/src/hfas/resources/data/ww_hfas/recipe/soul_fence.json new file mode 100644 index 0000000..d64e115 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_fence.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": "minecraft:stick", + "W": "ww_hfas:soul_planks" + }, + "pattern": [ + "W#W", + "W#W" + ], + "result": { + "count": 3, + "id": "ww_hfas:soul_fence" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_fence_gate.json b/src/hfas/resources/data/ww_hfas/recipe/soul_fence_gate.json new file mode 100644 index 0000000..5c0427f --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_fence_gate.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "minecraft:stick", + "W": "ww_hfas:soul_planks" + }, + "pattern": [ + "#W#", + "#W#" + ], + "result": { + "id": "ww_hfas:soul_fence_gate" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_planks.json b/src/hfas/resources/data/ww_hfas/recipe/soul_planks.json new file mode 100644 index 0000000..1f217e6 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_planks.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "group": "planks", + "ingredients": [ + "#ww_hfas:soul_logs" + ], + "result": { + "count": 4, + "id": "ww_hfas:soul_planks" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_pressure_plate.json b/src/hfas/resources/data/ww_hfas/recipe/soul_pressure_plate.json new file mode 100644 index 0000000..5cc9c34 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_pressure_plate.json @@ -0,0 +1,13 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:soul_planks" + }, + "pattern": [ + "##" + ], + "result": { + "id": "ww_hfas:soul_pressure_plate" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_slab.json b/src/hfas/resources/data/ww_hfas/recipe/soul_slab.json new file mode 100644 index 0000000..0eaf551 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_slab.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:soul_planks" + }, + "pattern": [ + "###" + ], + "result": { + "count": 6, + "id": "ww_hfas:soul_slab" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_stairs.json b/src/hfas/resources/data/ww_hfas/recipe/soul_stairs.json new file mode 100644 index 0000000..73d24a8 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_stairs.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:soul_planks" + }, + "pattern": [ + "# ", + "## ", + "###" + ], + "result": { + "count": 4, + "id": "ww_hfas:soul_stairs" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_trapdoor.json b/src/hfas/resources/data/ww_hfas/recipe/soul_trapdoor.json new file mode 100644 index 0000000..cf7531c --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_trapdoor.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "#": "ww_hfas:soul_planks" + }, + "pattern": [ + "###", + "###" + ], + "result": { + "count": 2, + "id": "ww_hfas:soul_trapdoor" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/recipe/soul_wood.json b/src/hfas/resources/data/ww_hfas/recipe/soul_wood.json new file mode 100644 index 0000000..d43c564 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/recipe/soul_wood.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "key": { + "#": "ww_hfas:soul_log" + }, + "pattern": [ + "##", + "##" + ], + "result": { + "count": 3, + "id": "ww_hfas:soul_wood" + } +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/tags/block/azalea_logs.json b/src/hfas/resources/data/ww_hfas/tags/block/azalea_logs.json new file mode 100644 index 0000000..8b47bdf --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/tags/block/azalea_logs.json @@ -0,0 +1,8 @@ +{ + "values": [ + "ww_hfas:azalea_log", + "ww_hfas:azalea_wood", + "ww_hfas:stripped_azalea_log", + "ww_hfas:stripped_azalea_wood" + ] +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/tags/block/blaze_logs.json b/src/hfas/resources/data/ww_hfas/tags/block/blaze_logs.json new file mode 100644 index 0000000..5b0cec5 --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/tags/block/blaze_logs.json @@ -0,0 +1,8 @@ +{ + "values": [ + "ww_hfas:blaze_log", + "ww_hfas:blaze_wood", + "ww_hfas:stripped_blaze_log", + "ww_hfas:stripped_blaze_wood" + ] +} \ No newline at end of file diff --git a/src/hfas/resources/data/ww_hfas/tags/block/soul_logs.json b/src/hfas/resources/data/ww_hfas/tags/block/soul_logs.json new file mode 100644 index 0000000..aefaa6f --- /dev/null +++ b/src/hfas/resources/data/ww_hfas/tags/block/soul_logs.json @@ -0,0 +1,8 @@ +{ + "values": [ + "ww_hfas:soul_log", + "ww_hfas:soul_wood", + "ww_hfas:stripped_soul_log", + "ww_hfas:stripped_soul_wood" + ] +} \ No newline at end of file