コード例 #1
0
 @Override
 public boolean isEntityApplicable(Entity entity) {
   if (entity instanceof EntityPlayer) {
     AndroidPlayer androidPlayer = AndroidPlayer.get((EntityPlayer) entity);
     if (androidPlayer == null || !androidPlayer.isAndroid()) {
       return true;
     }
   }
   return false;
 }
コード例 #2
0
  public void manageBiostats(InputEvent.KeyInputEvent event) {
    AndroidPlayer androidPlayer =
        AndroidPlayer.get(FMLClientHandler.instance().getClientPlayerEntity());

    for (IBionicStat stat : AndroidStatRegistry.stats.values()) {
      int level = androidPlayer.getUnlockedLevel(stat);
      if (level > 0 && stat.isEnabled(androidPlayer, level)) {
        stat.onKeyPress(
            androidPlayer,
            androidPlayer.getUnlockedLevel(stat),
            Keyboard.getEventKey(),
            Keyboard.getEventKeyState());
      }
    }
  }