Skip to content

Commit

Permalink
Relocate package, remove deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Jun 5, 2024
1 parent 866a8bf commit 3df738d
Show file tree
Hide file tree
Showing 93 changed files with 252 additions and 303 deletions.
10 changes: 8 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
------------------------------------------------------
Version 1.19.0
Version 2.0.0
------------------------------------------------------
Updated to MC 1.21

**Changes**
- The previously deprecated `nanoTime` parameter in `PostWorldRenderCallback` and `PostWorldRenderCallbackV2` has been removed
- The root package has been changed from `ladysnake.satin` to `org.ladysnake.satin`
- global search-replace of `ladysnake.satin` -> `org.ladysnake.satin` should do the trick for the migration in your projects

**Removals**
- Removed the `nanoTime` parameter in `PostWorldRenderCallback` and `PostWorldRenderCallbackV2` (deprecated since 1.17.0)
- Removed the `ShaderEffectManager#manageProgram` methods (deprecated since 1.6.0)
- Removed deprecated `GlMatrices` methods (deprecated since 1.1.0)

------------------------------------------------------
Version 1.18.0
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ loader_version=0.15.11
fabric_version=0.99.5+1.21

# Mod Properties
mod_version = 1.19.0
mod_version = 2.0.0
owners = Ladysnake
maven_group = org.ladysnake
archives_base_name = satin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin;
package org.ladysnake.satin;

import ladysnake.satin.api.event.ResolutionChangeCallback;
import ladysnake.satin.api.event.WorldRendererReloadCallback;
import ladysnake.satin.impl.ReloadableShaderEffectManager;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apiguardian.api.API;
import org.ladysnake.satin.api.event.ResolutionChangeCallback;
import org.ladysnake.satin.api.event.WorldRendererReloadCallback;
import org.ladysnake.satin.impl.ReloadableShaderEffectManager;

import static org.apiguardian.api.API.Status.STABLE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
* Callback definitions for Satin events
*/
@ParametersAreNonnullByDefault
package ladysnake.satin.api.event;
package org.ladysnake.satin.api.event;

import javax.annotation.ParametersAreNonnullByDefault;
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.experimental;
package org.ladysnake.satin.api.experimental;

import ladysnake.satin.api.event.PostWorldRenderCallback;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.Framebuffer;
import net.minecraft.client.option.GraphicsMode;
import net.minecraft.client.render.WorldRenderer;
import org.apiguardian.api.API;
import org.ladysnake.satin.api.event.PostWorldRenderCallback;

import static org.apiguardian.api.API.Status.EXPERIMENTAL;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed;
package org.ladysnake.satin.api.managed;

import ladysnake.satin.api.managed.uniform.UniformFinder;
import net.minecraft.client.gl.ShaderProgram;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderPhase;
import net.minecraft.client.render.VertexFormat;
import net.minecraft.util.Identifier;
import org.apiguardian.api.API;
import org.ladysnake.satin.api.managed.uniform.UniformFinder;
import org.ladysnake.satin.api.util.RenderLayerHelper;

import java.util.function.Consumer;

