Skip to content

Commit

Permalink
use standard actions (without modrinth, ofc)
Browse files Browse the repository at this point in the history
Co-authored-by: TheEpicBlock <[email protected]>
  • Loading branch information
sisby-folk committed Jul 28, 2024
1 parent 941225e commit a1c4d07
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 82 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
indent_size = 4
indent_style = tab
tab_width = 4
insert_final_newline = true

[*.yml]
indent_size = 2
indent_style = space

[*.java]
ij_java_block_brace_style = end_of_line
Expand Down
50 changes: 17 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,24 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.
name: Build

name: build
on: [pull_request, push]
on: [ push, pull_request ]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup jdk
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' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v3
java-version: 21
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
name: Artifacts
path: build/libs/
validate-wrappers: true

- name: Build with Gradle
run: ./gradlew build
30 changes: 11 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
name: release
name: Release

on:
release:
types:
- published

jobs:
github-release:
upload:
runs-on: ubuntu-latest
steps:
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/loom-cache
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup JDK 21
uses: actions/setup-java@v1
- name: Setup jdk
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'

- name: Ensure gradlew is executable
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
validate-wrappers: true

- name: Build mod
- name: Build with Gradle
run: ./gradlew build

- name: Upload GitHub release
Expand Down
7 changes: 2 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ org.gradle.caching=true
org.gradle.parallel=true
org.gradle.caching.debug=false
org.gradle.configureondemand=true

# Loom
fabric.loom.multiProjectOptimisation=true

# Mod Metadata
archivesName=fireblanket
group=net.modfest
Expand All @@ -20,7 +18,6 @@ homepage=https://modrinth.com/mod/fireblanket
issues=https://github.com/modfest/fireblanket/issues
sources=https://github.com/modfest/fireblanket
license=AGPL-3.0-or-later

# Mod Version
baseVersion = 0.5.4
branch = 1.21
baseVersion=0.5.4
branch=1.21
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.github.theepicblock.polymc.impl;

import io.github.theepicblock.polymc.api.PolyMap;

import net.minecraft.server.network.ServerPlayerEntity;

public class Util {
Expand Down
19 changes: 7 additions & 12 deletions src/main/java/net/modfest/fireblanket/Fireblanket.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package net.modfest.fireblanket;

import com.google.common.base.Stopwatch;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.ModInitializer;

import net.fabricmc.fabric.api.event.registry.RegistryEntryAddedCallback;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.entity.event.v1.ServerEntityWorldChangeEvents;
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerWorldEvents;
import net.fabricmc.fabric.api.event.registry.RegistryEntryAddedCallback;
import net.fabricmc.fabric.api.networking.v1.PacketByteBufs;
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry;
import net.fabricmc.fabric.api.networking.v1.ServerLoginConnectionEvents;
import net.fabricmc.fabric.api.networking.v1.ServerLoginNetworking;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.block.Block;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.PacketCallbacks;
import net.minecraft.network.packet.CustomPayload;
import net.minecraft.network.packet.Packet;
import net.minecraft.block.Block;
import net.minecraft.registry.Registries;
import net.minecraft.server.command.CommandManager;
import net.minecraft.server.command.ServerCommandSource;
Expand All @@ -34,23 +34,18 @@
import net.modfest.fireblanket.compat.PolyMcCompat;
import net.modfest.fireblanket.mixin.accessor.ClientConnectionAccessor;
import net.modfest.fireblanket.mixin.accessor.ServerChunkManagerAccessor;
import net.modfest.fireblanket.mixin.accessor.ServerLoginNetworkHandlerAccessor;
import net.modfest.fireblanket.mixinsupport.FSCConnection;
import net.modfest.fireblanket.net.BatchedBEUpdatePayload;
import net.modfest.fireblanket.net.CommandBlockPacket;
import net.modfest.fireblanket.world.blocks.UpdateSignBlockEntityTypes;
import net.modfest.fireblanket.mixin.accessor.ServerLoginNetworkHandlerAccessor;
import net.modfest.fireblanket.mixinsupport.FSCConnection;
import net.modfest.fireblanket.world.entity.EntityFilters;
import net.modfest.fireblanket.world.render_regions.RegionSyncRequest;
import net.modfest.fireblanket.world.render_regions.RenderRegions;
import net.modfest.fireblanket.world.render_regions.RenderRegionsState;
import net.modfest.fireblanket.world.entity.EntityFilters;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;

import com.google.common.base.Stopwatch;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.concurrent.LinkedBlockingQueue;
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/net/modfest/fireblanket/FireblanketClient.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package net.modfest.fireblanket;

import java.util.concurrent.CompletableFuture;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
Expand Down Expand Up @@ -31,6 +28,8 @@
import net.modfest.fireblanket.world.render_regions.RegionSyncRequest;
import net.modfest.fireblanket.world.render_regions.RenderRegions;

import java.util.concurrent.CompletableFuture;

public class FireblanketClient implements ClientModInitializer {

public static final RenderRegions renderRegions = new RenderRegions();
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/net/modfest/fireblanket/FireblanketMixin.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package net.modfest.fireblanket;

import java.util.List;
import java.util.Set;

import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.Bootstrap;
import org.objectweb.asm.tree.ClassNode;
import org.slf4j.LoggerFactory;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;

import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.Bootstrap;
import java.util.List;
import java.util.Set;

public class FireblanketMixin implements IMixinConfigPlugin {
public static final boolean GAMEPLAY_CHANGES = Boolean.getBoolean("fireblanket.gameplayChanges");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.function.BiFunction;
import java.util.zip.GZIPInputStream;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,7 @@ public boolean valid() {

}

record FullStateLegacy(ImmutableMap<String, RenderRegion> regions,
ImmutableMultimap<RenderRegion, UUID> entityAttachments,
ImmutableMultimap<RenderRegion, Long> blockAttachments) implements RegionSyncRequest {
record FullStateLegacy(ImmutableMap<String, RenderRegion> regions, ImmutableMultimap<RenderRegion, UUID> entityAttachments, ImmutableMultimap<RenderRegion, Long> blockAttachments) implements RegionSyncRequest {

@Override
public RequestType type() {
Expand Down

0 comments on commit a1c4d07

Please sign in to comment.