Compare commits
2 Commits
0.2.0-alph
...
main
Author | SHA1 | Date | |
---|---|---|---|
4a339a6ee5 | |||
530f280842 |
@ -96,5 +96,5 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
loom {
|
loom {
|
||||||
accessWidenerPath = file("src/main/resources/smooth-chunks.accesswidener")
|
accessWidenerPath = file("src/main/resources/animated-chunks.accesswidener")
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ loader_version=0.13.3
|
|||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=0.2.0
|
mod_version=0.2.0
|
||||||
maven_group=me.topchetoeu
|
maven_group=me.topchetoeu
|
||||||
archives_base_name=smooth-chunks
|
archives_base_name=animated-chunks
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.47.8+1.18.2
|
fabric_version=0.47.8+1.18.2
|
||||||
|
@ -1,32 +1,32 @@
|
|||||||
package me.topchetoeu.smoothchunks;
|
package me.topchetoeu.animatedchunks;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||||
|
|
||||||
import me.topchetoeu.smoothchunks.Manager.RegisterEvent;
|
import me.topchetoeu.animatedchunks.Manager.RegisterEvent;
|
||||||
import me.topchetoeu.smoothchunks.animation.Animation;
|
import me.topchetoeu.animatedchunks.animation.Animation;
|
||||||
import me.topchetoeu.smoothchunks.animation.FallAnimation;
|
import me.topchetoeu.animatedchunks.animation.FallAnimation;
|
||||||
import me.topchetoeu.smoothchunks.animation.FlyInAnimation;
|
import me.topchetoeu.animatedchunks.animation.FlyInAnimation;
|
||||||
import me.topchetoeu.smoothchunks.animation.ProgressManager;
|
import me.topchetoeu.animatedchunks.animation.ProgressManager;
|
||||||
import me.topchetoeu.smoothchunks.animation.RiseAnimation;
|
import me.topchetoeu.animatedchunks.animation.RiseAnimation;
|
||||||
import me.topchetoeu.smoothchunks.animation.ScaleAnimation;
|
import me.topchetoeu.animatedchunks.animation.ScaleAnimation;
|
||||||
import me.topchetoeu.smoothchunks.easing.Ease;
|
import me.topchetoeu.animatedchunks.easing.Ease;
|
||||||
import me.topchetoeu.smoothchunks.easing.ElasticEase;
|
import me.topchetoeu.animatedchunks.easing.ElasticEase;
|
||||||
import me.topchetoeu.smoothchunks.easing.LinearEase;
|
import me.topchetoeu.animatedchunks.easing.LinearEase;
|
||||||
import me.topchetoeu.smoothchunks.easing.SineEase;
|
import me.topchetoeu.animatedchunks.easing.QuadraticEase;
|
||||||
import me.topchetoeu.smoothchunks.gui.SmoothChunksScreen;
|
import me.topchetoeu.animatedchunks.easing.SineEase;
|
||||||
import me.topchetoeu.smoothchunks.easing.QuadraticEase;
|
import me.topchetoeu.animatedchunks.gui.AnimatedChunksScreen;
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientChunkEvents;
|
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientChunkEvents;
|
||||||
import net.fabricmc.fabric.api.event.Event;
|
import net.fabricmc.fabric.api.event.Event;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
|
public final class AnimatedChunks implements ClientModInitializer, ModMenuApi {
|
||||||
private static SmoothChunks instance;
|
private static AnimatedChunks instance;
|
||||||
public static SmoothChunks getInstance() {
|
public static AnimatedChunks getInstance() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
|
|||||||
registerEases(ease);
|
registerEases(ease);
|
||||||
registerAnimations(animation);
|
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);
|
EASES_REGISTERING.invoker().register(ease);
|
||||||
ANIMATIONS_REGISTERING.invoker().register(animation);
|
ANIMATIONS_REGISTERING.invoker().register(animation);
|
||||||
@ -148,7 +148,7 @@ public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
|
|||||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||||
return (Screen parent) -> {
|
return (Screen parent) -> {
|
||||||
var _this = getInstance();
|
var _this = getInstance();
|
||||||
return new SmoothChunksScreen(parent, _this.animation, _this.ease, _this.config);
|
return new AnimatedChunksScreen(parent, _this.animation, _this.ease, _this.config);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks;
|
package me.topchetoeu.animatedchunks;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
@ -8,8 +8,8 @@ import java.io.IOException;
|
|||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
|
|
||||||
import me.topchetoeu.smoothchunks.animation.Animation;
|
import me.topchetoeu.animatedchunks.animation.Animation;
|
||||||
import me.topchetoeu.smoothchunks.easing.Ease;
|
import me.topchetoeu.animatedchunks.easing.Ease;
|
||||||
|
|
||||||
public class ConfigManager {
|
public class ConfigManager {
|
||||||
public final File configFile;
|
public final File configFile;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks;
|
package me.topchetoeu.animatedchunks;
|
||||||
|
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks;
|
package me.topchetoeu.animatedchunks;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.animation;
|
package me.topchetoeu.animatedchunks.animation;
|
||||||
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.animation;
|
package me.topchetoeu.animatedchunks.animation;
|
||||||
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.animation;
|
package me.topchetoeu.animatedchunks.animation;
|
||||||
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.util.math.Vec2f;
|
import net.minecraft.util.math.Vec2f;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.animation;
|
package me.topchetoeu.animatedchunks.animation;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.animation;
|
package me.topchetoeu.animatedchunks.animation;
|
||||||
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.animation;
|
package me.topchetoeu.animatedchunks.animation;
|
||||||
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.easing;
|
package me.topchetoeu.animatedchunks.easing;
|
||||||
|
|
||||||
public interface Ease {
|
public interface Ease {
|
||||||
/**
|
/**
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.easing;
|
package me.topchetoeu.animatedchunks.easing;
|
||||||
|
|
||||||
public class ElasticEase implements Ease {
|
public class ElasticEase implements Ease {
|
||||||
private float steepness = 1;
|
private float steepness = 1;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.easing;
|
package me.topchetoeu.animatedchunks.easing;
|
||||||
|
|
||||||
public class LinearEase implements Ease {
|
public class LinearEase implements Ease {
|
||||||
public float ease(float x) {
|
public float ease(float x) {
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.easing;
|
package me.topchetoeu.animatedchunks.easing;
|
||||||
|
|
||||||
public class QuadraticEase implements Ease {
|
public class QuadraticEase implements Ease {
|
||||||
@Override
|
@Override
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.easing;
|
package me.topchetoeu.animatedchunks.easing;
|
||||||
|
|
||||||
public class SineEase implements Ease {
|
public class SineEase implements Ease {
|
||||||
@Override
|
@Override
|
@ -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.gui.screen.Screen;
|
||||||
import net.minecraft.client.sound.PositionedSoundInstance;
|
import net.minecraft.client.sound.PositionedSoundInstance;
|
||||||
@ -8,14 +8,14 @@ import net.minecraft.text.LiteralText;
|
|||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
import net.minecraft.util.math.ColorHelper.Argb;
|
import net.minecraft.util.math.ColorHelper.Argb;
|
||||||
import me.topchetoeu.smoothchunks.ConfigManager;
|
import me.topchetoeu.animatedchunks.ConfigManager;
|
||||||
import me.topchetoeu.smoothchunks.Manager;
|
import me.topchetoeu.animatedchunks.Manager;
|
||||||
import me.topchetoeu.smoothchunks.animation.Animation;
|
import me.topchetoeu.animatedchunks.animation.Animation;
|
||||||
import me.topchetoeu.smoothchunks.easing.Ease;
|
import me.topchetoeu.animatedchunks.easing.Ease;
|
||||||
import me.topchetoeu.smoothchunks.gui.Section.OrderType;
|
import me.topchetoeu.animatedchunks.gui.Section.OrderType;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
|
||||||
public class SmoothChunksScreen extends Screen {
|
public class AnimatedChunksScreen extends Screen {
|
||||||
public final Screen parent;
|
public final Screen parent;
|
||||||
private final HorizontalSection mainSection = new HorizontalSection();
|
private final HorizontalSection mainSection = new HorizontalSection();
|
||||||
private final Manager<Animation> animation;
|
private final Manager<Animation> animation;
|
||||||
@ -105,8 +105,8 @@ public class SmoothChunksScreen extends Screen {
|
|||||||
res.children.addSelectableChild(selectionSection(ease, "Ease"));
|
res.children.addSelectableChild(selectionSection(ease, "Ease"));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
public SmoothChunksScreen(Screen parent, Manager<Animation> animation, Manager<Ease> ease, ConfigManager config) {
|
public AnimatedChunksScreen(Screen parent, Manager<Animation> animation, Manager<Ease> ease, ConfigManager config) {
|
||||||
super(Text.of("Smooth Chunks Config"));
|
super(Text.of("Animated Chunks Config"));
|
||||||
config.reload();
|
config.reload();
|
||||||
this.animation = animation;
|
this.animation = animation;
|
||||||
this.ease = ease;
|
this.ease = ease;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
public class Boundbox implements BoundboxProvider {
|
public class Boundbox implements BoundboxProvider {
|
||||||
public float x, y, width, height;
|
public float x, y, width, height;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
public interface BoundboxProvider {
|
public interface BoundboxProvider {
|
||||||
float getX();
|
float getX();
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
@ -1,11 +1,11 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
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.MinecraftClient;
|
||||||
import net.minecraft.client.gui.Drawable;
|
import net.minecraft.client.gui.Drawable;
|
||||||
import net.minecraft.client.gui.DrawableHelper;
|
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 < 0) progress = 0;
|
||||||
if (progress > 1) progress = 1;
|
if (progress > 1) progress = 1;
|
||||||
if (progress < 0.999) {
|
if (progress < 0.999) {
|
||||||
float _progress = SmoothChunks.getInstance().getEaseManager().getValue().ease(progress);
|
float _progress = AnimatedChunks.getInstance().getEaseManager().getValue().ease(progress);
|
||||||
SmoothChunks.getInstance().getAnimationManager().getValue().animate(
|
AnimatedChunks.getInstance().getAnimationManager().getValue().animate(
|
||||||
_progress, matrices,
|
_progress, matrices,
|
||||||
x * 16, 0, y * 16, 0, 0, 0
|
x * 16, 0, y * 16, 0, 0, 0
|
||||||
);
|
);
|
||||||
@ -187,7 +187,7 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
|
|||||||
matrices.pop();
|
matrices.pop();
|
||||||
}
|
}
|
||||||
private void renderChunks(MatrixStack matrices, float delta, int n) {
|
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 += (lastTime - (lastTime = System.nanoTime())) / -1000000000f;
|
||||||
globalProgress += delta * 0.05f;
|
globalProgress += delta * 0.05f;
|
||||||
matrices.push();
|
matrices.push();
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
@ -1,10 +1,10 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import me.topchetoeu.smoothchunks.Descriptor;
|
import me.topchetoeu.animatedchunks.Descriptor;
|
||||||
import me.topchetoeu.smoothchunks.Manager;
|
import me.topchetoeu.animatedchunks.Manager;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.font.TextRenderer;
|
import net.minecraft.client.font.TextRenderer;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.gui;
|
package me.topchetoeu.animatedchunks.gui;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
@ -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.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
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.client.render.chunk.ChunkBuilder;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
@ -17,6 +17,6 @@ abstract class BuiltChunkMixin {
|
|||||||
// ci.cancel();
|
// ci.cancel();
|
||||||
// return;
|
// return;
|
||||||
BlockPos origin = ((ChunkBuilder.BuiltChunk)(Object)this).getOrigin();
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.smoothchunks.mixin;
|
package me.topchetoeu.animatedchunks.mixin;
|
||||||
|
|
||||||
import net.minecraft.client.gl.GlUniform;
|
import net.minecraft.client.gl.GlUniform;
|
||||||
import net.minecraft.client.render.BuiltChunkStorage;
|
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 org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectListIterator;
|
import it.unimi.dsi.fastutil.objects.ObjectListIterator;
|
||||||
import me.topchetoeu.smoothchunks.SmoothChunks;
|
import me.topchetoeu.animatedchunks.AnimatedChunks;
|
||||||
import me.topchetoeu.smoothchunks.animation.ProgressManager;
|
import me.topchetoeu.animatedchunks.animation.ProgressManager;
|
||||||
|
|
||||||
@Mixin(WorldRenderer.class)
|
@Mixin(WorldRenderer.class)
|
||||||
abstract class WorldRendererMixin {
|
abstract class WorldRendererMixin {
|
||||||
@ -31,7 +31,7 @@ abstract class WorldRendererMixin {
|
|||||||
@Accessor abstract BuiltChunkStorage getChunks();
|
@Accessor abstract BuiltChunkStorage getChunks();
|
||||||
|
|
||||||
private ProgressManager getProgressManager() {
|
private ProgressManager getProgressManager() {
|
||||||
return SmoothChunks.getInstance().getProgressManager();
|
return AnimatedChunks.getInstance().getProgressManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "render", at = @At(value = "HEAD"))
|
@Inject(method = "render", at = @At(value = "HEAD"))
|
||||||
@ -69,14 +69,14 @@ abstract class WorldRendererMixin {
|
|||||||
float progress = getProgressManager().getChunkProgress(x, 0, z);
|
float progress = getProgressManager().getChunkProgress(x, 0, z);
|
||||||
|
|
||||||
if (progress < 0.999) {
|
if (progress < 0.999) {
|
||||||
progress = SmoothChunks.getInstance().getEaseManager().getValue().ease(progress);
|
progress = AnimatedChunks.getInstance().getEaseManager().getValue().ease(progress);
|
||||||
|
|
||||||
float centerX = (float)playerX - x;
|
float centerX = (float)playerX - x;
|
||||||
float centerY = (float)playerY - y;
|
float centerY = (float)playerY - y;
|
||||||
float centerZ = (float)playerZ - z;
|
float centerZ = (float)playerZ - z;
|
||||||
|
|
||||||
matrices.translate(-centerX, -centerY, -centerZ);
|
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);
|
matrices.translate(centerX, centerY, centerZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8",
|
"minVersion": "0.8",
|
||||||
"package": "me.topchetoeu.smoothchunks.mixin",
|
"package": "me.topchetoeu.animatedchunks.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [],
|
"mixins": [],
|
||||||
"client": [
|
"client": [
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "smooth-chunks",
|
"id": "animated-chunks",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"name": "Smooth Chunks",
|
"name": "Animated Chunks",
|
||||||
"description": "Smooth chunk load animations.",
|
"description": "animated chunk load animations.",
|
||||||
"authors": [ "TopchetoEU" ],
|
"authors": [ "TopchetoEU" ],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"icon": "assets/smooth-chunks/icon.png",
|
"icon": "assets/animated-chunks/icon.png",
|
||||||
"environment": "client",
|
"environment": "client",
|
||||||
"accessWidener": "smooth-chunks.accesswidener",
|
"accessWidener": "animated-chunks.accesswidener",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"client": [
|
"client": [
|
||||||
"me.topchetoeu.smoothchunks.SmoothChunks"
|
"me.topchetoeu.animatedchunks.AnimatedChunks"
|
||||||
],
|
],
|
||||||
"modmenu": [
|
"modmenu": [
|
||||||
"me.topchetoeu.smoothchunks.SmoothChunks"
|
"me.topchetoeu.animatedchunks.AnimatedChunks"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"smooth-chunks.mixins.json"
|
"animated-chunks.mixins.json"
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.9.3+build.207",
|
"fabricloader": ">=0.9.3+build.207",
|
||||||
|
Loading…
Reference in New Issue
Block a user