Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.20.3' into 1.20.3
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle.kts
  • Loading branch information
IMS212 committed May 2, 2024
2 parents 01bce95 + d5652be commit 1d01bf0
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 9 deletions.
7 changes: 1 addition & 6 deletions LICENSE-DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
Incompatible licenses:

glsl-transformer is licensed under the glsl-transformer Noncommercial License 1.0.0. Details on this can be found in https://github.com/IrisShaders/glsl-transformer/blob/main/LICENSE.
The license text is short and easy to understand, but the gist is that you may distribute unmodified editions of this library and them in new works, under the condition that you qualify as a noncommercial entity. If you need to modify it, you may only do so in private or by contributing the changes back to the IrisShaders/glsl-transformer repository under the Contributor License Agreement. Using and distributing this library as part of a noncommercial, meaning access to it is not conditioned on payment or other compensation, Minecraft mod or related software falls under the allowed purposes. You are required to obtain a commercial license for using this library for any purpose other than a noncommercial one.

This license is not applicable if linking with a program (Iris) containing glsl-transformer, unless the linker interacts with the library's API directly.

tl;dr: If you intend to just depend on Iris and need to depend on the transformer due to that, you're fine. If you intend to use the transformer in any way, you must follow the license as followed above.
glsl-transformer is licensed under the GNU Affero General Public License version 3. This may affect your ability to distribute Iris.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ So, if you want to distribute a Forge port of Iris, we'd prefer if you let us kn

All code in this (Iris) repository is completely free and open source, and you are free to read, distribute, and modify the code as long as you abide by the (fairly reasonable) terms of the [GNU LGPLv3 license](https://github.com/IrisShaders/Iris/blob/master/LICENSE).

Dependencies may not be under an applicable license: See the [Incompatible Dependencies](https://github.com/IrisShaders/Iris/blob/master/LICENSE-DEPENDENCIES) page for more information.

You are not allowed to redistribute Iris commerically or behind a paywall, unless you get a commercial license for GLSL Transformer. See above for more information.
glsl-transformer is licensed under the GNU Affero General Public License version 3. This may affect your ability to distribute Iris.

Though it's not legally required, I'd appreciate it if you could ask before hosting your own public downloads for compiled versions of Iris. Though if you want to add the mod to a site like MCBBS, that's fine, no need to ask me.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package net.irisshaders.iris.mixin.entity_render_context;

import com.mojang.blaze3d.vertex.PoseStack;
import net.irisshaders.iris.shaderpack.materialmap.NamespacedId;
import net.irisshaders.iris.shaderpack.materialmap.WorldRenderingSettings;
import net.irisshaders.iris.uniforms.CapturedRenderingState;
import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EnderDragonRenderer;
import net.minecraft.client.renderer.entity.layers.CapeLayer;
import net.minecraft.client.resources.PlayerSkin;
import net.minecraft.world.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;

@Mixin(EnderDragonRenderer.class)
public class MixinEnderDragonRenderer {
private static final NamespacedId END_BEAM = new NamespacedId("minecraft", "end_crystal_beam");
private static int previousE;

@Inject(method = "renderCrystalBeams", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;pushPose()V"))
private static void changeId(float f, float g, float h, float i, int j, PoseStack poseStack, MultiBufferSource multiBufferSource, int k, CallbackInfo ci) {
if (WorldRenderingSettings.INSTANCE.getEntityIds() == null) return;

previousE = CapturedRenderingState.INSTANCE.getCurrentRenderedEntity();
CapturedRenderingState.INSTANCE.setCurrentEntity(WorldRenderingSettings.INSTANCE.getEntityIds().applyAsInt(END_BEAM));
}

@Inject(method = "renderCrystalBeams", at = @At(value = "RETURN"))
private static void changeId2(CallbackInfo ci) {
if (previousE != 0) {
CapturedRenderingState.INSTANCE.setCurrentEntity(previousE);
previousE = 0;
}
}
}
1 change: 1 addition & 0 deletions src/main/resources/mixins.iris.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"entity_render_context.MixinBlockEntityRenderDispatcher",
"entity_render_context.MixinCapeLayer",
"entity_render_context.MixinElytraLayer",
"entity_render_context.MixinEnderDragonRenderer",
"entity_render_context.MixinEntityRenderDispatcher",
"entity_render_context.MixinHorseArmorLayer",
"entity_render_context.MixinHumanoidArmorLayer",
Expand Down

0 comments on commit 1d01bf0

Please sign in to comment.