mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-14 16:49: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) {
|
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||||
var drops = super.getDrops(state, 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) {
|
if (tile instanceof BlockEntityImpl) {
|
||||||
for (var stack : drops) {
|
for (var stack : drops) {
|
||||||
if (stack.getItem() != this.asItem())
|
if (stack.getItem() != this.asItem())
|
||||||
|
|
|
@ -105,8 +105,8 @@ public class BlockEndFlower extends BushBlock implements IModItem, ICustomBlockS
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||||
var tile = builder.getParameter(LootContextParams.BLOCK_ENTITY);
|
var tile = builder.getOptionalParameter(LootContextParams.BLOCK_ENTITY);
|
||||||
if (tile instanceof BlockEntityEndFlower && ((BlockEntityEndFlower) tile).isDrainMode)
|
if (tile instanceof BlockEntityEndFlower f && f.isDrainMode)
|
||||||
return NonNullList.create();
|
return NonNullList.create();
|
||||||
return super.getDrops(state, builder);
|
return super.getDrops(state, builder);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue