Beispiel #1
0
 public int comparer(NextTickListEntry nextticklistentry)
 {
     if (scheduledTime < nextticklistentry.scheduledTime)
     {
         return -1;
     }
     if (scheduledTime > nextticklistentry.scheduledTime)
     {
         return 1;
     }
     if (tickEntryID < nextticklistentry.tickEntryID)
     {
         return -1;
     }
     return tickEntryID <= nextticklistentry.tickEntryID ? 0 : 1;
 }
Beispiel #2
0
 public int comparer(NextTickListEntry nextticklistentry)
 {
     if (scheduledTime < nextticklistentry.scheduledTime)
     {
         return(-1);
     }
     if (scheduledTime > nextticklistentry.scheduledTime)
     {
         return(1);
     }
     if (tickEntryID < nextticklistentry.tickEntryID)
     {
         return(-1);
     }
     return(tickEntryID <= nextticklistentry.tickEntryID ? 0 : 1);
 }
Beispiel #3
0
 public virtual void func_22074_c(int i, int j, int k, int l, int i1)
 {
     var nextticklistentry = new NextTickListEntry(i, j, k, l);
     byte byte0 = 8;
     if (scheduledUpdatesAreImmediate)
     {
         if (checkChunksExist(nextticklistentry.xCoord - byte0, nextticklistentry.yCoord - byte0,
                              nextticklistentry.zCoord - byte0, nextticklistentry.xCoord + byte0,
                              nextticklistentry.yCoord + byte0, nextticklistentry.zCoord + byte0))
         {
             int j1 = getBlockId(nextticklistentry.xCoord, nextticklistentry.yCoord, nextticklistentry.zCoord);
             if (j1 == nextticklistentry.blockID && j1 > 0)
             {
                 Block.blocksList[j1].updateTick(this, nextticklistentry.xCoord, nextticklistentry.yCoord,
                                                 nextticklistentry.zCoord, rand);
             }
         }
         return;
     }
     if (checkChunksExist(i - byte0, j - byte0, k - byte0, i + byte0, j + byte0, k + byte0))
     {
         if (l > 0)
         {
             nextticklistentry.setScheduledTime(i1 + worldInfo.getWorldTime());
         }
         if (!scheduledTickSet.contains(nextticklistentry))
         {
             scheduledTickSet.add(nextticklistentry);
             scheduledTickTreeSet.add(nextticklistentry);
         }
     }
 }