|
@Override |
|
public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { |
|
EnumResourceType type = state.getValue(ORE_RESOURCES); |
|
switch (type) { |
|
case APATITE: { |
|
int fortuneModifier = RANDOM.nextInt(fortune + 2) - 1; |
|
if (fortuneModifier < 0) { |
|
fortuneModifier = 0; |
|
} |
|
|
|
int amount = (2 + RANDOM.nextInt(5)) * (fortuneModifier + 1); |
|
if (amount > 0) { |
|
drops.add(ModuleCore.getItems().apatite.getItemStack(amount)); |
|
} |
|
break; |
|
} |
|
case TIN: { |
|
drops.add(new ItemStack(this, 1, damageDropped(state))); |
|
break; |
|
} |
|
case COPPER: { |
|
drops.add(new ItemStack(this, 1, damageDropped(state))); |
|
break; |
|
} |
|
} |
|
} |
This was brought to my attention as a warning in my IDE. This may be leading to the crashes that #2516 mitigates.