mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-20 04:19:40 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6039691b5 | ||
|
|
5db1edba33 | ||
|
|
d450461726 | ||
|
|
95f8afc0f3 | ||
|
|
19635e20ec | ||
|
|
ead4e11376 | ||
|
|
b0ceb5306a |
No files matched your search
+8
-8
@@ -49,7 +49,7 @@ configurations {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.78")
|
||||
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.9")
|
||||
|
||||
compileOnly("com.gtnewhorizons.retrofuturabootstrap:RetroFuturaBootstrap:0.4.0") { transitive = false }
|
||||
|
||||
@@ -57,11 +57,11 @@ dependencies {
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.22")
|
||||
|
||||
// Use modern models+textures to inject QuadProviders
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:TX-Loader:1.7.2:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:TX-Loader:1.8.0:dev')
|
||||
|
||||
// Iris Shaders
|
||||
compileOnly('org.jetbrains:annotations:24.0.1')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.5.20:dev")
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.6.0:dev")
|
||||
shadowImplementation("org.anarres:jcpp:1.4.14") // Apache 2.0
|
||||
shadowImplementation("org.taumc:glsl-transformation-lib:0.2.0-4.g6b42bca") {
|
||||
exclude module: "antlr4" // we only want to shadow the runtime module
|
||||
@@ -70,18 +70,18 @@ dependencies {
|
||||
compileOnly "org.apache.ant:ant:1.8.2"
|
||||
|
||||
// Because who doesn't want NEI
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.45-GTNH:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:CodeChickenCore:1.3.10:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.7.4-GTNH:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:CodeChickenCore:1.4.0:dev')
|
||||
|
||||
// Notfine Deps
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:Baubles:1.0.4:dev")
|
||||
compileOnly("com.github.GTNewHorizons:twilightforest:2.6.35:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:twilightforest:2.7.1:dev") { transitive = false }
|
||||
compileOnly(rfg.deobf('curse.maven:witchery-69673:2234410'))
|
||||
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.12.14-GTNH:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.13.1-GTNH:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:Natura:2.7.5:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ThaumicHorizons:1.6.4:dev")
|
||||
compileOnly("com.github.GTNewHorizons:ThaumicHorizons:1.6.5:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Battlegear2:1.4.1:dev") { transitive = false }
|
||||
compileOnly(rfg.deobf('maven.modrinth:backhand:1.4.1')) { transitive = false }
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+1
-1
@@ -16,5 +16,5 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.29'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.gtnewhorizons.angelica.api;
|
||||
|
||||
import com.gtnewhorizons.angelica.mixins.interfaces.IPatchedTextureAtlasSprite;
|
||||
import com.gtnewhorizons.angelica.mixins.interfaces.ITexturesCache;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
/**
|
||||
* Exposes a method to the API that allow mods to add texture update compat
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class TextureServices {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static void updateBlockTextureAnimation(IIcon icon, RenderBlocks renderBlocks) {
|
||||
if (renderBlocks instanceof ITexturesCache texturesCache) {
|
||||
texturesCache.getRenderedTextures().add(icon);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static void updateTextureAnimation(IIcon icon) {
|
||||
if(icon instanceof IPatchedTextureAtlasSprite patchedSprite) {
|
||||
patchedSprite.markNeedsAnimationUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -437,8 +437,6 @@ public class BatchingFontRenderer {
|
||||
chr = MCFONT_CHARS.charAt(lutIndex);
|
||||
}
|
||||
|
||||
final float shadowOffset = unicodeFlag ? 0.5F : 1.0F;
|
||||
|
||||
// Check ASCII space, NBSP, NNBSP
|
||||
if (chr == ' ' || chr == '\u00A0' || chr == '\u202F') {
|
||||
curX += 4;
|
||||
@@ -452,6 +450,7 @@ public class BatchingFontRenderer {
|
||||
final float uSz;
|
||||
final float vSz;
|
||||
final float itOff = curItalic ? 1.0F : 0.0F; // italic offset
|
||||
final float shadowOffset;
|
||||
final ResourceLocation texture;
|
||||
|
||||
if (lutIndex == -1 || unicodeFlag) {
|
||||
@@ -459,6 +458,7 @@ public class BatchingFontRenderer {
|
||||
continue;
|
||||
}
|
||||
// Draw unicode char
|
||||
shadowOffset = 0.5F;
|
||||
final int uniPage = chr / 256;
|
||||
texture = getUnicodePageLocation(uniPage);
|
||||
final int startColumn = this.glyphWidth[chr] >>> 4;
|
||||
@@ -475,6 +475,7 @@ public class BatchingFontRenderer {
|
||||
|
||||
} else {
|
||||
// Draw "ASCII" char
|
||||
shadowOffset = 1.0F;
|
||||
uStart = ((lutIndex % 16) * 8) / 128.0F;
|
||||
vStart = (float) ((lutIndex / 16) * 8) / 128.0F;
|
||||
xAdvance = this.charWidth[lutIndex];
|
||||
|
||||
@@ -138,10 +138,10 @@ public class AngelicaConfig {
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean enableZoom;
|
||||
|
||||
@Config.Comment("Optimizes in-world item rendering")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.Comment("Optimizes in-world item rendering [Experimental]")
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean optimizeInWorldItemRendering;
|
||||
public static boolean optimizeInWorldItemRendering_WIP;
|
||||
|
||||
@Config.Comment("Max amount of display lists to cache for optimized item rendering. Higher number will use more VRAM")
|
||||
@Config.DefaultInt(256)
|
||||
@@ -157,4 +157,8 @@ public class AngelicaConfig {
|
||||
"more latency. Will never introduce more than one frame of latency, and has a lower impact at higher framerates.")
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean sleepBeforeSwap;
|
||||
|
||||
@Config.Comment("Allows unicode languages to use an odd gui scale")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean removeUnicodeEvenScaling;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ public enum Mixins {
|
||||
|
||||
ANGELICA_ITEM_DISPLAY_LIST_OPTIMIZATION(new Builder("Optimized item rendering by wrapping them with display lists")
|
||||
.setPhase(Phase.EARLY).addMixinClasses("angelica.itemrenderer.MixinItemRenderer").setSide(Side.CLIENT)
|
||||
.setApplyIf(() -> AngelicaConfig.optimizeInWorldItemRendering)
|
||||
.setApplyIf(() -> AngelicaConfig.optimizeInWorldItemRendering_WIP)
|
||||
.addTargetedMod(TargetedMod.VANILLA)),
|
||||
|
||||
// Not compatible with the lwjgl debug callbacks, so disable if that's enabled
|
||||
@@ -219,6 +219,11 @@ public enum Mixins {
|
||||
"angelica.animation.MixinWorldRenderer",
|
||||
"angelica.animation.MixinRenderItem")),
|
||||
|
||||
SCALED_RESOUTION_UNICODE_FIX(new Builder("Removes unicode languages gui scaling being forced to even values").setPhase(Phase.EARLY)
|
||||
.setSide(Side.CLIENT).addTargetedMod(TargetedMod.VANILLA)
|
||||
.setApplyIf(() -> AngelicaConfig.removeUnicodeEvenScaling)
|
||||
.addMixinClasses("angelica.bugfixes.MixinScaledResolution_UnicodeFix")),
|
||||
|
||||
EXTRA_UTILITIES_THREAD_SAFETY(new Builder("Enable thread safety fixes in Extra Utilities").setPhase(Phase.LATE)
|
||||
.addTargetedMod(TargetedMod.EXTRAUTILS).setSide(Side.CLIENT)
|
||||
.setApplyIf(() -> CompatConfig.fixExtraUtils)
|
||||
|
||||
+27
-13
@@ -552,25 +552,39 @@ public class ChunkRenderManager<T extends ChunkGraphicsState> implements ChunkSt
|
||||
continue;
|
||||
}
|
||||
|
||||
// Do not allow distant chunks to block rendering
|
||||
if (this.alwaysDeferChunkUpdates || !this.isChunkPrioritized(render)) {
|
||||
this.builder.deferRebuild(render);
|
||||
} else {
|
||||
futures.add(this.builder.scheduleRebuildTaskAsync(render));
|
||||
}
|
||||
CompletableFuture<ChunkBuildResult<T>> futureTask = this.builder.scheduleRebuildTaskAsync(render);
|
||||
|
||||
this.dirty = true;
|
||||
submitted++;
|
||||
// Limit quantity of updates submitted if we are deferring all important builds
|
||||
if (this.alwaysDeferChunkUpdates && submitted >= budget)
|
||||
break;
|
||||
if (futureTask != null) {
|
||||
this.dirty = true;
|
||||
|
||||
// Do not allow distant chunks to block rendering
|
||||
if (this.alwaysDeferChunkUpdates || !this.isChunkPrioritized(render)) {
|
||||
this.builder.handleCompletion(futureTask);
|
||||
} else {
|
||||
futures.add(futureTask);
|
||||
}
|
||||
|
||||
submitted++;
|
||||
// Limit quantity of updates submitted if we are deferring all important builds
|
||||
if (this.alwaysDeferChunkUpdates && submitted >= budget)
|
||||
break;
|
||||
} else {
|
||||
// Immediately submit empty data to the queue and do not count this against the budget
|
||||
this.builder.enqueueUpload(new ChunkBuildResult<>(render, ChunkRenderData.EMPTY));
|
||||
}
|
||||
}
|
||||
|
||||
while (submitted < budget && !this.rebuildQueue.isEmpty()) {
|
||||
ChunkRenderContainer<T> render = this.rebuildQueue.dequeue();
|
||||
|
||||
this.builder.deferRebuild(render);
|
||||
submitted++;
|
||||
CompletableFuture<ChunkBuildResult<T>> futureTask = this.builder.scheduleRebuildTaskAsync(render);
|
||||
if(futureTask != null) {
|
||||
this.builder.handleCompletion(futureTask);
|
||||
submitted++;
|
||||
} else {
|
||||
// Immediately submit empty data to the queue and do not count this against the budget
|
||||
this.builder.enqueueUpload(new ChunkBuildResult<>(render, ChunkRenderData.EMPTY));
|
||||
}
|
||||
}
|
||||
|
||||
// always do at least one sort
|
||||
|
||||
+16
-15
@@ -10,7 +10,6 @@ import me.jellysquid.mods.sodium.client.render.chunk.ChunkGraphicsState;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderBackend;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderContainer;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderBuildTask;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderEmptyBuildTask;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderRebuildTask;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderTranslucencySortTask;
|
||||
import me.jellysquid.mods.sodium.client.render.pipeline.context.ChunkRenderCacheLocal;
|
||||
@@ -26,6 +25,7 @@ import net.minecraft.util.ReportedException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.joml.Vector3d;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Deque;
|
||||
@@ -294,7 +294,10 @@ public class ChunkBuilder<T extends ChunkGraphicsState> {
|
||||
return Runtime.getRuntime().availableProcessors();
|
||||
}
|
||||
|
||||
private void handleCompletion(CompletableFuture<ChunkBuildResult<T>> future) {
|
||||
/**
|
||||
* Add a completion handler to the given future task so that the result will be processed on the main thread.
|
||||
*/
|
||||
public void handleCompletion(CompletableFuture<ChunkBuildResult<T>> future) {
|
||||
future.whenComplete((res, ex) -> {
|
||||
if (ex != null) {
|
||||
this.failureQueue.add(ex);
|
||||
@@ -304,16 +307,6 @@ public class ChunkBuilder<T extends ChunkGraphicsState> {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a rebuild task and defers it to the work queue. When the task is completed, it will be moved onto the
|
||||
* completed uploads queued which will then be drained during the next available synchronization point with the
|
||||
* main thread.
|
||||
* @param render The render to rebuild
|
||||
*/
|
||||
public void deferRebuild(ChunkRenderContainer<T> render) {
|
||||
handleCompletion(this.scheduleRebuildTaskAsync(render));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a rebuild task and defers it to the work queue. When the task is completed, it will be moved onto the
|
||||
* completed uploads queued which will then be drained during the next available synchronization point with the
|
||||
@@ -330,16 +323,24 @@ public class ChunkBuilder<T extends ChunkGraphicsState> {
|
||||
* synchronization point on the main thread.
|
||||
* @param result The build task's result
|
||||
*/
|
||||
private void enqueueUpload(ChunkBuildResult<T> result) {
|
||||
public void enqueueUpload(ChunkBuildResult<T> result) {
|
||||
this.uploadQueue.add(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules the rebuild task asynchronously on the worker pool, returning a future wrapping the task.
|
||||
* @param render The render to rebuild
|
||||
* @return a future representing the rebuild task, or null if the chunk section is empty
|
||||
*/
|
||||
@Nullable
|
||||
public CompletableFuture<ChunkBuildResult<T>> scheduleRebuildTaskAsync(ChunkRenderContainer<T> render) {
|
||||
return this.schedule(this.createRebuildTask(render));
|
||||
ChunkRenderBuildTask<T> task = this.createRebuildTask(render);
|
||||
|
||||
if(task != null) {
|
||||
return this.schedule(task);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -360,7 +361,7 @@ public class ChunkBuilder<T extends ChunkGraphicsState> {
|
||||
ChunkRenderContext context = WorldSlice.prepare(this.world, render.getChunkPos(), this.sectionCache);
|
||||
|
||||
if (context == null) {
|
||||
return new ChunkRenderEmptyBuildTask<>(render);
|
||||
return null;
|
||||
} else {
|
||||
return new ChunkRenderRebuildTask<>(render, context, render.getRenderOrigin()).withCameraPosition(this.cameraPosition);
|
||||
}
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
package me.jellysquid.mods.sodium.client.render.chunk.tasks;
|
||||
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.ChunkGraphicsState;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderContainer;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildBuffers;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildResult;
|
||||
import me.jellysquid.mods.sodium.client.render.chunk.data.ChunkRenderData;
|
||||
import me.jellysquid.mods.sodium.client.render.pipeline.context.ChunkRenderCacheLocal;
|
||||
import me.jellysquid.mods.sodium.client.util.task.CancellationSource;
|
||||
|
||||
/**
|
||||
* A build task which does no computation and always return an empty build result. These tasks are created whenever
|
||||
* chunk meshes need to be deleted as the only way to change graphics state is to send a message to the main
|
||||
* actor thread. In cases where new chunk renders are being created and scheduled, the scheduler will prefer to just
|
||||
* synchronously update the render's data to an empty state to speed things along.
|
||||
*/
|
||||
public class ChunkRenderEmptyBuildTask<T extends ChunkGraphicsState> extends ChunkRenderBuildTask<T> {
|
||||
private final ChunkRenderContainer<T> render;
|
||||
|
||||
public ChunkRenderEmptyBuildTask(ChunkRenderContainer<T> render) {
|
||||
this.render = render;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkBuildResult<T> performBuild(ChunkRenderCacheLocal cache, ChunkBuildBuffers buffers, CancellationSource cancellationSource) {
|
||||
return new ChunkBuildResult<>(this.render, ChunkRenderData.EMPTY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void releaseResources() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ options.dynamic_lights_shader_force=Dynamic Lights - Forced With Shaders
|
||||
options.dynamic_lights_shader_force.tooltip=Enabled - Dynamic Lights are shown even when a shader is active, Disabled - Dynamic Lights are disabled when a shader is active.
|
||||
options.angelica.droppedItemLimit=Dropped Item Render Limit
|
||||
options.angelica.droppedItemLimit.tooltip=The maximum number of dropped items that will be rendered. Lower values can improve performance.
|
||||
options.angelica.mobSpawnerRenderDistance=Mod spawner render distance
|
||||
options.angelica.mobSpawnerRenderDistance=Mob spawner render distance
|
||||
options.angelica.mobSpawnerRenderDistance.tooltip=Render distance for the spinning mob inside mod spawners
|
||||
options.angelica.itemdisplaylistcount=Item Renderer Display List Cache Size
|
||||
options.angelica.itemdisplaylistcount.tooltip=The maximum number of display lists to cache in the optimized item renderer. Higher values will increase performance but increase VRAM usage.
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.gtnewhorizons.angelica.mixins.early.angelica.bugfixes;
|
||||
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
|
||||
@Mixin(ScaledResolution.class)
|
||||
public class MixinScaledResolution_UnicodeFix {
|
||||
|
||||
|
||||
// Force unicode languages to use the calculated scaleFactor and not adjust it.
|
||||
// Can lead to blurry text
|
||||
@ModifyConstant(method = "<init>", constant = @Constant(intValue = 1, ordinal = 5))
|
||||
int angelica$ScaledResolutionInit(int constant){
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user