diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java index c90099f87..2b6e49628 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java @@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import de.ellpeck.actuallyadditions.mod.util.Util; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; @@ -53,18 +53,23 @@ public class ItemSolidifiedExperience extends ItemBase{ @Override public ActionResult onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){ if(!world.isRemote){ + int amount; if(!player.isSneaking()){ - world.spawnEntityInWorld(new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, SOLID_XP_AMOUNT)); + amount = SOLID_XP_AMOUNT; if(!player.capabilities.isCreativeMode){ stack.stackSize--; } } else{ - world.spawnEntityInWorld(new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, SOLID_XP_AMOUNT*stack.stackSize)); + amount = SOLID_XP_AMOUNT*stack.stackSize; if(!player.capabilities.isCreativeMode){ stack.stackSize = 0; } } + + EntityXPOrb orb = new EntityXPOrb(world, player.posX+0.5, player.posY+0.5, player.posZ+0.5, amount); + orb.getEntityData().setBoolean(ModUtil.MOD_ID+"FromSolidified", true); + world.spawnEntityInWorld(orb); } return new ActionResult(EnumActionResult.SUCCESS, stack); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java index 7728de9df..da2633b40 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java @@ -14,6 +14,7 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.ItemSolidifiedExperience; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -139,7 +140,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I List orbs = this.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, new AxisAlignedBB(this.pos.getX()-range, this.pos.getY()-range, this.pos.getZ()-range, this.pos.getX()+1+range, this.pos.getY()+1+range, this.pos.getZ()+1+range)); if(orbs != null && !orbs.isEmpty()){ for(EntityXPOrb orb : orbs){ - if(orb != null && !orb.isDead){ + if(orb != null && !orb.isDead && !orb.getEntityData().getBoolean(ModUtil.MOD_ID+"FromSolidified")){ this.singlePointAmount += orb.getXpValue(); orb.setDead(); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 571e9a6a4..ffb59c470 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -798,7 +798,7 @@ booklet.actuallyadditions.chapter.esd.name=ESDs booklet.actuallyadditions.chapter.esd.text.1=The ESD is a block that works similar to a Hopper but has a lot more functionality. You can choose the sides to input and output and you can precisely configure the range of slots to look at! For more precise information about ESDs, craft one and hover over the elements in their GUI! Its actual name is booklet.actuallyadditions.chapter.xpSolidifier.name=Experience Solidifier -booklet.actuallyadditions.chapter.xpSolidifier.text.1=The Experience Solidifer uses the player's experience and turns it into Solidified Experience which can later be used by right-clicking (or sneak-right-clicking!) to get the experience back. Additionally, you can put Solidified Experience into the solidifier, and, when not powered by redstone, it will pick up any XP Orbs that are on the ground nearby and turn them into Solidified Experience, provided it has enough stored up internally. Solidified Experience is also sometimes dropped from mobs. +booklet.actuallyadditions.chapter.xpSolidifier.text.1=The Experience Solidifer uses the player's experience and turns it into Solidified Experience which can later be used by right-clicking (or sneak-right-clicking to use a full stack!) to get the experience back. Additionally, you can put Solidified Experience into the solidifier, and it will pick up any XP Orbs that are on the ground and turn them into Solidified Experience, provided they weren't created by it. Solidified Experience is also sometimes dropped from mobs. booklet.actuallyadditions.chapter.greenhouseGlass.name=Greenhouse Glass booklet.actuallyadditions.chapter.greenhouseGlass.text.1=Greenhouse Glass is a very effective way to speed up the growth of your plants! When placed anywhere above the plant, as long as there are no blocks below obstructing the path, and there is sunlight above the glass, it will significantly speed up the growth of the plant! It obviously has to be daytime, too. Thought that was obvious.