diff --git a/src/main/java/com/ninni/spawn/block/entity/AnthillBlockEntity.java b/src/main/java/com/ninni/spawn/block/entity/AnthillBlockEntity.java index c44fe9c..6b71306 100644 --- a/src/main/java/com/ninni/spawn/block/entity/AnthillBlockEntity.java +++ b/src/main/java/com/ninni/spawn/block/entity/AnthillBlockEntity.java @@ -149,6 +149,7 @@ private static boolean releaseAnt(Level world, BlockPos pos, BlockState state, A if (newAnt != null) { if (newAnt instanceof com.ninni.spawn.entity.Ant releasedAnt) { if (antState == AntState.RESOURCE_DELIVERED) { + ((com.ninni.spawn.entity.Ant) newAnt).setHasResource(false); ((com.ninni.spawn.entity.Ant) newAnt).setHasResource(false); int i = state.getValue(AnthillBlock.RESOURCE_LEVEL); if (state.getBlock() instanceof AnthillBlock && i < 3) { diff --git a/src/main/java/com/ninni/spawn/entity/Ant.java b/src/main/java/com/ninni/spawn/entity/Ant.java index 63caa34..2e0d326 100644 --- a/src/main/java/com/ninni/spawn/entity/Ant.java +++ b/src/main/java/com/ninni/spawn/entity/Ant.java @@ -88,7 +88,7 @@ public class Ant extends TamableAnimal implements NeutralMob{ public Ant(EntityType entityType, Level level) { super(entityType, level); this.lookControl = new AntLookControl(this); - this.remainingCooldownBeforeLocatingNewResource = Mth.nextInt(this.random, 20, 60); + this.remainingCooldownBeforeLocatingNewResource = Mth.nextInt(this.random, 200, 600); this.setPathfindingMalus(BlockPathTypes.WATER, -1); } @@ -500,7 +500,7 @@ public boolean canAntUse() { Ant.this.navigation.moveTo((double) Ant.this.savedResourcePos.getX() + 0.5, Ant.this.savedResourcePos.getY(), (double) Ant.this.savedResourcePos.getZ() + 0.5, 1.2f); return true; } - Ant.this.remainingCooldownBeforeLocatingNewResource = Mth.nextInt(Ant.this.random, 20, 60); + Ant.this.remainingCooldownBeforeLocatingNewResource = Mth.nextInt(Ant.this.random, 200, 600); return false; } @@ -593,7 +593,7 @@ public void tick() { } else { bl2 = false; } - Ant.this.getLookControl().setLookAt(vec3.x(), vec3.y() + 0.2, vec3.z()); + Ant.this.getLookControl().setLookAt(vec3.x(), vec3.y() + 0.5, vec3.z()); } if (bl2) { this.setWantedPos(); diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json new file mode 100644 index 0000000..2a89bc9 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "spawn:rotten_log_anthill" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/spawn/loot_tables/archaeology/anthill.json b/src/main/resources/data/spawn/loot_tables/archaeology/anthill.json new file mode 100644 index 0000000..bafe6d1 --- /dev/null +++ b/src/main/resources/data/spawn/loot_tables/archaeology/anthill.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:archaeology", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:string", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "minecraft:leather", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "spawn:fallen_leaves", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "minecraft:clay", + "weight": 2 + }, + { + "type": "minecraft:item", + "name": "minecraft:red_mushroom" + }, + { + "type": "minecraft:item", + "name": "minecraft:brown_mushroom" + }, + { + "type": "minecraft:item", + "name": "spawn:ant_pupa" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "spawn:archaeology/anthill" +} \ No newline at end of file