Posted July 25, 20169 yr I have this event method registered: @SubscribeEvent public void onUpdate(LivingEvent.LivingUpdateEvent e) { if(e.getEntityLiving() instanceof EntityPlayer) { EntityPlayer p = (EntityPlayer) e.getEntityLiving(); if(!p.worldObj.isRemote) { PlayerStats stats = ScalaeCapabilities.getStats(p); ... if(p.getActiveItemStack() != null && p.getActiveItemStack().getItem() == Items.BOW && (stats.hasPerk(31) || stats.hasPerk(30))) { Field f = null; int useCount = -1; try { f = EntityLivingBase.class.getDeclaredField("activeItemStackUseCount"); f.setAccessible(true); useCount = f.getInt(p); if(stats.hasPerk(31)) { f.set(p, useCount + 1); System.out.println("HELLO"); } } catch(NoSuchFieldException e1) { e1.printStackTrace(); } catch(SecurityException e1) { e1.printStackTrace(); } catch(IllegalArgumentException e1) { e1.printStackTrace(); } catch(IllegalAccessException e1) { e1.printStackTrace(); } } } } } I thought this code would decrease the amount of time needed to fully draw the bow, but instead it did nothing to the length of time (visually at least), made the arrows travel a meager 1 block away after drawing for a couple of seconds, and not being able to produce the "critical hit" that is usually seen when you fully draw the bow and release the arrow. The message "HELLO" is being printed. Kain
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.