This commit is contained in:
Shadows_of_Fire 2018-10-05 02:19:07 -04:00
parent df374a42de
commit f24c0b7705
2 changed files with 10 additions and 4 deletions

View file

@ -56,7 +56,9 @@ public enum ConfigBoolValues{
SUPER_DUPER_HARD_MODE("Super Duper Hard Recipes", ConfigCategories.OTHER, false, "Turn this on to make recipes for items from the mod really hard. (This is a joke feature poking fun at the whole FTB Infinity Expert Mode style of playing. You shouldn't really turn this on as it makes the mod completely unplayable.)"),
MOST_BLAND_PERSON_EVER("No Colored Item Names", ConfigCategories.OTHER, false, "If you want to be really boring and lame, you can turn on this setting to disable colored names on Actually Additions items. Because why would you want things to look pretty anyways, right?"),
COLOR_LENS_USES_OREDICT("Color Lens Oredict", ConfigCategories.OTHER, false, "If true, the Lens of Color will attempt to pull from the oredict instead of only using vanilla dyes.");
COLOR_LENS_USES_OREDICT("Color Lens Oredict", ConfigCategories.OTHER, false, "If true, the Lens of Color will attempt to pull from the oredict instead of only using vanilla dyes."),
SOLID_XP_ALWAYS_ORBS("Solid XP Orbs", ConfigCategories.OTHER, false, "If true, Solidified Experience will always spawn orbs, even for regular players.");
public final String name;
public final String category;

View file

@ -24,6 +24,7 @@ import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@ -69,9 +70,12 @@ public class ItemSolidifiedExperience extends ItemBase{
}
}
EntityXPOrb orb = new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, amount);
orb.getEntityData().setBoolean(ActuallyAdditions.MODID+"FromSolidified", true);
world.spawnEntity(orb);
if(ConfigBoolValues.SOLID_XP_ALWAYS_ORBS.currentValue || player instanceof FakePlayer) {
EntityXPOrb orb = new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, amount);
orb.getEntityData().setBoolean(ActuallyAdditions.MODID+"FromSolidified", true);
world.spawnEntity(orb);
}
else player.addExperience(amount);
}
return new ActionResult<>(EnumActionResult.SUCCESS, stack);
}