Fixes #2575: Removed ITickable from AEBaseTile

Removed TileEventType.TICK, use ITickable when really needed.
The few tiles needing to tick and are not a grid tile now implement ITickable.
Charger is no longer implementing ITickable.
This commit is contained in:
yueh
2016-11-05 21:36:56 +01:00
parent fe1a67ffaa
commit 5328627d7a
11 changed files with 144 additions and 114 deletions
@@ -26,6 +26,7 @@ import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.SoundCategory;
import appeng.tile.AEBaseInvTile;
@@ -35,10 +36,46 @@ import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.InvOperation;
public class TileSkyChest extends AEBaseInvTile
public class TileSkyChest extends AEBaseInvTile implements ITickable
{
private final int[] sides = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 };
private final int[] sides = {
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35 };
private final AppEngInternalInventory inv = new AppEngInternalInventory( this, 9 * 4 );
// server
private int numPlayersUsing;
@@ -126,8 +163,8 @@ public class TileSkyChest extends AEBaseInvTile
}
}
@TileEvent( TileEventType.TICK )
public void tick()
@Override
public void update()
{
int i = this.pos.getX();
int j = this.pos.getY();