Skip to content

Commit

Permalink
update to 1.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkGoosik committed Dec 8, 2022
1 parent 54b2b9b commit 999779d
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 51 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/publish-curseforge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17

- name: Cache Brachyura directory
uses: actions/cache@v2
with:
Expand All @@ -28,7 +28,7 @@ jobs:

- name: Build with Brachyura
run: java -jar brachyura-bootstrap-0.jar build

- name: Publish artifacts to CurseForge
uses: Kir-Antipov/[email protected]
with:
Expand All @@ -42,9 +42,7 @@ jobs:
fabric
quilt
game-versions: |
1.19
1.19.1
1.19.2
1.19.3
dependencies: |
fabric-api | depends | *
cloth-config | depends | *
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/publish-modrinth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17

- name: Cache Brachyura directory
uses: actions/cache@v2
with:
Expand All @@ -28,7 +28,7 @@ jobs:

- name: Build with Brachyura
run: java -jar brachyura-bootstrap-0.jar build

- name: Publish artifacts to Modrinth
uses: Kir-Antipov/[email protected]
with:
Expand All @@ -42,9 +42,7 @@ jobs:
fabric
quilt
game-versions: |
1.19
1.19.1
1.19.2
1.19.3
dependencies: |
fabric-api | depends | *
cloth-config | depends | *
Expand Down
10 changes: 5 additions & 5 deletions buildscript/buildscript.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Mod Properties
name = visuality
modVersion = 0.5.5
modVersion = 0.6.0
javaVersion = 17

# Dependencies
minecraftVersion = 1.19.2
yarnMappings = 1.19.2+build.28
minecraftVersion = 1.19.3
yarnMappings = 1.19.3+build.2
fabricLoader = 0.14.11
quiltflower = 1.9.0

fabricApi = 0.68.0+1.19.2
clothConfig = 8.2.88
fabricApi = 0.68.1+1.19.3
clothConfig = 9.0.93
10 changes: 5 additions & 5 deletions buildscript/src/main/java/Buildscript.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ public void getModDependencies(ModDependencyCollector d) {
d.addMaven("https://maven.shedaniel.me", new MavenId("me.shedaniel.cloth", "basic-math", "0.6.1"), RUNTIME, COMPILE);

// Runtime Mods
d.addMaven("https://api.modrinth.com/maven", new MavenId("maven.modrinth", "lazydfu", "0.1.3"), RUNTIME);
d.addMaven("https://api.modrinth.com/maven", new MavenId("maven.modrinth", "ferrite-core", "5.0.0-fabric"), RUNTIME);
d.addMaven("https://api.modrinth.com/maven", new MavenId("maven.modrinth", "starlight", "1.1.1+1.19"), RUNTIME);
d.addMaven("https://api.modrinth.com/maven", new MavenId("maven.modrinth", "lithium", "mc1.19.2-0.10.2"), RUNTIME);
//d.addMaven("https://api.modrinth.com/maven", new MavenId("maven.modrinth", "lazydfu", "0.1.3"), RUNTIME);
d.addMaven("https://api.modrinth.com/maven", new MavenId("maven.modrinth", "ferrite-core", "5.1.0-fabric"), RUNTIME);
//d.addMaven("https://api.modrinth.com/maven", new MavenId("maven.modrinth", "starlight", "1.1.1+1.19"), RUNTIME);
//d.addMaven("https://api.modrinth.com/maven", new MavenId("maven.modrinth", "lithium", "mc1.19.3-0.10.3"), RUNTIME);

// Compatibility
d.addMaven("https://maven.terraformersmc.com", new MavenId("com.terraformersmc", "modmenu", "4.1.1"), RUNTIME, COMPILE);
d.addMaven("https://maven.terraformersmc.com", new MavenId("com.terraformersmc", "modmenu", "5.0.1"), RUNTIME, COMPILE);
}

public void addFabricModules(ModDependencyCollector d) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/visuality/event/CirclesOnWaterEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public static void onTick(ClientWorld world) {
}
}

