Пример #1
0
 @Override
 protected void updateBoatAI(BoatAITaskList list) {
   this.list = list;
   int priority = 0;
   if (modules != null) {
     for (int i = 0; i < modules.size(); i++) {
       ModuleHelper.addBoatAI(
           ModuleHelper.parseStringToItemStack((String) modules.get(i)), list, this, (float) i);
       Block block =
           ModuleHelper.getBlockType(ModuleHelper.parseStringToItemStack((String) modules.get(i)));
       if (block != null) {
         this.dataWatcher.updateObject(EntityInfo.DATAWATCHER_TILE_ID, block.blockID);
       }
       priority = i;
     }
   }
   list.addTask(new RopeTask(this, list.size() == 0 ? priority : priority + 1));
 }
Пример #2
0
 public ModularBoat(World par1World, double par2, double par4, double par6, NBTTagCompound tag) {
   super(par1World, par2, par4, par6);
   modules = (ArrayList) readTagInformation(tag);
   list.clear();
   updateBoatAI(this.list);
 }