Compare commits
10 Commits
v0.1.0-bet
...
join-ticke
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a523823513 | ||
|
|
fe7bcfc56a | ||
|
|
44f8058b09 | ||
|
|
d1f8e81913 | ||
|
|
dcef1320b2 | ||
|
|
179b45cac5 | ||
|
|
89e9cd52e4 | ||
|
|
38c3f5fd80 | ||
|
|
98e8a08e85 | ||
|
|
caf2960b6b |
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -35,7 +35,14 @@ jobs:
|
||||
run: ./installConcurrentUtil.sh
|
||||
- name: "execute gradle build"
|
||||
run: ./gradlew build
|
||||
- name: Publish (Pre-)Release to Modrinth
|
||||
- name: Determine Snapshot Status
|
||||
run: |
|
||||
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
|
||||
echo "STATUS=snapshot" >> $GITHUB_ENV
|
||||
else
|
||||
echo "STATUS=release" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Publish (Pre-)Release to Modrinth & CurseForge
|
||||
if: "${{ env.STATUS == 'release' && github.event_name == 'release' }}"
|
||||
run: ./gradlew :moonrise-fabric:publishMods :moonrise-neoforge:publishMods
|
||||
env:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id("xyz.jpenilla.quiet-architectury-loom")
|
||||
id 'maven-publish'
|
||||
id 'io.github.goooler.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
configurations.create("libs")
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
"mixin.entity.collisions.intersection": false,
|
||||
"mixin.entity.collisions.movement": false,
|
||||
"mixin.entity.collisions.unpushable_cramming": false,
|
||||
"mixin.chunk.entity_class_groups": false
|
||||
"mixin.chunk.entity_class_groups": false,
|
||||
"mixin.alloc.entity_tracker": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@ org.gradle.daemon=false
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.21.1
|
||||
loader_version=0.15.11
|
||||
neoforge_version=21.1.20
|
||||
loader_version=0.16.5
|
||||
neoforge_version=21.1.42
|
||||
snakeyaml_version=2.2
|
||||
concurrentutil_version=0.0.2-SNAPSHOT
|
||||
cloth_version=15.0.128
|
||||
lithium_version=mc1.21.1-0.13.0
|
||||
# Mod Properties
|
||||
mod_version=0.1.0-beta.0
|
||||
mod_version=0.1.0-SNAPSHOT
|
||||
maven_group=ca.spottedleaf.moonrise
|
||||
archives_base_name=moonrise
|
||||
|
||||
@@ -3,7 +3,7 @@ import net.fabricmc.loom.util.aw2at.Aw2At
|
||||
plugins {
|
||||
id("xyz.jpenilla.quiet-architectury-loom")
|
||||
id 'maven-publish'
|
||||
id 'io.github.goooler.shadow'
|
||||
id 'com.gradleup.shadow'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -53,7 +53,7 @@ publishMods {
|
||||
modrinth {
|
||||
incompatible(
|
||||
"notenoughcrashes",
|
||||
"starlight-forge",
|
||||
"starlight-neoforge",
|
||||
"canary",
|
||||
"radium"
|
||||
)
|
||||
@@ -61,7 +61,7 @@ publishMods {
|
||||
curseforge {
|
||||
incompatible(
|
||||
"not-enough-crashes-forge",
|
||||
"starlight-forge",
|
||||
"starlight-neoforge",
|
||||
"canary",
|
||||
"radium-reforged"
|
||||
)
|
||||
|
||||
@@ -24,8 +24,8 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
||||
id("xyz.jpenilla.quiet-architectury-loom") version "1.7.294" apply false
|
||||
id 'io.github.goooler.shadow' version '8.1.8' apply false
|
||||
id("xyz.jpenilla.quiet-architectury-loom") version "1.7.295" apply false
|
||||
id 'com.gradleup.shadow' version '8.3.0' apply false
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
@@ -37,7 +37,7 @@ dependencyResolutionManagement {
|
||||
}
|
||||
versionCatalogs {
|
||||
create("fabricApiLibs") {
|
||||
from("net.fabricmc.fabric-api:fabric-api-catalog:0.102.0+1.21.1")
|
||||
from("net.fabricmc.fabric-api:fabric-api-catalog:0.103.0+1.21.1")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package ca.spottedleaf.moonrise.mixin.chunk_system;
|
||||
|
||||
import ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel;
|
||||
import ca.spottedleaf.moonrise.patches.chunk_system.player.ChunkSystemServerPlayer;
|
||||
import ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader;
|
||||
import net.minecraft.network.Connection;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.network.CommonListenerCookie;
|
||||
import net.minecraft.server.players.PlayerList;
|
||||
import net.minecraft.util.Unit;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@@ -30,6 +33,26 @@ abstract class PlayerListMixin {
|
||||
((ChunkSystemServerPlayer)serverPlayer).moonrise$setRealPlayer(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @reason prevent chunk load cycling on join
|
||||
* @author jpenilla
|
||||
*/
|
||||
@Inject(
|
||||
method = "placeNewPlayer",
|
||||
at = @At(
|
||||
target = "Lnet/minecraft/server/level/ServerLevel;addNewPlayer(Lnet/minecraft/server/level/ServerPlayer;)V",
|
||||
value = "INVOKE"
|
||||
)
|
||||
)
|
||||
private void addJoinTicket(final Connection connection, final ServerPlayer serverPlayer,
|
||||
final CommonListenerCookie commonListenerCookie, final CallbackInfo ci) {
|
||||
((ChunkSystemServerLevel) serverPlayer.serverLevel()).moonrise$getChunkTaskScheduler().chunkHolderManager.addTicketAtLevel(
|
||||
RegionizedPlayerChunkLoader.PLAYER_JOIN,
|
||||
serverPlayer.chunkPosition(),
|
||||
RegionizedPlayerChunkLoader.TICK_TICKET_LEVEL,
|
||||
Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @reason The RegionizedPlayerChunkLoader will handle the VD packet
|
||||
* @author Spottedleaf
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.level.TicketType;
|
||||
import net.minecraft.server.network.PlayerChunkSender;
|
||||
import net.minecraft.util.Unit;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.GameRules;
|
||||
import net.minecraft.world.level.chunk.ChunkAccess;
|
||||
@@ -52,6 +53,7 @@ public final class RegionizedPlayerChunkLoader {
|
||||
|
||||
public static final TicketType<Long> PLAYER_TICKET = TicketType.create("chunk_system:player_ticket", Long::compareTo);
|
||||
public static final TicketType<Long> PLAYER_TICKET_DELAYED = TicketType.create("chunk_system:player_ticket_delayed", Long::compareTo, 5 * 20);
|
||||
public static final TicketType<Unit> PLAYER_JOIN = TicketType.create("chunk_system:player_join", (a, b) -> 0, 5 * 20);
|
||||
|
||||
public static final int MIN_VIEW_DISTANCE = 2;
|
||||
public static final int MAX_VIEW_DISTANCE = 32;
|
||||
|
||||
Reference in New Issue
Block a user