Closes Ellpeck#1230 (#1231)

Fix solid experience dropping when doMobLoot is set to false
This commit is contained in:
Jacob Pearson 2019-02-22 01:22:13 -05:00 committed by Brennan Ward
parent f3d135663b
commit 30b594c16b

View file

@ -41,7 +41,7 @@ public class ItemSolidifiedExperience extends ItemBase{
@SubscribeEvent
public void onEntityDropEvent(LivingDropsEvent event){
if(ConfigBoolValues.DO_XP_DROPS.isEnabled()){
if(event.getEntityLiving().world != null && !event.getEntityLiving().world.isRemote && event.getSource().getTrueSource() instanceof EntityPlayer){
if(event.getEntityLiving().world != null && !event.getEntityLiving().world.isRemote && event.getSource().getTrueSource() instanceof EntityPlayer && event.getEntityLiving().world.getGameRules().getBoolean("doMobLoot")){
//Drop Solidified XP
if(event.getEntityLiving() instanceof EntityCreature){
if(event.getEntityLiving().world.rand.nextInt(10) <= event.getLootingLevel()*2){