mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Update to recommended forge, removed useless synchronization in ManaNetworkHandler
This commit is contained in:
2 files changed
+5
-5
No files matched your search
+1
-1
@@ -4,6 +4,6 @@ version=r1.8
|
||||
dir_output=../Build Output/Botania/
|
||||
dir_repo=./
|
||||
mc_version=1.9
|
||||
forge_version=12.16.0.1882-1.9
|
||||
forge_version=12.16.1.1888
|
||||
build_number=303
|
||||
mod_name=Botania
|
||||
@@ -70,12 +70,12 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
return isIn(tile, manaPools);
|
||||
}
|
||||
|
||||
private synchronized boolean isIn(TileEntity tile, Map<World, Set<TileSignature>> map) {
|
||||
private boolean isIn(TileEntity tile, Map<World, Set<TileSignature>> map) {
|
||||
Set<TileSignature> set = map.get(tile.getWorld());
|
||||
return set != null && set.contains(new TileSignature(tile, tile.getWorld().isRemote));
|
||||
}
|
||||
|
||||
private synchronized TileEntity getClosest(Set<TileSignature> tiles, BlockPos pos, boolean remoteCheck, int limit) {
|
||||
private TileEntity getClosest(Set<TileSignature> tiles, BlockPos pos, boolean remoteCheck, int limit) {
|
||||
return tiles.stream()
|
||||
.filter(ts -> ts.isRemote() == remoteCheck)
|
||||
.map(TileSignature::getTile)
|
||||
@@ -85,7 +85,7 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
private synchronized void remove(Map<World, Set<TileSignature>> map, TileEntity tile) {
|
||||
private void remove(Map<World, Set<TileSignature>> map, TileEntity tile) {
|
||||
World world = tile.getWorld();
|
||||
|
||||
if(!map.containsKey(world))
|
||||
@@ -94,7 +94,7 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
map.get(world).remove(new TileSignature(tile, tile.getWorld().isRemote));
|
||||
}
|
||||
|
||||
private synchronized void add(Map<World, Set<TileSignature>> map, TileEntity tile) {
|
||||
private void add(Map<World, Set<TileSignature>> map, TileEntity tile) {
|
||||
World world = tile.getWorld();
|
||||
map.putIfAbsent(world, new HashSet<>());
|
||||
map.get(world).add(new TileSignature(tile, tile.getWorld().isRemote));
|
||||
|
||||
Reference in new issue
Block a user