mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-13 00:09:09 +01:00
parent
55ad057dda
commit
335c01702b
2 changed files with 3 additions and 3 deletions
|
@ -114,7 +114,7 @@ public class BlockContainerImpl extends BaseEntityBlock implements IModItem {
|
|||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
var drops = super.getDrops(state, builder);
|
||||
|
||||
var tile = builder.getParameter(LootContextParams.BLOCK_ENTITY);
|
||||
var tile = builder.getOptionalParameter(LootContextParams.BLOCK_ENTITY);
|
||||
if (tile instanceof BlockEntityImpl) {
|
||||
for (var stack : drops) {
|
||||
if (stack.getItem() != this.asItem())
|
||||
|
|
|
@ -105,8 +105,8 @@ public class BlockEndFlower extends BushBlock implements IModItem, ICustomBlockS
|
|||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
var tile = builder.getParameter(LootContextParams.BLOCK_ENTITY);
|
||||
if (tile instanceof BlockEntityEndFlower && ((BlockEntityEndFlower) tile).isDrainMode)
|
||||
var tile = builder.getOptionalParameter(LootContextParams.BLOCK_ENTITY);
|
||||
if (tile instanceof BlockEntityEndFlower f && f.isDrainMode)
|
||||
return NonNullList.create();
|
||||
return super.getDrops(state, builder);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue