diff --git a/src/main/java/com/starfish_studios/hamsters/HamstersConfig.java b/src/main/java/com/starfish_studios/hamsters/HamstersConfig.java new file mode 100644 index 0000000..ebda602 --- /dev/null +++ b/src/main/java/com/starfish_studios/hamsters/HamstersConfig.java @@ -0,0 +1,4 @@ +package com.starfish_studios.hamsters; + +public class HamstersConfig { +} diff --git a/src/main/java/com/starfish_studios/hamsters/client/renderer/layers/HamsterNewMarkingLayer.java b/src/main/java/com/starfish_studios/hamsters/client/renderer/layers/HamsterNewMarkingLayer.java index a19538e..81835cf 100644 --- a/src/main/java/com/starfish_studios/hamsters/client/renderer/layers/HamsterNewMarkingLayer.java +++ b/src/main/java/com/starfish_studios/hamsters/client/renderer/layers/HamsterNewMarkingLayer.java @@ -33,14 +33,14 @@ public HamsterNewMarkingLayer(GeoRenderer entityRendererIn) { @Override public ResourceLocation getTextureResource(HamsterNew animatable) { - if (HamsterNew.Marking.byId(animatable.getMarking()) != HamsterNew.Marking.BLANK) return TEXTURES.get(HamsterNew.Marking.byId(animatable.getMarking())); + if (HamsterNew.Marking.BY_ID[animatable.getMarking()] != HamsterNew.Marking.BLANK) return TEXTURES.get(HamsterNew.Marking.BY_ID[animatable.getMarking()]); return Hamsters.id("textures/entity/hamster/blank.png"); } @Override public void render(PoseStack poseStack, HamsterNew animatable, BakedGeoModel bakedModel, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, float partialTick, int packedLight, int packedOverlay) { - if (HamsterNew.Marking.byId(animatable.getMarking()) != HamsterNew.Marking.BLANK && !animatable.isBaby()) { + if (HamsterNew.Marking.BY_ID[animatable.getMarking()] != HamsterNew.Marking.BLANK) { RenderType entityTranslucent = RenderType.entityTranslucent(getTextureResource(animatable)); this.getRenderer().actuallyRender(poseStack, animatable, bakedModel, renderType, bufferSource, bufferSource.getBuffer(entityTranslucent), true, partialTick, packedLight, packedOverlay, 1f, 1f, 1f, 1f); } diff --git a/src/main/java/com/starfish_studios/hamsters/entity/HamsterNew.java b/src/main/java/com/starfish_studios/hamsters/entity/HamsterNew.java index 65d967e..2c9deaf 100644 --- a/src/main/java/com/starfish_studios/hamsters/entity/HamsterNew.java +++ b/src/main/java/com/starfish_studios/hamsters/entity/HamsterNew.java @@ -8,6 +8,7 @@ import com.starfish_studios.hamsters.registry.HamstersTags; import net.minecraft.Util; import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; @@ -19,11 +20,14 @@ import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.tags.DamageTypeTags; -import net.minecraft.util.ByIdMap; +import net.minecraft.util.RandomSource; import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.damagesource.DamageSources; +import net.minecraft.world.damagesource.DamageType; +import net.minecraft.world.damagesource.DamageTypes; import net.minecraft.world.entity.*; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; @@ -31,11 +35,13 @@ import net.minecraft.world.entity.ai.goal.*; import net.minecraft.world.entity.ai.navigation.PathNavigation; import net.minecraft.world.entity.animal.ShoulderRidingEntity; +import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.FireworkRocketEntity; import net.minecraft.world.item.*; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.ServerLevelAccessor; import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.NotNull; @@ -48,8 +54,8 @@ import software.bernie.geckolib.core.animation.RawAnimation; import software.bernie.geckolib.core.object.PlayState; import software.bernie.geckolib.util.GeckoLibUtil; + import java.util.*; -import java.util.function.IntFunction; public class HamsterNew extends ShoulderRidingEntity implements GeoEntity { @@ -71,6 +77,7 @@ public class HamsterNew extends ShoulderRidingEntity implements GeoEntity { private static final EntityDataAccessor DATA_BOW_COLOR = SynchedEntityData.defineId(HamsterNew.class, EntityDataSerializers.INT); private static final EntityDataAccessor CHEEK_LEVEL = SynchedEntityData.defineId(HamsterNew.class, EntityDataSerializers.INT); private static final EntityDataAccessor SQUISHED_TICKS = SynchedEntityData.defineId(HamsterNew.class, EntityDataSerializers.INT); + private static final EntityDataAccessor BIRTH_COUNTDOWN = SynchedEntityData.defineId(HamsterNew.class, EntityDataSerializers.INT); private static final Ingredient FOOD_ITEMS = Ingredient.of(HamstersTags.HAMSTER_FOOD); @@ -80,6 +87,10 @@ public HamsterNew(EntityType entityType, Level l super(entityType, level); } + public static boolean checkHamsterNewSpawnRules(EntityType entityType, LevelAccessor levelAccessor, MobSpawnType mobSpawnType, BlockPos blockPos, RandomSource randomSource) { + return levelAccessor.getBlockState(blockPos.below()).is(HamstersTags.HAMSTERS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + } + @Override protected @NotNull PathNavigation createNavigation(@NotNull Level level) { return new MMPathNavigatorGround(this, level); @@ -90,15 +101,40 @@ public HamsterNew(EntityType entityType, Level l return new SmartBodyHelper(this); } + @Override + public SoundEvent getAmbientSound() { + return HamstersSoundEvents.HAMSTER_AMBIENT; + } + + @Override + public SoundEvent getHurtSound(@NotNull DamageSource damageSource) { + return HamstersSoundEvents.HAMSTER_HURT; + } + + @Override + public SoundEvent getDeathSound() { + return HamstersSoundEvents.HAMSTER_DEATH; + } + @Override protected void registerGoals() { this.goalSelector.addGoal(0, new FloatGoal(this)); this.goalSelector.addGoal(1, new PanicGoal(this, 1.3)); this.goalSelector.addGoal(2, new SitWhenOrderedToGoal(this)); this.goalSelector.addGoal(3, new BreedGoal(this, 1.0)); - this.goalSelector.addGoal(5, new TemptGoal(this, 1.0, FOOD_ITEMS, false)); - this.goalSelector.addGoal(6, new WaterAvoidingRandomStrollGoal(this, 1.0)); - this.goalSelector.addGoal(7, new LookAtPlayerGoal(this, Player.class, 6.0F) { + + this.goalSelector.addGoal(4, new HamsterTemptGoal(this, 1.0, FOOD_ITEMS, true)); + this.goalSelector.addGoal(4, new HamsterAvoidPlayersGoal(this, 6.0f, 1.6D, 1.6D)); +// this.goalSelector.addGoal(5, new AvoidEntityGoal<>(this, Animal.class, 10.0F, 1.5D, 2.0D, livingEntity -> livingEntity.getType().is(HamstersTags.HAMSTER_PREDATORS))); + this.goalSelector.addGoal(5, new AvoidEntityGoal<>(this, Player.class, 10.0F, 1.5D, 2.0D) { + @Override + public boolean canUse() { + return !HamsterNew.this.isTame() && super.canUse(); + } + }); + this.goalSelector.addGoal(6, new FollowParentGoal(this, 1.0)); + this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0)); + this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 6.0F) { @Override public void tick() { if (this.mob instanceof HamsterNew hamsterNew && hamsterNew.getSquishedTicks() > 0) return; @@ -106,11 +142,14 @@ public void tick() { } }); this.goalSelector.addGoal(9, new HamsterLookAroundGoal(this)); - // this.goalSelector.addGoal(10, new GetOnOwnersShoulderGoal(this)); +// this.goalSelector.addGoal(10, new GetOnOwnersShoulderGoal(this)); } public static AttributeSupplier.Builder createAttributes() { - return TamableAnimal.createMobAttributes().add(Attributes.MAX_HEALTH, 8.0D).add(Attributes.MOVEMENT_SPEED, 0.25D); + return TamableAnimal.createMobAttributes() + .add(Attributes.MAX_HEALTH, 8.0D) + .add(Attributes.MOVEMENT_SPEED, 0.25D) + .add(Attributes.ATTACK_DAMAGE, 1.0D); } @Override @@ -136,11 +175,25 @@ public boolean hurt(@NotNull DamageSource damageSource, float damageAmount) { return original; } + @Override + public void customServerAiStep() { + if (this.getMoveControl().hasWanted()) { + this.setSprinting(this.getMoveControl().getSpeedModifier() >= 1.3D); + } else { + this.setSprinting(false); + } + super.customServerAiStep(); + } + @Override public void aiStep() { super.aiStep(); + if (this.getBirthCountdown() > 0) { + this.setBirthCountdown(this.getBirthCountdown() - 1); + } + if (this.getSquishedTicks() > 0) { this.setSquishedTicks(this.getSquishedTicks() - 1); this.setDeltaMovement(0.0D, 0.0D, 0.0D); @@ -209,10 +262,11 @@ private ItemStack getFirework(DyeColor dyeColor, int i) { return canInteract ? InteractionResult.CONSUME : InteractionResult.PASS; } else { - - if (this.isTame()) { - - if (this.isFood(itemStack)) { + if (this.isTame()) { + if (itemStack.is(Items.SWEET_BERRIES) && this.getAge() == 0 && this.canFallInLove()) { + this.setInLove(player); + return InteractionResult.SUCCESS; + } else if (this.isFood(itemStack)) { // Feeding @@ -221,9 +275,14 @@ private ItemStack getFirework(DyeColor dyeColor, int i) { if (!player.getAbilities().instabuild) itemStack.shrink(1); if (this.getHealth() < this.getMaxHealth()) { - this.heal(this.getMaxHealth() / 4); + } + else if (this.getAge() < 0) { + this.ageUp(1); + if (!this.level().isClientSide) { + ((ServerLevel) this.level()).sendParticles(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0), this.getRandomY() + 0.5, this.getRandomZ(1.0), 5, 0.0D, 0.0D, 0.0D, 0.0D); + } } else { if (this.getCheekLevel() < 3) { @@ -234,7 +293,15 @@ private ItemStack getFirework(DyeColor dyeColor, int i) { } else { this.playSound(HamstersSoundEvents.HAMSTER_EXPLODE); - this.remove(RemovalReason.KILLED); + this.setHealth(0); + + this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY(), this.getZ(), 3)); + + for (int i = 0; i < 4; i++) { + ItemEntity seedsItem = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), new ItemStack(Items.WHEAT_SEEDS)); + seedsItem.setDeltaMovement(this.getRandom().nextGaussian() * 0.1, this.getRandom().nextGaussian() * 0.2 + 0.2, this.getRandom().nextGaussian() * 0.1); + this.level().addFreshEntity(seedsItem); + } ItemStack fireworkStack = this.getFirework(Util.getRandom(DyeColor.values(), this.getRandom()), this.getRandom().nextInt(3)); FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(this.level(), this, this.getX(), this.getEyeY(), this.getZ(), fireworkStack); @@ -277,7 +344,9 @@ else if (this.isOwnedBy(player) && this.getSquishedTicks() <= 0) { } } - } else if (this.isFood(itemStack)) { + } + + else if (this.isFood(itemStack)) { // Taming @@ -305,9 +374,12 @@ public SpawnGroupData finalizeSpawn(@NotNull ServerLevelAccessor serverLevelAcce this.populateDefaultEquipmentSlots(this.getRandom(), difficultyInstance); - if (spawnGroupData == null) { + if (mobSpawnType == MobSpawnType.SPAWN_EGG) { this.setVariant(Variant.BY_ID[this.getRandom().nextInt(Variant.BY_ID.length - 1)]); - this.setMarking(this.getRandom().nextInt(Marking.values().length)); + this.setMarking(Marking.BY_ID[this.getRandom().nextInt(Marking.BY_ID.length)]); + } else if (mobSpawnType == MobSpawnType.CHUNK_GENERATION) { + this.setVariant(Variant.BY_ID[Variant.WILD.getId()]); + this.setMarking(Marking.BY_ID[Marking.BLANK.getId()]); } return spawnGroupData; @@ -316,41 +388,31 @@ public SpawnGroupData finalizeSpawn(@NotNull ServerLevelAccessor serverLevelAcce @Override public AgeableMob getBreedOffspring(@NotNull ServerLevel serverLevel, @NotNull AgeableMob ageableMob) { + this.setBirthCountdown(60); + HamsterNew hamster = HamstersEntityType.HAMSTER_NEW.create(serverLevel); assert hamster != null; - // If both parents are Wild variant with no markings, the offspring will have a random color and marking. - - if (ageableMob instanceof HamsterNew hamsterParent && hamsterParent.getVariant() == Variant.WILD.getId() && hamsterParent.getMarking() == Marking.BLANK.getId()) { - hamster.setVariant(Variant.BY_ID[this.getRandom().nextInt(Variant.BY_ID.length)]); - hamster.setMarking(Marking.byId(this.getRandom().nextInt(Marking.values().length)).getId()); - } - - // If one parent is Wild, and one parent has color/marking, the offspring will have a 50% chance of a random color/marking or will have the same as the parent with color/marking. - else if (ageableMob instanceof HamsterNew hamsterParent) { - if (hamsterParent.getVariant() == Variant.WILD.getId() && hamsterParent.getMarking() == Marking.BLANK.getId()) { - hamster.setVariant(Variant.BY_ID[this.getRandom().nextInt(Variant.BY_ID.length)]); - hamster.setMarking(Marking.byId(this.getRandom().nextInt(Marking.values().length)).getId()); - } else { - hamster.setVariant(Variant.getTypeById(hamsterParent.getVariant())); - hamster.setMarking(hamsterParent.getMarking()); - } + if (this.isTame() && ageableMob instanceof HamsterNew hamsterParent && hamsterParent.isTame()) { + hamster.setTame(true); + hamster.setOwnerUUID(this.getOwnerUUID()); } - // If neither parent is Wild, and they have their own color and marking, the offspring will pick a color and marking from one of the parents. - - else if (ageableMob instanceof HamsterNew hamsterParent) { + if (this.getVariant() == Variant.WILD.getId() && this.getMarking() == Marking.BLANK.getId() && ageableMob instanceof HamsterNew hamsterParent && hamsterParent.getVariant() == Variant.WILD.getId() && hamsterParent.getMarking() == Marking.BLANK.getId()) { + hamster.setVariant(Variant.BY_ID[this.getRandom().nextInt(Variant.BY_ID.length) - 1]); + hamster.setMarking(Marking.BY_ID[this.getRandom().nextInt(Marking.BY_ID.length)]); + } else if (this.getVariant() != Variant.WILD.getId() && ageableMob instanceof HamsterNew hamsterParent && hamsterParent.getVariant() != Variant.WILD.getId()) { hamster.setVariant(this.getOffspringVariant(this, hamsterParent)); - hamster.setMarking(this.getOffspringPattern(this, hamsterParent).getId()); + hamster.setMarking(this.getOffspringPattern(this, hamsterParent)); } return hamster; } private Marking getOffspringPattern(HamsterNew hamster, HamsterNew otherParent) { - Marking marking = Marking.byId(hamster.getMarking()); - Marking otherMarking = Marking.byId(otherParent.getMarking()); + Marking marking = Marking.getTypeById(hamster.getMarking()); + Marking otherMarking = Marking.getTypeById(otherParent.getMarking()); return this.getRandom().nextBoolean() ? marking : otherMarking; } @@ -376,16 +438,18 @@ protected void defineSynchedData() { this.getEntityData().define(DATA_BOW_COLOR, 0); this.getEntityData().define(CHEEK_LEVEL, 0); this.getEntityData().define(SQUISHED_TICKS, 0); + this.getEntityData().define(BIRTH_COUNTDOWN, 0); } @Override public void readAdditionalSaveData(@NotNull CompoundTag compoundTag) { super.readAdditionalSaveData(compoundTag); this.setVariant(Variant.BY_ID[compoundTag.getInt("Variant")]); - this.setMarking(compoundTag.getInt("Marking")); + this.setMarking(Marking.BY_ID[compoundTag.getInt("Marking")]); this.setBowColor(DyeColor.byId(compoundTag.getInt("BowColor"))); this.setCheekLevel(compoundTag.getInt("CheekLevel")); this.setSquishedTicks(compoundTag.getInt("SquishedTicks")); + this.setBirthCountdown(compoundTag.getInt("BirthCountdown")); } @Override @@ -396,6 +460,7 @@ public void addAdditionalSaveData(@NotNull CompoundTag compoundTag) { compoundTag.putInt("BowColor", this.getBowColor().getId()); compoundTag.putInt("CheekLevel", this.getCheekLevel()); compoundTag.putInt("SquishedTicks", this.getSquishedTicks()); + compoundTag.putInt("BirthCountdown", this.getBirthCountdown()); } public int getSquishedTicks() { @@ -406,6 +471,14 @@ public void setSquishedTicks(int squishedTicks) { this.getEntityData().set(SQUISHED_TICKS, squishedTicks); } + public int getBirthCountdown() { + return this.getEntityData().get(BIRTH_COUNTDOWN); + } + + public void setBirthCountdown(int birthCountdown) { + this.getEntityData().set(BIRTH_COUNTDOWN, birthCountdown); + } + public DyeColor getBowColor() { return DyeColor.byId(this.entityData.get(DATA_BOW_COLOR)); } @@ -428,8 +501,8 @@ public int getMarking() { return this.entityData.get(MARKING); } - public void setMarking(int marking) { - this.entityData.set(MARKING, marking); + public void setMarking(Marking marking) { + this.entityData.set(MARKING, marking.getId()); } public int getVariant() { @@ -455,8 +528,7 @@ public enum Marking { ROAN (3, "roan"), BELLY (4, "belly"); - private static final IntFunction BY_ID = ByIdMap.continuous(Marking::getId, values(), ByIdMap.OutOfBoundsStrategy.ZERO); - + public static final Marking[] BY_ID = Arrays.stream(values()).sorted(Comparator.comparingInt(Marking::getId)).toArray(Marking[]::new); private final int id; private final String name; @@ -470,8 +542,9 @@ public int getId() { return this.id; } - public static Marking byId(int id) { - return BY_ID.apply(id); + public static Marking getTypeById(int id) { + for (Marking type : values()) if (type.id == id) return type; + return Marking.BLANK; } public String getName() { @@ -586,6 +659,38 @@ public void tick() { } } + static class HamsterAvoidPlayersGoal extends AvoidEntityGoal { + private final HamsterNew hamster; + + public HamsterAvoidPlayersGoal(HamsterNew hamster, float maxDistance, double walkSpeed, double sprintSpeed) { + super(hamster, Player.class, maxDistance, walkSpeed, sprintSpeed, EntitySelector.NO_CREATIVE_OR_SPECTATOR::test); + this.hamster = hamster; + } + + @Override + public boolean canUse() { + return !this.hamster.isTame() && super.canUse(); + } + + @Override + public boolean canContinueToUse() { + return !this.hamster.isTame() && super.canContinueToUse(); + } + } + + static class HamsterTemptGoal extends TemptGoal { + private final HamsterNew hamster; + + public HamsterTemptGoal(HamsterNew hamster, double d, Ingredient ingredient, boolean bl) { + super(hamster, d, ingredient, bl); + this.hamster = hamster; + } + + protected boolean canScare() { + return super.canScare() && !this.hamster.isTame(); + } + } + @SuppressWarnings("unused") public static class GetOnOwnersShoulderGoal extends Goal { diff --git a/src/main/java/com/starfish_studios/hamsters/registry/HamstersEntityType.java b/src/main/java/com/starfish_studios/hamsters/registry/HamstersEntityType.java index c3be35d..412b562 100644 --- a/src/main/java/com/starfish_studios/hamsters/registry/HamstersEntityType.java +++ b/src/main/java/com/starfish_studios/hamsters/registry/HamstersEntityType.java @@ -31,7 +31,7 @@ public class HamstersEntityType { .entityFactory(HamsterNew::new) .defaultAttributes(HamsterNew::createAttributes) .spawnGroup(MobCategory.CREATURE) - .spawnRestriction(SpawnPlacements.Type.ON_GROUND, Heightmap.Types.WORLD_SURFACE_WG, Animal::checkAnimalSpawnRules) + .spawnRestriction(SpawnPlacements.Type.ON_GROUND, Heightmap.Types.WORLD_SURFACE_WG, HamsterNew::checkHamsterNewSpawnRules) .dimensions(EntityDimensions.scalable(0.5F, 0.5F)) .trackRangeChunks(10) ); @@ -49,7 +49,7 @@ public class HamstersEntityType { public static final Supplier> SEAT = registerEntityType("seat", (type, world) -> new SeatEntity(world), MobCategory.MISC, 0.0F, 0.0F); static { - BiomeModifications.addSpawn(BiomeSelectors.tag(HamstersTags.HAS_HAMSTER), MobCategory.CREATURE, HamstersEntityType.HAMSTER, 30, 1, 1); + BiomeModifications.addSpawn(BiomeSelectors.tag(HamstersTags.HAS_HAMSTER), MobCategory.CREATURE, HamstersEntityType.HAMSTER_NEW, 30, 1, 1); } public static Supplier> registerEntityType(String id, EntityType.EntityFactory factory, MobCategory category, float width, float height) { diff --git a/src/main/java/com/starfish_studios/hamsters/registry/HamstersTags.java b/src/main/java/com/starfish_studios/hamsters/registry/HamstersTags.java index 64934a0..4393698 100644 --- a/src/main/java/com/starfish_studios/hamsters/registry/HamstersTags.java +++ b/src/main/java/com/starfish_studios/hamsters/registry/HamstersTags.java @@ -3,6 +3,7 @@ import com.starfish_studios.hamsters.Hamsters; import net.minecraft.core.registries.Registries; import net.minecraft.tags.TagKey; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.item.Item; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.Block; @@ -10,6 +11,10 @@ @SuppressWarnings("unused") public class HamstersTags { + public static final TagKey> HAMSTER_PREDATORS = TagKey.create(Registries.ENTITY_TYPE, Hamsters.id("hamster_predators")); + + public static final TagKey HAMSTERS_SPAWNABLE_ON = TagKey.create(Registries.BLOCK, Hamsters.id("hamsters_spawnable_on")); + public static final TagKey CAGE_PANELS = TagKey.create(Registries.ITEM, Hamsters.id("cage_panels")); public static final TagKey HAMSTER_FOOD = TagKey.create(Registries.ITEM, Hamsters.id("hamster_food")); diff --git a/src/main/resources/data/hamsters/tags/blocks/hamsters_spawnable_on.json b/src/main/resources/data/hamsters/tags/blocks/hamsters_spawnable_on.json new file mode 100644 index 0000000..fefa04c --- /dev/null +++ b/src/main/resources/data/hamsters/tags/blocks/hamsters_spawnable_on.json @@ -0,0 +1,6 @@ +{ + "values": [ + "#minecraft:dirt", + "minecraft:sand" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/hamsters/tags/entities/hamster_predators.json b/src/main/resources/data/hamsters/tags/entities/hamster_predators.json new file mode 100644 index 0000000..cad1954 --- /dev/null +++ b/src/main/resources/data/hamsters/tags/entities/hamster_predators.json @@ -0,0 +1,7 @@ +{ + "values": [ + "minecraft:fox", + "minecraft:cat", + "minecraft:wolf" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/hamsters/tags/worldgen/biome/has_hamster.json b/src/main/resources/data/hamsters/tags/worldgen/biome/has_hamster.json index 9d7d3cc..7b22a9c 100644 --- a/src/main/resources/data/hamsters/tags/worldgen/biome/has_hamster.json +++ b/src/main/resources/data/hamsters/tags/worldgen/biome/has_hamster.json @@ -1,8 +1,7 @@ { "values": [ - "minecraft:plains", - "minecraft:meadow", - "minecraft:sunflower_plains", - "#c:plains" + "#c:plains", + "#c:tree_deciduous", + "#c:is_dry/overworld" ] } \ No newline at end of file