diff options
author | boubou19 <miisterunknown@gmail.com> | 2024-07-02 20:48:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-02 20:48:44 +0200 |
commit | 84a6dabdcc9936aaeece6d74952157996fc6bc58 (patch) | |
tree | 846e5ff24ebbac4f5783f32497c69731f263e72e /src/main/java/gregtech/common/GT_Proxy.java | |
parent | b2cbfcf522d9dd13ce89a38d8a5767a8a64cecd8 (diff) | |
download | GT5-Unofficial-84a6dabdcc9936aaeece6d74952157996fc6bc58.tar.gz GT5-Unofficial-84a6dabdcc9936aaeece6d74952157996fc6bc58.tar.bz2 GT5-Unofficial-84a6dabdcc9936aaeece6d74952157996fc6bc58.zip |
Removal of the GT Arrows (#2692)
* remove arrows
* remove arrow classes
* remove arrow usages in ItemList
* less bullshit
* sa
---------
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/common/GT_Proxy.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_Proxy.java | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index bfd47d5c2c..4cd49429c3 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -67,7 +67,6 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Blocks; @@ -169,7 +168,6 @@ import gregtech.api.util.GT_Shaped_Recipe; import gregtech.api.util.GT_Shapeless_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; -import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.items.GT_MetaGenerated_Item_98; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.ID_MetaTool_01; @@ -1551,21 +1549,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { @SubscribeEvent public void onEntitySpawningEvent(EntityJoinWorldEvent aEvent) { - if ((aEvent.entity != null) && (!aEvent.entity.worldObj.isRemote)) { - if ((aEvent.entity instanceof EntityItem)) { - ((EntityItem) aEvent.entity).setEntityItemStack( - GT_OreDictUnificator.get(true, ((EntityItem) aEvent.entity).getEntityItem(), true)); - } - if ((this.mSkeletonsShootGTArrows > 0) && (aEvent.entity.getClass() == EntityArrow.class) - && (aEvent.entity.worldObj.rand.nextInt(this.mSkeletonsShootGTArrows) == 0) - && ((((EntityArrow) aEvent.entity).shootingEntity instanceof EntitySkeleton))) { - aEvent.entity.worldObj.spawnEntityInWorld( - new GT_Entity_Arrow( - (EntityArrow) aEvent.entity, - OrePrefixes.arrowGtWood.mPrefixedItems - .get(aEvent.entity.worldObj.rand.nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size())))); - aEvent.entity.setDead(); - } + if (aEvent.entity == null) { + return; + } + + if (aEvent.entity.worldObj.isRemote) { + return; + } + + if ((aEvent.entity instanceof EntityItem)) { + ((EntityItem) aEvent.entity) + .setEntityItemStack(GT_OreDictUnificator.get(true, ((EntityItem) aEvent.entity).getEntityItem(), true)); } } |