@SuppressWarnings("RedundantIfStatement")
private static boolean shown(ClientWorld world) {
var client = MinecraftClient.getInstance();
if(!config.waterCircles.enabled) return false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/visuality/mixin/BlockMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemConvertible;
import net.minecraft.tag.BlockTags;
import net.minecraft.registry.tag.BlockTags;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.random.Random;
Expand Down
21 changes: 11 additions & 10 deletions src/main/java/visuality/particle/WaterCircleParticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Quaternion;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.Vec3f;
import org.joml.Quaternionf;
import org.joml.Vector3f;

public class WaterCircleParticle extends SpriteBillboardParticle {
private final SpriteProvider sprites;
private static final Quaternion QUATERNION = new Quaternion(0F, -0.7F, 0.7F, 0F);
private static final Quaternionf QUATERNION = new Quaternionf(0F, -0.7F, 0.7F, 0F);

private WaterCircleParticle(ClientWorld world, double x, double y, double z, double color, SpriteProvider sprites) {
super(world, x, y, z, 0, 0, 0);
Expand Down Expand Up @@ -44,19 +44,20 @@ public void tick() {
}
}

@Override
public void buildGeometry(VertexConsumer buffer, Camera camera, float ticks) {
Vec3d vec3 = camera.getPos();
float x = (float) (MathHelper.lerp(ticks, this.prevPosX, this.x) - vec3.getX());
float y = (float) (MathHelper.lerp(ticks, this.prevPosY, this.y) - vec3.getY());
float z = (float) (MathHelper.lerp(ticks, this.prevPosZ, this.z) - vec3.getZ());

Vec3f[] vector3fs = new Vec3f[]{new Vec3f(-1.0F, -1.0F, 0.0F), new Vec3f(-1.0F, 1.0F, 0.0F), new Vec3f(1.0F, 1.0F, 0.0F), new Vec3f(1.0F, -1.0F, 0.0F)};
Vector3f[] vector3fs = new Vector3f[]{new Vector3f(-1.0F, -1.0F, 0.0F), new Vector3f(-1.0F, 1.0F, 0.0F), new Vector3f(1.0F, 1.0F, 0.0F), new Vector3f(1.0F, -1.0F, 0.0F)};
float f4 = this.getSize(ticks);

for(int i = 0; i < 4; ++i) {
Vec3f vector3f = vector3fs[i];
Vector3f vector3f = vector3fs[i];
vector3f.rotate(QUATERNION);
vector3f.scale(f4);
vector3f.mul(f4);
vector3f.add(x, y, z);
}

Expand All @@ -65,10 +66,10 @@ public void buildGeometry(VertexConsumer buffer, Camera camera, float ticks) {
float f5 = this.getMinV();
float f6 = this.getMaxV();
int light = this.getBrightness(ticks);
buffer.vertex(vector3fs[0].getX(), vector3fs[0].getY(), vector3fs[0].getZ()).texture(f8, f6).color(this.red, this.green, this.blue, this.alpha).light(light).next();
buffer.vertex(vector3fs[1].getX(), vector3fs[1].getY(), vector3fs[1].getZ()).texture(f8, f5).color(this.red, this.green, this.blue, this.alpha).light(light).next();
buffer.vertex(vector3fs[2].getX(), vector3fs[2].getY(), vector3fs[2].getZ()).texture(f7, f5).color(this.red, this.green, this.blue, this.alpha).light(light).next();
buffer.vertex(vector3fs[3].getX(), vector3fs[3].getY(), vector3fs[3].getZ()).texture(f7, f6).color(this.red, this.green, this.blue, this.alpha).light(light).next();
buffer.vertex(vector3fs[0].x(), vector3fs[0].y(), vector3fs[0].z()).texture(f8, f6).color(this.red, this.green, this.blue, this.alpha).light(light).next();
buffer.vertex(vector3fs[1].x(), vector3fs[1].y(), vector3fs[1].z()).texture(f8, f5).color(this.red, this.green, this.blue, this.alpha).light(light).next();
buffer.vertex(vector3fs[2].x(), vector3fs[2].y(), vector3fs[2].z()).texture(f7, f5).color(this.red, this.green, this.blue, this.alpha).light(light).next();
buffer.vertex(vector3fs[3].x(), vector3fs[3].y(), vector3fs[3].z()).texture(f7, f6).color(this.red, this.green, this.blue, this.alpha).light(light).next();
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/visuality/registry/HitParticleRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import net.minecraft.entity.EntityType;
import net.minecraft.particle.ParticleEffect;
import net.minecraft.particle.ParticleType;
import net.minecraft.registry.Registries;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import visuality.VisualityMod;

import java.util.ArrayList;
Expand All @@ -29,11 +29,11 @@ public static void reload() {
}

private static Optional<EntityType<?>> getEntityFromString(String id) {
return Registry.ENTITY_TYPE.getOrEmpty(new Identifier(id));
return Registries.ENTITY_TYPE.getOrEmpty(new Identifier(id));
}

private static Optional<ParticleType<?>> getParticleFromString(String id) {
return Registry.PARTICLE_TYPE.getOrEmpty(new Identifier(id));
return Registries.PARTICLE_TYPE.getOrEmpty(new Identifier(id));
}

public record Entry(EntityType<?> entity, ParticleEffect particle) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/visuality/registry/ShinyArmorRegistry.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package visuality.registry;

import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import visuality.VisualityMod;

import java.util.ArrayList;
Expand All @@ -19,6 +19,6 @@ public static void reload() {
}

private static Optional<Item> getItemFromString(String id) {
return Registry.ITEM.getOrEmpty(new Identifier(id));
return Registries.ITEM.getOrEmpty(new Identifier(id));
}
}
4 changes: 2 additions & 2 deletions src/main/java/visuality/registry/ShinyBlockRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.registry.Registries;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import visuality.VisualityMod;

import java.util.ArrayList;
Expand All @@ -20,6 +20,6 @@ public static void reload() {
}

private static Optional<Block> getBlockFromString(String id) {
return Registry.BLOCK.getOrEmpty(new Identifier(id));
return Registries.BLOCK.getOrEmpty(new Identifier(id));
}
}
5 changes: 3 additions & 2 deletions src/main/java/visuality/registry/VisualityParticles.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
import net.fabricmc.fabric.api.particle.v1.FabricParticleTypes;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.util.registry.Registry;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import visuality.VisualityMod;
import visuality.particle.*;

Expand Down Expand Up @@ -32,7 +33,7 @@ public static void init() {
}

private static DefaultParticleType add(String name, ParticleFactoryRegistry.PendingParticleFactory<DefaultParticleType> constructor) {
var particle = Registry.register(Registry.PARTICLE_TYPE, VisualityMod.id(name), FabricParticleTypes.simple());
var particle = Registry.register(Registries.PARTICLE_TYPE, VisualityMod.id(name), FabricParticleTypes.simple());
FACTORIES.put(particle, constructor);
return particle;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/visuality/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"modmenu.descriptionTranslation.visuality": "Visual improvements by adding a bunch of new particles.",
"modmenu.descriptionTranslation.visuality": "Little visual improvements by adding a bunch of new particles.",
"config.visuality.title": "Visuality Config",
"config.visuality.general": "General",
"config.visuality.option.slime": "Slime Blobs Enabled",
Expand All @@ -16,4 +16,4 @@
"config.visuality.option.shinyArmor.entries": "Shiny Armor Entries",
"config.visuality.option.shinyBlocks": "Shiny Blocks Enabled",
"config.visuality.option.shinyBlocks.entries": "Shiny Blocks Entries"
}
}

This file was deleted.

Binary file not shown.
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "visuality",
"version": "${version}",
"version": "dev",
"name": "Visuality",
"description": "Little visual improvements by adding a bunch of new particles.",
"authors": [
Expand Down Expand Up @@ -37,7 +37,7 @@
"fabricloader": "*",
"fabric-api": "*",
"cloth-config": "*",
"minecraft": ">=1.19",
"minecraft": ">=1.19.3",
"java": ">=17"
}
}

0 comments on commit 999779d

Please sign in to comment.