The Bug
It's very simple. Breed two frogs, let them lay their eggs, wait for the hatch and BAM. Some of your tadpoles are dead(unless your frogs are smart and laid their eggs out in open water).
Reproduce
Get Frogspawn
Place a wall around the frogspawn
Wait
Observed Result
Some Tadpoles spawned inside the wall
Expected Result
Tadpoles wouldn't spawn inside blocks
Comments 2
Code analysis: in FrogspawnBlock#tick(...)
, the function spawnTadpoles(...)
is called:
int $$3 = $$2.nextInt(2, 6);
for (int $$4 = 1; $$4 <= $$3; ++$$4) {
Tadpole $$5 = EntityType.TADPOLE.create($$0);
double $$6 = $$2.nextDouble();
double $$7 = $$2.nextDouble();
double $$8 = (double)$$1.getX() + $$6;
double $$9 = (double)$$1.getZ() + $$7;
int $$10 = $$2.nextInt(1, 361);
$$5.moveTo($$8, (double)$$1.getY() - 0.5, $$9, $$10, 0.0f);
$$5.setPersistenceRequired();
$$0.addFreshEntity($$5);
}
As can be seen here, the tadpoles are spawned randomly around the frogspawn block.
In 22w15a