mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-15 01:34:48 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4630bc4fd8 | ||
|
|
ce32a3d3df | ||
|
|
1991dc58ec | ||
|
|
ae19236e1a | ||
|
|
7ad368c937 | ||
|
|
5c86c87bcf | ||
|
|
99ba7fa775 | ||
|
|
5ae4ab8c5c | ||
|
|
ddd68e023f |
No files matched your search
@@ -194,10 +194,6 @@ public class GLStateManager {
|
||||
RENDER_BACKEND.vertexAttrib4f(Usage.COLOR.getAttributeLocation(), color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
|
||||
dirtyColorAttrib = false;
|
||||
}
|
||||
if (dirtyLightmapAttrib && (vertexFlags & VertexFlags.BRIGHTNESS_BIT) == 0) {
|
||||
RENDER_BACKEND.vertexAttrib4f(Usage.SECONDARY_UV.getAttributeLocation(), GLSMConfig.lastBrightnessX, GLSMConfig.lastBrightnessY, 0.0f, 1.0f);
|
||||
dirtyLightmapAttrib = false;
|
||||
}
|
||||
if (dirtyNormalAttrib && (vertexFlags & VertexFlags.NORMAL_BIT) == 0) {
|
||||
final var n = ShaderManager.getCurrentNormal();
|
||||
RENDER_BACKEND.vertexAttrib3f(Usage.NORMAL.getAttributeLocation(), n.x, n.y, n.z);
|
||||
@@ -208,6 +204,10 @@ public class GLStateManager {
|
||||
RENDER_BACKEND.vertexAttrib4f(Usage.PRIMARY_UV.getAttributeLocation(), tc.x, tc.y, tc.z, tc.w);
|
||||
dirtyTexCoordAttrib = false;
|
||||
}
|
||||
if (dirtyLightmapAttrib) {
|
||||
RENDER_BACKEND.vertexAttrib4f(Usage.SECONDARY_UV.getAttributeLocation(), GLSMConfig.lastBrightnessX, GLSMConfig.lastBrightnessY, 0.0f, 1.0f);
|
||||
dirtyLightmapAttrib = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Highest texture unit index that has ever had a non-zero binding; limits onDeleteTexture scan range
|
||||
@@ -1860,6 +1860,7 @@ public class GLStateManager {
|
||||
suspendPixelUnpackBuffer();
|
||||
RENDER_BACKEND.texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
||||
restorePixelUnpackBuffer();
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) {
|
||||
@@ -1875,6 +1876,7 @@ public class GLStateManager {
|
||||
suspendPixelUnpackBuffer();
|
||||
RENDER_BACKEND.texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
||||
restorePixelUnpackBuffer();
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, DoubleBuffer pixels) {
|
||||
@@ -1890,6 +1892,7 @@ public class GLStateManager {
|
||||
suspendPixelUnpackBuffer();
|
||||
RENDER_BACKEND.texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
||||
restorePixelUnpackBuffer();
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) {
|
||||
@@ -1905,6 +1908,7 @@ public class GLStateManager {
|
||||
suspendPixelUnpackBuffer();
|
||||
RENDER_BACKEND.texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
||||
restorePixelUnpackBuffer();
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels_buffer_offset) {
|
||||
@@ -1914,6 +1918,7 @@ public class GLStateManager {
|
||||
}
|
||||
TextureInfoCache.INSTANCE.onTexImage2D(target, level, internalformat, width, height, border, format, type, pixels_buffer_offset);
|
||||
RENDER_BACKEND.texImage2D(target, level, internalformat, width, height, border, format, type, pixels_buffer_offset);
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glTexCoord1f(float s) {
|
||||
@@ -3734,6 +3739,25 @@ public class GLStateManager {
|
||||
return DisplayListManager.getListMode();
|
||||
}
|
||||
|
||||
private static boolean handleRemovedTexParam(int target, int pname, int value) {
|
||||
if (pname == GL14.GL_GENERATE_MIPMAP) {
|
||||
if (target == GL11.GL_TEXTURE_2D) {
|
||||
final TextureInfo info = TextureInfoCache.INSTANCE.getInfo(getBoundTextureForServerState());
|
||||
if (info != null) info.setGenerateMipmap(value != 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void maybeGenerateMipmap(int target, int level) {
|
||||
if (target != GL11.GL_TEXTURE_2D) return;
|
||||
final TextureInfo info = TextureInfoCache.INSTANCE.getInfo(getBoundTextureForServerState());
|
||||
if (info != null && info.isGenerateMipmap() && level == info.getBaseLevel() && level < info.getMaxLevel()) {
|
||||
RENDER_BACKEND.generateMipmap(target);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean updateTexParameteriCache(int target, int texture, int pname, int param) {
|
||||
if (target != GL11.GL_TEXTURE_2D) {
|
||||
return true;
|
||||
@@ -3759,6 +3783,10 @@ public class GLStateManager {
|
||||
if (info.getWrapT() == param && !shouldBypassCache()) return false;
|
||||
info.setWrapT(param);
|
||||
}
|
||||
case GL12.GL_TEXTURE_BASE_LEVEL -> {
|
||||
if (info.getBaseLevel() == param && !shouldBypassCache()) return false;
|
||||
info.setBaseLevel(param);
|
||||
}
|
||||
case GL12.GL_TEXTURE_MAX_LEVEL -> {
|
||||
if (info.getMaxLevel() == param && !shouldBypassCache()) return false;
|
||||
info.setMaxLevel(param);
|
||||
@@ -3776,6 +3804,7 @@ public class GLStateManager {
|
||||
}
|
||||
|
||||
public static void glTexParameter(int target, int pname, IntBuffer params) {
|
||||
if (handleRemovedTexParam(target, pname, params.remaining() >= 1 ? params.get(params.position()) : 0)) return;
|
||||
if (params.remaining() >= 1) {
|
||||
final int val = params.get(params.position());
|
||||
final int remapped = remapTexClamp(pname, val);
|
||||
@@ -3786,6 +3815,7 @@ public class GLStateManager {
|
||||
}
|
||||
|
||||
public static void glTexParameter(int target, int pname, FloatBuffer params) {
|
||||
if (handleRemovedTexParam(target, pname, params.remaining() >= 1 ? (int) params.get(params.position()) : 0)) return;
|
||||
if (params.remaining() >= 1) {
|
||||
final float val = params.get(params.position());
|
||||
final float remapped = remapTexClamp(pname, val);
|
||||
@@ -3796,6 +3826,7 @@ public class GLStateManager {
|
||||
}
|
||||
|
||||
public static void glTexParameteri(int target, int pname, int param) {
|
||||
if (handleRemovedTexParam(target, pname, param)) return;
|
||||
param = remapTexClamp(pname, param);
|
||||
final RecordMode mode = DisplayListManager.getRecordMode();
|
||||
if (mode != RecordMode.NONE) {
|
||||
@@ -3835,6 +3866,7 @@ public class GLStateManager {
|
||||
}
|
||||
|
||||
public static void glTexParameterf(int target, int pname, float param) {
|
||||
if (handleRemovedTexParam(target, pname, param > 0 ? (int) (param + 0.5f) : (int) (param - 0.5f))) return;
|
||||
param = remapTexClamp(pname, param);
|
||||
final RecordMode mode = DisplayListManager.getRecordMode();
|
||||
if (mode != RecordMode.NONE) {
|
||||
@@ -3867,9 +3899,11 @@ public class GLStateManager {
|
||||
case GL11.GL_TEXTURE_MAG_FILTER -> info.getMagFilter();
|
||||
case GL11.GL_TEXTURE_WRAP_S -> info.getWrapS();
|
||||
case GL11.GL_TEXTURE_WRAP_T -> info.getWrapT();
|
||||
case GL12.GL_TEXTURE_BASE_LEVEL -> info.getBaseLevel();
|
||||
case GL12.GL_TEXTURE_MAX_LEVEL -> info.getMaxLevel();
|
||||
case GL12.GL_TEXTURE_MIN_LOD -> info.getMinLod();
|
||||
case GL12.GL_TEXTURE_MAX_LOD -> info.getMaxLod();
|
||||
case GL14.GL_GENERATE_MIPMAP -> info.isGenerateMipmap() ? GL11.GL_TRUE : GL11.GL_FALSE;
|
||||
default -> {
|
||||
if (isRecordingDisplayList()) {
|
||||
throw new IllegalStateException(String.format(
|
||||
@@ -4531,6 +4565,7 @@ public class GLStateManager {
|
||||
suspendPixelUnpackBuffer();
|
||||
RENDER_BACKEND.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
||||
restorePixelUnpackBuffer();
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) {
|
||||
@@ -4544,6 +4579,7 @@ public class GLStateManager {
|
||||
suspendPixelUnpackBuffer();
|
||||
RENDER_BACKEND.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
||||
restorePixelUnpackBuffer();
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels_buffer_offset) {
|
||||
@@ -4551,6 +4587,7 @@ public class GLStateManager {
|
||||
throw new UnsupportedOperationException("glTexSubImage2D with buffer offset in display lists not yet supported");
|
||||
}
|
||||
RENDER_BACKEND.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset);
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) {
|
||||
@@ -4574,6 +4611,7 @@ public class GLStateManager {
|
||||
throw new UnsupportedOperationException("glCopyTexImage2D in display lists not yet implemented - if you see this, please report!");
|
||||
}
|
||||
RENDER_BACKEND.copyTexImage2D(target, level, internalFormat, x, y, width, height, border);
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glCopyTexSubImage1D(int target, int level, int xoffset, int x, int y, int width) {
|
||||
@@ -4588,6 +4626,7 @@ public class GLStateManager {
|
||||
throw new UnsupportedOperationException("glCopyTexSubImage2D in display lists not yet implemented - if you see this, please report!");
|
||||
}
|
||||
RENDER_BACKEND.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
|
||||
maybeGenerateMipmap(target, level);
|
||||
}
|
||||
|
||||
public static void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) {
|
||||
@@ -4633,6 +4672,12 @@ public class GLStateManager {
|
||||
}
|
||||
|
||||
public static void glHint(int target, int hint) {
|
||||
// These hint targets are removed in core profile, ignore them
|
||||
switch (target) {
|
||||
case GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_POINT_SMOOTH_HINT, GL11.GL_FOG_HINT, GL14.GL_GENERATE_MIPMAP_HINT -> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final RecordMode mode = DisplayListManager.getRecordMode();
|
||||
if (mode != RecordMode.NONE) {
|
||||
DisplayListManager.recordHint(target, hint);
|
||||
|
||||
@@ -17,6 +17,7 @@ public class TextureInfo {
|
||||
@Getter @Setter protected int magFilter = GL11.GL_LINEAR;
|
||||
@Getter @Setter protected int wrapS = GL11.GL_REPEAT;
|
||||
@Getter @Setter protected int wrapT = GL11.GL_REPEAT;
|
||||
@Getter @Setter protected int baseLevel = 0;
|
||||
@Getter @Setter protected int maxLevel = 1000;
|
||||
@Getter @Setter protected int minLod = -1000;
|
||||
@Getter @Setter protected int maxLod = 1000;
|
||||
@@ -24,6 +25,8 @@ public class TextureInfo {
|
||||
|
||||
@Getter @Setter protected float maxAnisotropy = 1.0f;
|
||||
|
||||
@Getter @Setter protected boolean generateMipmap = false;
|
||||
|
||||
protected TextureInfo(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
+14
@@ -14,6 +14,7 @@ import com.gtnewhorizons.angelica.rendering.celeritas.light.VanillaDiffuseProvid
|
||||
import com.gtnewhorizons.angelica.rendering.celeritas.world.WorldSlice;
|
||||
import lombok.Getter;
|
||||
import net.coderbot.iris.block_rendering.BlockRenderingSettings;
|
||||
import net.coderbot.iris.vertices.ExtendedDataHelper;
|
||||
import net.irisshaders.iris.api.v0.IrisApi;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
@@ -184,6 +185,8 @@ public class AngelicaChunkBuildContext extends ChunkBuildContext {
|
||||
animatedSprites.add(sprite);
|
||||
}
|
||||
|
||||
final boolean isFluid = blockRenderContext.renderType == ExtendedDataHelper.FLUID_RENDER_TYPE;
|
||||
|
||||
// If block used vanilla AO, then we can safely compute our own lighting data and ignore what vanilla
|
||||
// computed. We suppress vanilla emitting the brightness/color in MixinRenderBlocks.
|
||||
// Otherwise, we need to use the block's lightmap values as they are as the ISBRH may have
|
||||
@@ -213,6 +216,17 @@ public class AngelicaChunkBuildContext extends ChunkBuildContext {
|
||||
for (int vIdx = 0; vIdx < 4; vIdx++) {
|
||||
vertices[vIdx].trueNormal = trueNormal;
|
||||
}
|
||||
|
||||
if (useAoCalculation && isFluid) {
|
||||
quadView.setup(trueNormal, blockX, blockY, blockZ);
|
||||
final ModelQuadFacing lightFace = quadView.getLightFace();
|
||||
final LightPipeline pipeline = blockAllowsSmoothLighting ? smoothLightPipeline : flatLightPipeline;
|
||||
final ModelQuadFacing cullFace = quadView.getCullFace();
|
||||
pipeline.calculate(quadView, worldX, worldY, worldZ, quadLightData, cullFace, lightFace, shouldApplyDiffuse, true);
|
||||
for (int vIdx = 0; vIdx < 4; vIdx++) {
|
||||
vertices[vIdx].light = quadLightData.lm[vIdx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Apply dynamic lights after AO calculation so they're not overwritten
|
||||
|
||||
+1
-1
@@ -269,7 +269,7 @@ public abstract class AngelicaChunkBuilderMeshingTask extends ChunkBuilderTask<C
|
||||
if (contextEncoder != null) {
|
||||
final byte lightValue = (byte) block.getLightValue();
|
||||
if (isFluid) {
|
||||
contextEncoder.prepareToRenderFluid(blockRenderContext, block, lightValue);
|
||||
contextEncoder.prepareToRenderFluid(blockRenderContext, block, metadata, lightValue);
|
||||
} else {
|
||||
int effectiveMeta = metadata;
|
||||
if (BlockRenderingSettings.INSTANCE.hasSnowyEntries()
|
||||
|
||||
+2
@@ -21,6 +21,8 @@ public class AngelicaRenderPassConfiguration {
|
||||
private record AngelicaPipelineState(int pass, boolean disableAlphaTest) implements TerrainRenderPass.PipelineState {
|
||||
@Override
|
||||
public void setup() {
|
||||
GLStateManager.glDepthMask(true);
|
||||
|
||||
if (pass == 0) {
|
||||
GLStateManager.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ public interface ContextAwareChunkVertexEncoder extends ChunkVertexEncoder {
|
||||
|
||||
void prepareToRenderBlock(BlockRenderContext ctx, Block block, int metadata, short renderType, byte lightValue);
|
||||
|
||||
void prepareToRenderFluid(BlockRenderContext ctx, Block block, byte lightValue);
|
||||
void prepareToRenderFluid(BlockRenderContext ctx, Block block, int metadata, byte lightValue);
|
||||
|
||||
void finishRenderingBlock();
|
||||
}
|
||||
+29
-3
@@ -12,6 +12,8 @@ import net.coderbot.iris.vertices.ExtendedDataHelper;
|
||||
import net.coderbot.iris.vertices.NormalHelper;
|
||||
import net.coderbot.iris.vertices.NormI8;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDynamicLiquid;
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
import org.embeddedt.embeddium.impl.render.chunk.terrain.material.Material;
|
||||
import org.embeddedt.embeddium.impl.render.chunk.vertex.format.ChunkVertexEncoder;
|
||||
import org.joml.Vector3f;
|
||||
@@ -59,14 +61,38 @@ public class IrisExtendedChunkVertexEncoder implements ContextAwareChunkVertexEn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepareToRenderFluid(BlockRenderContext ctx, Block block, byte lightValue) {
|
||||
public void prepareToRenderFluid(BlockRenderContext ctx, Block block, int metadata, byte lightValue) {
|
||||
this.context = ctx;
|
||||
Int2IntMap metaMap = blockMetaMatches != null ? blockMetaMatches.get(block) : null;
|
||||
ctx.blockId = (short) (metaMap != null ? metaMap.get(0) : -1);
|
||||
ctx.blockId = (short) resolveFluidBlockId(block, metadata);
|
||||
ctx.renderType = ExtendedDataHelper.FLUID_RENDER_TYPE;
|
||||
ctx.lightValue = lightValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try and prevent material flickering
|
||||
*/
|
||||
private int resolveFluidBlockId(Block block, int metadata) {
|
||||
if (blockMetaMatches == null) return -1;
|
||||
|
||||
int id = lookupFluidMeta(block, metadata);
|
||||
if (id == -1) {
|
||||
final Block counterpart = liquidCounterpart(block);
|
||||
if (counterpart != null) id = lookupFluidMeta(counterpart, metadata);
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
private int lookupFluidMeta(Block block, int metadata) {
|
||||
final Int2IntMap metaMap = blockMetaMatches.get(block);
|
||||
return metaMap != null ? metaMap.get(metadata) : -1;
|
||||
}
|
||||
|
||||
private static Block liquidCounterpart(Block block) {
|
||||
if (block instanceof BlockStaticLiquid) return Block.getBlockById(Block.getIdFromBlock(block) - 1);
|
||||
if (block instanceof BlockDynamicLiquid) return Block.getBlockById(Block.getIdFromBlock(block) + 1);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishRenderingBlock() {
|
||||
if (context != null) {
|
||||
|
||||
@@ -289,9 +289,6 @@ public abstract class TileOverride implements Comparable<TileOverride> {
|
||||
if (token.isEmpty()) {
|
||||
// nothing
|
||||
} else if (token.contains("/")) {
|
||||
if (!token.endsWith(".png")) {
|
||||
token += ".png";
|
||||
}
|
||||
ResourceLocation resource = TexturePackAPI.parseResourceLocation(properties.getResource(), token);
|
||||
if (resource != null) {
|
||||
list.add(resource.toString());
|
||||
|
||||
@@ -1597,6 +1597,11 @@ public class DeferredWorldRenderingPipeline implements WorldRenderingPipeline, R
|
||||
|
||||
this.customUniforms.update();
|
||||
|
||||
// Make sure SSBO is bound
|
||||
if (ssboHolder != null) {
|
||||
ssboHolder.setupBuffers();
|
||||
}
|
||||
|
||||
// Get ready for world rendering
|
||||
prepareRenderTargets();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package net.coderbot.iris.rendertarget;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.mojang.NativeImage;
|
||||
import com.gtnewhorizons.angelica.glsm.GLStateManager;
|
||||
import com.gtnewhorizons.angelica.glsm.RenderSystem;
|
||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -10,6 +10,11 @@ import java.util.Random;
|
||||
public class NativeImageBackedNoiseTexture extends DynamicTexture {
|
||||
public NativeImageBackedNoiseTexture(int size) {
|
||||
super(create(size));
|
||||
|
||||
RenderSystem.texParameteri(getGlTextureId(), GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
|
||||
RenderSystem.texParameteri(getGlTextureId(), GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
|
||||
RenderSystem.texParameteri(getGlTextureId(), GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
|
||||
RenderSystem.texParameteri(getGlTextureId(), GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
|
||||
}
|
||||
|
||||
private static NativeImage create(int size) {
|
||||
@@ -27,11 +32,4 @@ public class NativeImageBackedNoiseTexture extends DynamicTexture {
|
||||
return image;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDynamicTexture() {
|
||||
GLStateManager.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
|
||||
GLStateManager.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
|
||||
super.updateDynamicTexture();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package net.coderbot.iris.shaderpack;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class DimensionFlatteningMap {
|
||||
private static final Map<String, String> MODERN_TO_LEGACY = new HashMap<>();
|
||||
|
||||
static {
|
||||
MODERN_TO_LEGACY.put("minecraft:overworld", "Overworld");
|
||||
MODERN_TO_LEGACY.put("minecraft:the_nether", "Nether");
|
||||
MODERN_TO_LEGACY.put("minecraft:the_end", "The End");
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a modern dimension ID to its 1.7.10 string name.
|
||||
*/
|
||||
public static String toLegacyName(String dimensionName) {
|
||||
return MODERN_TO_LEGACY.getOrDefault(dimensionName, dimensionName);
|
||||
}
|
||||
}
|
||||
@@ -23,14 +23,12 @@ import net.coderbot.iris.shaderpack.option.ShaderPackOptions;
|
||||
import net.coderbot.iris.shaderpack.option.menu.OptionMenuContainer;
|
||||
import net.coderbot.iris.shaderpack.option.values.MutableOptionValues;
|
||||
import net.coderbot.iris.shaderpack.option.values.OptionValues;
|
||||
import net.coderbot.iris.shaderpack.parsing.BooleanParser;
|
||||
import net.coderbot.iris.shaderpack.preprocessor.JcppProcessor;
|
||||
import net.coderbot.iris.shaderpack.preprocessor.PropertiesPreprocessor;
|
||||
import net.coderbot.iris.shaderpack.texture.CustomTextureData;
|
||||
import net.coderbot.iris.shaderpack.texture.TextureFilteringData;
|
||||
import net.coderbot.iris.shaderpack.texture.TextureStage;
|
||||
import net.coderbot.iris.uniforms.custom.CustomUniforms;
|
||||
import net.irisshaders.iris.api.v0.IrisApi;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@@ -242,12 +240,8 @@ public class ShaderPack {
|
||||
List<String> invalidFeatureFlags = invalidFlagList.stream().map(FeatureFlags::getHumanReadableName).collect(Collectors.toList());
|
||||
|
||||
if (!invalidFeatureFlags.isEmpty()) {
|
||||
// TODO: GUI
|
||||
// if (Minecraft.getMinecraft().screen instanceof ShaderPackScreen) {
|
||||
// Minecraft.getMinecraft().setScreen(new FeatureMissingErrorScreen(Minecraft.getMinecraft().screen, I18n.format("iris.unsupported.pack"), I18n.format("iris.unsupported.pack.description", FeatureFlags.getInvalidStatus(invalidFlagList), invalidFeatureFlags.stream()
|
||||
// .collect(Collectors.joining(", ", ": ", ".")))));
|
||||
// }
|
||||
IrisApi.getInstance().getConfig().setShadersEnabledAndApply(false);
|
||||
// TODO: GUI?
|
||||
Iris.logger.warn("Shader pack requires unsupported feature flags, loading anyway: {}", String.join(", ", invalidFeatureFlags));
|
||||
}
|
||||
|
||||
ProfileSet profiles = ProfileSet.fromTree(shaderProperties.getProfiles(), this.shaderPackOptions.getOptionSet());
|
||||
@@ -258,9 +252,7 @@ public class ShaderPack {
|
||||
this.profile.current.ifPresent(profile -> disabledPrograms.addAll(profile.disabledPrograms));
|
||||
// Add programs that are disabled by shader options
|
||||
shaderProperties.getConditionallyEnabledPrograms().forEach((program, shaderOption) -> {
|
||||
if ("true".equals(shaderOption)) return;
|
||||
|
||||
if ("false".equals(shaderOption) || !this.shaderPackOptions.getOptionValues().getBooleanValueOrDefault(shaderOption)) {
|
||||
if (!BooleanParser.parse(shaderOption, this.shaderPackOptions.getOptionValues())) {
|
||||
disabledPrograms.add(program);
|
||||
}
|
||||
});
|
||||
@@ -438,7 +430,8 @@ public class ShaderPack {
|
||||
folderNames.add(folderName);
|
||||
|
||||
for (String dimensionName : dimensionNames) {
|
||||
dimensionMap.put(dimensionName, folderName);
|
||||
// Convert modern dimension IDs to 1.7.10 names
|
||||
dimensionMap.put(DimensionFlatteningMap.toLegacyName(dimensionName), folderName);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -668,6 +661,7 @@ public class ShaderPack {
|
||||
*/
|
||||
public ProgramSet getProgramSet(String dimensionName) {
|
||||
int dimensionId = Iris.getCurrentDimensionId();
|
||||
dimensionName = DimensionFlatteningMap.toLegacyName(dimensionName);
|
||||
|
||||
// First, try to find an exact match in the dimension map
|
||||
String folderName = dimensionMap.get(dimensionName);
|
||||
|
||||
@@ -383,8 +383,11 @@ public class FlatteningMap {
|
||||
doublePlant("peony", 5);
|
||||
|
||||
// === Water / Lava (IDs 8-11) ===
|
||||
// In 1.13+, water/lava are single blocks. In 1.7.10, flowing variants are separate.
|
||||
// Map modern names to both still and flowing for full coverage.
|
||||
// In 1.13+, water/lava are single blocks. In 1.7.10, flowing variants are separate.
|
||||
// Map modern names to both still and flowing for full coverage. See IrisExtendedChunkVertexEncoder.java
|
||||
// for more info on this.
|
||||
liquidLevels("water", "water", "flowing_water");
|
||||
liquidLevels("lava", "lava", "flowing_lava");
|
||||
multi("water",
|
||||
entry("water"),
|
||||
entry("flowing_water"));
|
||||
@@ -972,6 +975,13 @@ public class FlatteningMap {
|
||||
STATE_MAPPINGS.put(modern + "|" + property + "=" + value, List.of(entries));
|
||||
}
|
||||
|
||||
/** Maps each modern liquid level state to that exact metadata on both the static and flowing IDs */
|
||||
private static void liquidLevels(String modern, String legacyStatic, String legacyDynamic) {
|
||||
for (int level = 0; level <= 15; level++) {
|
||||
state(modern, "level", String.valueOf(level), entryMetas(legacyStatic, level), entryMetas(legacyDynamic, level));
|
||||
}
|
||||
}
|
||||
|
||||
/** Creates a BlockEntry with no specific metas. */
|
||||
private static BlockEntry entry(String legacyName) {
|
||||
return new BlockEntry(new NamespacedId("minecraft", legacyName), Collections.emptySet());
|
||||
|
||||
@@ -11,6 +11,9 @@ public interface OptionValues {
|
||||
Optional<String> getStringValue(String name);
|
||||
|
||||
default boolean getBooleanValueOrDefault(String name) {
|
||||
if ("0".equals(name)) return false;
|
||||
if ("1".equals(name)) return true;
|
||||
|
||||
return getBooleanValue(name).orElseGet(() -> {
|
||||
if (!getOptionSet().getBooleanOptions().containsKey(name)) {
|
||||
Iris.logger.warn("Tried to get boolean value for unknown option: " + name + ", defaulting to true!");
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
package net.coderbot.iris.shaderpack.parsing;
|
||||
|
||||
import net.coderbot.iris.Iris;
|
||||
import net.coderbot.iris.shaderpack.option.values.OptionValues;
|
||||
|
||||
import java.util.EmptyStackException;
|
||||
import java.util.Stack;
|
||||
|
||||
public class BooleanParser {
|
||||
public static boolean parse(String expression, OptionValues valueLookup) {
|
||||
try {
|
||||
StringBuilder option = new StringBuilder();
|
||||
Stack<Operation> operationStack = new Stack<>();
|
||||
Stack<Boolean> valueStack = new Stack<>();
|
||||
for (int i = 0; i < expression.length(); i++) {
|
||||
char c = expression.charAt(i);
|
||||
switch (c) {
|
||||
case '!' -> operationStack.push(Operation.NOT);
|
||||
case '&' -> {
|
||||
if (!option.isEmpty()) {
|
||||
valueStack.push(processValue(option.toString(), valueLookup, operationStack));
|
||||
option = new StringBuilder();
|
||||
}
|
||||
if (operationStack.isEmpty() || !operationStack.peek().equals(Operation.AND)) {
|
||||
operationStack.push(Operation.OPEN);
|
||||
}
|
||||
i++;
|
||||
operationStack.push(Operation.AND);
|
||||
}
|
||||
case '|' -> {
|
||||
if (!option.isEmpty()) {
|
||||
valueStack.push(processValue(option.toString(), valueLookup, operationStack));
|
||||
option = new StringBuilder();
|
||||
}
|
||||
if (!operationStack.isEmpty() && operationStack.peek().equals(Operation.AND)) {
|
||||
evaluate(operationStack, valueStack, true);
|
||||
}
|
||||
i++;
|
||||
operationStack.push(Operation.OR);
|
||||
}
|
||||
case '(' -> operationStack.push(Operation.OPEN);
|
||||
case ')' -> {
|
||||
if (!option.isEmpty()) {
|
||||
valueStack.push(processValue(option.toString(), valueLookup, operationStack));
|
||||
option = new StringBuilder();
|
||||
}
|
||||
if (!operationStack.isEmpty() && operationStack.peek().equals(Operation.AND)) {
|
||||
evaluate(operationStack, valueStack, true);
|
||||
}
|
||||
evaluate(operationStack, valueStack, true);
|
||||
}
|
||||
case ' ' -> {}
|
||||
default -> option.append(c);
|
||||
}
|
||||
}
|
||||
if (!option.isEmpty()) {
|
||||
valueStack.push(processValue(option.toString(), valueLookup, operationStack));
|
||||
}
|
||||
evaluate(operationStack, valueStack, false);
|
||||
boolean result = valueStack.pop();
|
||||
if (!valueStack.isEmpty() || !operationStack.isEmpty()) {
|
||||
Iris.logger.warn("Failed to parse boolean expression, stack isn't empty, defaulting to true: '{}'", expression);
|
||||
return true;
|
||||
}
|
||||
return result;
|
||||
} catch (EmptyStackException e) {
|
||||
Iris.logger.warn("Failed to parse boolean expression, stack is empty unexpectedly, defaulting to true: '{}'", expression);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean processValue(String value, OptionValues valueLookup, Stack<Operation> operationStack) {
|
||||
boolean booleanValue = switch (value) {
|
||||
case "true", "1" -> true;
|
||||
case "false", "0" -> false;
|
||||
default -> valueLookup != null && valueLookup.getBooleanValueOrDefault(value);
|
||||
};
|
||||
if (!operationStack.isEmpty() && operationStack.peek() == Operation.NOT) {
|
||||
operationStack.pop();
|
||||
return !booleanValue;
|
||||
}
|
||||
return booleanValue;
|
||||
}
|
||||
|
||||
private static void evaluate(Stack<Operation> operationStack, Stack<Boolean> valueStack, boolean currentBracket) {
|
||||
boolean value = valueStack.pop();
|
||||
while (!operationStack.isEmpty() && (!currentBracket || operationStack.peek() != Operation.OPEN)) {
|
||||
value = operationStack.pop().compute(value, valueStack);
|
||||
}
|
||||
if (!operationStack.isEmpty() && operationStack.peek() == Operation.OPEN) {
|
||||
operationStack.pop();
|
||||
if (!operationStack.isEmpty() && operationStack.peek() == Operation.NOT) {
|
||||
value = operationStack.pop().compute(value, valueStack);
|
||||
}
|
||||
}
|
||||
valueStack.push(value);
|
||||
}
|
||||
|
||||
private enum Operation {
|
||||
AND {
|
||||
@Override
|
||||
boolean compute(boolean value, Stack<Boolean> valueStack) {
|
||||
return valueStack.pop() && value;
|
||||
}
|
||||
},
|
||||
OR {
|
||||
@Override
|
||||
boolean compute(boolean value, Stack<Boolean> valueStack) {
|
||||
return valueStack.pop() || value;
|
||||
}
|
||||
},
|
||||
NOT {
|
||||
@Override
|
||||
boolean compute(boolean value, Stack<Boolean> valueStack) {
|
||||
return !value;
|
||||
}
|
||||
},
|
||||
OPEN;
|
||||
|
||||
boolean compute(boolean value, Stack<Boolean> valueStack) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,6 +116,7 @@ public final class CommonUniforms {
|
||||
final SmoothedVec2f eyeBrightnessSmooth = new SmoothedVec2f(directives.getEyeBrightnessHalfLife(), directives.getEyeBrightnessHalfLife(), CommonUniforms::getEyeBrightness, updateNotifier);
|
||||
|
||||
uniforms
|
||||
.uniform1f(ONCE, "pi", () -> (float) Math.PI)
|
||||
.uniform1f(ONCE, "darknessFactor", () -> 0.0F) // This is PER_FRAME in modern, it is an effect added by The Warden. We're just setting to 0 because 1.7.10 doesn't have it.
|
||||
.uniform1f(ONCE, "darknessLightFactor", () -> 0.0F) // Warden darkness current light factor - 1.7.10 doesn't have it so hardcode to 0
|
||||
.uniform1b(PER_FRAME, "hideGUI", () -> client.gameSettings.hideGUI)
|
||||
|
||||
@@ -72,6 +72,11 @@ public class VanillaBiomeList {
|
||||
biomes.add(new BiomeEntry(BiomeGenBase.sky, "END_HIGHLANDS"));
|
||||
biomes.add(new BiomeEntry(BiomeGenBase.sky, "END_BARRENS"));
|
||||
|
||||
// Modern biome variants (1.20+)
|
||||
biomes.add(new BiomeEntry(BiomeGenBase.jungle, "BIOME_SPARSE_JUNGLE"));
|
||||
biomes.add(new BiomeEntry(BiomeGenBase.mushroomIsland, "BIOME_MUSHROOM_FIELDS"));
|
||||
biomes.add(new BiomeEntry(BiomeGenBase.swampland, "BIOME_MANGROVE_SWAMP"));
|
||||
|
||||
return Collections.unmodifiableList(biomes);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
options.button.shader=シェーダー...
|
||||
|
||||
options.chunks=%s チャンク
|
||||
options.entityShadows=エンティティの影
|
||||
options.droppedItems=%s アイテム
|
||||
options.droppedItems.max=無制限
|
||||
|
||||
sodium.option_impact.low=低
|
||||
sodium.option_impact.medium=中
|
||||
sodium.option_impact.high=高
|
||||
sodium.option_impact.extreme=極高
|
||||
sodium.option_impact.varies=場合による
|
||||
sodium.options.pages.quality=品質
|
||||
sodium.options.pages.performance=パフォーマンス
|
||||
sodium.options.pages.advanced=詳細
|
||||
sodium.options.pages.appearance=外観
|
||||
sodium.options.pages.text=文字エフェクト
|
||||
sodium.options.view_distance.tooltip=地形をどれだけ遠くまで描画するかを設定します。描画距離が短いほど描画される地形が少なくなり、FPSが向上します。
|
||||
sodium.options.simulation_distance.tooltip=エンティティが読み込まれ、処理される距離を設定します。演算距離を短くすることで内部サーバーの負荷が減り、FPSが向上します。
|
||||
sodium.options.brightness.tooltip=ゲーム画面の明るさ(ガンマ)を設定します。
|
||||
sodium.options.clouds.name=雲
|
||||
sodium.options.clouds.tooltip=雲をどのように表示するか、無効にするかを設定します。
|
||||
sodium.options.gui_scale.tooltip=GUIの大きさを設定します。「自動」では最大倍率が適用されます。
|
||||
sodium.options.fullscreen.tooltip=有効にすると、ゲーム画面は(対応している場合)フルスクリーンで表示されます。
|
||||
sodium.options.v_sync.tooltip=有効にすると、ゲームのFPSがモニターのリフレッシュレートに同期され、入力遅延が増加する代わりに、より滑らかになります。処理速度が遅いと、パフォーマンスが低下する可能性があります。
|
||||
sodium.options.fps_limit.tooltip=最大FPSを制限し、マルチタスク時の負荷を軽減できます。垂直同期が有効になっている場合、この設定はモニターのリフレッシュレートよりも低い値でない限り無視されます。
|
||||
sodium.options.view_bobbing.tooltip=有効にすると、移動時に視点が揺れます。画面酔いの症状が出る場合は、無効にすると症状が軽減される可能性があります。
|
||||
|
||||
|
||||
sodium.options.graphics_quality.tooltip=一部の古い形式の設定を制御します。これはMODとの互換性のために必要です。以降の設定を「デフォルト」にすると、この設定が適用されます。
|
||||
sodium.options.clouds_quality.tooltip=雲の品質を設定します。
|
||||
sodium.options.weather_quality.tooltip=雨や雪のエフェクトの品質を設定します。
|
||||
sodium.options.leaves_quality.name=木の葉の品質
|
||||
sodium.options.leaves_quality.tooltip=木の葉の品質を設定します。
|
||||
sodium.options.grass_quality.name=草ブロックの品質
|
||||
sodium.options.grass_quality.tooltip=草ブロックの側面の品質を設定します。
|
||||
sodium.options.celeritas_smooth_lighting.name=Celeritasスムースライティング
|
||||
sodium.options.celeritas_smooth_lighting.tooltip=有効にすると、Celeritasの照明パイプラインがスムースライティングに使用されます。スムースライティングが有効である必要があります。
|
||||
sodium.options.particle_quality.name=パーティクルの品質
|
||||
sodium.options.particle_quality.tooltip=画面上に同時に存在できるパーティクルの最大数を設定します。
|
||||
sodium.options.smooth_lighting.tooltip=ブロックの照明と陰影を滑らかにします。チャンクロードが少し遅くなりますが、FPSには影響しません。
|
||||
sodium.options.biome_blend.value=%s ブロック
|
||||
sodium.options.biome_blend.tooltip=ブロックの色情報を収集するバイオームの範囲を設定します。値を大きくすると、チャンクロードが大幅に遅くなる上に、あまり品質が向上しなくなります。
|
||||
|
||||
sodium.options.entity_shadows.tooltip=有効にすると、エンティティの下に影が表示されます。
|
||||
sodium.options.vignette.name=ビネット
|
||||
sodium.options.vignette.tooltip=有効にすると、ゲーム画面にビネット効果が適用されます。フィルレートが制限されていない限り、FPSに影響が出る可能性は非常に低いでしょう。
|
||||
sodium.options.mipmap_levels.tooltip=ブロックのテクスチャに使用するミップマップの数を設定します。値が大きいほど遠くのブロックの見た目が良くなりますが、アニメーションが多いとパフォーマンスに悪影響を与える可能性があります。
|
||||
sodium.options.use_chunk_multidraw.name=チャンクの同時描画
|
||||
sodium.options.use_chunk_multidraw.tooltip=複数のチャンクを少ない回数で描画できます。CPU負荷を大幅に削減し、GPUの利用効率も向上する可能性があります。一部のグラフィックドライバで問題を引き起こす可能性があるため、不具合が発生する場合は無効にしてください。
|
||||
sodium.options.use_vertex_objects.name=頂点配列オブジェクト
|
||||
sodium.options.use_vertex_objects.tooltip=頂点の描画方法に関する情報をグラフィックドライバに移動することでパフォーマンスが向上し、同じオブジェクトの反復描画をより最適化できるようになります。互換性の無いMODを使用している場合を除き、通常はこの機能を無効にする必要はありません。
|
||||
sodium.options.use_block_face_culling.name=ブロック表面カリング
|
||||
sodium.options.use_block_face_culling.tooltip=有効にすると、画面に映るブロック面のみが描画対象となります。描画処理の初期段階で多数のブロック面が除外され、メモリ帯域幅とGPUの処理時間を節約できます。一部のリソースパックでは問題が発生する可能性があるため、ブロック面に穴が開く場合は無効にしてください。
|
||||
sodium.options.use_compact_vertex_format.name=小さな頂点フォーマット
|
||||
sodium.options.use_compact_vertex_format.tooltip=有効にすると、チャンク描画に小さな頂点フォーマットが使用されます。特に内臓グラフィックスの場合、VRAMの使用量と帯域幅を大幅に削減できますが、位置とテクスチャ座標属性の精度が低下するため、一部のリソースパックでZ-Fightingが発生する可能性があります。
|
||||
sodium.options.use_fog_occlusion.name=霧による遮蔽
|
||||
sodium.options.use_fog_occlusion.tooltip=有効にすると、霧に完全に隠れているチャンクは描画されなくなり、パフォーマンスが向上します。霧が強い水中などでより効果が高くなりますが、空と霧の間で見た目の異常が出る可能性があります。
|
||||
sodium.options.use_entity_culling.name=エンティティカリング
|
||||
sodium.options.use_entity_culling.tooltip=有効にすると、見える範囲に存在しないと判断されたエンティティが描画されなくなります。地下や壁の背後にあるエンティティの描画をしないことで、パフォーマンスが向上します。
|
||||
sodium.options.use_particle_culling.name=パーティクルカリング
|
||||
sodium.options.use_particle_culling.tooltip=有効にすると、見えると判断されたパーティクルのみが描画されるようになります。近くに多数のパーティクルがある場合にFPSが大幅に向上する可能性があります。
|
||||
sodium.options.animate_only_visible_textures.name=見えるアニメーションのみ描画
|
||||
sodium.options.animate_only_visible_textures.tooltip=有効にすると、表示可能と判断されたアニメーションのみが描画されます。特にリソースパックの負荷が高い場合、一部のハードウェアでFPSが大幅に向上する可能性があります。一部のアニメーションが動かないなどの問題が発生した場合は、この設定を無効にしてください。
|
||||
sodium.options.translucency_sorting.name=半透明ブロックの整理
|
||||
sodium.options.translucency_sorting.tooltip=有効にすると、半透明ブロックは奥から手前へと正しく並べ替えられ、特に複数の半透明ブロックが重なっている場合の品質が向上しますが、代わりに負荷が上昇します。
|
||||
sodium.options.cpu_render_ahead_limit.name=CPUの先読み処理制限
|
||||
sodium.options.cpu_render_ahead_limit.tooltip=CPUがGPUの描画完了まで待機できる最大フレーム数を設定します。極端に低い値、または高い値を設定すると、FPSが不安定になる可能性があります。
|
||||
sodium.options.cpu_render_ahead_limit.value=%s フレーム
|
||||
sodium.options.allow_direct_memory_access.name=ダイレクトメモリアクセス
|
||||
sodium.options.allow_direct_memory_access.tooltip=有効にすると、一部の重要なコードパスでのパフォーマンス向上のために、メモリへの直接アクセスが許可されます。チャンクやエンティティの描画でのCPUの余分な負荷が大幅に削減される可能性が高まりますが、一部のバグやクラッシュの診断が難しくなる場合があります。誰かに指示された場合か、設定内容を十分に理解している場合にのみ無効にしてください。
|
||||
sodium.options.ignore_driver_blacklist.name=ドライバブラックリストの無視
|
||||
sodium.options.ignore_driver_blacklist.tooltip=有効にすると、ハードウェア/ドライバー構成との既知の非互換性が無視され、問題を引き起こす可能性のある設定を有効にできるようになります。何をしているのかを正確に理解していない限り、このオプションを変更しないでください。変更後に設定画面を保存して閉じ、再度開く必要があります。
|
||||
sodium.options.enable_memory_tracing.name=メモリトレース
|
||||
sodium.options.enable_memory_tracing.tooltip=デバッグ機能です。有効にすると、メモリリークが検出された際の診断情報を改善するために、メモリ割り当てと処理の呼び出し履歴が収集されます。
|
||||
sodium.options.performance_impact_string=パフォーマンスへの影響: %s
|
||||
sodium.options.use_persistent_mapping.name=永続的なマッピング
|
||||
sodium.options.use_persistent_mapping.tooltip=有効にすると、チャンクとエンティティの描画を高速化するために、少量のメモリが永続的にマッピングされます。\n\nOpenGL4.4かARB_buffer_storageが必要です。
|
||||
sodium.options.chunk_memory_allocator.name=チャンクメモリ割り当て
|
||||
sodium.options.chunk_memory_allocator.tooltip=チャンク描画に使用するメモリ割り当て方法を設定します。\n- 非同期: 最速で、ほとんどの最新のグラフィックドライバで正常に動作します。\n- スワップ: 古いグラフィックドライバ向けの代替法です。メモリ使用量が大幅に増加する可能性があります。
|
||||
sodium.options.chunk_memory_allocator.async=非同期
|
||||
sodium.options.chunk_memory_allocator.swap=スワップ
|
||||
sodium.options.chunk_update_threads.name=チャンク更新スレッド
|
||||
sodium.options.chunk_update_threads.tooltip=チャンクロードに使用するCPUスレッド数を設定します。スレッド数を増やすと、チャンクロード速度が向上しますが、フレームタイムに悪影響を与える可能性があります。
|
||||
sodium.options.always_defer_chunk_updates.name=常にチャンク更新を遅らせる
|
||||
sodium.options.always_defer_chunk_updates.tooltip=有効にすると、重要なチャンクの更新完了を待たずに描画が実行されます。状況によってはFPSが大幅に向上する可能性がありますが、地形描画に著しい視覚的な遅延が発生する場合があります。
|
||||
sodium.options.use_no_error_context.name=エラーの無いコンテキスト
|
||||
sodium.options.use_no_error_context.tooltip=有効にすると、エラーチェックが無効になった状態でOpenGLコンテキストが作成されます。パフォーマンスが若干向上する可能性がありますが、OpenGLエラーを適切に処理できずにゲームがクラッシュする可能性も高まります。原因不明の突然のクラッシュが発生する場合は、この設定を無効にしてください。
|
||||
sodium.options.async_occlusion_mode.name=非同期オクルージョン
|
||||
sodium.options.async_occlusion_mode.tooltip=有効にすると、レンダリングパスで非同期オクルージョンカリングを使用します。「Only Shadow(デフォルト)」はシャドウパスのみで非同期オクルージョンを実行し、メインの描画リストでは同期を維持します。「Everything」は全てのパスを非同期で実行しますが、カメラの高速移動時に1フレームの可視遅延が発生する可能性があります。「None」は非同期オクルージョンを完全に無効化します。
|
||||
sodium.options.use_occlusion_culling.name=オクルージョンカリング
|
||||
sodium.options.use_occlusion_culling.tooltip=有効にすると、他のチャンクの後ろに隠れているチャンクは描画されません。無効にするとパフォーマンスが大幅に低下しますが、デバッグには役立ちます。
|
||||
sodium.options.threads.value=%s スレッド
|
||||
sodium.options.default=デフォルト
|
||||
sodium.options.buttons.undo=戻す
|
||||
sodium.options.buttons.apply=適用
|
||||
sodium.options.buttons.donate=JellySquidに一杯のコーヒーを!
|
||||
|
||||
options.dynamic_fov=臨場感ある視野角
|
||||
options.dynamic_fov.tooltip=有効にすると、ゲーム画面の視野角はプレイヤーの速度に応じて変化します。
|
||||
options.framerate=%s FPS
|
||||
|
||||
iris.shaders.toggled=シェーダーを %s に切り替えました!
|
||||
iris.shaders.disabled=シェーダーを無効化しました!
|
||||
|
||||
options.iris.apply=適用
|
||||
options.iris.refresh=更新
|
||||
options.iris.openShaderPackFolder=パックフォルダーを開く...
|
||||
options.iris.shaderPackSettings=シェーダーの設定...
|
||||
options.iris.shaderPackList=シェーダー一覧...
|
||||
options.iris.refreshShaderPacks=シェーダーの更新
|
||||
options.iris.shaderPackSelection=シェーダーパック...
|
||||
options.iris.shaderPackSelection.title=シェーダーパック
|
||||
options.iris.shaderPackSelection.addedPack=シェーダー「%s」を追加しました
|
||||
options.iris.shaderPackSelection.addedPacks=%s個のシェーダーを追加しました。
|
||||
options.iris.shaderPackSelection.failedAdd=無効なファイルです
|
||||
options.iris.shaderPackSelection.failedAddSingle=「%s」は無効なシェーダーです。
|
||||
options.iris.shaderPackSelection.copyError=シェーダー「%s」を追加できませんでした
|
||||
options.iris.shaderPackSelection.copyErrorAlreadyExists=「%s」は既にパックフォルダーに存在します!
|
||||
options.iris.shaderPackOptions.tooManyFiles=シェーダー設定ファイルは複数個インポートできません!
|
||||
options.iris.shaderPackOptions.failedImport=シェーダー設定ファイル「%s」のインポートに失敗しました!
|
||||
options.iris.shaderPackOptions.importedSettings=シェーダー設定を「%s」からインポートしました。
|
||||
options.iris.shaders.disabled=シェーダー: OFF
|
||||
options.iris.shaders.enabled=シェーダー: ON
|
||||
options.iris.shaders.nonePresent=シェーダー: 未選択
|
||||
options.iris.back=戻る
|
||||
options.iris.reset=リセット
|
||||
options.iris.reset.tooltip=全ての設定をリセットしますか?
|
||||
options.iris.reset.tooltip.holdShift=Shiftキーを押しながらクリックでリセット
|
||||
options.iris.importSettings.tooltip=ファイルから設定をインポート
|
||||
options.iris.exportSettings.tooltip=設定をファイルへエクスポート
|
||||
options.iris.mustDisableFullscreen=フルスクリーンを解除してください!
|
||||
options.iris.setToDefault=この設定をリセットしますか?
|
||||
options.iris.profile=プロファイル
|
||||
options.iris.profile.custom=カスタム
|
||||
options.iris.shadowDistance=影の最大描画距離
|
||||
options.iris.shadowDistance.sodium_tooltip=影の最大描画距離
|
||||
options.iris.shadowDistance.enabled=影が描画される最大の距離を設定できます。 指定された値より遠くの地形やエンティティには影が描画されません。 最大描画距離を下げることで、パフォーマンスが向上することがあります。
|
||||
options.iris.shadowDistance.disabled=お使いのシェーダーパックでは既に最大描画距離が設定されているため、ここでは変更できません。
|
||||
options.iris.gui.hide=GUIを非表示
|
||||
options.iris.gui.show=GUIを表示
|
||||
|
||||
options.dynamic_lights=ダイナミックライト
|
||||
options.dynamic_lights.tooltip=ダイナミックライトを有効にします。モード:OFF - 無効、FASTEST - 500ミリ秒の遅延、FAST - 250ミリ秒の遅延、FANCY - 50ミリ秒の遅延、REALTIME - 無遅延。
|
||||
options.dynamic_lights_shader_force=ダイナミックライト - シェーダーに強制適用
|
||||
options.dynamic_lights_shader_force.tooltip=有効 - シェーダーがONのときでもダイナミックライトを使用します、無効 - シェーダーがONのときはダイナミックライトを使用しません。
|
||||
options.dynamic_lights_frustum_culling=フラスタムカリング
|
||||
options.dynamic_lights_frustum_culling.tooltip=画面上の光源があるチャンクのみを更新します。GPU負荷が軽減されます。
|
||||
options.dynamic_lights_adaptive_ticking=適応型ティック処理
|
||||
options.dynamic_lights_adaptive_ticking.tooltip=遠方および画面外の光源の更新頻度を下げます。グローバルモード設定と併用できます。
|
||||
options.dynamic_lights_slow_dist=遅い光源更新の距離
|
||||
options.dynamic_lights_slow_dist.tooltip=光源の更新頻度が1/5となる距離(単位:ブロック)。推奨値:32ブロック(約2チャンク)。
|
||||
options.dynamic_lights_slower_dist=より遅い光源更新の距離
|
||||
options.dynamic_lights_slower_dist.tooltip=光源の更新頻度が1/10となる距離(単位:ブロック)。推奨値:64ブロック(約4チャンク)。
|
||||
options.dynamic_lights_background_dist=バックグラウンド更新距離
|
||||
options.dynamic_lights_background_dist.tooltip=光源の更新頻度が1/20(1秒に1回)となる距離(単位:ブロック)。見えない光源にも適用されます。
|
||||
options.dynamic_lights_cull_timeout=カリングタイムアウト(ティック)
|
||||
options.dynamic_lights_cull_timeout.tooltip=見えないチャンクが更新を強制されるまでに待機できる最大ティック数。値が小さいほど応答性は向上しますが、GPUの負荷が増加します。
|
||||
options.dynamiclights.page=ダイナミックライト
|
||||
options.dynamiclights.entities=エンティティの設定...
|
||||
options.dynamiclights.entities.title=ダイナミックライト- エンティティ
|
||||
options.dynamiclights.entities.info=ダイナミックライトを適用するエンティティの種類を設定します。一部の項目はMODとの互換性のために設定されています。
|
||||
options.dynamiclights.entities.search=検索 (@mod, $on, $off)
|
||||
options.dynamiclights.entity.tooltip=%sのエンティティのダイナミックライトを設定します。そのエンティティタイプが不要な光を発する場合は、パフォーマンス向上のために無効にしてください。
|
||||
|
||||
options.angelica.search.no_results=該当する設定が見つかりません
|
||||
options.angelica.fontconfig=フォント設定...
|
||||
options.angelica.fontconfig.title=フォント設定
|
||||
options.angelica.fontconfig.currentfonts=使用フォント: §e%s§r 代替フォント: §b%s
|
||||
options.angelica.fontconfig.searchprompt=§7§oフォントを検索...
|
||||
options.angelica.fontconfig.testareaprompt=§7§oテストエリア
|
||||
options.angelica.fontconfig.testareainfo=ここに文章を入力して、どのように表示されるかを確認できます。書式設定には「&」を使用してください。
|
||||
options.angelica.fontconfig.testareaexample=&d&lへロブライン&rは&n此処には&7&m&o居なかった&r
|
||||
options.angelica.fontconfig.disable_custom_font=カスタムフォントを無効化
|
||||
options.angelica.fontconfig.enable_custom_font=カスタムフォントを有効化
|
||||
options.angelica.fontconfig.reset_values=設定をリセット
|
||||
options.angelica.fontconfig.no_fonts_warning=お使いのシステムではカスタムフォントを利用できません。詳細についてはログをご覧ください。
|
||||
options.angelica.fontconfig.font_quality=カスタムフォントの品質: %s
|
||||
options.angelica.fontconfig.shadow_offset=陰影のオフセット: %s
|
||||
options.angelica.fontconfig.shadow_copies=陰影の数: %s
|
||||
options.angelica.fontconfig.bold_copies=太字のコピーの数:%s
|
||||
options.angelica.fontconfig.glyph_scale=文字の大きさ:%s
|
||||
options.angelica.fontconfig.glyph_aspect=文字の縦横比:%s
|
||||
options.angelica.fontconfig.whitespace_scale=空白の長さ:%s
|
||||
options.angelica.fontconfig.glyph_spacing=文字間の長さ:%s
|
||||
options.angelica.fontconfig.font_aa_strength=アンチエイリアシングの強度:%s
|
||||
options.angelica.fontconfig.aamode.aa_none=アンチエイリアシング:オフ
|
||||
options.angelica.fontconfig.aamode.aa_4x=アンチエイリアシング:4x MSAA
|
||||
options.angelica.fontconfig.aamode.aa_16x=アンチエイリアシング:16x MSAA
|
||||
options.angelica.fontconfig.custom_font_scale=カスタムフォントの大きさ:%s
|
||||
options.angelica.fontconfig.shadow_offset_unicode=ユニコード陰影オフセット:%s
|
||||
options.angelica.fontconfig.font_quality.tooltip=カスタムフォントの描画品質を向上させ、パフォーマンスとメモリ使用量を多少犠牲にする代わりに、ギザギザを軽減します。
|
||||
options.angelica.fontconfig.shadow_offset.tooltip=フォントの陰影のオフセット。§l太字§rにも適用されます。
|
||||
options.angelica.fontconfig.shadow_copies.tooltip=文字の陰影の数。すべてをオフセットすることで、擬似的な3D効果を生み出します。
|
||||
options.angelica.fontconfig.bold_copies.tooltip=太字のコピーの数。細めのカスタムフォントで、太字の見栄えが良くなる場合があります。
|
||||
options.angelica.fontconfig.glyph_scale.tooltip=各文字の大きさ。極端な値を設定すると、プレイに支障が出る可能性があります。
|
||||
options.angelica.fontconfig.glyph_aspect.tooltip=各文字の縦横比。
|
||||
options.angelica.fontconfig.whitespace_scale.tooltip=スペースなどの空白の拡大率。
|
||||
options.angelica.fontconfig.glyph_spacing.tooltip=各文字の間隔。
|
||||
options.angelica.fontconfig.font_aa_strength.tooltip=フォントのアンチエイリアシングに使用されるサンプル間隔。値が大きいとフォントがぼやけ、値が小さいとギザギザが発生する可能性があります。お使いの環境に最適な値を見つけてください。
|
||||
options.angelica.fontconfig.aamode.tooltip=フォントのアンチエイリアシングモード。パフォーマンスを多少犠牲にする代わりに、拡大縮小された文字や、斜体の外観と読みやすさを大幅に向上させることができます。
|
||||
options.angelica.fontconfig.custom_font_scale.tooltip=カスタムフォントの大きさ変更の値です。カスタムフォントの文字が、通常フォントの文字と比較して小さすぎるか、大きすぎる場合はこの値を調整してください。
|
||||
options.angelica.fontconfig.shadow_offset_unicode.tooltip=Unicodeフォントにのみ適用される陰影オフセットの値です。Unicodeフォントの一部をMinecraft風のフォントに置き換えるリソースパックを使用している場合は、この値を1.0倍に設定してください。
|
||||
options.angelica.hudCaching=HUDキャッシング
|
||||
options.angelica.hudCaching.tooltip=HUDをフレームバッファにキャッシュし、フレーム間で再利用することで描画時の余計な負荷を削減します。起動時にHUDキャッシングを有効にする必要があります(実験的機能)。
|
||||
options.angelica.droppedItemLimit=ドロップアイテムの描画数制限
|
||||
options.angelica.droppedItemLimit.tooltip=描画されるドロップアイテムの最大数。値を小さくするとパフォーマンスが向上する可能性があります。
|
||||
options.angelica.mobSpawnerRenderDistance=モブスポナーの描画距離
|
||||
options.angelica.mobSpawnerRenderDistance.tooltip=モブスポナー内の回転するモブの描画距離
|
||||
options.angelica.itemdisplaylistcount=アイテム描画キャッシュの制限
|
||||
options.angelica.itemdisplaylistcount.tooltip=最適化されたアイテム描画でキャッシュするVBOの最大値。値を大きくするとパフォーマンスが大幅に向上しますが、VRAMの使用量が増える可能性があります。
|
||||
options.angelica.threadedChunkBuilding=並列チャンク構築
|
||||
options.angelica.threadedChunkBuilding.tooltip=有効にすると、チャンクメッシュ生成が複数のスレッドで並列実行され、チャンクロード速度が大幅に向上します。カスタムブロックレンダラーを使用するMODでレンダリングの問題が発生する場合は、無効にしてください。有効化には描画の再読み込みが必要です。
|
||||
|
||||
pack.iris.select.title=シェーダー選択
|
||||
pack.iris.configure.title=シェーダー設定
|
||||
pack.iris.list.label=+ ドラッグアンドドロップでシェーダーを追加
|
||||
pack.iris.list.label.lwjgl2=ドラッグアンドドロップでシェーダーを追加するにはlwjgl3ifyをインストールしてください
|
||||
label.iris.true=ON
|
||||
label.iris.false=OFF
|
||||
|
||||
sodium.options.use_render_pass_optimization.name=レンダーパスの最適化
|
||||
sodium.options.use_render_pass_optimization.tooltip=スプライトの透明度を分析し、スプライトがより負荷の高いレンダリングパスを必要としない場合、レンダリングパスを自動的にダウングレードします(例:半透明から切り抜き、切り抜きから不透明)。これにより、描画呼び出しと余計な描画が削減されます。
|
||||
|
||||
options.angelica.aggressiveChunkLoading=積極的チャンクロード
|
||||
options.angelica.aggressiveChunkLoading.tooltip=隣接するチャンクの準備がまだ整っていなくても、チャンクが読み込まれるとすぐに描画します。描画距離の端での体感的なチャンクロード速度が向上します。隣接するチャンクが読み込まれると、チャンクは自動的に再構築されます。描画距離の短いサーバーで役立ちます。
|
||||
options.angelica.disablef3=F3画面追加情報の無効化
|
||||
options.angelica.disablef3.tooltip=Angelicaに関するF3画面の情報の表示を無効にします。
|
||||
options.angelica.texteffects.rgb_colors=RGBカラー
|
||||
options.angelica.texteffects.rgb_colors.tooltip=「%s」のHTMLカラーコードを有効にします。
|
||||
options.angelica.texteffects.gradients=グラデーション
|
||||
options.angelica.texteffects.gradients.tooltip=滑らかな色の移り変わり
|
||||
options.angelica.texteffects.rainbow=虹色
|
||||
options.angelica.texteffects.rainbow.tooltip=虹色のアニメーション
|
||||
options.angelica.texteffects.wave_text=波打つ文字
|
||||
options.angelica.texteffects.wave_text.tooltip=波打つ文字のアニメーション
|
||||
options.angelica.texteffects.wave_amplitude=波の振幅
|
||||
options.angelica.texteffects.wave_amplitude.tooltip=波打つ文字が跳ね返る距離(デフォルト:2.0)
|
||||
options.angelica.texteffects.dinnerbone_text=文字の上下反転
|
||||
options.angelica.texteffects.dinnerbone_text.tooltip=文字の上下反転の設定。
|
||||
options.angelica.texteffects.drop_shadow=陰影
|
||||
options.angelica.texteffects.drop_shadow.tooltip=区切りごとの陰影は「%s」、色付きの陰影は
|
||||
options.angelica.texteffects.ampersand_conversion=アンパサンドの変換
|
||||
options.angelica.texteffects.ampersand_conversion.tooltip=描画時に「%s」プレフィックスコードをフォーマットコードに変換します。
|
||||
|
||||
sodium.options.multidraw_mode.name=同時描画モード
|
||||
sodium.options.multidraw_mode.tooltip=地形描画の命令の割り当て方法を設定します。§l直接的§r は glMultiDrawElementsBaseVertex を使用します (デフォルト、OpenGL 3.2 以降)。§l間接的§r はGPU間接レンダリング (GL 4.3 以降) を使用し、一部のハードウェアではCPUの余分な負荷を削減できます。§l独立的§r は個別の描画呼び出しをします。
|
||||
sodium.options.multidraw_mode.direct=直接的
|
||||
sodium.options.multidraw_mode.indirect=間接的
|
||||
sodium.options.multidraw_mode.individual=独立的
|
||||
sodium.options.upload_method.name=ストリーミングアップロード方式
|
||||
sodium.options.upload_method.tooltip=データがGPUにストリーミングされる方式を変更します。一部の設定は、特定のドライバーでパフォーマンスの向上につながる場合があります。
|
||||
|
||||
|
||||
|
||||
sodium.options.enable_deferred_batching.name=遅延パーティクル同時処理
|
||||
sodium.options.enable_deferred_batching.tooltip=パーティクルの描画呼び出しを、レイヤーごとに統合された描画にまとめて実行します。パーティクルが正しくレンダリングされない場合は、この設定を無効にしてください。
|
||||
@@ -0,0 +1,80 @@
|
||||
options.button.detail=詳細...
|
||||
options.button.other=その他...
|
||||
options.button.particle=パーティクル...
|
||||
options.button.sky=環境...
|
||||
options.chunks=%s チャンク
|
||||
options.framerate=%s FPS
|
||||
options.graphics.shelledfancy=描画優先(ハイブリッド)
|
||||
options.graphics.shelledfast=処理優先(ハイブリッド)
|
||||
options.graphics.smart=スマート
|
||||
options.graphics.ultra=ウルトラ
|
||||
options.off=オフ
|
||||
options.on=オン
|
||||
options.cloud_height=雲の高さ
|
||||
options.cloud_height.tooltip=雲の高さを設定します。
|
||||
options.cloud_scale=雲の大きさ
|
||||
options.cloud_scale.tooltip=雲の大きさを設定します。
|
||||
options.gui_background=背景テーマ
|
||||
options.gui_background.tooltip=設定画面背景のテーマを設定します。
|
||||
options.downfall_distance=天気のエフェクト
|
||||
options.downfall_distance.tooltip=天気のエフェクトを設定します。
|
||||
options.dynamic_fov=臨場感ある視野角
|
||||
options.dynamic_fov.tooltip=ゲームモードによっては、プレイヤーの移動速度や特定のMODの操作(ツールのズームや武器のスコープなど)に応じて、ゲーム画面の視野角が変化します。
|
||||
options.horizon=地平線
|
||||
options.horizon.tooltip=描画チャンクの端を映すかを設定します。
|
||||
options.terrain_fog=霧
|
||||
options.terrain_fog.tooltip=霧の有効、無効を設定します。
|
||||
options.fog_near_distance=霧の距離
|
||||
options.fog_near_distance.tooltip=霧が発生し始める距離を設定します。(0%%(透明)から描画距離に応じて線形的に増加します)。
|
||||
options.bobview_mode=画面の揺れ
|
||||
options.bobview_mode.tooltip=画面の揺れ動作を、手または画面のみを揺らすように変更します。
|
||||
options.bobview.hand=手のみ
|
||||
options.bobview.camera=画面のみ
|
||||
options.fov.all=オン
|
||||
options.fov.mods=Modによる動作のみ
|
||||
options.fov.none=オフ
|
||||
options.mode_cloud_translucency=半透明の雲
|
||||
options.mode_cloud_translucency.tooltip=半透明の雲の有効、無効を設定します
|
||||
options.mode_clouds=雲
|
||||
options.mode_clouds.tooltip=雲の設定
|
||||
options.mode_dropped_items=ドロップアイテム
|
||||
options.mode_dropped_items.tooltip=ドロップアイテムの描画品質を設定します。
|
||||
options.mode_glint_inv=GUIエンチャントエフェクト
|
||||
options.mode_glint_inv.tooltip=GUI上でのエンチャントエフェクトの有効、無効を設定します。
|
||||
options.mode_glint_world=ワールドエンチャントエフェクト
|
||||
options.mode_glint_world.tooltip=ワールド上でのエンチャントエフェクトの有効、無効を設定します。
|
||||
options.mode_gui_background=背景
|
||||
options.mode_gui_background.tooltip=設定画面背景の有効、無効を設定します。
|
||||
options.mode_leaves=葉の品質
|
||||
options.mode_leaves.tooltip=葉の品質
|
||||
options.mode_light_flicker=光のちらつき
|
||||
options.mode_light_flicker.tooltip=光のちらつきの有効、無効を設定します。
|
||||
options.mode_shadows=エンティティの影
|
||||
options.mode_shadows.tooltip=エンティティの影の有効、無効を設定します。
|
||||
options.mode_sky=空
|
||||
options.mode_sky.tooltip=空の描画の有効、無効を設定します。
|
||||
options.mode_sun_moon=太陽と月
|
||||
options.mode_sun_moon.tooltip=太陽と月の描画の有効、無効を設定します。
|
||||
options.mode_stars=星
|
||||
options.mode_stars.tooltip=星の描画の有効、無効を設定します。
|
||||
options.mode_water=水
|
||||
options.mode_water.tooltip=水の設定をします。
|
||||
options.mode_vignette=ビネット
|
||||
options.mode_vignette.tooltip=ビネットの有効、無効を設定します。
|
||||
options.particles_enc_table=エンチャント台のパーティクル
|
||||
options.particles_enc_table.tooltip=エンチャント台のパーティクルの設定をします。
|
||||
options.particles_void=奈落のパーティクル
|
||||
options.particles_void.tooltip=奈落のパーティクルの有効、無効を設定します。
|
||||
options.render_distance_clouds=雲までの距離
|
||||
options.render_distance_clouds.tooltip=最も近い雲までの距離を設定します。
|
||||
options.title.detail=詳細設定
|
||||
options.title.other=その他の設定
|
||||
options.title.particle=パーティクルの設定
|
||||
options.title.sky=環境の設定
|
||||
options.title.video=ビデオ設定
|
||||
options.total_stars=星の密度
|
||||
options.total_stars.tooltip=星の密度を設定します。
|
||||
options.void_fog=奈落の霧
|
||||
options.void_fog.tooltip=奈落の霧の有効、無効を設定します。
|
||||
options.hurt_shake=被ダメージ時の画面揺れ
|
||||
options.background.random=ランダム
|
||||
@@ -6,15 +6,12 @@ import net.coderbot.iris.layer.GbufferPrograms;
|
||||
import net.coderbot.iris.pipeline.HandRenderer;
|
||||
import net.coderbot.iris.uniforms.ItemIdManager;
|
||||
import net.irisshaders.iris.api.v0.IrisApi;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
/**
|
||||
@@ -44,31 +41,6 @@ public class MixinItemRenderer {
|
||||
ItemIdManager.setItemId(this.itemToRender);
|
||||
}
|
||||
|
||||
/**
|
||||
* Force the equip lower/raise animation whenever the held stack isn't an exact match for
|
||||
* the one being rendered.
|
||||
*/
|
||||
@Redirect(
|
||||
method = "updateEquippedItem",
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;getItemDamage()I", ordinal = 0)
|
||||
)
|
||||
private int iris$animateStackSwap(ItemStack incoming) {
|
||||
if (this.itemToRender != null
|
||||
&& !ItemStack.areItemStacksEqual(incoming, this.itemToRender)) {
|
||||
return Integer.MIN_VALUE;
|
||||
}
|
||||
return incoming.getItemDamage();
|
||||
}
|
||||
|
||||
@Redirect(
|
||||
method = "updateEquippedItem",
|
||||
at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/ItemRenderer;itemToRender:Lnet/minecraft/item/ItemStack;", opcode = Opcodes.PUTFIELD, ordinal = 0)
|
||||
)
|
||||
private void iris$commitSlotOnInstantSwap(ItemRenderer self, ItemStack value) {
|
||||
this.itemToRender = value;
|
||||
int equippedItemSlot = Minecraft.getMinecraft().thePlayer.inventory.currentItem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the item ID after rendering first-person items.
|
||||
*/
|
||||
|
||||
+18
-1
@@ -20,7 +20,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
/**
|
||||
* Mixin allows devs to target the ender crystal beams as a separate entity.
|
||||
* Mixin allows devs to target the ender crystal beams and dragon death rays as separate entities.
|
||||
* Also sets the special condition "lightning" on the dragon's death beams.
|
||||
*/
|
||||
@Mixin(RenderDragon.class)
|
||||
@@ -28,9 +28,15 @@ public abstract class MixinRenderDragon {
|
||||
@Unique
|
||||
private static final NamespacedId END_CRYSTAL_BEAM = new NamespacedId("minecraft", "end_crystal_beam");
|
||||
|
||||
@Unique
|
||||
private static final NamespacedId DRAGON_DEATH_RAY = new NamespacedId("minecraft", "dragon_death_rays");
|
||||
|
||||
@Unique
|
||||
private int angelica$previousEntityId = -1;
|
||||
|
||||
@Unique
|
||||
private int angelica$previousDeathRayEntityId = -1;
|
||||
|
||||
@Unique
|
||||
private boolean angelica$deathBeamsActive = false;
|
||||
|
||||
@@ -83,6 +89,13 @@ public abstract class MixinRenderDragon {
|
||||
GbufferPrograms.setupSpecialRenderCondition(SpecialCondition.LIGHTNING);
|
||||
angelica$deathBeamsActive = true;
|
||||
|
||||
Object2IntFunction<NamespacedId> entityIdMap = BlockRenderingSettings.INSTANCE.getEntityIds();
|
||||
if (entityIdMap != null) {
|
||||
angelica$previousDeathRayEntityId = CapturedRenderingState.INSTANCE.getCurrentRenderedEntity();
|
||||
int deathRayId = entityIdMap.applyAsInt(DRAGON_DEATH_RAY);
|
||||
CapturedRenderingState.INSTANCE.setCurrentEntity(deathRayId);
|
||||
}
|
||||
|
||||
angelica$depthPassReplay++;
|
||||
GLStateManager.glColorMask(false, false, false, false);
|
||||
angelica$invokeRenderEquippedItems(dragon, partialTicks);
|
||||
@@ -118,6 +131,10 @@ public abstract class MixinRenderDragon {
|
||||
private void angelica$endDeathBeamsLighting(EntityDragon dragon, float partialTicks, CallbackInfo ci) {
|
||||
if (angelica$depthPassReplay > 0) return;
|
||||
if (angelica$deathBeamsActive) {
|
||||
if (angelica$previousDeathRayEntityId != -1) {
|
||||
CapturedRenderingState.INSTANCE.setCurrentEntity(angelica$previousDeathRayEntityId);
|
||||
angelica$previousDeathRayEntityId = -1;
|
||||
}
|
||||
GbufferPrograms.teardownSpecialRenderCondition();
|
||||
angelica$deathBeamsActive = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user