fixed some stuff unnecessarily happening on the client

Closes #2
This commit is contained in:
Ellpeck 2020-04-29 14:06:19 +02:00
parent ac0c456196
commit ccc1547292
2 changed files with 17 additions and 13 deletions

View file

@ -153,6 +153,8 @@ public class PipeItem implements INBTSerializable<CompoundNBT>, ILiquidContainer
}
private void onPathObstructed(PipeTileEntity currPipe, boolean tryReturn) {
if (currPipe.getWorld().isRemote)
return;
if (!this.dropOnObstruction && tryReturn) {
PipeNetwork network = PipeNetwork.get(currPipe.getWorld());
if (network.routeItemToLocation(currPipe.getPos(), this.destInventory, this.getStartPipe(), this.startInventory, speed -> this)) {

View file

@ -94,6 +94,7 @@ public class PipeTileEntity extends TileEntity implements INamedContainerProvide
return;
IProfiler profiler = this.world.getProfiler();
if (!this.world.isRemote) {
profiler.startSection("ticking_modules");
int prio = 0;
Iterator<Pair<ItemStack, IModule>> modules = this.streamModules().iterator();
@ -108,6 +109,7 @@ public class PipeTileEntity extends TileEntity implements INamedContainerProvide
PipeNetwork.get(this.world).clearDestinationCache(this.pos);
}
profiler.endSection();
}
profiler.startSection("ticking_items");
List<PipeItem> items = this.getItems();