Skip to content

Commit

Permalink
v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Furgl committed Nov 9, 2016
1 parent 7743a06 commit 885d463
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
}
*/
version = "1.10.2-2.1"
version = "1.10.2-2.2"
group= "furgl.autoPickup" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "AutoPickup"

sourceCompatibility = 1.7
targetCompatibility = 1.7

minecraft {
version = "1.10.2-12.18.1.2011"
version = "1.10.2-12.18.2.2099"
runDir = "run"

// the mappings can be changed at any time, and must be in the following format.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/furgl/autoPickup/AutoPickup.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class AutoPickup
{
public static final String MODID = "autopickup";
public static final String MODNAME = "AutoPickup";
public static final String VERSION = "2.1";
public static final String VERSION = "2.2";

public static SimpleNetworkWrapper network;
@SidedProxy(clientSide = "furgl.autoPickup.ClientProxy", serverSide = "furgl.autoPickup.CommonProxy")
Expand Down
11 changes: 2 additions & 9 deletions src/main/java/furgl/autoPickup/event/DelayedPickupEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingExperienceDropEvent;
import net.minecraftforge.event.entity.player.AttackEntityEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteractSpecific;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock;
import net.minecraftforge.event.entity.player.PlayerPickupXpEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
Expand Down Expand Up @@ -98,10 +93,8 @@ public void onEvent(LivingExperienceDropEvent event)
{
if (!event.getEntity().worldObj.isRemote && event.getAttackingPlayer() != null)
{
if (MinecraftForge.EVENT_BUS.post(new PlayerPickupXpEvent(event.getAttackingPlayer(), new EntityXPOrb(event.getAttackingPlayer().worldObj, event.getAttackingPlayer().posX, event.getAttackingPlayer().posY, event.getAttackingPlayer().posZ, event.getDroppedExperience())))) return;
event.getAttackingPlayer().xpCooldown = 2;
event.getAttackingPlayer().worldObj.playSound(event.getAttackingPlayer(), new BlockPos(event.getAttackingPlayer()), SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP, SoundCategory.AMBIENT, 0.1F, 0.5F * ((event.getAttackingPlayer().worldObj.rand.nextFloat() - event.getAttackingPlayer().worldObj.rand.nextFloat()) * 0.7F + 1.8F));
event.getAttackingPlayer().addExperience(event.getDroppedExperience());
EntityXPOrb xp = new EntityXPOrb(event.getEntity().worldObj, event.getAttackingPlayer().posX, event.getAttackingPlayer().posY, event.getAttackingPlayer().posZ, event.getDroppedExperience());
event.getEntity().worldObj.spawnEntityInWorld(xp);
event.setDroppedExperience(0);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "autopickup",
"name": "AutoPickup",
"description": "Allows items to be picked up automatically or blacklisted and never picked up.",
"version": "2.1",
"version": "2.2",
"mcversion": "1.10.2",
"url": "https://sites.google.com/site/furglsmods/auto-pickup",
"updateUrl": "",
Expand Down

0 comments on commit 885d463

Please sign in to comment.