Merge pull request #634 from altrisi/freeze-schedules
❄️ Freezing Scarpet ❄️
This commit is contained in:
11 files changed
+143
-14
No files matched your search
@@ -2,6 +2,7 @@ package carpet.script;
|
||||
|
||||
import carpet.CarpetServer;
|
||||
import carpet.CarpetSettings;
|
||||
import carpet.helpers.TickSpeed;
|
||||
import carpet.script.exception.InternalExpressionException;
|
||||
import carpet.script.value.BlockValue;
|
||||
import carpet.script.value.EntityValue;
|
||||
@@ -973,6 +974,8 @@ public class CarpetEventServer
|
||||
|
||||
public void tick()
|
||||
{
|
||||
if (!TickSpeed.process_entities)
|
||||
return;
|
||||
Iterator<ScheduledCall> eventIterator = scheduledCalls.iterator();
|
||||
List<ScheduledCall> currentCalls = new ArrayList<>();
|
||||
while(eventIterator.hasNext())
|
||||
|
||||
@@ -167,6 +167,15 @@ public class ShapesRenderer
|
||||
}
|
||||
}
|
||||
|
||||
public void renewShapes()
|
||||
{
|
||||
synchronized (shapes)
|
||||
{
|
||||
shapes.values().forEach(el -> el.values().forEach(shape -> {
|
||||
shape.expiryTick++;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
public abstract static class RenderedShape<T extends ShapeDispatcher.ExpiringShape>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user