Skip to content

Commit

Permalink
Merge pull request #10 from wendavid552/fabric_1.18.x_dev
Browse files Browse the repository at this point in the history
build: add release.yml
  • Loading branch information
wendavid552 authored Feb 23, 2023
2 parents 67f3cbf + e4f3f90 commit 3dba299
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ jobs:

- uses: actions/[email protected]
with:
name: build-artifacts
path: build/libs/*
103 changes: 103 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Release

on:
release:
types:
- published
workflow_dispatch:
inputs:
target_release_tag:
description: The tag of the release you want to append the artifact to
type: string
required: true


jobs:
matrix_prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setmatrix.outputs.matrix }}
steps:
- uses: actions/[email protected]

- name: Display context
run: |
echo ref_name = ${{ github.ref_name }}
echo target_release_tag = ${{ github.event.inputs.target_release_tag }}
build:
uses: ./.github/workflows/build.yml
with:
release: true

release:
needs:
- build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: build-artifacts

- name: Get github release information
if: ${{ github.event_name == 'workflow_dispatch' }}
id: get_release
uses: cardinalby/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: ${{ github.event.inputs.target_release_tag }}

- name: Generate publish related infomation
id: release_info
run: |
if [ $GITHUB_EVENT_NAME == 'release' ]
then
echo "::set-output name=tag_name::" # leave an empty value here so softprops/action-gh-release will use the default value
elif [ $GITHUB_EVENT_NAME == 'workflow_dispatch' ]
then
echo "::set-output name=tag_name::${{ github.event.inputs.target_release_tag }}"
else
echo Unknown github event name $GITHUB_EVENT_NAME
exit 1
fi
- name: Read Properties mod_version
id: mod_version
uses: christian-draeger/[email protected]
with:
path: gradle.properties
property: mod_version

- name: Read Properties minecraft_version
id: minecraft_version
uses: christian-draeger/[email protected]
with:
path: gradle.properties
property: minecraft_version

- name: Publish Minecraft Mods
uses: Kir-Antipov/[email protected]
with:
github-tag: ${{ steps.release_info.outputs.tag_name }}
github-token: ${{ secrets.GITHUB_TOKEN }}

files-primary: ${{'build-artifacts/!(*-@(dev|sources)).jar'}}
files-secondary: ''

name: ${{ format('Itemscroller v {0} for mc{1}', steps.mod_version.outputs.value, steps.minecraft_version.outputs.value) }}
version: ${{ format('mc{0}-v{1}', steps.minecraft_version.outputs.value, steps.mod_version.outputs.value) }}
version-type: release
changelog: ${{ format('{0}{1}', github.event.release.body, steps.get_release.outputs.body) }} # one of them should be an empty string (null)

loaders: fabric
game-versions: ${{ matrix.game_versions }}
version-resolver: exact

retry-attempts: 3
retry-delay: 10000
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
## Note
This is a customized version of Masa's itemscroller mod that fixes crafting features for 1.18. Masa's original mod can be found [here](https://github.com/maruohon/itemscroller)
This is a customized version of Andrew54757's itemscroller-crafting-fix, which is a customized version of Masa's itemscroller mod that fixes crafting features for 1.18.

Customizations:
* More accurate/faster crafting through recipe book protocol
* Toggleable crafting (so you can keep crafting without holding down a key, eg for crafting millions of pistons)
* Honey crafting
Masa's original mod can be found [here](https://github.com/maruohon/itemscroller)

- Removed carpetControlQ crafting option as it causes a "slow crafting issue"
- Removed packetRateLimit as it may lead to problems.
Andrew54757's mod can be found [here](https://github.com/Andrews54757/itemscroller-crafting-fix)

## This is not Masa's original itemscroller. If you have issues with this mod, please contact Andrews54757 (or open a bug report here).
Customizations:
Beside the customizations offered by crafting-fix, we also provide some features that are not present in the original mod:
* Apply crafting features over anvil, grindstone(could help with building overstacked items), stonecutter.
* Renaming multiple items automatically over anvil
* `reserveCrafting` to make it possible to pick up every kind of recipe items after each crafting

### What's different?
Post 1.13, Mojang has changed the crafting mechanics of the game. Before 1.13, crafting was very fast as much of the logic was handled client-side. In 1.13, most of the crafting logic was moved to the server. This broke Itemscroller's fast crafting features, since every ingredient now had to be moved one slot at a time to the crafting grid for it to work. This drastically worsened server-client desync, a compounding problem, leading to an increasing number of failed crafting attempts and accidental ingredient leaks which made afk crafting impossible.
- Fix rendering bug when recipes do not have the length of a square number

This customized version of the mod, fixes the problem by handling ingredient movement server-side using the recipe book protocols when it can.
除crafting-fix提供的功能外,还提供以下功能:
* 可以在铁砧/砂轮(可用于合成堆叠附魔书等)/切石机上使用快速合成功能
* 可以在铁砧上批量重命名物品,只需快速合成前在铁砧上预先写好名字并调用对应的快速合成功能即可,注意仅能用于`合成而不扔出`
* `reserveCrafting` 选项可以在合成后保留物品栏中合成材料的槽位,无论地上合成材料扔出的顺序,总有物品栏位置能从地上捡起合成材料

**Note: Some recipes like fireworks rockets that are not in the recipe book do not take advantage of this protocol, in those cases old itemscroller methods will be used**
## This is not Masa's original itemscroller. If you have issues with this mod, please contact WenDavid552 (or open a bug report here).

Item Scroller
==============
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ author = masa
mod_file_name = itemscroller-fabric

# Current mod version
mod_version = craftfix-1.2.6
mod_version = craftaddon-1.0.0

# Required malilib version
malilib_version = 0.12.0
Expand Down

0 comments on commit 3dba299

Please sign in to comment.