Add some profiling for subtiles

This commit is contained in:
Vincent Lee committed 2018-09-02 22:39:47 -05:00
1 parent 8595d27f41
commit 7dc0bd4670
2 files changed
+5

No files matched your search

@@ -77,7 +77,9 @@ public class SubTilePureDaisy extends SubTileEntity {
BlockPos coords = supertile.getPos().add(acoords);
World world = supertile.getWorld();
if(!world.isAirBlock(coords)) {
world.profiler.startSection("findRecipe");
RecipePureDaisy recipe = findRecipe(coords);
world.profiler.endSection();
if(recipe != null) {
if (ticksRemaining[positionAt] == -1)
@@ -77,6 +77,7 @@ public class TileSpecialFlower extends TileMod implements IWandBindable, ISubTil
@Override
public void update() {
if(subTile != null) {
world.profiler.startSection(subTileName);
TileEntity tileBelow = world.getTileEntity(pos.down());
if(tileBelow instanceof TileRedStringRelay) {
BlockPos coords = ((TileRedStringRelay) tileBelow).getBinding();
@@ -86,6 +87,7 @@ public class TileSpecialFlower extends TileMod implements IWandBindable, ISubTil
subTile.onUpdate();
setPos(currPos);
world.profiler.endSection();
return;
}
}
@@ -101,6 +103,7 @@ public class TileSpecialFlower extends TileMod implements IWandBindable, ISubTil
subTile.onUpdate();
subTile.overgrowth = false;
subTile.overgrowthBoost = false;
world.profiler.endSection();
}
}