Skip to content

Commit

Permalink
Re-license some external patches under the MPL2
Browse files Browse the repository at this point in the history
The author has requested that their changes continue to
be distributed under a copyleft license. After discussion,
we agreed that MPL2 is the best option for allowing Sodium
to continue using the patches, and for ensuring that others
must distribute their changes if the patches are modified.
  • Loading branch information
jellysquid3 committed Aug 15, 2024
1 parent f2e075f commit 12ec2f1
Show file tree
Hide file tree
Showing 6 changed files with 434 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ repositories.

## 📜 License

Except where otherwise stated, the content of this repository is provided under the [Polyform Shield 1.0.0](LICENSE.md)
license by [JellySquid](https://jellysquid.me).
Except where otherwise stated (see [third-party license notices](thirdparty/NOTICE.txt)), the content of this repository is provided
under the [Polyform Shield 1.0.0](LICENSE.md) license by [JellySquid](https://jellysquid.me).
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* Original source: https://github.com/IrisShaders/Iris/blob/41095ac23ea0add664afd1b85c414d1f1ed94066/src/main/java/net/coderbot/iris/mixin/bettermipmaps/MixinMipmapGenerator.java
*/
package net.caffeinemc.mods.sodium.mixin.features.textures.mipmaps;

import net.caffeinemc.mods.sodium.client.util.color.ColorSRGB;
Expand All @@ -23,8 +30,6 @@
* cutout textures, this results in a lot of pixels with high alpha values and dark colors, causing visual
* artifacts.</ul>
* </li>
*
* This Mixin is ported from Iris at <a href="https://github.com/IrisShaders/Iris/blob/41095ac23ea0add664afd1b85c414d1f1ed94066/src/main/java/net/coderbot/iris/mixin/bettermipmaps/MixinMipmapGenerator.java">MixinMipmapGenerator</a>.
*/
@Mixin(MipmapGenerator.class)
public class MipmapGeneratorMixin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* Original source: https://github.com/IrisShaders/Iris/blob/41095ac23ea0add664afd1b85c414d1f1ed94066/src/main/java/net/coderbot/iris/mixin/bettermipmaps/MixinTextureAtlasSprite.java
*/
package net.caffeinemc.mods.sodium.mixin.features.textures.mipmaps;

import com.mojang.blaze3d.platform.NativeImage;
Expand All @@ -16,9 +23,6 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

/**
* This Mixin is ported from Iris at <a href="https://github.com/IrisShaders/Iris/blob/41095ac23ea0add664afd1b85c414d1f1ed94066/src/main/java/net/coderbot/iris/mixin/bettermipmaps/MixinTextureAtlasSprite.java">MixinTextureAtlasSprite</a>.
*/
@Mixin(SpriteContents.class)
public class SpriteContentsMixin {
@Mutable
Expand Down
24 changes: 24 additions & 0 deletions thirdparty/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Third-Party License Notice
=======================================

This project contains source code based upon, or includes source code from, the following third-party
projects.

The complete text for each software license can be found in the directory "thirdparty/licenses".

* lodborg's interval tree library for Java
* Copyright (c) 2016 lodborg
* License: MIT
* Original Source
* https://github.com/lodborg/interval-tree/tree/v1.0.0
* Files:
* common/src/main/java/net/caffeinemc/mods/sodium/client/util/interval_tree

* coderbot's mip-map generator patches for Minecraft
* Copyright (c) 2021 Coderbot
* License: Mozilla Public License (MPL2)
* Original Source:
* https://github.com/IrisShaders/Iris/tree/41095ac23ea0add664afd1b85c414d1f1ed94066/src/main/java/net/coderbot/iris/mixin/bettermipmaps
* Files:
* common/src/main/java/net/caffeinemc/mods/sodium/mixin/features/textures/mipmaps

21 changes: 21 additions & 0 deletions thirdparty/licenses/LICENSE-MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

1 comment on commit 12ec2f1

@douira
Copy link
Collaborator

@douira douira commented on 12ec2f1 Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably remove the MIT License header from the interval tree code that I included. I added the license header myself to mark the files in lieu of a repo-wide list of files with differing licenses. However, there's also no harm in keeping those headers.

Please sign in to comment.