Skip to content

Commit

Permalink
Fix bucket spawning fish inside block (#2155)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetteriM1 authored Oct 24, 2023
1 parent 55c6dc8 commit 6ed56ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/cn/nukkit/item/ItemBucket.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,27 +178,27 @@ public boolean onActivate(Level level, Player player, Block block, Block target,
if (ev.isMobSpawningAllowed()) {
switch (this.getDamage()) {
case 2:
Entity e2 = Entity.createEntity("Cod", block);
Entity e2 = Entity.createEntity("Cod", block.add(0.5, 0, 0.5));
if (e2 != null) e2.spawnToAll();
break;
case 3:
Entity e3 = Entity.createEntity("Salmon", block);
Entity e3 = Entity.createEntity("Salmon", block.add(0.5, 0, 0.5));
if (e3 != null) e3.spawnToAll();
break;
case 4:
Entity e4 = Entity.createEntity("TropicalFish", block);
Entity e4 = Entity.createEntity("TropicalFish", block.add(0.5, 0, 0.5));
if (e4 != null) e4.spawnToAll();
break;
case 5:
Entity e5 = Entity.createEntity("Pufferfish", block);
Entity e5 = Entity.createEntity("Pufferfish", block.add(0.5, 0, 0.5));
if (e5 != null) e5.spawnToAll();
break;
case 12:
Entity e12 = Entity.createEntity("Axolotl", block);
Entity e12 = Entity.createEntity("Axolotl", block.add(0.5, 0, 0.5));
if (e12 != null) e12.spawnToAll();
break;
case 13:
Entity e13 = Entity.createEntity("Tadpole", block);
Entity e13 = Entity.createEntity("Tadpole", block.add(0.5, 0, 0.5));
if (e13 != null) e13.spawnToAll();
break;
}
Expand Down

0 comments on commit 6ed56ca

Please sign in to comment.