Expand Down Expand Up @@ -53,7 +54,7 @@ public interface ManagedCoreShader extends UniformFinder {
*
* @param baseLayer the layer to copy
* @return a render layer using this shader program
* @see ladysnake.satin.api.util.RenderLayerHelper#copy(RenderLayer, String, Consumer)
* @see RenderLayerHelper#copy(RenderLayer, String, Consumer)
*/
RenderLayer getRenderLayer(RenderLayer baseLayer);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed;
package org.ladysnake.satin.api.managed;

import net.minecraft.client.gl.Framebuffer;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderPhase;
import net.minecraft.client.util.Window;
import org.apiguardian.api.API;
import org.ladysnake.satin.api.util.RenderLayerHelper;

import javax.annotation.Nullable;
import java.util.function.Consumer;
Expand Down Expand Up @@ -68,7 +69,7 @@ public interface ManagedFramebuffer {
*
* @param baseLayer the layer to copy
* @return a render layer using this framebuffer
* @see ladysnake.satin.api.util.RenderLayerHelper#copy(RenderLayer, String, Consumer)
* @see RenderLayerHelper#copy(RenderLayer, String, Consumer)
*/
RenderLayer getRenderLayer(RenderLayer baseLayer);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed;
package org.ladysnake.satin.api.managed;

import ladysnake.satin.api.managed.uniform.SamplerUniform;
import ladysnake.satin.api.managed.uniform.SamplerUniformV2;
import ladysnake.satin.api.managed.uniform.Uniform1f;
import ladysnake.satin.api.managed.uniform.Uniform1i;
import ladysnake.satin.api.managed.uniform.Uniform2f;
import ladysnake.satin.api.managed.uniform.Uniform2i;
import ladysnake.satin.api.managed.uniform.Uniform3f;
import ladysnake.satin.api.managed.uniform.Uniform3i;
import ladysnake.satin.api.managed.uniform.Uniform4f;
import ladysnake.satin.api.managed.uniform.Uniform4i;
import ladysnake.satin.api.managed.uniform.UniformFinder;
import ladysnake.satin.api.managed.uniform.UniformMat4;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.Framebuffer;
import net.minecraft.client.gl.PostEffectProcessor;
import net.minecraft.client.texture.AbstractTexture;
import net.minecraft.util.Identifier;
import org.apiguardian.api.API;
import org.joml.Matrix4f;
import org.ladysnake.satin.api.managed.uniform.SamplerUniform;
import org.ladysnake.satin.api.managed.uniform.SamplerUniformV2;
import org.ladysnake.satin.api.managed.uniform.Uniform1f;
import org.ladysnake.satin.api.managed.uniform.Uniform1i;
import org.ladysnake.satin.api.managed.uniform.Uniform2f;
import org.ladysnake.satin.api.managed.uniform.Uniform2i;
import org.ladysnake.satin.api.managed.uniform.Uniform3f;
import org.ladysnake.satin.api.managed.uniform.Uniform3i;
import org.ladysnake.satin.api.managed.uniform.Uniform4f;
import org.ladysnake.satin.api.managed.uniform.Uniform4i;
import org.ladysnake.satin.api.managed.uniform.UniformFinder;
import org.ladysnake.satin.api.managed.uniform.UniformMat4;

import javax.annotation.Nullable;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed;
package org.ladysnake.satin.api.managed;

import ladysnake.satin.impl.ReloadableShaderEffectManager;
import net.minecraft.client.gl.PostEffectProcessor;
import net.minecraft.client.render.VertexFormat;
import net.minecraft.client.render.VertexFormats;
import net.minecraft.util.Identifier;
import org.apiguardian.api.API;
import org.jetbrains.annotations.ApiStatus;
import org.ladysnake.satin.impl.ReloadableShaderEffectManager;

import java.util.function.Consumer;

Expand Down Expand Up @@ -58,26 +57,6 @@ static ShaderEffectManager getInstance() {
@API(status = STABLE, since = "1.0.0")
ManagedShaderEffect manage(Identifier location, Consumer<ManagedShaderEffect> initCallback);

/**
* @deprecated use {@link #manageCoreShader(Identifier)}.
* <strong>Shader files must go in {@code shaders/core} instead of {@code shaders/program}
*/
@Deprecated(since = "1.6.0", forRemoval = true)
@ApiStatus.ScheduledForRemoval
default ManagedCoreShader manageProgram(Identifier location) {
return manageCoreShader(location);
}

/**
* @deprecated use {@link #manageCoreShader(Identifier, VertexFormat, Consumer)}.
* <strong>Shader files must go in {@code shaders/core} instead of {@code shaders/program}
*/
@Deprecated(since = "1.6.0", forRemoval = true)
@ApiStatus.ScheduledForRemoval
default ManagedCoreShader manageProgram(Identifier location, Consumer<ManagedCoreShader> initCallback) {
return manageCoreShader(location, VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, initCallback);
}

/**
* Manages a core {@link net.minecraft.client.gl.ShaderProgram} loaded from a json definition file
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
* Classes describing managed shader effects facilities
*/
@ParametersAreNonnullByDefault
package ladysnake.satin.api.managed;
package org.ladysnake.satin.api.managed;

import javax.annotation.ParametersAreNonnullByDefault;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import net.minecraft.client.gl.Framebuffer;
import net.minecraft.client.texture.AbstractTexture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import org.apiguardian.api.API;
import org.ladysnake.satin.api.managed.ManagedShaderEffect;

import java.util.function.IntSupplier;

Expand All @@ -28,7 +29,7 @@ public interface SamplerUniformV2 extends SamplerUniform {
/**
* Sets the value of a sampler uniform declared in json
*
* <p><strong>This method is only supported for {@link ladysnake.satin.api.managed.ManagedShaderEffect}</strong>
* <p><strong>This method is only supported for {@link ManagedShaderEffect}</strong>
*
* @param textureSupplier a supplier for opengl texture names
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import org.apiguardian.api.API;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import org.apiguardian.api.API;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import org.apiguardian.api.API;
import org.joml.Vector2f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import org.apiguardian.api.API;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import org.apiguardian.api.API;
import org.joml.Vector3f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import org.apiguardian.api.API;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package ladysnake.satin.api.managed.uniform;
package org.ladysnake.satin.api.managed.uniform;

import org.apiguardian.api.API;
import org.joml.Vector4f;
Expand Down
Loading

0 comments on commit 3df738d

Please sign in to comment.