Compare commits
6 Commits
v0.2.0-bet
...
v0.2.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bad5cae4d8 | ||
|
|
e3b1502bb6 | ||
|
|
54fc964987 | ||
|
|
0cbc9aa1a1 | ||
|
|
19e2136ae1 | ||
|
|
126cc03747 |
@@ -12,13 +12,13 @@ Fabric/NeoForge mod for optimising performance of the integrated (singleplayer/L
|
|||||||
Moonrise aims to optimise the game *without changing Vanilla behavior*. If you find that there are changes to Vanilla behavior,
|
Moonrise aims to optimise the game *without changing Vanilla behavior*. If you find that there are changes to Vanilla behavior,
|
||||||
please open an issue.
|
please open an issue.
|
||||||
|
|
||||||
Moonrise ports several important [Paper](https://github.com/PaperMC/Paper/)
|
Moonrise is an official port of several important [Paper](https://github.com/PaperMC/Paper/)
|
||||||
patches. Listed below are notable patches:
|
patches. Listed below are notable patches:
|
||||||
|
- [Starlight](https://github.com/PaperMC/Starlight/)
|
||||||
- Chunk system rewrite
|
- Chunk system rewrite
|
||||||
- Collision optimisations
|
- Collision optimisations
|
||||||
- Entity tracker optimisations
|
- Entity tracker optimisations
|
||||||
- Random ticking optimisations
|
- Random ticking optimisations
|
||||||
- [Starlight](https://github.com/PaperMC/Starlight/)
|
|
||||||
|
|
||||||
## Known Compatibility Issues
|
## Known Compatibility Issues
|
||||||
| Mod | Status |
|
| Mod | Status |
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ modmenu_version=12.0.0-beta.1
|
|||||||
fabric_lithium_version=mc1.21.1-0.14.0-beta.1
|
fabric_lithium_version=mc1.21.1-0.14.0-beta.1
|
||||||
neo_lithium_version=BrMIoIMv
|
neo_lithium_version=BrMIoIMv
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=0.2.0-beta.2
|
mod_version=0.2.0-beta.3
|
||||||
maven_group=ca.spottedleaf.moonrise
|
maven_group=ca.spottedleaf.moonrise
|
||||||
archives_base_name=moonrise
|
archives_base_name=moonrise
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import net.minecraft.world.level.chunk.status.ChunkStatus;
|
|||||||
import net.minecraft.world.level.chunk.storage.RegionStorageInfo;
|
import net.minecraft.world.level.chunk.storage.RegionStorageInfo;
|
||||||
import net.minecraft.world.level.chunk.storage.SerializableChunkData;
|
import net.minecraft.world.level.chunk.storage.SerializableChunkData;
|
||||||
import net.minecraft.world.level.lighting.LevelLightEngine;
|
import net.minecraft.world.level.lighting.LevelLightEngine;
|
||||||
|
import org.slf4j.Logger;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
@@ -46,6 +47,10 @@ abstract class SerializableChunkDataMixin {
|
|||||||
@Final
|
@Final
|
||||||
private List<SerializableChunkData.SectionData> sectionData;
|
private List<SerializableChunkData.SectionData> sectionData;
|
||||||
|
|
||||||
|
@Shadow
|
||||||
|
@Final
|
||||||
|
private static Logger LOGGER;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @reason Replace light correctness check with our own
|
* @reason Replace light correctness check with our own
|
||||||
* Our light check is versioned in case we change the light format OR fix a bug
|
* Our light check is versioned in case we change the light format OR fix a bug
|
||||||
@@ -116,6 +121,13 @@ abstract class SerializableChunkDataMixin {
|
|||||||
final SWMRNibbleArray[] blockNibbles = StarLightEngine.getFilledEmptyLight(world);
|
final SWMRNibbleArray[] blockNibbles = StarLightEngine.getFilledEmptyLight(world);
|
||||||
final SWMRNibbleArray[] skyNibbles = StarLightEngine.getFilledEmptyLight(world);
|
final SWMRNibbleArray[] skyNibbles = StarLightEngine.getFilledEmptyLight(world);
|
||||||
|
|
||||||
|
if (!this.lightCorrect) {
|
||||||
|
((StarlightChunk)ret).starlight$setBlockNibbles(blockNibbles);
|
||||||
|
((StarlightChunk)ret).starlight$setSkyNibbles(skyNibbles);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
for (final SerializableChunkData.SectionData sectionData : this.sectionData) {
|
for (final SerializableChunkData.SectionData sectionData : this.sectionData) {
|
||||||
final int y = sectionData.y();
|
final int y = sectionData.y();
|
||||||
final DataLayer blockLight = sectionData.blockLight();
|
final DataLayer blockLight = sectionData.blockLight();
|
||||||
@@ -143,6 +155,11 @@ abstract class SerializableChunkDataMixin {
|
|||||||
|
|
||||||
((StarlightChunk)ret).starlight$setBlockNibbles(blockNibbles);
|
((StarlightChunk)ret).starlight$setBlockNibbles(blockNibbles);
|
||||||
((StarlightChunk)ret).starlight$setSkyNibbles(skyNibbles);
|
((StarlightChunk)ret).starlight$setSkyNibbles(skyNibbles);
|
||||||
|
} catch (final Throwable thr) {
|
||||||
|
ret.setLightCorrect(false);
|
||||||
|
|
||||||
|
LOGGER.error("Failed to parse light data for chunk " + ret.getPos() + " in world '" + WorldUtil.getWorldName(world) + "'", thr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import it.unimi.dsi.fastutil.objects.AbstractReference2ObjectMap;
|
|||||||
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectSet;
|
import it.unimi.dsi.fastutil.objects.ObjectSet;
|
||||||
import it.unimi.dsi.fastutil.objects.Reference2ObjectMap;
|
import it.unimi.dsi.fastutil.objects.Reference2ObjectMap;
|
||||||
import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet;
|
import it.unimi.dsi.fastutil.objects.ReferenceArrayList;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -27,7 +27,7 @@ public final class ZeroCollidingReferenceStateTable<O, S> {
|
|||||||
|
|
||||||
public ZeroCollidingReferenceStateTable(final Collection<Property<?>> properties) {
|
public ZeroCollidingReferenceStateTable(final Collection<Property<?>> properties) {
|
||||||
this.propertyToIndexer = new Int2ObjectOpenHashMap<>(properties.size());
|
this.propertyToIndexer = new Int2ObjectOpenHashMap<>(properties.size());
|
||||||
this.properties = new ReferenceOpenHashSet<>(properties);
|
this.properties = new ReferenceArrayList<>(properties);
|
||||||
|
|
||||||
final List<Property<?>> sortedProperties = new ArrayList<>(properties);
|
final List<Property<?>> sortedProperties = new ArrayList<>(properties);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user