From a0b2475f1e40713ad8330122d444d9fa5155bc9e Mon Sep 17 00:00:00 2001 From: "Daniel (aka. rotgruengelb)" Date: Tue, 16 Apr 2024 21:40:56 +0200 Subject: [PATCH] - added spawning in all types of taigas and more rarely in snowy plains, frozen rivers, ice spikes and windswept gravelly hills - added sound to braking plushie - removed broken particles of plushie - plushie now drops itself when broken - Fixed animations and models - added plushie to functional itemgroup - added translations --- .../net/rotgruengelb/forestal/Forestal.java | 6 ++-- .../forestal/block/ForestalBlocks.java | 6 ++-- .../forestal/entity/ForestalEntities.java | 3 ++ .../forestal/entity/GrizzlyBearEntity.java | 11 +++++++ .../forestal/item/ForestalItems.java | 3 ++ .../forestal/util/ForestalTags.java | 29 +++++++++++++++++ .../world/gen/ForestalEntityGeneration.java | 20 ++++++++++++ .../world/gen/ForestalWorldGeneration.java | 8 +++++ .../animations/grizzly_bear.animation.json | 9 ++++-- .../resources/assets/forestal/lang/en_us.json | 5 +++ .../models/block/grizzly_plushie.bbmodel | 2 +- .../models/block/grizzly_plushie.json | 31 ++++++++++++++++++- .../loot_tables/blocks/grizzly_plushie.json | 21 +++++++++++++ .../biome/spawns_entity/grizzly_bear.json | 13 ++++++++ .../spawns_entity/grizzly_bear/common.json | 9 ++++++ .../spawns_entity/grizzly_bear/rare.json | 21 +++++++++++++ 16 files changed, 186 insertions(+), 11 deletions(-) create mode 100644 src/main/java/net/rotgruengelb/forestal/util/ForestalTags.java create mode 100644 src/main/java/net/rotgruengelb/forestal/world/gen/ForestalEntityGeneration.java create mode 100644 src/main/java/net/rotgruengelb/forestal/world/gen/ForestalWorldGeneration.java create mode 100644 src/main/resources/assets/forestal/lang/en_us.json create mode 100644 src/main/resources/data/forestal/loot_tables/blocks/grizzly_plushie.json create mode 100644 src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear.json create mode 100644 src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear/common.json create mode 100644 src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear/rare.json diff --git a/src/main/java/net/rotgruengelb/forestal/Forestal.java b/src/main/java/net/rotgruengelb/forestal/Forestal.java index ae2e485..261450b 100644 --- a/src/main/java/net/rotgruengelb/forestal/Forestal.java +++ b/src/main/java/net/rotgruengelb/forestal/Forestal.java @@ -1,11 +1,10 @@ package net.rotgruengelb.forestal; import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry; import net.rotgruengelb.forestal.block.ForestalBlocks; import net.rotgruengelb.forestal.entity.ForestalEntities; -import net.rotgruengelb.forestal.entity.GrizzlyBearEntity; import net.rotgruengelb.forestal.item.ForestalItems; +import net.rotgruengelb.forestal.world.gen.ForestalWorldGeneration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -19,7 +18,6 @@ public void onInitialize() { ForestalBlocks.registerModBlocks(); ForestalEntities.registerModEntities(); ForestalItems.registerModItems(); - - FabricDefaultAttributeRegistry.register(ForestalEntities.GRIZZLY_BEAR, GrizzlyBearEntity.createGrizzlyBearAttributes()); + ForestalWorldGeneration.generateModWorldGeneration(); } } \ No newline at end of file diff --git a/src/main/java/net/rotgruengelb/forestal/block/ForestalBlocks.java b/src/main/java/net/rotgruengelb/forestal/block/ForestalBlocks.java index 339145d..1080eb5 100644 --- a/src/main/java/net/rotgruengelb/forestal/block/ForestalBlocks.java +++ b/src/main/java/net/rotgruengelb/forestal/block/ForestalBlocks.java @@ -6,14 +6,14 @@ import net.minecraft.item.BlockItem; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.sound.BlockSoundGroup; import net.minecraft.util.Identifier; import net.rotgruengelb.forestal.Forestal; public class ForestalBlocks { - public static final Block GRIZZLY_PLUSHIE = registerBlock("grizzly_plushie", - new PlushieBlock(FabricBlockSettings.create() - .nonOpaque())); + public static final Block GRIZZLY_PLUSHIE = registerBlock("grizzly_plushie", new PlushieBlock(FabricBlockSettings.create() + .nonOpaque().breakInstantly().noBlockBreakParticles().sounds(BlockSoundGroup.WOOL))); private static Block registerBlockNoItem(String name, Block block) { return Registry.register(Registries.BLOCK, new Identifier(Forestal.MOD_ID, name), block); diff --git a/src/main/java/net/rotgruengelb/forestal/entity/ForestalEntities.java b/src/main/java/net/rotgruengelb/forestal/entity/ForestalEntities.java index 6ccffaa..e502957 100644 --- a/src/main/java/net/rotgruengelb/forestal/entity/ForestalEntities.java +++ b/src/main/java/net/rotgruengelb/forestal/entity/ForestalEntities.java @@ -1,5 +1,6 @@ package net.rotgruengelb.forestal.entity; +import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry; import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; import net.minecraft.entity.EntityDimensions; import net.minecraft.entity.EntityType; @@ -16,5 +17,7 @@ public class ForestalEntities { public static void registerModEntities() { Forestal.LOGGER.debug("Registering ForestalEntities for " + Forestal.MOD_ID); + + FabricDefaultAttributeRegistry.register(ForestalEntities.GRIZZLY_BEAR, GrizzlyBearEntity.createGrizzlyBearAttributes()); } } diff --git a/src/main/java/net/rotgruengelb/forestal/entity/GrizzlyBearEntity.java b/src/main/java/net/rotgruengelb/forestal/entity/GrizzlyBearEntity.java index c9009f8..2706483 100644 --- a/src/main/java/net/rotgruengelb/forestal/entity/GrizzlyBearEntity.java +++ b/src/main/java/net/rotgruengelb/forestal/entity/GrizzlyBearEntity.java @@ -2,6 +2,7 @@ import net.minecraft.block.BlockState; import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnReason; import net.minecraft.entity.ai.goal.*; import net.minecraft.entity.attribute.DefaultAttributeContainer; import net.minecraft.entity.attribute.EntityAttributes; @@ -13,10 +14,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.recipe.Ingredient; +import net.minecraft.registry.tag.BlockTags; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.ServerWorldAccess; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; import software.bernie.geckolib.animatable.GeoEntity; @@ -40,6 +44,13 @@ public static DefaultAttributeContainer.Builder createGrizzlyBearAttributes() { .add(EntityAttributes.GENERIC_ATTACK_DAMAGE, 6.0); } + public static boolean isValidGrizzlyBearSpawn(EntityType grizzlyBearEntityEntityType, ServerWorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) { + boolean bl = SpawnReason.isTrialSpawner(spawnReason) || AnimalEntity.isLightLevelValidForNaturalSpawn(world, pos); + return (world.getBlockState(pos.down()) + .isIn(BlockTags.ANIMALS_SPAWNABLE_ON) || world.getBlockState(pos.down()) + .isIn(BlockTags.ICE)) && bl; + } + @Nullable @Override public PassiveEntity createChild(ServerWorld world, PassiveEntity entity) { diff --git a/src/main/java/net/rotgruengelb/forestal/item/ForestalItems.java b/src/main/java/net/rotgruengelb/forestal/item/ForestalItems.java index c06f45f..f752eb2 100644 --- a/src/main/java/net/rotgruengelb/forestal/item/ForestalItems.java +++ b/src/main/java/net/rotgruengelb/forestal/item/ForestalItems.java @@ -13,6 +13,8 @@ import net.rotgruengelb.forestal.Forestal; import net.rotgruengelb.forestal.entity.ForestalEntities; +import static net.rotgruengelb.forestal.block.ForestalBlocks.GRIZZLY_PLUSHIE; + public class ForestalItems { public static final Item GRIZZLY_BEAR_SPAWN_EGG = registerItem("grizzly_bear_spawn_egg", new SpawnEggItem(ForestalEntities.GRIZZLY_BEAR, 0x966240, 0x553a28, new FabricItemSettings())); @@ -22,6 +24,7 @@ private static Item registerItem(String name, Item item) { public static void addItemsToItemGroup() { addToItemGroup(ItemGroups.SPAWN_EGGS, GRIZZLY_BEAR_SPAWN_EGG); + addToItemGroup(ItemGroups.FUNCTIONAL, GRIZZLY_PLUSHIE.asItem()); } private static void addToItemGroup(RegistryKey group, Item item) { diff --git a/src/main/java/net/rotgruengelb/forestal/util/ForestalTags.java b/src/main/java/net/rotgruengelb/forestal/util/ForestalTags.java new file mode 100644 index 0000000..c4feab1 --- /dev/null +++ b/src/main/java/net/rotgruengelb/forestal/util/ForestalTags.java @@ -0,0 +1,29 @@ +package net.rotgruengelb.forestal.util; + +import net.minecraft.item.Item; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.util.Identifier; +import net.minecraft.world.biome.Biome; +import net.rotgruengelb.forestal.Forestal; + +public class ForestalTags { + public static class Biomes { + private static TagKey of(String id) { + return TagKey.of(RegistryKeys.BIOME, new Identifier(Forestal.MOD_ID, id)); + } + + public static class SPAWNS_GRIZZLY_BEAR { + public static final TagKey COMMON = of("spawns_entity/grizzly_bear/common"); + public static final TagKey RARE = of("spawns_entity/grizzly_bear/rare"); + public static final TagKey ALL = of("spawns_entity/grizzly_bear"); + } + } + + public static class Items { + + private static TagKey of(String id) { + return TagKey.of(RegistryKeys.ITEM, new Identifier(Forestal.MOD_ID, id)); + } + } +} diff --git a/src/main/java/net/rotgruengelb/forestal/world/gen/ForestalEntityGeneration.java b/src/main/java/net/rotgruengelb/forestal/world/gen/ForestalEntityGeneration.java new file mode 100644 index 0000000..5e93c9f --- /dev/null +++ b/src/main/java/net/rotgruengelb/forestal/world/gen/ForestalEntityGeneration.java @@ -0,0 +1,20 @@ +package net.rotgruengelb.forestal.world.gen; + +import net.fabricmc.fabric.api.biome.v1.BiomeModifications; +import net.fabricmc.fabric.api.biome.v1.BiomeSelectors; +import net.minecraft.entity.SpawnGroup; +import net.minecraft.entity.SpawnRestriction; +import net.minecraft.world.Heightmap; +import net.rotgruengelb.forestal.entity.ForestalEntities; +import net.rotgruengelb.forestal.entity.GrizzlyBearEntity; +import net.rotgruengelb.forestal.util.ForestalTags; + +public class ForestalEntityGeneration { + public static void addSpawns() { + BiomeModifications.addSpawn(BiomeSelectors.tag(ForestalTags.Biomes.SPAWNS_GRIZZLY_BEAR.COMMON), SpawnGroup.CREATURE, ForestalEntities.GRIZZLY_BEAR, 30, 1, 2); + + BiomeModifications.addSpawn(BiomeSelectors.tag(ForestalTags.Biomes.SPAWNS_GRIZZLY_BEAR.RARE), SpawnGroup.CREATURE, ForestalEntities.GRIZZLY_BEAR, 7, 1, 1); + + SpawnRestriction.register(ForestalEntities.GRIZZLY_BEAR, SpawnRestriction.Location.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, GrizzlyBearEntity::isValidGrizzlyBearSpawn); + } +} diff --git a/src/main/java/net/rotgruengelb/forestal/world/gen/ForestalWorldGeneration.java b/src/main/java/net/rotgruengelb/forestal/world/gen/ForestalWorldGeneration.java new file mode 100644 index 0000000..4373157 --- /dev/null +++ b/src/main/java/net/rotgruengelb/forestal/world/gen/ForestalWorldGeneration.java @@ -0,0 +1,8 @@ +package net.rotgruengelb.forestal.world.gen; + +public class ForestalWorldGeneration { + + public static void generateModWorldGeneration() { + ForestalEntityGeneration.addSpawns(); + } +} diff --git a/src/main/resources/assets/forestal/animations/grizzly_bear.animation.json b/src/main/resources/assets/forestal/animations/grizzly_bear.animation.json index eaf9e6f..b96af6c 100644 --- a/src/main/resources/assets/forestal/animations/grizzly_bear.animation.json +++ b/src/main/resources/assets/forestal/animations/grizzly_bear.animation.json @@ -10,12 +10,12 @@ "vector": ["Math.sin((query.anim_time + 0.1) * 180) * 1.5", 0, 0] }, "position": { - "vector": [0, "Math.sin((query.anim_time - 0.0) * 180) * 0.4", 0] + "vector": [0, "-1+Math.sin((query.anim_time - 0.0) * 180) * 0.4", 0] } }, "body": { "position": { - "vector": [0, "Math.sin((query.anim_time - 0.0) * 180) * 0.4", 0] + "vector": [0, "-1+Math.sin((query.anim_time - 0.0) * 180) * 0.4", 0] } } } @@ -113,6 +113,11 @@ "position": { "vector": [0, -7, 0] } + }, + "body": { + "position": { + "vector": [0, "Math.sin((query.anim_time - 0.0) * 120) * 0.4", 0] + } } } } diff --git a/src/main/resources/assets/forestal/lang/en_us.json b/src/main/resources/assets/forestal/lang/en_us.json new file mode 100644 index 0000000..5bb2dc3 --- /dev/null +++ b/src/main/resources/assets/forestal/lang/en_us.json @@ -0,0 +1,5 @@ +{ + "block.forestal.grizzly_plushie": "Grizzly Bear Plushie", + "entity.forestal.grizzly_bear": "Grizzly Bear", + "item.forestal.grizzly_bear_spawn_egg": "Grizzly Bear Spawn Egg" +} \ No newline at end of file diff --git a/src/main/resources/assets/forestal/models/block/grizzly_plushie.bbmodel b/src/main/resources/assets/forestal/models/block/grizzly_plushie.bbmodel index d4992d7..24313d5 100644 --- a/src/main/resources/assets/forestal/models/block/grizzly_plushie.bbmodel +++ b/src/main/resources/assets/forestal/models/block/grizzly_plushie.bbmodel @@ -1 +1 @@ -{"meta":{"format_version":"4.9","model_format":"java_block","box_uv":true},"name":"grizzly_plushie","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"unhandled_root_fields":{},"resolution":{"width":32,"height":32},"elements":[{"name":"cube","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[4.5,0,6],"to":[11.5,9,11],"autouv":0,"color":0,"origin":[8.5,0,9],"faces":{"north":{"uv":[5,5,12,14],"texture":0},"east":{"uv":[0,5,5,14],"texture":0},"south":{"uv":[17,5,24,14],"texture":0},"west":{"uv":[12,5,17,14],"texture":0},"up":{"uv":[12,5,5,0],"texture":0},"down":{"uv":[19,0,12,5],"texture":0}},"type":"cube","uuid":"087812e8-1690-9738-4f48-af1a1e2dbdf9"},{"name":"cube","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[9.5,0,5],"to":[12.5,2,6],"autouv":0,"color":6,"rotation":[0,-22.5,0],"origin":[11,1,5.5],"uv_offset":[16,19],"faces":{"north":{"uv":[17,20,20,22],"texture":0},"east":{"uv":[16,20,17,22],"texture":0},"south":{"uv":[21,20,24,22],"texture":0},"west":{"uv":[20,20,21,22],"texture":0},"up":{"uv":[20,20,17,19],"texture":0},"down":{"uv":[23,19,20,20],"texture":0}},"type":"cube","uuid":"8ff96bcb-edab-356d-d1a6-dd59f76a8bf4"},{"name":"cube","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[3.5,0,5],"to":[6.5,2,6],"autouv":0,"color":6,"rotation":[0,22.5,0],"origin":[5,1,5.5],"uv_offset":[16,22],"faces":{"north":{"uv":[17,23,20,25],"texture":0},"east":{"uv":[16,23,17,25],"texture":0},"south":{"uv":[21,23,24,25],"texture":0},"west":{"uv":[20,23,21,25],"texture":0},"up":{"uv":[20,23,17,22],"texture":0},"down":{"uv":[23,22,20,23],"texture":0}},"type":"cube","uuid":"804c0a8d-4e9e-3f92-b5b4-ac316559d9cc"},{"name":"cube","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[9.5,8,8],"to":[12.5,10,9],"autouv":0,"color":8,"origin":[8.5,0,9],"uv_offset":[0,19],"faces":{"north":{"uv":[1,20,4,22],"texture":0},"east":{"uv":[0,20,1,22],"texture":0},"south":{"uv":[5,20,8,22],"texture":0},"west":{"uv":[4,20,5,22],"texture":0},"up":{"uv":[4,20,1,19],"texture":0},"down":{"uv":[7,19,4,20],"texture":0}},"type":"cube","uuid":"9bb79ca1-3473-8e2c-8694-5d1c5e4a623a"},{"name":"cube","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[3.5,8,8],"to":[6.5,10,9],"autouv":0,"color":8,"origin":[8.5,0,9],"uv_offset":[16,14],"faces":{"north":{"uv":[17,15,20,17],"texture":0},"east":{"uv":[16,15,17,17],"texture":0},"south":{"uv":[21,15,24,17],"texture":0},"west":{"uv":[20,15,21,17],"texture":0},"up":{"uv":[20,15,17,14],"texture":0},"down":{"uv":[23,14,20,15],"texture":0}},"type":"cube","uuid":"38dd8ded-45ec-64a9-a6bd-01aca5d3973b"},{"name":"cube","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[5.5,5,4],"to":[10.5,7,7],"autouv":0,"color":5,"origin":[8.5,0,9],"uv_offset":[0,14],"faces":{"north":{"uv":[3,17,8,19],"texture":0},"east":{"uv":[0,17,3,19],"texture":0},"south":{"uv":[11,17,16,19],"texture":0},"west":{"uv":[8,17,11,19],"texture":0},"up":{"uv":[8,17,3,14],"texture":0},"down":{"uv":[13,14,8,17],"texture":0}},"type":"cube","uuid":"eb134a56-16d4-8aa5-0bb7-849daeab8476"},{"name":"cube","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[8.89941753585461,-0.574010924528082,8],"to":[9.89941753585461,3.4259890754719198,10],"autouv":0,"color":0,"rotation":[0,0,22.5],"origin":[8,9.5,8],"uv_offset":[6,21],"faces":{"north":{"uv":[8,23,9,27],"texture":0},"east":{"uv":[6,23,8,27],"texture":0},"south":{"uv":[11,23,12,27],"texture":0},"west":{"uv":[9,23,11,27],"texture":0},"up":{"uv":[9,23,8,21],"texture":0},"down":{"uv":[10,21,9,23],"texture":0}},"type":"cube","uuid":"e71f7df3-c91f-31ba-66d8-5c2254c4c3f9"},{"name":"cube","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[6.1006,-0.5739999999999981,8],"to":[7.1006,3.4259999999999984,10],"autouv":0,"color":0,"rotation":[0,0,-22.5],"origin":[8,9.5,8],"uv_offset":[0,21],"faces":{"north":{"uv":[2,23,3,27],"texture":0},"east":{"uv":[0,23,2,27],"texture":0},"south":{"uv":[5,23,6,27],"texture":0},"west":{"uv":[3,23,5,27],"texture":0},"up":{"uv":[3,23,2,21],"texture":0},"down":{"uv":[4,21,3,23],"texture":0}},"type":"cube","uuid":"34efee8e-3c9f-c2ea-f656-a83ab7a95590"}],"outliner":[{"name":"grizzly_plushie","origin":[8,8,8],"color":0,"uuid":"0d1c5e92-650a-ec54-04c7-966f79fdef5f","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["087812e8-1690-9738-4f48-af1a1e2dbdf9","8ff96bcb-edab-356d-d1a6-dd59f76a8bf4","804c0a8d-4e9e-3f92-b5b4-ac316559d9cc","9bb79ca1-3473-8e2c-8694-5d1c5e4a623a","38dd8ded-45ec-64a9-a6bd-01aca5d3973b","eb134a56-16d4-8aa5-0bb7-849daeab8476","e71f7df3-c91f-31ba-66d8-5c2254c4c3f9","34efee8e-3c9f-c2ea-f656-a83ab7a95590"]}],"textures":[{"path":"","name":"texture","folder":"block","namespace":"","id":"0","width":32,"height":32,"uv_width":32,"uv_height":32,"particle":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":false,"uuid":"5bc2b7eb-01e1-e8dd-dc3a-f0141b7dd09f","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAl5JREFUWEftVz0vREEUnUew2Y2PyCoEESWRoFNYrVqnoEWiUBF+AaFSSNBS6NRaFDoKoRREFDayiI2PsHJHzubsmPdmXrIUYpq3b97MvWfOPffe2UBZxsRQX0Gm65M16j7/UrLCfOeP2/ungc1e1Jx1gwAQ542par337um1COTXAIABecKpgLrMPoQeqGwMzA736xCAAXgUJn4NAJw3JCpV7vldh0FG2QGw4JhbAQDn0IHJvakHCREGvq3vHkUKMwAAjjmMsAhdzrFf9rBovQAAediJbMqP2sPrvQAA/clVVl3nvlTe2ZzWT64FZzdZPdfSUKe629LfagRSNxYDUDynG+i2xdT2zZYx0M3SzqGfBtiZqYEfFeFIpqtYdlmIZhYwCMTYJwtcxSkQALbTI55cB2xi5CppyxQvALbaKgBMpUf1AdYGr3MCsDmPOwchi+M4zsVPiUIPNuYLyWRK+8/nn0JxDIwvFPeFZRHYc2YBe8n0tGpB8liYGlMABWAMACIOQ+sVAjn5/OqmtpGoqijaen770L8FBDuNG6Ko9ZpKAYBFctrp5TW1MjNZEoYfBYAbkIDgdgv6FkcHNUC0ZLPTiQ7QuM5vH/VZRAOu+GsRhrVj+SiOzKsZmDI7Jb/zbxcIXYhgtLc9rY4vvhoOhgDoaKpVOJn5jdMOjYsbmLMbikGwII6EZqDmeVk3t7VnbSyuEEWKkC8kPuo2T8Txh0bEDsIQBhq+Aq5iEA9ib9Z5eTcBQMBhlxanBriS+TDgMuhjg9cEZvz4Kg5Kec5FaWwAcTeUe33s/3L/AP4cA5/yFogwMtjKLgAAAABJRU5ErkJggg=="}],"display":{}} \ No newline at end of file +{"meta":{"format_version":"4.9","model_format":"java_block","box_uv":false},"name":"grizzly_plushie","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"unhandled_root_fields":{},"resolution":{"width":32,"height":32},"elements":[{"name":"cube","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[4.5,0,6],"to":[11.5,9,11],"autouv":0,"color":6,"origin":[8.5,0,9],"faces":{"north":{"uv":[5,5,12,14],"texture":0},"east":{"uv":[0,5,5,14],"texture":0},"south":{"uv":[17,5,24,14],"texture":0},"west":{"uv":[12,5,17,14],"texture":0},"up":{"uv":[12,5,5,0],"texture":0},"down":{"uv":[19,0,12,5],"texture":0}},"type":"cube","uuid":"85d11f82-64f8-b822-0f4e-1b2391a29b81"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[9.5,0,5],"to":[12.5,2,6],"autouv":0,"color":9,"rotation":[0,-22.5,0],"origin":[11,1,5.5],"faces":{"north":{"uv":[17,20,20,22],"texture":0},"east":{"uv":[16,20,17,22],"texture":0},"south":{"uv":[21,20,24,22],"texture":0},"west":{"uv":[20,20,21,22],"texture":0},"up":{"uv":[20,20,17,19],"texture":0},"down":{"uv":[23,19,20,20],"texture":0}},"type":"cube","uuid":"3eff2a68-8b0a-825d-e2c3-10a856be41af"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[3.5,0,5],"to":[6.5,2,6],"autouv":0,"color":9,"rotation":[0,22.5,0],"origin":[5,1,5.5],"faces":{"north":{"uv":[17,23,20,25],"texture":0},"east":{"uv":[16,23,17,25],"texture":0},"south":{"uv":[21,23,24,25],"texture":0},"west":{"uv":[20,23,21,25],"texture":0},"up":{"uv":[20,23,17,22],"texture":0},"down":{"uv":[23,22,20,23],"texture":0}},"type":"cube","uuid":"24970f6d-e3f0-8464-3ad5-a3e99a488ecc"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[9.5,8,8],"to":[12.5,10,9],"autouv":0,"color":5,"origin":[8.5,0,9],"faces":{"north":{"uv":[1,20,4,22],"texture":0},"east":{"uv":[0,20,1,22],"texture":0},"south":{"uv":[5,20,8,22],"texture":0},"west":{"uv":[4,20,5,22],"texture":0},"up":{"uv":[4,20,1,19],"texture":0},"down":{"uv":[7,19,4,20],"texture":0}},"type":"cube","uuid":"fd9fd270-6dda-bb45-1336-0593ea1d5ea0"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[3.5,8,8],"to":[6.5,10,9],"autouv":0,"color":2,"origin":[8.5,0,9],"faces":{"north":{"uv":[17,15,20,17],"texture":0},"east":{"uv":[16,15,17,17],"texture":0},"south":{"uv":[21,15,24,17],"texture":0},"west":{"uv":[20,15,21,17],"texture":0},"up":{"uv":[20,15,17,14],"texture":0},"down":{"uv":[23,14,20,15],"texture":0}},"type":"cube","uuid":"da61bf66-22de-9452-b215-86bf4901e359"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[5.5,5,4],"to":[10.5,7,7],"autouv":0,"color":4,"origin":[8.5,0,9],"faces":{"north":{"uv":[3,17,8,19],"texture":0},"east":{"uv":[0,17,3,19],"texture":0},"south":{"uv":[11,17,16,19],"texture":0},"west":{"uv":[8,17,11,19],"texture":0},"up":{"uv":[8,17,3,14],"texture":0},"down":{"uv":[13,14,8,17],"texture":0}},"type":"cube","uuid":"93d8281f-af3d-8d41-3ab8-f08e340fa1e9"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[8.89942,-0.57401,8],"to":[9.89942,3.42599,10],"autouv":0,"color":4,"rotation":[0,0,22.5],"origin":[8,9.5,8],"faces":{"north":{"uv":[8,23,9,27],"texture":0},"east":{"uv":[6,23,8,27],"texture":0},"south":{"uv":[11,23,12,27],"texture":0},"west":{"uv":[9,23,11,27],"texture":0},"up":{"uv":[9,23,8,21],"texture":0},"down":{"uv":[10,21,9,23],"texture":0}},"type":"cube","uuid":"2bcd9878-cd4a-8ff1-1238-002cb505cc5a"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[6.1006,-0.574,8],"to":[7.1006,3.426,10],"autouv":0,"color":9,"rotation":[0,0,-22.5],"origin":[8,9.5,8],"faces":{"north":{"uv":[2,23,3,27],"texture":0},"east":{"uv":[0,23,2,27],"texture":0},"south":{"uv":[5,23,6,27],"texture":0},"west":{"uv":[3,23,5,27],"texture":0},"up":{"uv":[3,23,2,21],"texture":0},"down":{"uv":[4,21,3,23],"texture":0}},"type":"cube","uuid":"7685f1ea-40bd-c623-085e-94ba980b5434"}],"outliner":[{"name":"grizzly_plushie","origin":[8,8,8],"color":0,"uuid":"8ad4c645-57b1-fc07-75c1-11932d9a58c5","export":true,"mirror_uv":false,"isOpen":false,"locked":false,"visibility":true,"autouv":0,"children":["85d11f82-64f8-b822-0f4e-1b2391a29b81","3eff2a68-8b0a-825d-e2c3-10a856be41af","24970f6d-e3f0-8464-3ad5-a3e99a488ecc","fd9fd270-6dda-bb45-1336-0593ea1d5ea0","da61bf66-22de-9452-b215-86bf4901e359","93d8281f-af3d-8d41-3ab8-f08e340fa1e9","2bcd9878-cd4a-8ff1-1238-002cb505cc5a","7685f1ea-40bd-c623-085e-94ba980b5434"]}],"textures":[{"path":"C:\\Users\\Daniel\\Documents\\envirorment\\Mods\\Forestal\\forestal\\src\\main\\resources\\assets\\forestal\\textures\\block\\grizzly_plushie.png","name":"grizzly_plushie.png","folder":"block","namespace":"forestal","id":"0","width":32,"height":32,"uv_width":32,"uv_height":32,"particle":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":true,"uuid":"7196c690-6779-9ba4-1c18-acaf7338ead2","relative_path":"../../../textures/block/grizzly_plushie.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAl5JREFUWEftVz0vREEUnUew2Y2PyCoEESWRoFNYrVqnoEWiUBF+AaFSSNBS6NRaFDoKoRREFDayiI2PsHJHzubsmPdmXrIUYpq3b97MvWfOPffe2UBZxsRQX0Gm65M16j7/UrLCfOeP2/ungc1e1Jx1gwAQ542par337um1COTXAIABecKpgLrMPoQeqGwMzA736xCAAXgUJn4NAJw3JCpV7vldh0FG2QGw4JhbAQDn0IHJvakHCREGvq3vHkUKMwAAjjmMsAhdzrFf9rBovQAAediJbMqP2sPrvQAA/clVVl3nvlTe2ZzWT64FZzdZPdfSUKe629LfagRSNxYDUDynG+i2xdT2zZYx0M3SzqGfBtiZqYEfFeFIpqtYdlmIZhYwCMTYJwtcxSkQALbTI55cB2xi5CppyxQvALbaKgBMpUf1AdYGr3MCsDmPOwchi+M4zsVPiUIPNuYLyWRK+8/nn0JxDIwvFPeFZRHYc2YBe8n0tGpB8liYGlMABWAMACIOQ+sVAjn5/OqmtpGoqijaen770L8FBDuNG6Ko9ZpKAYBFctrp5TW1MjNZEoYfBYAbkIDgdgv6FkcHNUC0ZLPTiQ7QuM5vH/VZRAOu+GsRhrVj+SiOzKsZmDI7Jb/zbxcIXYhgtLc9rY4vvhoOhgDoaKpVOJn5jdMOjYsbmLMbikGwII6EZqDmeVk3t7VnbSyuEEWKkC8kPuo2T8Txh0bEDsIQBhq+Aq5iEA9ib9Z5eTcBQMBhlxanBriS+TDgMuhjg9cEZvz4Kg5Kec5FaWwAcTeUe33s/3L/AP4cA5/yFogwMtjKLgAAAABJRU5ErkJggg=="}],"display":{"thirdperson_righthand":{"rotation":[32.5,9.5,15.5],"translation":[-0.75,2.5,1.25],"scale":[0.7,0.7,0.7]},"thirdperson_lefthand":{"rotation":[32.5,9.5,-15.5],"translation":[-0.75,2.5,1.25],"scale":[0.7,0.7,0.7]},"ground":{"translation":[0,5.5,0],"scale":[0.85,0.85,0.85]},"gui":{"rotation":[-170.53,48.28,-157.4],"translation":[1,2.75,0],"scale":[1.1,1.1,1.1]},"head":{"translation":[0,16,0],"scale":[1.2,1.2,1.2]},"fixed":{"rotation":[-90,0,0],"translation":[0,0,-13.5],"scale":[1.7,1.7,1.7]}}} \ No newline at end of file diff --git a/src/main/resources/assets/forestal/models/block/grizzly_plushie.json b/src/main/resources/assets/forestal/models/block/grizzly_plushie.json index b2d7354..9895192 100644 --- a/src/main/resources/assets/forestal/models/block/grizzly_plushie.json +++ b/src/main/resources/assets/forestal/models/block/grizzly_plushie.json @@ -110,7 +110,36 @@ } } ], - "display": {}, + "display": { + "thirdperson_righthand": { + "rotation": [32.5, 9.5, 15.5], + "translation": [-0.75, 2.5, 1.25], + "scale": [0.7, 0.7, 0.7] + }, + "thirdperson_lefthand": { + "rotation": [32.5, 9.5, -15.5], + "translation": [-0.75, 2.5, 1.25], + "scale": [0.7, 0.7, 0.7] + }, + "ground": { + "translation": [0, 5.5, 0], + "scale": [0.85, 0.85, 0.85] + }, + "gui": { + "rotation": [-170.53, 48.28, -157.4], + "translation": [1, 2.75, 0], + "scale": [1.1, 1.1, 1.1] + }, + "head": { + "translation": [0, 16, 0], + "scale": [1.2, 1.2, 1.2] + }, + "fixed": { + "rotation": [-90, 0, 0], + "translation": [0, 0, -13.5], + "scale": [1.7, 1.7, 1.7] + } + }, "groups": [ { "name": "grizzly_plushie", diff --git a/src/main/resources/data/forestal/loot_tables/blocks/grizzly_plushie.json b/src/main/resources/data/forestal/loot_tables/blocks/grizzly_plushie.json new file mode 100644 index 0000000..ce69709 --- /dev/null +++ b/src/main/resources/data/forestal/loot_tables/blocks/grizzly_plushie.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "forestal:grizzly_plushie" + } + ], + "rolls": 1 + } + ], + "random_sequence": "forestal:blocks/grizzly_plushie" +} \ No newline at end of file diff --git a/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear.json b/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear.json new file mode 100644 index 0000000..43d3c34 --- /dev/null +++ b/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear.json @@ -0,0 +1,13 @@ +{ + "replace": false, + "values": [ + { + "id": "#forestal:spawns_entity_grizzly_bear/common", + "required": false + }, + { + "id": "#forestal:spawns_entity_grizzly_bear/rare", + "required": false + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear/common.json b/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear/common.json new file mode 100644 index 0000000..2376b14 --- /dev/null +++ b/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear/common.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + { + "id": "#c:taiga", + "required": false + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear/rare.json b/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear/rare.json new file mode 100644 index 0000000..a721b12 --- /dev/null +++ b/src/main/resources/data/forestal/tags/worldgen/biome/spawns_entity/grizzly_bear/rare.json @@ -0,0 +1,21 @@ +{ + "replace": false, + "values": [ + { + "id": "#c:snowy_plains", + "required": false + }, + { + "id": "minecraft:windswept_gravelly_hills", + "required": false + }, + { + "id": "minecraft:frozen_river", + "required": false + }, + { + "id": "minecraft:ice_spikes", + "required": false + } + ] +} \ No newline at end of file