Skip to content

Commit

Permalink
update to 1.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkGoosik committed Oct 26, 2024
1 parent 9b6f6d9 commit bbc5537
Show file tree
Hide file tree
Showing 19 changed files with 132 additions and 190 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,24 @@ jobs:
strategy:
matrix:
java: [ 21 ]
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v2
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: Make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: Capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '21' }}
uses: actions/upload-artifact@v3
if: ${{ matrix.java == '21' }}
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
57 changes: 0 additions & 57 deletions .github/workflows/publish-curseforge.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/publish-github.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/publish-modrinth.yml

This file was deleted.

76 changes: 76 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: publish

on:
release:
types:
- published

jobs:
build:
strategy:
matrix:
java: [ 21 ]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: Make gradle wrapper executable
run: chmod +x ./gradlew
- name: Build
run: ./gradlew build
- uses: BrycensRanch/read-properties-action@v1
id: props
with:
file: gradle.properties
all: true

- name: Publish
uses: Kir-Antipov/[email protected]
with:
modrinth-id: ${{ steps.props.outputs.modrinth_id }}
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: ${{ steps.props.outputs.curseforge_id }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files: |
build/libs/${{ steps.props.outputs.archives_base_name }}-${{ github.event.release.tag_name }}.jar
build/libs/${{ steps.props.outputs.archives_base_name }}-${{ github.event.release.tag_name }}-sources.jar
version: ${{ github.event.release.tag_name }}

version-type: beta
loaders: |
fabric
game-versions: ${{ steps.props.outputs.minecraft_version_range }}
game-version-filter: releases

dependencies: |
fabric-api
cloth-config
java: |
21
retry-attempts: 0
fail-mode: skip

- name: Upload assets to GitHub
uses: AButler/[email protected]
with:
files: "build/libs/*"
repo-token: ${{ secrets.GH_TOKEN }}

- name: Hit mod update webhook
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.MOD_UPDATE_WEBHOOK }}
method: 'GET'
preventFailureOnNoResponse: 'true'
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "1.7-SNAPSHOT"
id "fabric-loom" version "1.8-SNAPSHOT"
}

version = project.mod_version
Expand Down
19 changes: 11 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ org.gradle.jvmargs = -Xmx2G
org.gradle.parallel = true

# Mod Properties
mod_version = 0.7.7+1.21
mod_version = 0.7.8+1.21.3
maven_group = ru.pinkgoosik
archives_base_name = visuality
minecraft_version_range = >=1.21 <1.22

minecraft_version_range = >=1.21.2 <1.22
modrinth_id = rI0hvYcd
curseforge_id = 521126

# Dependencies | Check these on https://fabricmc.net/develop
minecraft_version = 1.21
yarn_mappings = 1.21+build.2
fabric_loader = 0.15.11
fabric_api = 0.100.3+1.21
minecraft_version = 1.21.3
yarn_mappings = 1.21.3+build.2
fabric_loader = 0.16.8
fabric_api = 0.107.0+1.21.3

cloth_config = 15.0.127
modmenu_version = 11.0.1
cloth_config = 16.0.141
modmenu_version = 12.0.0-beta.1
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 5 additions & 0 deletions src/main/java/visuality/config/VisualityClothConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ private static void setupEntries(ConfigCategory category, ConfigEntryBuilder ent
.setSaveConsumer(newValue -> config.hitParticlesEnabled = newValue)
.build());

// category.addEntry(entryBuilder.startFloatField(text("option.hitParticlesPer1Damage"), config.hitParticlesPer1Damage)
// .setDefaultValue(0.5F)
// .setSaveConsumer(newValue -> config.hitParticlesPer1Damage = newValue)
// .build());

category.addEntry(entryBuilder.startStrList(text("option.hitParticles.entries"), config.hitParticleEntries)
.setDefaultValue(VisualityConfig.DEFAULT_HIT_PARTICLES)
.setSaveConsumer(newValue -> {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/visuality/config/VisualityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class VisualityConfig {
public VisualityClothConfig.WaterCirclesConfigOption waterCircles = new VisualityClothConfig.WaterCirclesConfigOption();

public boolean hitParticlesEnabled = true;
// public float hitParticlesPer1Damage = 0.5F;
public ArrayList<String> hitParticleEntries = DEFAULT_HIT_PARTICLES;

public boolean shinyArmorEnabled = true;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/visuality/event/CirclesOnWaterEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.option.ParticlesMode;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.ParticlesMode;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.Heightmap;
import net.minecraft.world.World;
Expand Down Expand Up @@ -36,7 +36,7 @@ public static void onTick(ClientWorld world) {
BlockPos playerPos = new BlockPos((int) player.getX() + x, (int) player.getY(), (int) player.getZ() + z);
BlockPos topPos = world.getTopPosition(Heightmap.Type.MOTION_BLOCKING, playerPos);

if(!(biome.getPrecipitation(topPos).equals(Biome.Precipitation.RAIN)) || !(biome.doesNotSnow(player.getSteppingPos()))) continue;
if(!(biome.getPrecipitation(topPos, world.getSeaLevel()).equals(Biome.Precipitation.RAIN)) || !(biome.doesNotSnow(player.getSteppingPos(), world.getSeaLevel()))) continue;
if(world.getBlockState(topPos.down()).isOf(Blocks.WATER) && world.getBlockState(topPos).isAir()) {
if(world.getFluidState(topPos.down()).getLevel() == 8) {
ParticleUtils.add(world, VisualityParticles.WATER_CIRCLE, topPos.getX() + random.nextDouble(), topPos.getY() + 0.05D, topPos.getZ() + random.nextDouble());
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 @@ -55,7 +55,7 @@ void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rando
if(VisualityMod.config.shinyBlocksEnabled && ShinyBlockRegistry.isShiny(state)) {
for(Direction direction : Direction.values()) {
BlockPos offset = pos.offset(direction);
if(!world.getBlockState(offset).isOpaqueFullCube(world, offset)) {
if(!world.getBlockState(offset).isOpaqueFullCube()) {
if(random.nextFloat() > 0.8) {
Direction.Axis axis = direction.getAxis();
double x = axis == Direction.Axis.X ? 0.5 + 0.5625 * (double) direction.getOffsetX() : (double) random.nextFloat();
Expand Down
Loading

0 comments on commit bbc5537

Please sign in to comment.