Skip to content

Commit

Permalink
tweakage
Browse files Browse the repository at this point in the history
  • Loading branch information
N1nn1 committed Sep 6, 2023
1 parent 86e9a8a commit 6412302
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/ninni/spawn/entity/Ant.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class Ant extends TamableAnimal implements NeutralMob{
public Ant(EntityType<? extends Ant> 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);
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"spawn:rotten_log_anthill"
]
}
44 changes: 44 additions & 0 deletions src/main/resources/data/spawn/loot_tables/archaeology/anthill.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 6412302

Please sign in to comment.