Skip to content

Commit

Permalink
1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Goby56 committed Aug 24, 2024
1 parent a0898e9 commit 7437439
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 32 deletions.
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.16.2

# Fabric API
fabric_version=0.97.8+1.20.5
fabric_version=0.92.2+1.20.1

# Mod Properties
mod_version=0.3.0+1.20.5
mod_version=0.3.0+1.20.1
maven_group=com.goby56.wakes
archives_base_name=wakes

# Dependencies
yacl_version=3.4.2+1.20.5-fabric
iris_version=1.7.3+1.21
modmenu_version=10.0.0
yacl_version=3.5.0+1.20.1-fabric
iris_version=1.7.2+1.20.1
modmenu_version=7.2.0
jankson_version=1.2.2
satin_version=1.18.0
satin_version=1.14.0
3 changes: 0 additions & 3 deletions src/main/java/com/goby56/wakes/debug/WakeDebugRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
import com.goby56.wakes.simulation.Brick;
import com.goby56.wakes.simulation.WakeHandler;
import com.goby56.wakes.simulation.WakeNode;
import kroppeb.stareval.function.Type;
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext;
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents;
import net.minecraft.client.render.debug.DebugRenderer;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d;

import java.awt.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class WakeDebugRenderer implements WorldRenderEvents.DebugRender {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.goby56.wakes.particle;

import net.minecraft.entity.Entity;
import net.minecraft.particle.SimpleParticleType;
import net.minecraft.particle.DefaultParticleType;

public class WithOwnerParticleType extends SimpleParticleType {
public class WithOwnerParticleType extends DefaultParticleType {
public Entity owner;

protected WithOwnerParticleType(boolean alwaysShow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import com.goby56.wakes.simulation.WakeNode;
import net.minecraft.client.particle.*;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.SimpleParticleType;
import net.minecraft.entity.Entity;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.util.math.Vec3d;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -64,7 +64,7 @@ public ParticleTextureSheet getType() {
return ParticleTextureSheet.PARTICLE_SHEET_TRANSLUCENT;
}

public static class Factory implements ParticleFactory<SimpleParticleType> {
public static class Factory implements ParticleFactory<DefaultParticleType> {
private final SpriteProvider sprites;

public Factory(SpriteProvider spriteSet) {
Expand All @@ -73,7 +73,7 @@ public Factory(SpriteProvider spriteSet) {

@Nullable
@Override
public Particle createParticle(SimpleParticleType parameters, ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
public Particle createParticle(DefaultParticleType parameters, ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
SplashCloudParticle cloud = new SplashCloudParticle(world, x, y, z, this.sprites, velocityX, velocityY, velocityZ);
if (parameters instanceof WithOwnerParticleType type) {
cloud.owner = type.owner;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.goby56.wakes.particle.ModParticles;
import com.goby56.wakes.particle.WithOwnerParticleType;
import com.goby56.wakes.render.SplashPlaneRenderer;
import com.goby56.wakes.simulation.WakeNode;
import com.goby56.wakes.utils.WakesUtils;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
Expand All @@ -21,7 +20,7 @@
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.Entity;
import net.minecraft.entity.vehicle.BoatEntity;
import net.minecraft.particle.SimpleParticleType;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.util.math.*;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -128,14 +127,14 @@ public ParticleTextureSheet getType() {
}

@Environment(EnvType.CLIENT)
public static class Factory implements ParticleFactory<SimpleParticleType> {
public static class Factory implements ParticleFactory<DefaultParticleType> {

public Factory(SpriteProvider spriteSet) {
}

@Nullable
@Override
public Particle createParticle(SimpleParticleType parameters, ClientWorld world, double x, double y, double z, double velX, double velY, double velZ) {
public Particle createParticle(DefaultParticleType parameters, ClientWorld world, double x, double y, double z, double velX, double velY, double velZ) {
SplashPlaneParticle splashPlane = new SplashPlaneParticle(world, x, y, z);
if (parameters instanceof WithOwnerParticleType type) {
splashPlane.owner = type.owner;
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/com/goby56/wakes/utils/WakesUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,6 @@ public static float getWaterLevel(World world, Entity entityInWater) {
MathHelper.floor(box.minZ), MathHelper.ceil(box.maxZ));
}

// public static float getWaterLevel(ModelPart.Cuboid cuboidInWater) {
// return getWaterLevel(
// (int) cuboidInWater.minX, (int) cuboidInWater.maxX,
// (int) cuboidInWater.minY, (int) cuboidInWater.maxY,
// (int) cuboidInWater.minZ, (int) cuboidInWater.maxZ);
// }

private static float getWaterLevel(World world, int minX, int maxX, int minY, int maxY, int minZ, int maxZ) {
// Taken from BoatEntity$getWaterLevelBelow
BlockPos.Mutable blockPos = new BlockPos.Mutable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"uniforms": [
{ "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
{ "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
{ "name": "IViewRotMat", "type": "matrix3x3", "count": 9, "values": [ 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 ] },
{ "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] },
{ "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] },
{ "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ uniform sampler2D Sampler2;

uniform mat4 ModelViewMat;
uniform mat4 ProjMat;
uniform mat3 IViewRotMat;
uniform int FogShape;

out float vertexDistance;
Expand All @@ -27,7 +28,7 @@ out vec4 normal;
void main() {
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);

vertexDistance = fog_distance(Position, FogShape);
vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape);
vertexColor = Color;
lightMapColor = texelFetch(Sampler2, UV2 / 16, 0);
overlayColor = texelFetch(Sampler1, UV1, 0);
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
],
"depends": {
"fabricloader": ">=0.14.21",
"minecraft": "~1.20.5",
"java": ">=21",
"minecraft": ">=1.20 <1.20.3",
"java": ">=17",
"fabric-api": "*"
},
"suggests": {
"blazingly-fast-boats": "*"
},
"recommends": {
"modmenu": ">=10.0.0",
"yet_another_config_lib_v3": ">=3.3.2"
"modmenu": ">=7.2.0",
"yet_another_config_lib_v3": ">=3.5.0"
}
}

0 comments on commit 7437439

Please sign in to comment.