diff --git a/processor/src/main/java/org/polaris2023/utils/Codes.java b/processor/src/main/java/org/polaris2023/utils/Codes.java index 8b10302e..dfc0853f 100644 --- a/processor/src/main/java/org/polaris2023/utils/Codes.java +++ b/processor/src/main/java/org/polaris2023/utils/Codes.java @@ -49,7 +49,8 @@ public final class %%classname%% implements DataProvider, IModel<%%classname%%> private Path assetsDir; private final ConcurrentHashMap MODELS = new ConcurrentHashMap<>();// object is Bean or map, by gson - + private final ConcurrentHashMap BLOCKSTATES = + new ConcurrentHashMap<>(); private %%classname%% basicItem(Supplier item) { ResourceLocation key = BuiltInRegistries.ITEM.getKey(item.get()).withPrefix("item/"); MODELS.put(key, Map.of("parent", "minecraft:item/generated", "textures", Map.of( @@ -104,39 +105,101 @@ public final class %%classname%% implements DataProvider, IModel<%%classname%%> } private %%classname%% cubeAll(Supplier block) { - ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block.get()).withPrefix("block/"); - MODELS.put(key, Map.of( + ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block.get()); + ResourceLocation blockKey = key.withPrefix("block/"); + MODELS.put(blockKey, Map.of( "parent", "minecraft:block/cube_all", "textures", Map.of( - "all", key.toString() + "all", blockKey.toString() + ) + )); + BLOCKSTATES.put(key, Map.of( + "variants", Map.of( + "", Map.of( + "model", blockKey.toString() + ) ) )); return this; } private %%classname%% stairsBlock(Supplier block, String bottom, String side, String top) { - ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block.get()).withPrefix("block/"); - MODELS.put(key, Map.of( + ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block.get()); + ResourceLocation blockKey = key.withPrefix("block/"); + ResourceLocation inner = blockKey.withSuffix("_inner"); + ResourceLocation outer = blockKey.withSuffix("_outer"); + MODELS.put(blockKey, Map.of( "parent", "minecraft:block/stairs", "textures", Map.of( - "bottom", bottom.isEmpty() ? key.toString() : bottom, - "side", side.isEmpty() ? key.toString() : side, - "top", top.isEmpty() ? key.toString() : top + "bottom", bottom.isEmpty() ? blockKey.toString() : bottom, + "side", side.isEmpty() ? blockKey.toString() : side, + "top", top.isEmpty() ? blockKey.toString() : top ))); - MODELS.put(key.withSuffix("_inner"), Map.of( + MODELS.put(inner, Map.of( "parent", "minecraft:block/inner_stairs", "textures", Map.of( - "bottom", bottom.isEmpty() ? key.toString() : bottom, - "side", side.isEmpty() ? key.toString() : side, - "top", top.isEmpty() ? key.toString() : top + "bottom", bottom.isEmpty() ? blockKey.toString() : bottom, + "side", side.isEmpty() ? blockKey.toString() : side, + "top", top.isEmpty() ? blockKey.toString() : top ))); - MODELS.put(key.withSuffix("_outer"), Map.of( + MODELS.put(outer, Map.of( "parent", "minecraft:block/outer_stairs", "textures", Map.of( - "bottom", bottom.isEmpty() ? key.toString() : bottom, - "side", side.isEmpty() ? key.toString() : side, - "top", top.isEmpty() ? key.toString() : top + "bottom", bottom.isEmpty() ? blockKey.toString() : bottom, + "side", side.isEmpty() ? blockKey.toString() : side, + "top", top.isEmpty() ? blockKey.toString() : top ))); + BLOCKSTATES.put(key, Map.of( + "variants", Map.of( + "facing=east,half=bottom,shape=inner_left", Map.of( + "model", inner.toString(), + "uvlock", true, + "y", 270 + ), + "facing=east,half=bottom,shape=inner_right", Map.of( + "model", inner.toString() + ), + "facing=east,half=bottom,shape=outer_left", Map.of( + "model", outer.toString(), + "uvlock", true, + "y", 270 + ), + "facing=east,half=bottom,shape=outer_right", Map.of( + "model", outer.toString() + ), + "facing=east,half=bottom,shape=straight", Map.of( + "model", blockKey.toString() + ), + "facing=east,half= top,shape=inner_left", Map.of( + "model", inner.toString(), + "uvlock", true, + "x", 180 + ), + "facing=east,half=top,shape=inner_right", Map.of( + "model", inner.toString(), + "uvlock", true, + "x", 180, + "y", 90 + ), + "facing=east,half=top,shape=outer_left", Map.of( + "model", outer.toString(), + "uvlock", true, + "z", 180 + ), + "facing=east,half=top,shape=outer_right", Map.of( + "model", outer.toString(), + "uvlock", true, + "x", 180, + "y", 90 + + ), + "facing=east,half= top,shape=straight", Map.of( + "model", blockKey.toString(), + "uvlock", true, + "x", 180 + ) + ) + )); return this; } @@ -212,7 +275,7 @@ public void init() { @Override public CompletableFuture run(CachedOutput output) { init(); - CompletableFuture[] futures = new CompletableFuture[MODELS.size()]; + CompletableFuture[] futures = new CompletableFuture[MODELS.size() + BLOCKSTATES.size()]; int i = 0; for (Map.Entry entry : MODELS.entrySet()) { ResourceLocation key = entry.getKey(); @@ -222,6 +285,14 @@ public CompletableFuture run(CachedOutput output) { futures[i] = DataProvider.saveStable(output, jsonTree, itemModel); i++; } + for(Map.Entry entry : BLOCKSTATES.entrySet()) { + ResourceLocation key = entry.getKey(); + Object object = entry.getValue(); + Path states = assetsDir.resolve(key.getNamespace()).resolve("blockstates").resolve(key.getPath() + ".json"); + JsonElement jsonTree = GSON.toJsonTree(object); + futures[i] = DataProvider.saveStable(output, jsonTree, states); + i++; + } return CompletableFuture.allOf(futures); } diff --git a/src/main/java/org/polaris2023/wild_wind/client/WildWindClientEventHandler.java b/src/main/java/org/polaris2023/wild_wind/client/WildWindClientEventHandler.java index 9f2a3eac..cd30bac7 100644 --- a/src/main/java/org/polaris2023/wild_wind/client/WildWindClientEventHandler.java +++ b/src/main/java/org/polaris2023/wild_wind/client/WildWindClientEventHandler.java @@ -1,26 +1,17 @@ package org.polaris2023.wild_wind.client; -import net.minecraft.client.color.block.BlockColor; -import net.minecraft.core.BlockPos; import net.minecraft.util.FastColor; import net.minecraft.world.item.Items; -import net.minecraft.world.item.SpawnEggItem; -import net.minecraft.world.level.BlockAndTintGetter; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.state.BlockState; import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.EventPriority; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.neoforge.client.event.EntityRenderersEvent; import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent; -import org.jetbrains.annotations.Nullable; import org.polaris2023.wild_wind.client.entity.abstracts.ModMobRenderer; import org.polaris2023.wild_wind.client.entity.firefly.FireflyModel; import org.polaris2023.wild_wind.client.entity.piranha.PiranhaModel; import org.polaris2023.wild_wind.client.entity.trout.TroutModel; -import org.polaris2023.wild_wind.common.block.WoolBlock; -import org.polaris2023.wild_wind.common.block.entity.WoolBlockEntity; import org.polaris2023.wild_wind.common.init.ModBlocks; import org.polaris2023.wild_wind.common.init.ModComponents; import org.polaris2023.wild_wind.common.init.ModEntities; @@ -38,14 +29,7 @@ public static void registerSlimeColor(RegisterColorHandlersEvent.Item event) { @SubscribeEvent public static void registerBlockColor(RegisterColorHandlersEvent.Block event) { - event.register((state, level, pos, tinIndex) -> { - if (level == null || pos == null) { - return FastColor.ARGB32.opaque(0); - } - WoolBlockEntity woolTile = (WoolBlockEntity) level.getBlockEntity(pos); - if (woolTile == null) return FastColor.ARGB32.opaque(0); - return FastColor.ARGB32.opaque(woolTile.rgb); - }, ModBlocks.WOOL.get()); + } @SubscribeEvent diff --git a/src/main/java/org/polaris2023/wild_wind/client/entity/piranha/PiranhaAnimation.java b/src/main/java/org/polaris2023/wild_wind/client/entity/piranha/PiranhaAnimation.java index 575a81db..18b95f0b 100644 --- a/src/main/java/org/polaris2023/wild_wind/client/entity/piranha/PiranhaAnimation.java +++ b/src/main/java/org/polaris2023/wild_wind/client/entity/piranha/PiranhaAnimation.java @@ -11,121 +11,92 @@ * @author baka4n */ public class PiranhaAnimation { - public static final AnimationDefinition SWIM = AnimationDefinition.Builder.withLength(1.0F).looping() - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -14.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .build(); + public static final AnimationDefinition SWIM = AnimationDefinition.Builder.withLength(0.5F).looping() + .addAnimation("mouth", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(7.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("tail", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 20.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -20.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 20.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .build(); - public static final AnimationDefinition STRUGGLE = AnimationDefinition.Builder.withLength(1.0F).looping() - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(0.0F, -20.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 20.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.625F, KeyframeAnimations.degreeVec(0.0F, -20.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.875F, KeyframeAnimations.degreeVec(0.0F, 20.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(2.0F, 1.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.posVec(2.0F, 1.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.625F, KeyframeAnimations.posVec(2.0F, 2.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.posVec(2.0F, 1.5F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(0.0F, 20.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, -20.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.625F, KeyframeAnimations.degreeVec(0.0F, 20.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.875F, KeyframeAnimations.degreeVec(0.0F, -20.0F, -90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, -90.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(2.0F, 1.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.posVec(2.0F, 1.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.625F, KeyframeAnimations.posVec(2.0F, 2.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.posVec(2.0F, 1.5F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .build(); + public static final AnimationDefinition JUMP = AnimationDefinition.Builder.withLength(0.6667F).looping() + .addAnimation("root", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 90.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 90.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.3333F, KeyframeAnimations.degreeVec(0.0F, -50.0F, 90.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 12.5F, 90.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.6667F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 90.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("root", new AnimationChannel(AnimationChannel.Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, -2.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.1667F, KeyframeAnimations.posVec(0.0F, -2.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.3333F, KeyframeAnimations.posVec(0.0F, 3.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.posVec(0.0F, -2.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.6667F, KeyframeAnimations.posVec(0.0F, -2.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("tail", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.3333F, KeyframeAnimations.degreeVec(0.0F, 37.5F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, -35.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.6667F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, -5.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.3333F, KeyframeAnimations.degreeVec(0.0F, 35.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, -22.5F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.6667F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .build(); - public static final AnimationDefinition BITE = AnimationDefinition.Builder.withLength(1.25F).looping() - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.2083F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.4167F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5833F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.9583F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.125F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.posVec(0.0F, 0.0F, 3.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.posVec(0.0F, 0.0F, -2.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.2083F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.4167F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5833F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.9583F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.125F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.posVec(0.0F, 0.0F, 3.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.posVec(0.0F, 0.0F, -2.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone3", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(30.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone4", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.4167F, KeyframeAnimations.degreeVec(-2.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(1.88F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.25F, KeyframeAnimations.degreeVec(7.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone4", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 1.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.posVec(0.0F, 0.0F, 5.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.25F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .build(); - - public static final AnimationDefinition BITE2 = AnimationDefinition.Builder.withLength(0.75F).looping() - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, -10.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -10.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone4", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, -10.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -10.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .build(); + public static final AnimationDefinition ATTACK = AnimationDefinition.Builder.withLength(0.375F) + .addAnimation("root", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.125F, KeyframeAnimations.degreeVec(-15.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("root", new AnimationChannel(AnimationChannel.Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.125F, KeyframeAnimations.posVec(0.0F, 0.0F, 1.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 0.0F, -2.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("mouth", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.125F, KeyframeAnimations.degreeVec(25.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(-10.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("mouth", new AnimationChannel(AnimationChannel.Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.125F, KeyframeAnimations.posVec(0.0F, -1.0F, 0.75F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("tail", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.0833F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.1667F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.375F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .build(); } \ No newline at end of file diff --git a/src/main/java/org/polaris2023/wild_wind/client/entity/piranha/PiranhaModel.java b/src/main/java/org/polaris2023/wild_wind/client/entity/piranha/PiranhaModel.java index 87290365..410b8fd3 100644 --- a/src/main/java/org/polaris2023/wild_wind/client/entity/piranha/PiranhaModel.java +++ b/src/main/java/org/polaris2023/wild_wind/client/entity/piranha/PiranhaModel.java @@ -16,36 +16,42 @@ public class PiranhaModel extends ColorableHierarchicalModel { // This layer location should be baked with EntityRendererProvider.Context in the entity renderer and passed into this model's constructor public static final ModelLayerLocation LAYER_LOCATION = Helpers.location("piranha", "main"); - private final ModelPart bone4; + private final ModelPart root; private final ModelPart bone; - private final ModelPart bone3; + private final ModelPart mouth; private final ModelPart bone2; + private final ModelPart tail; public PiranhaModel(ModelPart root) { - this.bone4 = root.getChild("bone4"); - this.bone = this.bone4.getChild("bone"); - this.bone3 = this.bone.getChild("bone3"); - this.bone2 = this.bone4.getChild("bone2"); + this.root = root.getChild("root"); + this.bone = this.root.getChild("bone"); + this.mouth = this.bone.getChild("mouth"); + this.bone2 = this.root.getChild("bone2"); + this.tail = this.bone2.getChild("tail"); } public static LayerDefinition createBodyLayer() { MeshDefinition meshdefinition = new MeshDefinition(); PartDefinition partdefinition = meshdefinition.getRoot(); - PartDefinition bone4 = partdefinition.addOrReplaceChild("bone4", CubeListBuilder.create(), PartPose.offset(0.0F, 22.0F, -6.0F)); + PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create(), PartPose.offset(0.0F, 21.0F, 0.0F)); - PartDefinition bone = bone4.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(21, 4).addBox(0.0F, -7.0F, -2.0F, 0.0F, 2.0F, 4.0F, new CubeDeformation(0.0F)) - .texOffs(8, 12).addBox(-1.0F, -4.5F, -5.0F, 2.0F, 3.0F, 2.0F, new CubeDeformation(0.0F)) - .texOffs(6, 10).addBox(-1.5F, -5.0F, -3.0F, 3.0F, 5.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 2.0F, 5.0F)); + PartDefinition bone = root.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(13, 0).addBox(-0.75F, -3.0F, -3.0F, 2.0F, 4.0F, 3.0F, new CubeDeformation(0.0F)) + .texOffs(24, 5).addBox(-0.75F, 1.0F, -1.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)) + .texOffs(24, 9).addBox(-0.5F, 1.0F, -2.5F, 0.0F, 1.0F, 1.0F, new CubeDeformation(0.0F)) + .texOffs(24, 9).mirror().addBox(1.0F, 1.0F, -2.5F, 0.0F, 1.0F, 1.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(-0.25F, 0.0F, -1.0F)); - PartDefinition cube_r1 = bone.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(0, 13).addBox(0.0F, 0.0F, -1.0F, 2.0F, 0.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(1.5F, 0.0F, -2.0F, 0.0F, 0.0F, 0.7854F)); + PartDefinition mouth = bone.addOrReplaceChild("mouth", CubeListBuilder.create().texOffs(24, 0).addBox(-0.5F, -0.5F, -2.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.25F, 1.5F, -1.0F)); - PartDefinition cube_r2 = bone.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(0, 13).addBox(-2.0F, 0.0F, -1.0F, 2.0F, 0.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-1.5F, 0.0F, -2.0F, 0.0F, 0.0F, -0.7854F)); + PartDefinition bone2 = root.addOrReplaceChild("bone2", CubeListBuilder.create().texOffs(11, 16).addBox(0.0F, -5.0F, -1.0F, 0.0F, 2.0F, 5.0F, new CubeDeformation(0.0F)) + .texOffs(0, 0).addBox(-1.0F, -3.0F, 0.0F, 2.0F, 4.0F, 4.0F, new CubeDeformation(0.0F)) + .texOffs(11, 9).addBox(-1.0F, 1.0F, 0.0F, 2.0F, 2.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 0.0F, -1.0F)); - PartDefinition bone3 = bone.addOrReplaceChild("bone3", CubeListBuilder.create().texOffs(6, 15).addBox(-1.0F, -0.5F, -2.0F, 2.0F, 1.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, -1.0F, -3.0F)); + PartDefinition cube_r1 = bone2.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(0, 20).mirror().addBox(0.0F, -1.0F, 0.0F, 0.0F, 3.0F, 4.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offsetAndRotation(1.0F, 1.0F, 0.0F, 0.0F, 0.2618F, 0.0F)); - PartDefinition bone2 = bone4.addOrReplaceChild("bone2", CubeListBuilder.create().texOffs(12, 0).addBox(-1.5F, -5.0F, 0.0F, 3.0F, 5.0F, 3.0F, new CubeDeformation(0.0F)) - .texOffs(6, 0).addBox(0.0F, -5.0F, 3.0F, 0.0F, 5.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 2.0F, 5.0F)); + PartDefinition cube_r2 = bone2.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(0, 20).addBox(0.0F, -1.0F, 0.0F, 0.0F, 3.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-1.0F, 1.0F, 0.0F, 0.0F, -0.2618F, 0.0F)); + + PartDefinition tail = bone2.addOrReplaceChild("tail", CubeListBuilder.create().texOffs(0, 9).addBox(0.0F, -3.0F, 0.0F, 0.0F, 6.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 0.0F, 4.0F)); return LayerDefinition.create(meshdefinition, 32, 32); } @@ -54,18 +60,17 @@ public static LayerDefinition createBodyLayer() { public void setupAnim(Piranha piranha, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { root().getAllParts().forEach(ModelPart::resetPose); animate(piranha.swim, PiranhaAnimation.SWIM, ageInTicks, 1.0F); - animate(piranha.struggle, PiranhaAnimation.STRUGGLE, ageInTicks, 1.0F); - animate(piranha.attack, PiranhaAnimation.BITE, ageInTicks, 1.0F); - animate(piranha.attack2, PiranhaAnimation.BITE2, ageInTicks, 1.0F); + animate(piranha.jump, PiranhaAnimation.JUMP, ageInTicks, 1.0F); + animate(piranha.attack, PiranhaAnimation.ATTACK, ageInTicks, 1.0F); } @Override public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, int rgba) { - bone4.render(poseStack, vertexConsumer, packedLight, packedOverlay, rgba); + root().render(poseStack, vertexConsumer, packedLight, packedOverlay, rgba); } @Override public ModelPart root() { - return bone4; + return root; } } \ No newline at end of file diff --git a/src/main/java/org/polaris2023/wild_wind/client/entity/trout/TroutAnimation.java b/src/main/java/org/polaris2023/wild_wind/client/entity/trout/TroutAnimation.java index 36c0b3af..338271a6 100644 --- a/src/main/java/org/polaris2023/wild_wind/client/entity/trout/TroutAnimation.java +++ b/src/main/java/org/polaris2023/wild_wind/client/entity/trout/TroutAnimation.java @@ -11,78 +11,59 @@ * @author baka4n */ public class TroutAnimation { - public static final AnimationDefinition SWIM = AnimationDefinition.Builder.withLength(1.0F).looping() - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -14.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .build(); + public static final AnimationDefinition SWIM = AnimationDefinition.Builder.withLength(0.5F).looping() + .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("bone3", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .build(); - public static final AnimationDefinition STRUGGLE = AnimationDefinition.Builder.withLength(1.0F).looping() - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(90.0F, -20.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.625F, KeyframeAnimations.degreeVec(90.0F, 0.0F, -10.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 10.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.875F, KeyframeAnimations.degreeVec(90.0F, 0.0F, -10.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 1.0F, 2.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 1.0F, 2.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.7083F, KeyframeAnimations.posVec(0.0F, 2.0F, 2.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.posVec(0.0F, 1.0F, 2.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(90.0F, 20.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.375F, KeyframeAnimations.degreeVec(90.0F, 0.0F, -10.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.5F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.625F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 10.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.75F, KeyframeAnimations.degreeVec(90.0F, 0.0F, -10.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.875F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 10.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 1.0F, 2.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 1.0F, 2.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.7083F, KeyframeAnimations.posVec(0.0F, 2.0F, 2.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(1.0F, KeyframeAnimations.posVec(0.0F, 1.0F, 2.0F), AnimationChannel.Interpolations.LINEAR) - )) - .build(); - - public static final AnimationDefinition STRUGGLE2 = AnimationDefinition.Builder.withLength(0.25F).looping() - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(2.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.posVec(2.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, - new Keyframe(0.0F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.125F, KeyframeAnimations.degreeVec(180.0F, -10.0F, 90.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.degreeVec(90.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.POSITION, - new Keyframe(0.0F, KeyframeAnimations.posVec(2.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), - new Keyframe(0.25F, KeyframeAnimations.posVec(2.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) - )) - .build(); + public static final AnimationDefinition JUMP = AnimationDefinition.Builder.withLength(1.0F).looping() + .addAnimation("bone", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 37.5F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -35.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("bone2", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -15.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 17.5F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -22.5F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("bone3", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, -5.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 35.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -22.5F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("root", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 90.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 10.0F, 90.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, -50.0F, 90.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, 12.5F, 90.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 90.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .addAnimation("root", new AnimationChannel(AnimationChannel.Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, -2.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, -2.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.5F, KeyframeAnimations.posVec(0.0F, 3.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(0.75F, KeyframeAnimations.posVec(0.0F, -2.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM), + new Keyframe(1.0F, KeyframeAnimations.posVec(0.0F, -2.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM) + )) + .build(); } \ No newline at end of file diff --git a/src/main/java/org/polaris2023/wild_wind/client/entity/trout/TroutModel.java b/src/main/java/org/polaris2023/wild_wind/client/entity/trout/TroutModel.java index 6af9f790..eda943c9 100644 --- a/src/main/java/org/polaris2023/wild_wind/client/entity/trout/TroutModel.java +++ b/src/main/java/org/polaris2023/wild_wind/client/entity/trout/TroutModel.java @@ -17,45 +17,44 @@ public class TroutModel extends ColorableHierarchicalModel { // This layer location should be baked with EntityRendererProvider.Context in the entity renderer and passed into this model's constructor public static final ModelLayerLocation LAYER_LOCATION = Helpers.location("trout", "main"); private final ModelPart root; + private final ModelPart bone3; private final ModelPart bone; private final ModelPart bone2; public TroutModel(ModelPart root) { - - this.root = root; - this.bone = root.getChild("bone"); - this.bone2 = root.getChild("bone2"); + this.root = root.getChild("root"); + this.bone3 = this.root.getChild("bone3"); + this.bone = this.bone3.getChild("bone"); + this.bone2 = this.bone.getChild("bone2"); } public static LayerDefinition createBodyLayer() { MeshDefinition meshdefinition = new MeshDefinition(); PartDefinition partdefinition = meshdefinition.getRoot(); - PartDefinition bone = partdefinition.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(4, 10).addBox(-0.3F, -1.9657F, -1.5F, 5.0F, 5.0F, 3.0F, new CubeDeformation(0.0F)) - .texOffs(15, 16).addBox(4.7F, -1.4657F, -1.0F, 3.0F, 4.0F, 2.0F, new CubeDeformation(0.0F)) - .texOffs(0, 0).addBox(-0.3F, -3.9657F, 0.0F, 3.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.0343F, 24.0F, -0.3F, 0.0F, 1.5708F, 0.0F)); + PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create().texOffs(15, 27).addBox(-1.0F, -2.0F, -3.0F, 2.0F, 4.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 21.0F, -5.0F)); - PartDefinition cube_r1 = bone.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(0, 0).addBox(-1.0F, 1.4142F, 0.4142F, 2.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(2.7F, 2.0343F, 0.0F, 0.7854F, 3.1416F, 0.0F)); + PartDefinition bone3 = root.addOrReplaceChild("bone3", CubeListBuilder.create().texOffs(0, 0).addBox(-1.5F, -2.0F, 0.0F, 3.0F, 5.0F, 8.0F, new CubeDeformation(0.0F)) + .texOffs(23, 0).addBox(0.0F, -6.0F, 0.0F, 0.0F, 4.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 0.0F, 0.0F)); - PartDefinition cube_r2 = bone.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(0, 0).addBox(-1.0F, 1.4142F, 0.4142F, 2.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(2.7F, 2.0343F, 0.0F, 0.7854F, 0.0F, 0.0F)); + PartDefinition cube_r1 = bone3.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(27, 27).mirror().addBox(0.0F, -4.0F, 0.0F, 0.0F, 4.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offsetAndRotation(-1.5F, 3.0F, 2.0F, 0.0F, -0.7854F, 0.0F)); - PartDefinition bone2 = partdefinition.addOrReplaceChild("bone2", CubeListBuilder.create().texOffs(12, 13).addBox(-5.0F, -2.0F, -1.5F, 5.0F, 5.0F, 3.0F, new CubeDeformation(0.0F)) - .texOffs(0, 0).addBox(-9.0F, -1.5F, 0.0F, 4.0F, 4.0F, 0.0F, new CubeDeformation(0.0F)) - .texOffs(0, 0).addBox(-5.0F, -4.0F, 0.0F, 4.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 24.0F, 0.0F, 0.0F, 1.5708F, 0.0F)); + PartDefinition cube_r2 = bone3.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(27, 27).addBox(0.0F, -4.0F, 0.0F, 0.0F, 4.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(1.5F, 3.0F, 2.0F, 0.0F, 0.7854F, 0.0F)); - PartDefinition cube_r3 = bone2.addOrReplaceChild("cube_r3", CubeListBuilder.create().texOffs(0, 0).addBox(-1.0F, 1.4142F, 0.4142F, 2.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-4.0F, 2.0F, 0.0F, 0.7854F, 3.1416F, 0.0F)); + PartDefinition bone = bone3.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(0, 14).addBox(-1.0F, -2.0F, 0.0F, 2.0F, 4.0F, 6.0F, new CubeDeformation(0.0F)) + .texOffs(0, 25).addBox(0.0F, -4.0F, 0.0F, 0.0F, 2.0F, 6.0F, new CubeDeformation(0.0F)) + .texOffs(15, 29).mirror().addBox(0.0F, 2.0F, 0.0F, 0.0F, 2.0F, 6.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(0.0F, 0.0F, 8.0F)); - PartDefinition cube_r4 = bone2.addOrReplaceChild("cube_r4", CubeListBuilder.create().texOffs(0, 0).addBox(-1.0F, 1.4142F, 0.4142F, 2.0F, 2.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-4.0F, 2.0F, 0.0F, 0.7854F, 0.0F, 0.0F)); + PartDefinition bone2 = bone.addOrReplaceChild("bone2", CubeListBuilder.create().texOffs(17, 14).addBox(0.0F, -3.0F, 0.0F, 0.0F, 6.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 0.0F, 6.0F)); - return LayerDefinition.create(meshdefinition, 32, 32); + return LayerDefinition.create(meshdefinition, 64, 64); } @Override public void setupAnim(Trout trout, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.root().getAllParts().forEach(ModelPart::resetPose); animate(trout.swim, TroutAnimation.SWIM, ageInTicks, 1.0F); - animate(trout.struggle, TroutAnimation.STRUGGLE, ageInTicks, 1.0F); - animate(trout.attack, TroutAnimation.STRUGGLE2, ageInTicks, 1.0F); + animate(trout.jump, TroutAnimation.JUMP, ageInTicks, 1.0F); } diff --git a/src/main/java/org/polaris2023/wild_wind/common/block/entity/WoolBlockEntity.java b/src/main/java/org/polaris2023/wild_wind/common/block/entity/WoolBlockEntity.java deleted file mode 100644 index 19b2b7fd..00000000 --- a/src/main/java/org/polaris2023/wild_wind/common/block/entity/WoolBlockEntity.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.polaris2023.wild_wind.common.block.entity; - -import net.minecraft.core.BlockPos; -import net.minecraft.core.HolderLookup; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import org.polaris2023.wild_wind.common.init.ModBlocks; - -/** - * @author : baka4n - * {@code @Date : 2025/02/16 21:28:52} - */ -public class WoolBlockEntity extends BlockEntity { - public int rgb = 0; - public WoolBlockEntity(BlockPos pos, BlockState blockState) { - super(ModBlocks.WOOL_TILE.get(), pos, blockState); - } - - @Override - protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) { - super.saveAdditional(tag, registries); - tag.putInt("rgb", rgb); - } - - @Override - protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) { - super.loadAdditional(tag, registries); - rgb = tag.getInt("rgb"); - } -} diff --git a/src/main/java/org/polaris2023/wild_wind/common/block/item/WoolBlockItem.java b/src/main/java/org/polaris2023/wild_wind/common/block/item/WoolBlockItem.java deleted file mode 100644 index bb22b5ea..00000000 --- a/src/main/java/org/polaris2023/wild_wind/common/block/item/WoolBlockItem.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.polaris2023.wild_wind.common.block.item; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.context.BlockPlaceContext; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import org.polaris2023.wild_wind.common.block.entity.WoolBlockEntity; -import org.polaris2023.wild_wind.common.init.ModComponents; - -/** - * @author : baka4n - * {@code @Date : 2025/02/16 21:46:09} - */ -public class WoolBlockItem extends BlockItem { - public WoolBlockItem(Block block, Properties properties) { - super(block, properties.component(ModComponents.COLOR, 0)); - } - - @Override - public InteractionResult place(BlockPlaceContext context) { - ItemStack itemInHand = context.getItemInHand(); - int rgb = itemInHand.getOrDefault(ModComponents.COLOR, 0); - InteractionResult place = super.place(context); - BlockPos clickedPos = context.getClickedPos(); - Level level = context.getLevel(); - - BlockEntity blockEntity = level.getBlockEntity(clickedPos); - if (blockEntity instanceof WoolBlockEntity) { - ((WoolBlockEntity) blockEntity).rgb = rgb; - blockEntity.setChanged(); - } - return place; - - - } -} diff --git a/src/main/java/org/polaris2023/wild_wind/common/dyed/ModDyeColors.java b/src/main/java/org/polaris2023/wild_wind/common/dyed/ModDyeColors.java new file mode 100644 index 00000000..5375df2f --- /dev/null +++ b/src/main/java/org/polaris2023/wild_wind/common/dyed/ModDyeColors.java @@ -0,0 +1,9 @@ +package org.polaris2023.wild_wind.common.dyed; + +/** + * @author : baka4n + * {@code @Date : 2025/02/21 18:18:36} + */ +public class ModDyeColors { + +} diff --git a/src/main/java/org/polaris2023/wild_wind/common/entity/Piranha.java b/src/main/java/org/polaris2023/wild_wind/common/entity/Piranha.java index 56e91dd6..55206b46 100644 --- a/src/main/java/org/polaris2023/wild_wind/common/entity/Piranha.java +++ b/src/main/java/org/polaris2023/wild_wind/common/entity/Piranha.java @@ -1,26 +1,57 @@ package org.polaris2023.wild_wind.common.entity; +import com.google.common.base.Function; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.entity.AnimationState; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ambient.AmbientCreature; import net.minecraft.world.entity.animal.AbstractSchoolingFish; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import org.polaris2023.wild_wind.common.entity.goal.piranha.PiranhaAttackGoal; import org.polaris2023.wild_wind.common.init.items.entity.ModMobBuckets; +import java.util.List; + public class Piranha extends AbstractSchoolingFish { public final AnimationState swim = new AnimationState(); - public final AnimationState struggle = new AnimationState(); + public final AnimationState jump = new AnimationState(); public final AnimationState attack = new AnimationState(); - public final AnimationState attack2 = new AnimationState(); public Piranha(EntityType entityType, Level level) { super(entityType, level); } + public static final List> FACTORY = List.of( + piranha -> new PiranhaAttackGoal(piranha, 1.0F, false) + ); + + @Override + protected void registerGoals() { + super.registerGoals(); + for (int i = 0; i < FACTORY.size(); i++) { + this.goalSelector.addGoal(i, FACTORY.get(i).apply(this)); + } + } + + @Override + public void tick() { + super.tick(); + if (this.isInWater()) { + if (!this.moveControl.hasWanted()) { + swim.ifStarted(AnimationState::stop); + } else { + swim.startIfStopped(tickCount); + } + } else { + swim.ifStarted(AnimationState::stop); + jump.startIfStopped(tickCount); + } + } + public static AttributeSupplier.Builder createAttributes() { return AmbientCreature.createMobAttributes() .add(Attributes.MAX_HEALTH, 8F) diff --git a/src/main/java/org/polaris2023/wild_wind/common/entity/Trout.java b/src/main/java/org/polaris2023/wild_wind/common/entity/Trout.java index c3264ecf..aaafe47d 100644 --- a/src/main/java/org/polaris2023/wild_wind/common/entity/Trout.java +++ b/src/main/java/org/polaris2023/wild_wind/common/entity/Trout.java @@ -15,8 +15,7 @@ public class Trout extends AbstractSchoolingFish { public final AnimationState swim = new AnimationState(); - public final AnimationState struggle = new AnimationState(); - public final AnimationState attack = new AnimationState(); + public final AnimationState jump = new AnimationState(); public Trout(EntityType entityType, Level level) { super(entityType, level); @@ -27,6 +26,16 @@ public static AttributeSupplier.Builder createAttributes() { .add(Attributes.MAX_HEALTH, 3f); } + @Override + public void tick() { + super.tick(); + if (!this.moveControl.hasWanted()) { + swim.ifStarted(AnimationState::stop); + } else { + swim.startIfStopped(tickCount); + } + } + @Override protected SoundEvent getFlopSound() { return SoundEvents.COD_FLOP; diff --git a/src/main/java/org/polaris2023/wild_wind/common/entity/goal/piranha/PiranhaAttackGoal.java b/src/main/java/org/polaris2023/wild_wind/common/entity/goal/piranha/PiranhaAttackGoal.java new file mode 100644 index 00000000..1694ae42 --- /dev/null +++ b/src/main/java/org/polaris2023/wild_wind/common/entity/goal/piranha/PiranhaAttackGoal.java @@ -0,0 +1,14 @@ +package org.polaris2023.wild_wind.common.entity.goal.piranha; + +import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; +import org.polaris2023.wild_wind.common.entity.Piranha; + +/** + * @author : baka4n + * {@code @Date : 2025/02/20 21:44:01} + */ +public class PiranhaAttackGoal extends MeleeAttackGoal { + public PiranhaAttackGoal(Piranha piranha, double speedModifier, boolean followingTargetEvenIfNotSeen) { + super(piranha, speedModifier, followingTargetEvenIfNotSeen); + } +} diff --git a/src/main/java/org/polaris2023/wild_wind/common/init/ModBlocks.java b/src/main/java/org/polaris2023/wild_wind/common/init/ModBlocks.java index 88cf9002..6d89c316 100644 --- a/src/main/java/org/polaris2023/wild_wind/common/init/ModBlocks.java +++ b/src/main/java/org/polaris2023/wild_wind/common/init/ModBlocks.java @@ -20,11 +20,10 @@ import org.polaris2023.annotation.modelgen.item.BasicBlockItem; import org.polaris2023.annotation.modelgen.item.BasicItem; -import org.polaris2023.wild_wind.common.block.BrittleIceBlock; +import org.polaris2023.wild_wind.common.block.*; -import org.polaris2023.wild_wind.common.block.CookingPotBlock; -import org.polaris2023.wild_wind.common.block.GlowMucusBlock; import org.polaris2023.wild_wind.common.block.entity.CookingPotBlockEntity; +import org.polaris2023.wild_wind.common.block.entity.DuckweedBlockEntity; import java.util.Arrays; @@ -91,6 +90,20 @@ public class ModBlocks { public static final DeferredItem COOKING_POT_ITEM = register("cooking_pot", COOKING_POT); + @I18n(en_us = "Sculk Jaw", zh_cn = "幽匿厄口", zh_tw = "幽匿厄口") + public static final DeferredBlock SCULK_JAW = + register("sculk_jaw", SculkJawBlock::new, BlockBehaviour.Properties.of()); + public static final DeferredItem SCULK_JAW_ITEM = + register("sculk_jaw", SCULK_JAW); + + @I18n(en_us = "Duckweed", zh_cn = "浮萍", zh_tw = "浮萍") + public static final DeferredBlock DUCKWEED = + register("duckweed", DuckweedBlock::new, BlockBehaviour.Properties.of()); + public static final DeferredHolder, BlockEntityType> DUCKWEED_TILE = + entity("duckweed", DSL.remainderType(), DuckweedBlockEntity::new, DUCKWEED); + public static final DeferredItem DUCKWEED_ITEM = + register("duckweed", DUCKWEED); + @I18n(en_us = "Brittle Ice", zh_cn = "脆冰", zh_tw = "脆冰") public static final DeferredBlock BRITTLE_ICE = register("brittle_ice", BrittleIceBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.ICE) @@ -263,6 +276,7 @@ public class ModBlocks { Type type, BlockEntityType.BlockEntitySupplier factory, DeferredBlock... blocks) { + return TILES.register(name, () -> BlockEntityType.Builder.of(factory, Arrays.stream(blocks).map(DeferredBlock::get).toArray(Block[]::new)).build(type)); } } diff --git a/src/main/java/org/polaris2023/wild_wind/common/init/ModEnumExtensions.java b/src/main/java/org/polaris2023/wild_wind/common/init/ModEnumExtensions.java new file mode 100644 index 00000000..b69d93f3 --- /dev/null +++ b/src/main/java/org/polaris2023/wild_wind/common/init/ModEnumExtensions.java @@ -0,0 +1,24 @@ +package org.polaris2023.wild_wind.common.init; + +import net.minecraft.world.entity.vehicle.Boat; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.neoforged.fml.common.asm.enumextension.EnumProxy; +import org.polaris2023.wild_wind.common.init.items.entity.ModBoats; + +import java.util.function.Supplier; + +/** + * @author : baka4n + * {@code @Date : 2025/02/20 19:47:19} + */ +public class ModEnumExtensions { + public static final EnumProxy WILD_WIND_AZALEA = + new EnumProxy<>(Boat.Type.class, + ModBlocks.AZALEA_PLANKS, + "wild_wind:azalea", + ModBoats.AZALEA_BOAT, + ModBoats.AZALEA_CHEST_BOAT, + (Supplier) () -> Items.STICK, + false); +} diff --git a/src/main/java/org/polaris2023/wild_wind/common/init/ModItems.java b/src/main/java/org/polaris2023/wild_wind/common/init/ModItems.java index c5752c4f..557136c7 100644 --- a/src/main/java/org/polaris2023/wild_wind/common/init/ModItems.java +++ b/src/main/java/org/polaris2023/wild_wind/common/init/ModItems.java @@ -1,10 +1,12 @@ package org.polaris2023.wild_wind.common.init; +import net.minecraft.world.item.BoatItem; import net.minecraft.world.item.Item; import net.neoforged.neoforge.registries.DeferredItem; import org.polaris2023.annotation.language.I18n; import org.polaris2023.annotation.modelgen.item.BasicItem; import org.polaris2023.wild_wind.common.init.items.ModBaseItems; +import org.polaris2023.wild_wind.common.init.items.entity.ModBoats; import org.polaris2023.wild_wind.common.init.items.entity.ModMobBuckets; import org.polaris2023.wild_wind.common.init.items.entity.ModSpawnEggs; import org.polaris2023.wild_wind.common.item.LivingTuberItem; @@ -55,6 +57,8 @@ public class ModItems { ModBaseItems.init(); ModSpawnEggs.init(); ModMobBuckets.init(); + ModBoats.init(); + } } diff --git a/src/main/java/org/polaris2023/wild_wind/common/init/items/ModBaseItems.java b/src/main/java/org/polaris2023/wild_wind/common/init/items/ModBaseItems.java index e4cd6cbe..48aa2e60 100644 --- a/src/main/java/org/polaris2023/wild_wind/common/init/items/ModBaseItems.java +++ b/src/main/java/org/polaris2023/wild_wind/common/init/items/ModBaseItems.java @@ -21,7 +21,7 @@ * {@code @Date : 2025/02/12 20:19:42} */ @BasicItem -public enum ModBaseItems implements Supplier, ItemLike { +public enum ModBaseItems implements Supplier, ItemLike { @I18n(en_us = "Glow Powder", zh_cn = "萤光粉末", zh_tw = "螢光粉末") GLOW_POWDER, @I18n(en_us = "Apple Cake", zh_cn = "苹果派", zh_tw = "蘋果派") @@ -36,6 +36,8 @@ public enum ModBaseItems implements Supplier, ItemLike { SPIDER_EGG(STACK_TO_1), @I18n(en_us = "Spider Mucosa", zh_cn = "蛛丝壁膜", zh_tw = "蛛絲壁膜") SPIDER_MUCOSA, + @I18n(en_us = "salt", zh_cn = "盐", zh_tw = "鹽") + SALT(STACK_TO_SNOW) ; public final DeferredItem entry; ModBaseItems() { diff --git a/src/main/java/org/polaris2023/wild_wind/common/init/items/entity/ModBoats.java b/src/main/java/org/polaris2023/wild_wind/common/init/items/entity/ModBoats.java new file mode 100644 index 00000000..6dfdf625 --- /dev/null +++ b/src/main/java/org/polaris2023/wild_wind/common/init/items/entity/ModBoats.java @@ -0,0 +1,28 @@ +package org.polaris2023.wild_wind.common.init.items.entity; + +import net.minecraft.world.item.BoatItem; +import net.minecraft.world.item.Item; +import net.neoforged.neoforge.registries.DeferredItem; +import org.polaris2023.annotation.language.I18n; +import org.polaris2023.annotation.modelgen.item.BasicItem; +import org.polaris2023.wild_wind.common.init.ModEnumExtensions; + +import static org.polaris2023.wild_wind.common.init.ModInitializer.register; + +/** + * @author : baka4n + * {@code @Date : 2025/02/20 20:11:15} + */ +@BasicItem +public class ModBoats { + + @I18n(en_us = "Azalea Boat", zh_cn = "杜鹃木船", zh_tw = "杜鵑木船") + public static final DeferredItem AZALEA_BOAT = + register("azalea_boat", () -> new BoatItem(false, ModEnumExtensions.WILD_WIND_AZALEA.getValue(), new Item.Properties().stacksTo(1))); + @I18n(en_us = "Azalea Chest Boat", zh_tw = "杜鵑木運輸船", zh_cn = "杜鹃木运输船") + public static final DeferredItem AZALEA_CHEST_BOAT = + register("azalea_chest_boat", () -> new BoatItem(false, ModEnumExtensions.WILD_WIND_AZALEA.getValue(), new Item.Properties().stacksTo(1))); + + + public static void init() {} +} diff --git a/src/main/java/org/polaris2023/wild_wind/common/init/items/foods/ModBaseFoods.java b/src/main/java/org/polaris2023/wild_wind/common/init/items/foods/ModBaseFoods.java index 53321015..72c955d0 100644 --- a/src/main/java/org/polaris2023/wild_wind/common/init/items/foods/ModBaseFoods.java +++ b/src/main/java/org/polaris2023/wild_wind/common/init/items/foods/ModBaseFoods.java @@ -86,8 +86,7 @@ public enum ModBaseFoods implements Supplier, ItemLike { COOKED_FROG_LEG(p -> p .component(ModComponents.MEAT_VALUE, 0.5F) .component(ModComponents.MONSTER_VALUE, 1F)), - @I18n(en_us = "salt", zh_cn = "盐", zh_tw = "鹽") - SALT(STACK_TO_SNOW) + ; public final DeferredItem entry; diff --git a/src/main/java/org/polaris2023/wild_wind/common/item/MagicFluteItem.java b/src/main/java/org/polaris2023/wild_wind/common/item/MagicFluteItem.java index 50732f65..d4bb93bb 100644 --- a/src/main/java/org/polaris2023/wild_wind/common/item/MagicFluteItem.java +++ b/src/main/java/org/polaris2023/wild_wind/common/item/MagicFluteItem.java @@ -43,6 +43,7 @@ public InteractionResultHolder use(Level level, Player player, Intera player.startUsingItem(usedHand); play(level, player, instrument); onFluteWorks(itemStack, player); + player.getCooldowns().addCooldown(this, 300); player.awardStat(Stats.ITEM_USED.get(this)); return InteractionResultHolder.consume(itemStack); diff --git a/src/main/java/org/polaris2023/wild_wind/datagen/ModRecipeProvider.java b/src/main/java/org/polaris2023/wild_wind/datagen/ModRecipeProvider.java index 2059ba5d..941dbc59 100644 --- a/src/main/java/org/polaris2023/wild_wind/datagen/ModRecipeProvider.java +++ b/src/main/java/org/polaris2023/wild_wind/datagen/ModRecipeProvider.java @@ -258,10 +258,10 @@ protected void addShapelessRecipe() { .requires(ItemTags.WOOL); })); add(shapeless(RecipeCategory.MISC, ModBlocks.SALT_BLOCK_ITEM, 1, salt_block -> { - unlockedBy(salt_block, ModBaseFoods.SALT); - salt_block.requires(ModBaseFoods.SALT, 9); + unlockedBy(salt_block, ModBaseItems.SALT); + salt_block.requires(ModBaseItems.SALT, 9); })); - add(shapeless(RecipeCategory.MISC, ModBaseFoods.SALT, 9, salt -> { + add(shapeless(RecipeCategory.MISC, ModBaseItems.SALT, 9, salt -> { unlockedBy(salt, ModBlocks.SALT_BLOCK_ITEM); salt.requires(ModBlocks.SALT_BLOCK_ITEM); })); diff --git a/src/main/java/org/polaris2023/wild_wind/datagen/loot/ModBlockLootSubProvider.java b/src/main/java/org/polaris2023/wild_wind/datagen/loot/ModBlockLootSubProvider.java index eef79c4d..7c197a76 100644 --- a/src/main/java/org/polaris2023/wild_wind/datagen/loot/ModBlockLootSubProvider.java +++ b/src/main/java/org/polaris2023/wild_wind/datagen/loot/ModBlockLootSubProvider.java @@ -9,6 +9,7 @@ import org.polaris2023.wild_wind.common.init.ModBlocks; import org.polaris2023.wild_wind.common.init.ModInitializer; import org.polaris2023.wild_wind.common.init.ModItems; +import org.polaris2023.wild_wind.common.init.items.ModBaseItems; import org.polaris2023.wild_wind.datagen.ModBlockFamilies; import java.util.Set; @@ -39,8 +40,8 @@ public void generate() { this.dropSelf(ModBlocks.CONCRETE.get()); this.dropSelf(ModBlocks.GLAZED_TERRACOTTA.get()); this.dropSelf(ModBlocks.SALT_BLOCK.get()); - this.dropOther(ModBlocks.SALT_ORE.get(), ModItems.SALT.get()); - this.dropOther(ModBlocks.DEEPSLATE_SALT_ORE.get(), ModItems.SALT.get()); + this.dropOther(ModBlocks.SALT_ORE.get(), ModBaseItems.SALT.get()); + this.dropOther(ModBlocks.DEEPSLATE_SALT_ORE.get(), ModBaseItems.SALT.get()); this.dropSelf(ModBlocks.AZALEA_LOG.get()); this.dropSelf(ModBlocks.STRIPPED_AZALEA_LOG.get()); this.dropSelf(ModBlocks.AZALEA_WOOD.get()); @@ -48,6 +49,8 @@ public void generate() { this.dropSelf(ModBlocks.AZALEA_PLANKS.get()); this.dropSelf(ModBlocks.AZALEA_SIGN.get()); this.dropSelf(ModBlocks.AZALEA_HANGING_SIGN.get()); + this.dropSelf(ModBlocks.SCULK_JAW.get()); + this.dropSelf(ModBlocks.DUCKWEED.get()); ModBlockFamilies.AZALEA_PLANKS.generateBlockLoot(this::dropSelf); } } diff --git a/src/main/java/org/polaris2023/wild_wind/util/ItemPropertiesUtil.java b/src/main/java/org/polaris2023/wild_wind/util/ItemPropertiesUtil.java index 8d2cf2b4..547a6cb8 100644 --- a/src/main/java/org/polaris2023/wild_wind/util/ItemPropertiesUtil.java +++ b/src/main/java/org/polaris2023/wild_wind/util/ItemPropertiesUtil.java @@ -4,12 +4,13 @@ import org.jetbrains.annotations.NotNull; import java.util.function.Consumer; +import java.util.function.Supplier; /** * @author : baka4n * {@code @Date : 2025/02/16 18:24:53} */ -public enum ItemPropertiesUtil implements Consumer { +public enum ItemPropertiesUtil implements Consumer, Supplier { STACK_TO_1(p -> p.stacksTo(1)), STACK_TO_SNOW(p -> p.stacksTo(16)) ; @@ -28,4 +29,11 @@ public void accept(Item.Properties properties) { public Consumer andThen(@NotNull Consumer after) { return props.andThen(after); } + + @Override + public Item.Properties get() { + Item.Properties properties = new Item.Properties(); + accept(properties); + return properties; + } } diff --git a/src/main/resources/META-INF/enumextensions.json b/src/main/resources/META-INF/enumextensions.json index dbbed4c5..9ae2c6d8 100644 --- a/src/main/resources/META-INF/enumextensions.json +++ b/src/main/resources/META-INF/enumextensions.json @@ -1,5 +1,13 @@ { "entries": [ - + { + "enum": "net/minecraft/world/entity/vehicle/Boat$Type", + "name": "WILD_WIND_AZALEA", + "constructor": "(Ljava/util/function/Supplier;Ljava/lang/String;Ljava/util/function/Supplier;Ljava/util/function/Supplier;Ljava/util/function/Supplier;Z)V", + "parameters": { + "class": "org/polaris2023/wild_wind/common/init/ModEnumExtensions", + "field": "WILD_WIND_AZALEA" + } + } ] } \ No newline at end of file diff --git a/src/main/resources/assets/wild_wind/textures/block/baobab_log_side.png b/src/main/resources/assets/wild_wind/textures/block/baobab_log_side.png new file mode 100644 index 00000000..c05be267 Binary files /dev/null and b/src/main/resources/assets/wild_wind/textures/block/baobab_log_side.png differ diff --git a/src/main/resources/assets/wild_wind/textures/block/baobab_log_side_stripped.png b/src/main/resources/assets/wild_wind/textures/block/baobab_log_side_stripped.png new file mode 100644 index 00000000..577424d6 Binary files /dev/null and b/src/main/resources/assets/wild_wind/textures/block/baobab_log_side_stripped.png differ diff --git a/src/main/resources/assets/wild_wind/textures/block/baobab_log_top_stripped.png b/src/main/resources/assets/wild_wind/textures/block/baobab_log_top_stripped.png new file mode 100644 index 00000000..594aad45 Binary files /dev/null and b/src/main/resources/assets/wild_wind/textures/block/baobab_log_top_stripped.png differ diff --git a/src/main/resources/assets/wild_wind/textures/entity/piranha.png b/src/main/resources/assets/wild_wind/textures/entity/piranha.png index b92cce64..902ff2f6 100644 Binary files a/src/main/resources/assets/wild_wind/textures/entity/piranha.png and b/src/main/resources/assets/wild_wind/textures/entity/piranha.png differ diff --git a/src/main/resources/assets/wild_wind/textures/entity/trout.png b/src/main/resources/assets/wild_wind/textures/entity/trout.png index 4244d63e..05c58647 100644 Binary files a/src/main/resources/assets/wild_wind/textures/entity/trout.png and b/src/main/resources/assets/wild_wind/textures/entity/trout.png differ diff --git a/src/main/resources/assets/wild_wind/textures/item/baobab_boat.png b/src/main/resources/assets/wild_wind/textures/item/baobab_boat.png new file mode 100644 index 00000000..20d4bf1d Binary files /dev/null and b/src/main/resources/assets/wild_wind/textures/item/baobab_boat.png differ diff --git a/src/main/resources/assets/wild_wind/textures/item/baobab_chest_boat.png b/src/main/resources/assets/wild_wind/textures/item/baobab_chest_boat.png new file mode 100644 index 00000000..c0178882 Binary files /dev/null and b/src/main/resources/assets/wild_wind/textures/item/baobab_chest_boat.png differ diff --git a/src/main/resources/textures/block/azalea_door_bottom.png b/src/main/resources/textures/block/azalea_door_bottom.png new file mode 100644 index 00000000..d53d2cfa Binary files /dev/null and b/src/main/resources/textures/block/azalea_door_bottom.png differ diff --git a/src/main/resources/textures/block/azalea_door_top.png b/src/main/resources/textures/block/azalea_door_top.png new file mode 100644 index 00000000..b522e9e3 Binary files /dev/null and b/src/main/resources/textures/block/azalea_door_top.png differ diff --git a/src/main/resources/textures/block/azalea_log.png b/src/main/resources/textures/block/azalea_log.png new file mode 100644 index 00000000..522f5af3 Binary files /dev/null and b/src/main/resources/textures/block/azalea_log.png differ diff --git a/src/main/resources/textures/block/azalea_log_top.png b/src/main/resources/textures/block/azalea_log_top.png new file mode 100644 index 00000000..2555ec16 Binary files /dev/null and b/src/main/resources/textures/block/azalea_log_top.png differ diff --git a/src/main/resources/textures/block/azalea_planks.png b/src/main/resources/textures/block/azalea_planks.png new file mode 100644 index 00000000..8f4c5fa2 Binary files /dev/null and b/src/main/resources/textures/block/azalea_planks.png differ diff --git a/src/main/resources/textures/block/azalea_trapdoor.png b/src/main/resources/textures/block/azalea_trapdoor.png new file mode 100644 index 00000000..447405ac Binary files /dev/null and b/src/main/resources/textures/block/azalea_trapdoor.png differ diff --git a/src/main/resources/textures/block/baobab_door_bottom.png b/src/main/resources/textures/block/baobab_door_bottom.png new file mode 100644 index 00000000..442064f3 Binary files /dev/null and b/src/main/resources/textures/block/baobab_door_bottom.png differ diff --git a/src/main/resources/textures/block/baobab_door_top.png b/src/main/resources/textures/block/baobab_door_top.png new file mode 100644 index 00000000..3e0751e4 Binary files /dev/null and b/src/main/resources/textures/block/baobab_door_top.png differ diff --git a/src/main/resources/textures/block/baobab_leaves.png b/src/main/resources/textures/block/baobab_leaves.png new file mode 100644 index 00000000..227a7c9c Binary files /dev/null and b/src/main/resources/textures/block/baobab_leaves.png differ diff --git a/src/main/resources/textures/block/baobab_log_side.png b/src/main/resources/textures/block/baobab_log_side.png new file mode 100644 index 00000000..c05be267 Binary files /dev/null and b/src/main/resources/textures/block/baobab_log_side.png differ diff --git a/src/main/resources/textures/block/baobab_log_side_stripped.png b/src/main/resources/textures/block/baobab_log_side_stripped.png new file mode 100644 index 00000000..577424d6 Binary files /dev/null and b/src/main/resources/textures/block/baobab_log_side_stripped.png differ diff --git a/src/main/resources/textures/block/baobab_log_top.png b/src/main/resources/textures/block/baobab_log_top.png new file mode 100644 index 00000000..465b2150 Binary files /dev/null and b/src/main/resources/textures/block/baobab_log_top.png differ diff --git a/src/main/resources/textures/block/baobab_log_top_stripped.png b/src/main/resources/textures/block/baobab_log_top_stripped.png new file mode 100644 index 00000000..594aad45 Binary files /dev/null and b/src/main/resources/textures/block/baobab_log_top_stripped.png differ diff --git a/src/main/resources/textures/block/baobab_planks.png b/src/main/resources/textures/block/baobab_planks.png new file mode 100644 index 00000000..d7d9a0f2 Binary files /dev/null and b/src/main/resources/textures/block/baobab_planks.png differ diff --git a/src/main/resources/textures/block/baobab_sapling.png b/src/main/resources/textures/block/baobab_sapling.png new file mode 100644 index 00000000..e6c6cd70 Binary files /dev/null and b/src/main/resources/textures/block/baobab_sapling.png differ diff --git a/src/main/resources/textures/block/baobab_trapdoor.png b/src/main/resources/textures/block/baobab_trapdoor.png new file mode 100644 index 00000000..2820e670 Binary files /dev/null and b/src/main/resources/textures/block/baobab_trapdoor.png differ diff --git a/src/main/resources/textures/block/brittle_ice_0.png b/src/main/resources/textures/block/brittle_ice_0.png new file mode 100644 index 00000000..7cb11f63 Binary files /dev/null and b/src/main/resources/textures/block/brittle_ice_0.png differ diff --git a/src/main/resources/textures/block/brittle_ice_1.png b/src/main/resources/textures/block/brittle_ice_1.png new file mode 100644 index 00000000..4fbe3cf1 Binary files /dev/null and b/src/main/resources/textures/block/brittle_ice_1.png differ diff --git a/src/main/resources/textures/block/brittle_ice_2.png b/src/main/resources/textures/block/brittle_ice_2.png new file mode 100644 index 00000000..f3ebc922 Binary files /dev/null and b/src/main/resources/textures/block/brittle_ice_2.png differ diff --git a/src/main/resources/textures/block/brittle_ice_3.png b/src/main/resources/textures/block/brittle_ice_3.png new file mode 100644 index 00000000..499169bb Binary files /dev/null and b/src/main/resources/textures/block/brittle_ice_3.png differ diff --git a/src/main/resources/textures/block/deepslate_salt_ore.png b/src/main/resources/textures/block/deepslate_salt_ore.png new file mode 100644 index 00000000..6143b846 Binary files /dev/null and b/src/main/resources/textures/block/deepslate_salt_ore.png differ diff --git a/src/main/resources/textures/block/palm_crown.png b/src/main/resources/textures/block/palm_crown.png new file mode 100644 index 00000000..5bb6e642 Binary files /dev/null and b/src/main/resources/textures/block/palm_crown.png differ diff --git a/src/main/resources/textures/block/palm_door_bottom.png b/src/main/resources/textures/block/palm_door_bottom.png new file mode 100644 index 00000000..a17c7356 Binary files /dev/null and b/src/main/resources/textures/block/palm_door_bottom.png differ diff --git a/src/main/resources/textures/block/palm_door_top.png b/src/main/resources/textures/block/palm_door_top.png new file mode 100644 index 00000000..f8dfa5aa Binary files /dev/null and b/src/main/resources/textures/block/palm_door_top.png differ diff --git a/src/main/resources/textures/block/palm_leaves.png b/src/main/resources/textures/block/palm_leaves.png new file mode 100644 index 00000000..b073073e Binary files /dev/null and b/src/main/resources/textures/block/palm_leaves.png differ diff --git a/src/main/resources/textures/block/palm_log.png b/src/main/resources/textures/block/palm_log.png new file mode 100644 index 00000000..e81d41ef Binary files /dev/null and b/src/main/resources/textures/block/palm_log.png differ diff --git a/src/main/resources/textures/block/palm_log_top.png b/src/main/resources/textures/block/palm_log_top.png new file mode 100644 index 00000000..beb83655 Binary files /dev/null and b/src/main/resources/textures/block/palm_log_top.png differ diff --git a/src/main/resources/textures/block/palm_planks.png b/src/main/resources/textures/block/palm_planks.png new file mode 100644 index 00000000..d40841d9 Binary files /dev/null and b/src/main/resources/textures/block/palm_planks.png differ diff --git a/src/main/resources/textures/block/palm_sapling.png b/src/main/resources/textures/block/palm_sapling.png new file mode 100644 index 00000000..43b185c6 Binary files /dev/null and b/src/main/resources/textures/block/palm_sapling.png differ diff --git a/src/main/resources/textures/block/palm_trapdoor.png b/src/main/resources/textures/block/palm_trapdoor.png new file mode 100644 index 00000000..64840929 Binary files /dev/null and b/src/main/resources/textures/block/palm_trapdoor.png differ diff --git a/src/main/resources/textures/block/salt_block.png b/src/main/resources/textures/block/salt_block.png new file mode 100644 index 00000000..ace7eda7 Binary files /dev/null and b/src/main/resources/textures/block/salt_block.png differ diff --git a/src/main/resources/textures/block/salt_ore.png b/src/main/resources/textures/block/salt_ore.png new file mode 100644 index 00000000..bfcd884d Binary files /dev/null and b/src/main/resources/textures/block/salt_ore.png differ diff --git a/src/main/resources/textures/block/stripped_azalea_log.png b/src/main/resources/textures/block/stripped_azalea_log.png new file mode 100644 index 00000000..fd038e54 Binary files /dev/null and b/src/main/resources/textures/block/stripped_azalea_log.png differ diff --git a/src/main/resources/textures/block/stripped_azalea_log_top.png b/src/main/resources/textures/block/stripped_azalea_log_top.png new file mode 100644 index 00000000..d9080a07 Binary files /dev/null and b/src/main/resources/textures/block/stripped_azalea_log_top.png differ diff --git a/src/main/resources/textures/block/stripped_palm_log.png b/src/main/resources/textures/block/stripped_palm_log.png new file mode 100644 index 00000000..8b0a0247 Binary files /dev/null and b/src/main/resources/textures/block/stripped_palm_log.png differ diff --git a/src/main/resources/textures/block/stripped_palm_log_top.png b/src/main/resources/textures/block/stripped_palm_log_top.png new file mode 100644 index 00000000..5a14215e Binary files /dev/null and b/src/main/resources/textures/block/stripped_palm_log_top.png differ diff --git a/src/main/resources/textures/entity/boat/azalea.png b/src/main/resources/textures/entity/boat/azalea.png new file mode 100644 index 00000000..c43d768d Binary files /dev/null and b/src/main/resources/textures/entity/boat/azalea.png differ diff --git a/src/main/resources/textures/entity/boat/baobab.png b/src/main/resources/textures/entity/boat/baobab.png new file mode 100644 index 00000000..499cfd60 Binary files /dev/null and b/src/main/resources/textures/entity/boat/baobab.png differ diff --git a/src/main/resources/textures/entity/boat/palm.png b/src/main/resources/textures/entity/boat/palm.png new file mode 100644 index 00000000..08826447 Binary files /dev/null and b/src/main/resources/textures/entity/boat/palm.png differ diff --git a/src/main/resources/textures/entity/chest_boat/azalea.png b/src/main/resources/textures/entity/chest_boat/azalea.png new file mode 100644 index 00000000..bfd1c8dd Binary files /dev/null and b/src/main/resources/textures/entity/chest_boat/azalea.png differ diff --git a/src/main/resources/textures/entity/chest_boat/baobab.png b/src/main/resources/textures/entity/chest_boat/baobab.png new file mode 100644 index 00000000..ad66eefc Binary files /dev/null and b/src/main/resources/textures/entity/chest_boat/baobab.png differ diff --git a/src/main/resources/textures/entity/chest_boat/palm.png b/src/main/resources/textures/entity/chest_boat/palm.png new file mode 100644 index 00000000..a96df33c Binary files /dev/null and b/src/main/resources/textures/entity/chest_boat/palm.png differ diff --git a/src/main/resources/textures/entity/signs/azalea.png b/src/main/resources/textures/entity/signs/azalea.png new file mode 100644 index 00000000..7cc55a96 Binary files /dev/null and b/src/main/resources/textures/entity/signs/azalea.png differ diff --git a/src/main/resources/textures/entity/signs/baobab.png b/src/main/resources/textures/entity/signs/baobab.png new file mode 100644 index 00000000..0a8c2d43 Binary files /dev/null and b/src/main/resources/textures/entity/signs/baobab.png differ diff --git a/src/main/resources/textures/entity/signs/hanging/azalea.png b/src/main/resources/textures/entity/signs/hanging/azalea.png new file mode 100644 index 00000000..bf576863 Binary files /dev/null and b/src/main/resources/textures/entity/signs/hanging/azalea.png differ diff --git a/src/main/resources/textures/entity/signs/hanging/baobab.png b/src/main/resources/textures/entity/signs/hanging/baobab.png new file mode 100644 index 00000000..0ae333b7 Binary files /dev/null and b/src/main/resources/textures/entity/signs/hanging/baobab.png differ diff --git a/src/main/resources/textures/entity/signs/hanging/palm.png b/src/main/resources/textures/entity/signs/hanging/palm.png new file mode 100644 index 00000000..882d8b46 Binary files /dev/null and b/src/main/resources/textures/entity/signs/hanging/palm.png differ diff --git a/src/main/resources/textures/entity/signs/palm.png b/src/main/resources/textures/entity/signs/palm.png new file mode 100644 index 00000000..1facb708 Binary files /dev/null and b/src/main/resources/textures/entity/signs/palm.png differ diff --git a/src/main/resources/textures/gui/hanging_signs/azalea.png b/src/main/resources/textures/gui/hanging_signs/azalea.png new file mode 100644 index 00000000..38f2ebba Binary files /dev/null and b/src/main/resources/textures/gui/hanging_signs/azalea.png differ diff --git a/src/main/resources/textures/gui/hanging_signs/baobab.png b/src/main/resources/textures/gui/hanging_signs/baobab.png new file mode 100644 index 00000000..f2d87f1a Binary files /dev/null and b/src/main/resources/textures/gui/hanging_signs/baobab.png differ diff --git a/src/main/resources/textures/gui/hanging_signs/palm.png b/src/main/resources/textures/gui/hanging_signs/palm.png new file mode 100644 index 00000000..7f9553cf Binary files /dev/null and b/src/main/resources/textures/gui/hanging_signs/palm.png differ diff --git a/src/main/resources/textures/item/azalea_boat.png b/src/main/resources/textures/item/azalea_boat.png new file mode 100644 index 00000000..cdb2adc1 Binary files /dev/null and b/src/main/resources/textures/item/azalea_boat.png differ diff --git a/src/main/resources/textures/item/azalea_chest_boat.png b/src/main/resources/textures/item/azalea_chest_boat.png new file mode 100644 index 00000000..ac886128 Binary files /dev/null and b/src/main/resources/textures/item/azalea_chest_boat.png differ diff --git a/src/main/resources/textures/item/azalea_door.png b/src/main/resources/textures/item/azalea_door.png new file mode 100644 index 00000000..e0f79f78 Binary files /dev/null and b/src/main/resources/textures/item/azalea_door.png differ diff --git a/src/main/resources/textures/item/azalea_hanging_sign.png b/src/main/resources/textures/item/azalea_hanging_sign.png new file mode 100644 index 00000000..ae7ffb90 Binary files /dev/null and b/src/main/resources/textures/item/azalea_hanging_sign.png differ diff --git a/src/main/resources/textures/item/azalea_sign.png b/src/main/resources/textures/item/azalea_sign.png new file mode 100644 index 00000000..092e6449 Binary files /dev/null and b/src/main/resources/textures/item/azalea_sign.png differ diff --git a/src/main/resources/textures/item/baobab_boat.png b/src/main/resources/textures/item/baobab_boat.png new file mode 100644 index 00000000..20d4bf1d Binary files /dev/null and b/src/main/resources/textures/item/baobab_boat.png differ diff --git a/src/main/resources/textures/item/baobab_chest_boat.png b/src/main/resources/textures/item/baobab_chest_boat.png new file mode 100644 index 00000000..c0178882 Binary files /dev/null and b/src/main/resources/textures/item/baobab_chest_boat.png differ diff --git a/src/main/resources/textures/item/baobab_door.png b/src/main/resources/textures/item/baobab_door.png new file mode 100644 index 00000000..de90c316 Binary files /dev/null and b/src/main/resources/textures/item/baobab_door.png differ diff --git a/src/main/resources/textures/item/baobab_hanging_sign.png b/src/main/resources/textures/item/baobab_hanging_sign.png new file mode 100644 index 00000000..61110195 Binary files /dev/null and b/src/main/resources/textures/item/baobab_hanging_sign.png differ diff --git a/src/main/resources/textures/item/baobab_sign.png b/src/main/resources/textures/item/baobab_sign.png new file mode 100644 index 00000000..e1dc969d Binary files /dev/null and b/src/main/resources/textures/item/baobab_sign.png differ diff --git a/src/main/resources/textures/item/palm_boat.png b/src/main/resources/textures/item/palm_boat.png new file mode 100644 index 00000000..4527fa0a Binary files /dev/null and b/src/main/resources/textures/item/palm_boat.png differ diff --git a/src/main/resources/textures/item/palm_chest_boat.png b/src/main/resources/textures/item/palm_chest_boat.png new file mode 100644 index 00000000..2e078dfb Binary files /dev/null and b/src/main/resources/textures/item/palm_chest_boat.png differ diff --git a/src/main/resources/textures/item/palm_door.png b/src/main/resources/textures/item/palm_door.png new file mode 100644 index 00000000..c0a7d7fc Binary files /dev/null and b/src/main/resources/textures/item/palm_door.png differ diff --git a/src/main/resources/textures/item/palm_hanging_sign.png b/src/main/resources/textures/item/palm_hanging_sign.png new file mode 100644 index 00000000..31659bb0 Binary files /dev/null and b/src/main/resources/textures/item/palm_hanging_sign.png differ diff --git a/src/main/resources/textures/item/palm_sign.png b/src/main/resources/textures/item/palm_sign.png new file mode 100644 index 00000000..69e66594 Binary files /dev/null and b/src/main/resources/textures/item/palm_sign.png differ