mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
fix a profiling issue
This commit is contained in:
parent
f305eb8e04
commit
3019fdff8c
4 changed files with 2 additions and 7 deletions
|
@ -20,7 +20,6 @@ import net.minecraftforge.common.capabilities.Capability;
|
|||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.common.util.INBTSerializable;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import org.apache.commons.lang3.mutable.MutableDouble;
|
||||
import org.apache.commons.lang3.mutable.MutableInt;
|
||||
import org.apache.commons.lang3.mutable.MutableObject;
|
||||
|
||||
|
@ -165,7 +164,9 @@ public class AuraChunk implements ICapabilityProvider, INBTSerializable<NBTTagCo
|
|||
|
||||
for (Map.Entry<BlockPos, MutableInt> entry : this.drainSpots.entrySet()) {
|
||||
for (IDrainSpotEffect effect : this.effects) {
|
||||
world.profiler.func_194340_a(() -> NaturesAura.MOD_ID + ":" + effect.getClass().getSimpleName());
|
||||
effect.update(world, this.chunk, this, entry.getKey(), entry.getValue());
|
||||
world.profiler.endSection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import org.apache.commons.lang3.mutable.MutableInt;
|
|||
public class GrassDieEffect implements IDrainSpotEffect {
|
||||
@Override
|
||||
public void update(World world, Chunk chunk, AuraChunk auraChunk, BlockPos pos, MutableInt spot) {
|
||||
world.profiler.func_194340_a(() -> NaturesAura.MOD_ID + ":GrassDieEffect");
|
||||
if (spot.intValue() < 0) {
|
||||
int aura = AuraChunk.getAuraInArea(world, pos, 25);
|
||||
if (aura < 0) {
|
||||
|
@ -49,6 +48,5 @@ public class GrassDieEffect implements IDrainSpotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
world.profiler.endSection();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.apache.commons.lang3.mutable.MutableInt;
|
|||
public class PlantBoostEffect implements IDrainSpotEffect {
|
||||
@Override
|
||||
public void update(World world, Chunk chunk, AuraChunk auraChunk, BlockPos pos, MutableInt spot) {
|
||||
world.profiler.func_194340_a(() -> NaturesAura.MOD_ID + ":PlantBoostEffect");
|
||||
if (spot.intValue() <= 0)
|
||||
return;
|
||||
int aura = AuraChunk.getAuraInArea(world, pos, 25);
|
||||
|
@ -51,6 +50,5 @@ public class PlantBoostEffect implements IDrainSpotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
world.profiler.endSection();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import java.util.List;
|
|||
public class ReplenishingEffect implements IDrainSpotEffect {
|
||||
@Override
|
||||
public void update(World world, Chunk chunk, AuraChunk auraChunk, BlockPos pos, MutableInt spot) {
|
||||
world.profiler.func_194340_a(() -> NaturesAura.MOD_ID + ":ReplenishingEffect");
|
||||
int amount = spot.intValue();
|
||||
if (amount < 0) {
|
||||
List<ISpotDrainable> tiles = new ArrayList<>();
|
||||
|
@ -41,6 +40,5 @@ public class ReplenishingEffect implements IDrainSpotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
world.profiler.endSection();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue