Skip to content

Commit

Permalink
Fix forge crash
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNijjar committed Jul 14, 2023
1 parent afe488b commit c2f776b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;

import java.util.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class ClaimHandler extends SaveHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ public void onMouseOut(UIState mapState, Point2D.Double mousePosition, BlockPos
}

public void onActivate(UIState mapState) {}

public void onDeactivate(UIState mapState) {}

public boolean onMouseClick(UIState mapState, Point2D.Double mousePosition, BlockPos blockPosition, int button, boolean doubleClick) {return false;}

public void onOverlayMenuPopup(UIState mapState, Point2D.Double mousePosition, BlockPos blockPosition, ModPopupMenu modPopupMenu) {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ private void update(Map<ChunkPos, ClientClaims.Entry> claims, ResourceKey<Level>
private void update(ChunkPos pos, ClientClaims.Entry entry, ResourceKey<Level> dimension) {
try {
api.show(ClaimedChunkDisplay.create(pos, entry, dimension));
}catch (Exception ignored) {}
} catch (Exception ignored) {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
public class TeamHelper {

private static final ChatFormatting[] COLORS = new ChatFormatting[]{
ChatFormatting.DARK_GREEN,
ChatFormatting.GREEN,
ChatFormatting.AQUA,
ChatFormatting.DARK_AQUA,
ChatFormatting.DARK_BLUE,
ChatFormatting.BLUE,
ChatFormatting.LIGHT_PURPLE,
ChatFormatting.DARK_PURPLE,
ChatFormatting.DARK_GREEN,
ChatFormatting.GREEN,
ChatFormatting.AQUA,
ChatFormatting.DARK_AQUA,
ChatFormatting.DARK_BLUE,
ChatFormatting.BLUE,
ChatFormatting.LIGHT_PURPLE,
ChatFormatting.DARK_PURPLE,
};

public static Set<GameProfile> getTeamMembers(String id, MinecraftServer server) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
public class ServerLevelMixin {

@ModifyExpressionValue(
method = "tick(Ljava/util/function/BooleanSupplier;)V",
at = @At(
value = "INVOKE",
target = "Lit/unimi/dsi/fastutil/longs/LongSet;isEmpty()Z",
ordinal = 0
)
method = "tick(Ljava/util/function/BooleanSupplier;)V",
at = @At(
value = "INVOKE",
target = "Ljava/util/List;isEmpty()Z",
ordinal = 0
)
)
private boolean cadmus$fixOfflineChunkLoading(boolean isEmpty) {
return isEmpty && Cadmus.FORCE_LOADED_CHUNK_COUNT <= 0;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx2G

enabledPlatforms=fabric,forge

version=0.0.4
version=0.0.5
group=earth.terrarium.cadmus

minecraftVersion=1.20.1
Expand Down

0 comments on commit c2f776b

Please sign in to comment.