Package com.flansmod.common.types

Examples of com.flansmod.common.types.InfoType


  public void playerDrops(PlayerDropsEvent event)
  {
    for(int i = event.drops.size() - 1; i >= 0; i--)
    {
      EntityItem ent = event.drops.get(i);
      InfoType type = InfoType.getType(ent.getEntityItem());
      if(type != null && !type.canDrop)
        event.drops.remove(i);
    }
  }
View Full Code Here


  }
 
  @SubscribeEvent
  public void playerDrops(ItemTossEvent event)
  {
    InfoType type = InfoType.getType(event.entityItem.getEntityItem());
    if(type != null && !type.canDrop)
      event.setCanceled(true);
  }
View Full Code Here

      Class<? extends InfoType> typeClass = type.getTypeClass();
      for(TypeFile typeFile : TypeFile.files.get(type))
      {
        try
        {
          InfoType infoType = (typeClass.getConstructor(TypeFile.class).newInstance(typeFile));
          infoType.read(typeFile);
          switch(type)
          {
          case bullet : bulletItems.add((ItemBullet)new ItemBullet((BulletType)infoType).setUnlocalizedName(infoType.shortName)); break;
          case attachment : attachmentItems.add((ItemAttachment)new ItemAttachment((AttachmentType)infoType).setUnlocalizedName(infoType.shortName)); break;
          case gun : gunItems.add((ItemGun)new ItemGun((GunType)infoType).setUnlocalizedName(infoType.shortName)); break;
View Full Code Here

TOP

Related Classes of com.flansmod.common.types.InfoType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.