Skip to content

Commit

Permalink
Move vis orbs from getDrops to onBlockHarvested (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis authored Mar 9, 2024
1 parent f536b44 commit c264b44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/tb/common/block/BlockAshroom.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package tb.common.block;

import java.util.ArrayList;
import java.util.Random;

import net.minecraft.item.ItemStack;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

import thaumcraft.api.aspects.Aspect;
Expand Down Expand Up @@ -41,7 +40,7 @@ protected boolean func_150109_e(World p_150109_1_, int p_150109_2_, int p_150109
}

@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
public void onBlockHarvested(World world, int x, int y, int z, int metadata, EntityPlayer player) {
if (metadata >= this.growthStages - 1) {
for (int i = 0; i < 8 + world.rand.nextInt(32); ++i) // Nerf for the shrooms
{
Expand All @@ -54,6 +53,7 @@ public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metad
if (!world.isRemote) world.spawnEntityInWorld(orb);
}
}
return super.getDrops(world, x, y, z, metadata, fortune);
super.onBlockHarvested(world, x, y, z, metadata, player);
}

}

0 comments on commit c264b44

Please sign in to comment.