Skip to content

Commit

Permalink
v1.4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
byteful committed Jun 29, 2024
1 parent 8f9cabc commit cdf2461
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 27 deletions.
47 changes: 23 additions & 24 deletions .run/Build.run.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Build" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list/>
</option>
<option name="taskNames">
<list>
<option value="clean"/>
<option value="build"/>
<option value="shadowJar"/>
<option value="publishMavenPublicationToMavenLocal"/>
</list>
</option>
<option name="vmOptions"/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2"/>
</configuration>
<configuration default="false" name="Build" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="shadowJar" />
<option value="publishMavenPublicationToMavenLocal" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies {
implementation 'de.tr7zw:item-nbt-api:2.13.1'
implementation 'com.github.Redempt:RedLib:6.6.1'
implementation 'com.github.Redempt:Crunch:2.0.3'
implementation 'com.github.cryptomorin:XSeries:11.1.0'
implementation 'com.github.cryptomorin:XSeries:11.2.0'
implementation 'com.github.Revxrsal.Lamp:common:3.2.1'
implementation 'com.github.Revxrsal.Lamp:bukkit:3.2.1'
implementation 'com.github.Sven65:Item-Names:1.0.2'
Expand All @@ -55,7 +55,7 @@ dependencies {
}

group = 'me.byteful.plugin'
version = '1.4.0.1'
version = '1.4.0.2'
description = 'LevelTools'
java.sourceCompatibility = JavaVersion.VERSION_17

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

import com.google.common.collect.Sets;
import me.byteful.plugin.leveltools.api.block.BlockDataManager;
import me.byteful.plugin.leveltools.api.block.BlockPosition;
import me.byteful.plugin.leveltools.api.scheduler.ScheduledTask;
import me.byteful.plugin.leveltools.api.scheduler.Scheduler;
import me.byteful.plugin.leveltools.util.Text;

public class FileBlockDataManager implements BlockDataManager {
private final Set<BlockPosition> cache = new HashSet<>();
private static final int MAX_CACHE_SIZE = 10_000;
private final Set<BlockPosition> cache = ConcurrentHashMap.newKeySet();
private final Path file;
private final ScheduledTask saveTask;

Expand Down Expand Up @@ -45,6 +51,7 @@ public boolean isPlacedBlock(BlockPosition pos) {

@Override
public void addPlacedBlock(BlockPosition pos) {
if (cache.size() >= MAX_CACHE_SIZE) return;
cache.add(pos);
}

Expand Down

0 comments on commit cdf2461

Please sign in to comment.