File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/enderio/base/common/loot Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,11 @@ public BrokenSpawnerLootModifier(LootItemCondition[] conditionsIn) {
3636
3737 @ Override
3838 protected ObjectArrayList <ItemStack > doApply (ObjectArrayList <ItemStack > generatedLoot , LootContext context ) {
39- BlockEntity entity = context .getParam (LootContextParams .BLOCK_ENTITY );
39+ BlockEntity entity = context .getParamOrNull (LootContextParams .BLOCK_ENTITY );
40+ if (entity == null ) {
41+ return generatedLoot ;
42+ }
43+
4044 if (entity instanceof SpawnerBlockEntity spawnerBlockEntity ) {
4145 if (!context .getParam (LootContextParams .TOOL ).is (EIOTags .Items .BROKEN_SPAWNER_BLACKLIST )) {
4246 if (context .getRandom ().nextFloat () < BaseConfig .COMMON .BLOCKS .BROKEN_SPAWNER_DROP_CHANCE .get ()) {
You can’t perform that action at this time.
0 commit comments