4 Commits

34 changed files with 91 additions and 88 deletions

View File

@@ -6,6 +6,8 @@
[![Mod Loader](https://img.shields.io/badge/Mod%20Loader-Fabric-lightyellow?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTEyLTE2VDE2OjU0OjE3LTA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0wNy0yOFQyMToxNzo0OC0wNzowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0wNy0yOFQyMToxNzo0OC0wNzowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowZWRiMWMyYy1mZjhjLWU0NDEtOTMxZi00OTVkNGYxNGM3NjAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MGVkYjFjMmMtZmY4Yy1lNDQxLTkzMWYtNDk1ZDRmMTRjNzYwIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MGVkYjFjMmMtZmY4Yy1lNDQxLTkzMWYtNDk1ZDRmMTRjNzYwIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowZWRiMWMyYy1mZjhjLWU0NDEtOTMxZi00OTVkNGYxNGM3NjAiIHN0RXZ0OndoZW49IjIwMTgtMTItMTZUMTY6NTQ6MTctMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE4IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4/HiGMAAAAtUlEQVRYw+XXrQqAMBQF4D2P2eBL+QIG8RnEJFaNBjEum+0+zMQLtwwv+wV3ZzhhMDgfJ0wUSinxZUQWgKos1JP/AbD4OneIDyQPwCFniA+EJ4CaXm4TxAXCC0BNHgLhAdAnx9hC8PwGSRtAFVMQjF7cNTWED8B1cgwW20yfJgAvrssAsZ1cB3g/xckAxr6FmCDU5N6f488BrpCQ4rQBJkiMYh4ACmLzwOQF0CExinkCsvw7vgGikl+OotaKRwAAAABJRU5ErkJggg==)](https://fabricmc.net)
![Enviroment](https://img.shields.io/badge/Enviroment-Client-purple)
[![Modrinth](https://img.shields.io/badge/dynamic/json?color=158000&label=downloads&prefix=+%20&query=downloads&url=https://api.modrinth.com/api/v1/mod/animated-chunks&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSIgd2lkdGg9IjE0LjY2NyIgaGVpZ2h0PSIxNC42NjciICB4bWxuczp2PSJodHRwczovL3ZlY3RhLmlvL25hbm8iPjxkZWZzPjxjbGlwUGF0aCBpZD0iQSI+PHBhdGggZD0iTTAgMGgxMXYxMUgweiIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNBKSI+PHBhdGggZD0iTTEuMzA5IDcuODU3YTQuNjQgNC42NCAwIDAgMS0uNDYxLTEuMDYzSDBDLjU5MSA5LjIwNiAyLjc5NiAxMSA1LjQyMiAxMWMxLjk4MSAwIDMuNzIyLTEuMDIgNC43MTEtMi41NTZoMGwtLjc1LS4zNDVjLS44NTQgMS4yNjEtMi4zMSAyLjA5Mi0zLjk2MSAyLjA5MmE0Ljc4IDQuNzggMCAwIDEtMy4wMDUtMS4wNTVsMS44MDktMS40NzQuOTg0Ljg0NyAxLjkwNS0xLjAwM0w4LjE3NCA1LjgybC0uMzg0LS43ODYtMS4xMTYuNjM1LS41MTYuNjk0LS42MjYuMjM2LS44NzMtLjM4N2gwbC0uMjEzLS45MS4zNTUtLjU2Ljc4Ny0uMzcuODQ1LS45NTktLjcwMi0uNTEtMS44NzQuNzEzLTEuMzYyIDEuNjUxLjY0NSAxLjA5OC0xLjgzMSAxLjQ5MnptOS42MTQtMS40NEE1LjQ0IDUuNDQgMCAwIDAgMTEgNS41QzExIDIuNDY0IDguNTAxIDAgNS40MjIgMCAyLjc5NiAwIC41OTEgMS43OTQgMCA0LjIwNmguODQ4QzEuNDE5IDIuMjQ1IDMuMjUyLjgwOSA1LjQyMi44MDljMi42MjYgMCA0Ljc1OCAyLjEwMiA0Ljc1OCA0LjY5MSAwIC4xOS0uMDEyLjM3Ni0uMDM0LjU2bC43NzcuMzU3aDB6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiM1ZGE0MjYiLz48L2c+PC9zdmc+)](https://modrinth.com/mod/animated-chunks)
[![CurseForge](https://cf.way2muchnoise.eu/full_animated-chunks_downloads.svg)](https://curseforge.com/minecraft/mc-mods/animated-chunks)
An enhanecd fork of [cadenkriese's mod](https://github.com/cadenkriese/smooth-chunks) for the latest versions of the game, with a completely different code base.
@@ -13,7 +15,7 @@ An enhanecd fork of [cadenkriese's mod](https://github.com/cadenkriese/smooth-ch
## What is this?
Smooth Chunks is a Fabric mod that adds animations of currently loading chunks. This makes chunk loading generally seem much more pleasant than them appearing out of thin air. There are multiple built-in animations and ease types, and if this isnt't enough, there's an API which will allow you to add your own animations and eases (with ease :trollface:)
Smooth Chunks is a Fabric mod that adds animations of currently loading chunks. This makes chunk loading generally seem much more pleasant than them appearing out of thin air. There are multiple built-in animations and ease types, and if this isnt't enough, there's an API which will allow you to add your own animations and eases <br/> (with ease :trollface:)
Generally, this is what you'd call an "eye-candy" mod.

View File

@@ -96,5 +96,5 @@ publishing {
}
}
loom {
accessWidenerPath = file("src/main/resources/smooth-chunks.accesswidener")
accessWidenerPath = file("src/main/resources/animated-chunks.accesswidener")
}

View File

@@ -5,16 +5,13 @@ org.gradle.jvmargs=-Xmx4G
# Fabric Properties
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.1
loader_version=0.13.3
loader_version=0.14.9
# Mod Properties
mod_version=0.2.0
maven_group=me.topchetoeu
archives_base_name=smooth-chunks
archives_base_name=animated-chunks
# Dependencies
fabric_version=0.47.8+1.18.2
autoconfig_version=3.3.1
cloth_version=3.2.24
fabric_version=0.58.0+1.18.2
modmenu_version=3.2.1

View File

@@ -1,32 +1,32 @@
package me.topchetoeu.smoothchunks;
package me.topchetoeu.animatedchunks;
import java.io.File;
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.topchetoeu.smoothchunks.Manager.RegisterEvent;
import me.topchetoeu.smoothchunks.animation.Animation;
import me.topchetoeu.smoothchunks.animation.FallAnimation;
import me.topchetoeu.smoothchunks.animation.FlyInAnimation;
import me.topchetoeu.smoothchunks.animation.ProgressManager;
import me.topchetoeu.smoothchunks.animation.RiseAnimation;
import me.topchetoeu.smoothchunks.animation.ScaleAnimation;
import me.topchetoeu.smoothchunks.easing.Ease;
import me.topchetoeu.smoothchunks.easing.ElasticEase;
import me.topchetoeu.smoothchunks.easing.LinearEase;
import me.topchetoeu.smoothchunks.easing.SineEase;
import me.topchetoeu.smoothchunks.gui.SmoothChunksScreen;
import me.topchetoeu.smoothchunks.easing.QuadraticEase;
import me.topchetoeu.animatedchunks.Manager.RegisterEvent;
import me.topchetoeu.animatedchunks.animation.Animation;
import me.topchetoeu.animatedchunks.animation.FallAnimation;
import me.topchetoeu.animatedchunks.animation.FlyInAnimation;
import me.topchetoeu.animatedchunks.animation.ProgressManager;
import me.topchetoeu.animatedchunks.animation.RiseAnimation;
import me.topchetoeu.animatedchunks.animation.ScaleAnimation;
import me.topchetoeu.animatedchunks.easing.Ease;
import me.topchetoeu.animatedchunks.easing.ElasticEase;
import me.topchetoeu.animatedchunks.easing.LinearEase;
import me.topchetoeu.animatedchunks.easing.QuadraticEase;
import me.topchetoeu.animatedchunks.easing.SineEase;
import me.topchetoeu.animatedchunks.gui.AnimatedChunksScreen;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientChunkEvents;
import net.fabricmc.fabric.api.event.Event;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.util.math.BlockPos;
public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
private static SmoothChunks instance;
public static SmoothChunks getInstance() {
public final class AnimatedChunks implements ClientModInitializer, ModMenuApi {
private static AnimatedChunks instance;
public static AnimatedChunks getInstance() {
return instance;
}
@@ -134,7 +134,7 @@ public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
registerEases(ease);
registerAnimations(animation);
config = new ConfigManager(new File("config/smooth-chunks.dat"), animation, ease);
config = new ConfigManager(new File("config/animated-chunks.dat"), animation, ease);
EASES_REGISTERING.invoker().register(ease);
ANIMATIONS_REGISTERING.invoker().register(animation);
@@ -148,7 +148,7 @@ public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return (Screen parent) -> {
var _this = getInstance();
return new SmoothChunksScreen(parent, _this.animation, _this.ease, _this.config);
return new AnimatedChunksScreen(parent, _this.animation, _this.ease, _this.config);
};
}
}

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks;
package me.topchetoeu.animatedchunks;
import java.io.File;
import java.io.FileNotFoundException;
@@ -8,8 +8,8 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import me.topchetoeu.smoothchunks.animation.Animation;
import me.topchetoeu.smoothchunks.easing.Ease;
import me.topchetoeu.animatedchunks.animation.Animation;
import me.topchetoeu.animatedchunks.easing.Ease;
public class ConfigManager {
public final File configFile;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks;
package me.topchetoeu.animatedchunks;
import org.apache.commons.lang3.Validate;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks;
package me.topchetoeu.animatedchunks;
import java.util.Collection;
import java.util.Collections;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.animation;
package me.topchetoeu.animatedchunks.animation;
import net.minecraft.client.util.math.MatrixStack;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.animation;
package me.topchetoeu.animatedchunks.animation;
import net.minecraft.client.util.math.MatrixStack;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.animation;
package me.topchetoeu.animatedchunks.animation;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Vec2f;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.animation;
package me.topchetoeu.animatedchunks.animation;
import java.util.ArrayList;
import java.util.HashSet;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.animation;
package me.topchetoeu.animatedchunks.animation;
import net.minecraft.client.util.math.MatrixStack;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.animation;
package me.topchetoeu.animatedchunks.animation;
import net.minecraft.client.util.math.MatrixStack;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.easing;
package me.topchetoeu.animatedchunks.easing;
public interface Ease {
/**

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.easing;
package me.topchetoeu.animatedchunks.easing;
public class ElasticEase implements Ease {
private float steepness = 1;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.easing;
package me.topchetoeu.animatedchunks.easing;
public class LinearEase implements Ease {
public float ease(float x) {

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.easing;
package me.topchetoeu.animatedchunks.easing;
public class QuadraticEase implements Ease {
@Override

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.easing;
package me.topchetoeu.animatedchunks.easing;
public class SineEase implements Ease {
@Override

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.sound.PositionedSoundInstance;
@@ -8,14 +8,14 @@ import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.util.math.ColorHelper.Argb;
import me.topchetoeu.smoothchunks.ConfigManager;
import me.topchetoeu.smoothchunks.Manager;
import me.topchetoeu.smoothchunks.animation.Animation;
import me.topchetoeu.smoothchunks.easing.Ease;
import me.topchetoeu.smoothchunks.gui.Section.OrderType;
import me.topchetoeu.animatedchunks.ConfigManager;
import me.topchetoeu.animatedchunks.Manager;
import me.topchetoeu.animatedchunks.animation.Animation;
import me.topchetoeu.animatedchunks.easing.Ease;
import me.topchetoeu.animatedchunks.gui.Section.OrderType;
import net.minecraft.client.MinecraftClient;
public class SmoothChunksScreen extends Screen {
public class AnimatedChunksScreen extends Screen {
public final Screen parent;
private final HorizontalSection mainSection = new HorizontalSection();
private final Manager<Animation> animation;
@@ -105,8 +105,8 @@ public class SmoothChunksScreen extends Screen {
res.children.addSelectableChild(selectionSection(ease, "Ease"));
return res;
}
public SmoothChunksScreen(Screen parent, Manager<Animation> animation, Manager<Ease> ease, ConfigManager config) {
super(Text.of("Smooth Chunks Config"));
public AnimatedChunksScreen(Screen parent, Manager<Animation> animation, Manager<Ease> ease, ConfigManager config) {
super(Text.of("Animated Chunks Config"));
config.reload();
this.animation = animation;
this.ease = ease;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
public class Boundbox implements BoundboxProvider {
public float x, y, width, height;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
public interface BoundboxProvider {
float getX();

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
import org.apache.commons.lang3.Validate;
import org.lwjgl.glfw.GLFW;

View File

@@ -1,11 +1,11 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
import org.lwjgl.glfw.GLFW;
import org.lwjgl.opengl.GL11;
import com.mojang.blaze3d.systems.RenderSystem;
import me.topchetoeu.smoothchunks.SmoothChunks;
import me.topchetoeu.animatedchunks.AnimatedChunks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.Drawable;
import net.minecraft.client.gui.DrawableHelper;
@@ -170,8 +170,8 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
if (progress < 0) progress = 0;
if (progress > 1) progress = 1;
if (progress < 0.999) {
float _progress = SmoothChunks.getInstance().getEaseManager().getValue().ease(progress);
SmoothChunks.getInstance().getAnimationManager().getValue().animate(
float _progress = AnimatedChunks.getInstance().getEaseManager().getValue().ease(progress);
AnimatedChunks.getInstance().getAnimationManager().getValue().animate(
_progress, matrices,
x * 16, 0, y * 16, 0, 0, 0
);
@@ -187,7 +187,7 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
matrices.pop();
}
private void renderChunks(MatrixStack matrices, float delta, int n) {
duration = SmoothChunks.getInstance().getProgressManager().getDuration();
duration = AnimatedChunks.getInstance().getProgressManager().getDuration();
// globalProgress += (lastTime - (lastTime = System.nanoTime())) / -1000000000f;
globalProgress += delta * 0.05f;
matrices.push();

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
import java.util.ArrayList;
import java.util.Hashtable;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
import org.apache.commons.lang3.Validate;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
import java.util.ArrayList;
import java.util.Collections;

View File

@@ -1,10 +1,10 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
import java.util.LinkedHashMap;
import java.util.Map;
import me.topchetoeu.smoothchunks.Descriptor;
import me.topchetoeu.smoothchunks.Manager;
import me.topchetoeu.animatedchunks.Descriptor;
import me.topchetoeu.animatedchunks.Manager;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.screen.Screen;

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.gui;
package me.topchetoeu.animatedchunks.gui;
import java.util.ArrayList;
import java.util.Hashtable;

View File

@@ -1,11 +1,11 @@
package me.topchetoeu.smoothchunks.mixin;
package me.topchetoeu.animatedchunks.mixin;
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 me.topchetoeu.smoothchunks.SmoothChunks;
import me.topchetoeu.animatedchunks.AnimatedChunks;
import net.minecraft.client.render.chunk.ChunkBuilder;
import net.minecraft.util.math.BlockPos;
@@ -17,6 +17,6 @@ abstract class BuiltChunkMixin {
// ci.cancel();
// return;
BlockPos origin = ((ChunkBuilder.BuiltChunk)(Object)this).getOrigin();
SmoothChunks.getInstance().getProgressManager().unload(origin.getX(), 0, origin.getZ());
AnimatedChunks.getInstance().getProgressManager().unload(origin.getX(), 0, origin.getZ());
}
}

View File

@@ -1,4 +1,4 @@
package me.topchetoeu.smoothchunks.mixin;
package me.topchetoeu.animatedchunks.mixin;
import net.minecraft.client.gl.GlUniform;
import net.minecraft.client.render.BuiltChunkStorage;
@@ -21,8 +21,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import it.unimi.dsi.fastutil.objects.ObjectListIterator;
import me.topchetoeu.smoothchunks.SmoothChunks;
import me.topchetoeu.smoothchunks.animation.ProgressManager;
import me.topchetoeu.animatedchunks.AnimatedChunks;
import me.topchetoeu.animatedchunks.animation.ProgressManager;
@Mixin(WorldRenderer.class)
abstract class WorldRendererMixin {
@@ -31,7 +31,7 @@ abstract class WorldRendererMixin {
@Accessor abstract BuiltChunkStorage getChunks();
private ProgressManager getProgressManager() {
return SmoothChunks.getInstance().getProgressManager();
return AnimatedChunks.getInstance().getProgressManager();
}
@Inject(method = "render", at = @At(value = "HEAD"))
@@ -69,14 +69,14 @@ abstract class WorldRendererMixin {
float progress = getProgressManager().getChunkProgress(x, 0, z);
if (progress < 0.999) {
progress = SmoothChunks.getInstance().getEaseManager().getValue().ease(progress);
progress = AnimatedChunks.getInstance().getEaseManager().getValue().ease(progress);
float centerX = (float)playerX - x;
float centerY = (float)playerY - y;
float centerZ = (float)playerZ - z;
matrices.translate(-centerX, -centerY, -centerZ);
SmoothChunks.getInstance().getAnimationManager().getValue().animate(progress, matrices, x, y, z, (float)playerX, (float)playerY, (float)playerZ);
AnimatedChunks.getInstance().getAnimationManager().getValue().animate(progress, matrices, x, y, z, (float)playerX, (float)playerY, (float)playerZ);
matrices.translate(centerX, centerY, centerZ);
}
}

View File

@@ -1,7 +1,7 @@
{
"required": true,
"minVersion": "0.8",
"package": "me.topchetoeu.smoothchunks.mixin",
"package": "me.topchetoeu.animatedchunks.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [],
"client": [

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -1,29 +1,33 @@
{
"schemaVersion": 1,
"id": "smooth-chunks",
"id": "animated-chunks",
"version": "0.2.0",
"name": "Smooth Chunks",
"description": "Smooth chunk load animations.",
"name": "Animated Chunks",
"description": "animated chunk load animations.",
"authors": [ "TopchetoEU" ],
"license": "MIT",
"icon": "assets/smooth-chunks/icon.png",
"icon": "assets/animated-chunks/icon.png",
"environment": "client",
"accessWidener": "smooth-chunks.accesswidener",
"accessWidener": "animated-chunks.accesswidener",
"entrypoints": {
"client": [
"me.topchetoeu.smoothchunks.SmoothChunks"
"me.topchetoeu.animatedchunks.AnimatedChunks"
],
"modmenu": [
"me.topchetoeu.smoothchunks.SmoothChunks"
"me.topchetoeu.animatedchunks.AnimatedChunks"
]
},
"mixins": [
"smooth-chunks.mixins.json"
"animated-chunks.mixins.json"
],
"depends": {
"fabricloader": ">=0.9.3+build.207",
"fabricloader": "*",
"fabric": "*",
"minecraft": ">=1.18.2",
"modmenu": ">=3.2.1"
"minecraft": "=1.18.2",
"modmenu": "3.*"
},
"breaks": {
"sodium": "*",
"iris": "*"
}
}