Skip to content

Commit

Permalink
Merge branch '1.20.x/dev' into 1.20.x/stable
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed May 1, 2024
2 parents a7ddb20 + d7d02ab commit c68fc1d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 9 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
loader_version=0.15.10

# Mod Properties
version_type=release
revision=1
mod_version=0.5.4
mod_version=0.5.5
maven_group=me.flashyreese.mods
archives_base_name=sodium-extra

# Dependencies
reeses_sodium_options=1.7.3+mc1.20.5-build.74
sodium_version=mc1.20.5-0.5.8
fabric_version=0.97.5+1.20.5
sodium_version=mc1.20.6-0.5.8
fabric_version=0.97.8+1.20.6
crowdin_translate=1.4+1.19.3
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,14 @@ public static OptionPage render() {
.setBinding((opts, value) -> opts.renderSettings.beaconBeam = value, opts -> opts.renderSettings.beaconBeam)
.build()
)
.add(OptionImpl.createBuilder(boolean.class, sodiumExtraOpts)
.setEnabled(SodiumExtraClientMod.mixinConfig().getOptions().get("mixin.render.block.entity").isEnabled())
.setName(Text.translatable("sodium-extra.option.limit_beacon_beam_height"))
.setTooltip(Text.translatable("sodium-extra.option.limit_beacon_beam_height.tooltip"))
.setControl(TickBoxControl::new)
.setBinding((opts, value) -> opts.renderSettings.limitBeaconBeamHeight = value, opts -> opts.renderSettings.limitBeaconBeamHeight)
.build()
)
.add(OptionImpl.createBuilder(boolean.class, sodiumExtraOpts)
.setEnabled(SodiumExtraClientMod.mixinConfig().getOptions().get("mixin.render.block.entity").isEnabled())
.setName(Text.translatable("sodium-extra.option.enchanting_table_book"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public static class RenderSettings {
public boolean painting;
public boolean piston;
public boolean beaconBeam;
public boolean limitBeaconBeamHeight;
public boolean enchantingTableBook;
public boolean itemFrameNameTag;
public boolean playerNameTag;
Expand All @@ -216,6 +217,7 @@ public RenderSettings() {
this.painting = true;
this.piston = true;
this.beaconBeam = true;
this.limitBeaconBeamHeight = false;
this.enchantingTableBook = true;
this.itemFrameNameTag = true;
this.playerNameTag = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void onStartTick(MinecraftClient client) {
}
@Override
public void onHudRender(DrawContext drawContext, float tickDelta) {
if (!client.getDebugHud().shouldShowDebugHud()) {
if (!this.client.getDebugHud().shouldShowDebugHud() && !this.client.options.hudHidden) {
SodiumExtraGameOptions.OverlayCorner overlayCorner = SodiumExtraClientMod.options().extraSettings.overlayCorner;
// Calculate starting position based on the overlay corner
int x;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class IrisCompat {
apiInstance = api.cast(api.getDeclaredMethod("getInstance").invoke(null));
handleRenderingShadowPass = MethodHandles.lookup().findVirtual(api, "isRenderingShadowPass", MethodType.methodType(boolean.class));

Class<?> irisVertexFormatsClass = Class.forName("net.coderbot.iris.vertices.IrisVertexFormats");
Class<?> irisVertexFormatsClass = Class.forName("net.irisshaders.iris.vertices.IrisVertexFormats");
Field terrainField = irisVertexFormatsClass.getDeclaredField("TERRAIN");
terrainFormat = (VertexFormat) terrainField.get(null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public void render(BeaconBlockEntity beaconBlockEntity, float f, MatrixStack mat
@Coerce
@Redirect(method = "render(Lnet/minecraft/block/entity/BeaconBlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;II)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/block/entity/BeaconBlockEntityRenderer;renderBeam(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;FJII[F)V"))
private void modifyMaxY(MatrixStack matrices, VertexConsumerProvider vertexConsumers, float tickDelta, long worldTime, int yOffset, int maxY, float[] color, BeaconBlockEntity beaconBlockEntity, float f, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j) {
if (maxY == 1024) {
if (maxY == 1024 && SodiumExtraClientMod.options().renderSettings.limitBeaconBeamHeight) {
int lastSegment = beaconBlockEntity.getPos().getY() + yOffset;
maxY = Objects.requireNonNull(beaconBlockEntity.getWorld()).getTopY() - lastSegment; // Todo: This fixes the beam to max height of the world, should be toggle-able
maxY = Objects.requireNonNull(beaconBlockEntity.getWorld()).getTopY() - lastSegment;
}
renderBeam(matrices, vertexConsumers, tickDelta, worldTime, yOffset, maxY, color);
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/assets/sodium-extra/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@
"sodium-extra.option.item_frames.tooltip": "If enabled, item frames are rendered.",
"sodium-extra.option.light_updates": "Light Updates",
"sodium-extra.option.light_updates.tooltip": "If enabled, lighting updates will be processed. If disabled, this can affect lighting when generating new chunks. Only disable this if you know what you are doing.",
"sodium-extra.option.limit_beacon_beam_height": "Limit Beacon Beam Height",
"sodium-extra.option.limit_beacon_beam_height.tooltip": "If enabled, beacon beams will be limited to the maximum height of the world.",
"sodium-extra.option.linear_flat_color_blender": "Use Linear Flat Color Blender",
"sodium-extra.option.linear_flat_color_blender.tooltip": "Applies linear color biome blend without linear color blended block faces.",
"sodium-extra.option.multi_dimension_fog": "Multi Dimension Fog",
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"minecraft": ">=1.20.5"
},
"breaks": {
"iris": "<1.7.0",
"reeses-sodium-options": "<1.4.2"
},
"recommends": {
Expand Down

0 comments on commit c68fc1d

Please sign in to comment.