Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
b1e6495
compiles on 1.17 after commenting out some lines, rendering broken
Jul 13, 2021
75f29a9
fix rendering
Jul 13, 2021
f7b22a3
Implement tab looping
Andrew6rant Jul 19, 2021
52e6f7c
Merge pull request #1 from Andrew6rant/1.17.1
Jul 25, 2021
d572fc3
Update README.md
Jul 25, 2021
87e7562
Bump version
Jul 30, 2021
865d834
Setup GitHub Actions
Andrew6rant Aug 9, 2021
71f835c
Update README.md
Andrew6rant Aug 11, 2021
397e32b
Update build.yml
Andrew6rant Dec 12, 2021
4d74a73
Update settings.gradle to newest standard
Andrew6rant Dec 12, 2021
ad11d43
Update build.yml
Andrew6rant Dec 12, 2021
da4a70d
Update build.gradle
Andrew6rant Dec 12, 2021
08c6237
Update to Gradle 7.3 for Java 17
Andrew6rant Dec 12, 2021
cdce70a
initial update to 1.18.1
Andrew6rant Dec 13, 2021
95bdc06
Update SimpleBlockTab.java
Andrew6rant Dec 13, 2021
47a9875
compile on Java 17 only
Andrew6rant Dec 13, 2021
72bb24d
reopen writeNBT using accesswidener
Andrew6rant Dec 13, 2021
1f9cbc5
configure Jitpack for Java 17
Andrew6rant Jan 4, 2022
7f72374
Update jitpack.yml
Andrew6rant Jan 4, 2022
c387b48
Update README.md
Andrew6rant Jan 4, 2022
6bcd9e5
Update README.md
Andrew6rant Jan 4, 2022
be34cd9
added support for BigInv mod
Andrew6rant Jan 10, 2022
3d1d24d
Update icon.png
Andrew6rant Mar 2, 2022
5928d11
offset next/back buttons when recipe book is opened
Andrew6rant Mar 4, 2022
2344032
version bump
Andrew6rant Mar 4, 2022
3be3ca4
Do sight check by default
qualterz Apr 15, 2022
73c881e
Merge pull request #5 from qualterz/sightcheck
Andrew6rant Apr 16, 2022
22691e8
bump version (to avoid confusion with 1.19 branch)
Andrew6rant Apr 16, 2022
6689ed1
add media showcases
Andrew6rant Apr 17, 2022
5513dc5
fix markdown rendering
Andrew6rant Apr 17, 2022
caaa735
format table view
Andrew6rant Apr 17, 2022
57718c4
Update icon.png
Andrew6rant Mar 2, 2022
66c31ac
Update to 1.19
Khodyn Jun 13, 2022
9d650c3
empty commit to force GitHub build action
Khodyn Jun 13, 2022
f13490f
Lower required Fabric API version
Khodyn Jun 14, 2022
f8737ef
Fix tabs becoming unselected at edge of range
Khodyn Jun 14, 2022
b4d25e1
Correctly handle walking back into reach of the same tab
Khodyn Jun 14, 2022
635135f
Improve non-obstructed range check
Khodyn Jun 14, 2022
ee1dc89
oops
Khodyn Jun 14, 2022
0cba06b
Merge pull request #14 from Khodyn/1.19
Andrew6rant Jun 24, 2022
7769d25
properly manage dependencies
Andrew6rant Jun 24, 2022
2014f17
fix typo
Andrew6rant Jun 24, 2022
56eb9dd
automate releases
Andrew6rant Jun 24, 2022
9850e36
pull 1.18.x changes into 1.19.x branch
Andrew6rant Jun 25, 2022
6c44ba0
remove declared tag for mc-publish
Andrew6rant Jun 25, 2022
eb7b442
fix crash when AbstractChestBlocks do not have CHEST_TYPE property
Andrew6rant Jun 26, 2022
17d9f95
optimize isDouble check and add BRB support
Andrew6rant Jun 26, 2022
5214e72
Update README.md
Andrew6rant Jun 27, 2022
81b6ea7
pull changes from 1.18.x branch
Andrew6rant Jun 30, 2022
f6003d1
support 1.19 specific blocks
Andrew6rant Jun 30, 2022
79a67cf
dynamically support all modded screens
Andrew6rant Jun 30, 2022
66b914c
fix bug where tabs opened at wrong index
Andrew6rant Jun 30, 2022
5feb240
bump version
Andrew6rant Jun 30, 2022
18abc1a
remove top row offset
Andrew6rant Jul 1, 2022
9f47cae
Soft Keybind Conflict & Bed Exclusion
Ueaj-Kerman Jul 16, 2022
855635d
fix soft keybind conflict
Ueaj-Kerman Jul 16, 2022
2ca4238
Merge pull request #35 from Devan-Kerman/1.19.x
Andrew6rant Jul 16, 2022
3ba017a
refactor mod compat system and add LevelZ offsets
Andrew6rant Jul 16, 2022
d581a98
pull changes from 1.18.x branch
Andrew6rant Jul 19, 2022
587a1ca
swap JSON serializer to Gson and bump version
Andrew6rant Jul 19, 2022
31e40e7
port nearby item frame feature to 1.19.x
Andrew6rant Jul 20, 2022
76b2e99
support double chests' nearby item frames
Andrew6rant Jul 21, 2022
2b2fdb2
Update README with new 0.8.1 feature
Andrew6rant Jul 21, 2022
da7cbcc
port entity tab to 1.19
Andrew6rant Jul 22, 2022
04ba418
tweak release script for beta
Andrew6rant Jul 22, 2022
9fd16df
bump version
Andrew6rant Jul 22, 2022
0dff1c7
Update README with 0.9.0 showcase
Andrew6rant Jul 22, 2022
70a5511
Change gradle to use JDK 8
wntiv-main Aug 7, 2022
6d8be01
Update mod dependencies
wntiv-main Aug 7, 2022
a646354
update mod.json versions
wntiv-main Aug 8, 2022
dcd52b3
Revert "reopen writeNBT using accesswidener"
wntiv-main Aug 8, 2022
38d1b97
Update SimpleBlockTab.java
wntiv-main Aug 8, 2022
e466b09
Revert update to 1.19
wntiv-main Aug 8, 2022
bb92c70
Use 1.16-friendly code
wntiv-main Aug 9, 2022
9546acc
tidy up code
wntiv-main Aug 10, 2022
e12b7f9
fix everything
wntiv-main Aug 10, 2022
1ea4462
use java 8
wntiv-main Aug 10, 2022
46554c7
check not null
wntiv-main Aug 10, 2022
9e4f372
Check for empty item frame
wntiv-main Aug 10, 2022
362a7d3
Update fabric.mod.json
wntiv-main Aug 11, 2022
a004ba2
actually cache the item frame item
wntiv-main Aug 11, 2022
8a44d53
Fix crash and get entity spawn egg
wntiv-main Aug 11, 2022
9c91c35
Fix crash with shulker boxes
wntiv-main Aug 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/resources/BigInv_compat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/resources/InventoryTabs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/resources/Tabs_showcase.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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
on: [pull_request, push]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
17 # Minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- 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 == '17' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: build/libs/
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Artifacts

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt-hotspot'
java-version: 17
cache: 'gradle'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- uses: Kir-Antipov/[email protected]
with:
curseforge-id: 585506
modrinth-id: F1AqcMCK
modrinth-featured: true
modrinth-unfeature-mode: intersection
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
version-type: beta
version-resolver: all
loaders: |
fabric
quilt
49 changes: 46 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,48 @@
# InventoryTabs
Adds tabs to access nearby blocks.
Adds tabs to access nearby blocks without leaving your inventory. Completely client-side. Requires Cloth Config API.

<table><tr><td width="34.5%">

![Inventory Tabs showcase](https://raw.githubusercontent.com/Andrew6rant/inventorytabs/1.18.x/.github/resources/InventoryTabs.png)

</td><td width="65.5%">

![Showcase GIF](https://raw.githubusercontent.com/Andrew6rant/inventorytabs/1.18.x/.github/resources/Tabs_showcase.gif)

</td></tr></table>

Also has [BigInv](https://github.com/SollyW/BigInv) and [PlayerEx](https://www.curseforge.com/minecraft/mc-mods/playerex) support!

<table><tr><td width="36.5%">

![BigInv support](https://raw.githubusercontent.com/Andrew6rant/inventorytabs/1.18.x/.github/resources/BigInv_compat.png)

</td><td width="33.5%">

![PlayerEx support](https://user-images.githubusercontent.com/57331134/175751311-6edb68b4-82f4-4104-ba45-38139303536c.png)

</td></tr></table>

New in 0.8.1: Chest icons and hover text can be changed by nearby item frames!

![InventoryTabs-nearby-item-frames](https://user-images.githubusercontent.com/57331134/180107483-11429056-8e99-4529-ad7d-7091032fb9aa.gif)

New in 0.9.0: Entity support!

<table><tr><td width="38%">

![Chest Minecart showcase](https://user-images.githubusercontent.com/57331134/180368210-2510a9a3-0efb-49c9-9a1b-66b137739bf9.gif)

</td><td width="32%">

![Villager inventory showcase](https://user-images.githubusercontent.com/57331134/180335139-9db9e488-9e1d-467f-9877-13db22173453.png)

</td></tr></table>


## Devs
### Importing
To add **Inventory Tabs** to your project, you need to add ``https://jitpack.io`` as a repo and ``com.github.cakewhip:inventorytabs:mcA.B.C-vX.Y.Z`` as a dependency. For example:
To add **Inventory Tabs** to your project, you need to add ``https://jitpack.io`` as a repo and ``com.github.Andrew6rant:InventoryTabs:inventorytabs-(mod version)-(Minecraft version)`` as a dependency. For example:
```
repositories {
maven {
Expand All @@ -12,9 +51,10 @@ repositories {
}

dependencies {
modImplementation "com.github.cakewhip:inventorytabs:mcA.B.C-vX.Y.Z"
modImplementation "com.github.Andrew6rant:InventoryTabs:inventorytabs-0.6.1-1.19.x"
}
```

See the releases page for available versions.

### Adding Custom Tabs
Expand All @@ -36,3 +76,6 @@ Your handled screen needs to update the ``TabManager``, which you can grab a ref
Finally, there are some methods to call for rendering and managing the tabs. In the ``render`` method before anything is drawn, call ``TabRenderer#renderBackground``. In the ``drawBackground``, call ``TabRenderer#renderForeground`` and ``TabRenderer#renderHoverTooltips``. In the ``mouseClicked`` method, call ``TabManager#mouseClicked``.

If your screen's GUI dynamically changes (in the case of a recipe book opening), you can implement the ``TabRenderingHints`` interface and offset the top and bottom rows however you like.

## Credits
This 1.18 and 1.19 port is based on LiamMCW's fork of the original mod by cakewhip. Full credits can be found at https://github.com/Andrew6rant/inventorytabs/graphs/contributors.
33 changes: 20 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

archivesBaseName = project.archives_base_name
version = "${project.mod_version}-${project.minecraft_version}"
version = project.mod_version
group = project.maven_group

repositories {
maven {
url "https://maven.shedaniel.me/"
}
maven {
name = 'terraformers maven'
url "https://maven.terraformersmc.com/releases"
}
}

dependencies {
Expand All @@ -28,6 +32,11 @@ dependencies {
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}") {
exclude(group: "net.fabricmc.fabric-api")
}


modCompileOnly("com.terraformersmc:modmenu:${project.modmenu_version}") {
transitive = false
}
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
}
Expand All @@ -47,8 +56,8 @@ tasks.withType(JavaCompile).configureEach {
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 8
}

java {
Expand All @@ -58,6 +67,10 @@ java {
withSourcesJar()
}

loom {
setupRemappedVariants = true
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
Expand All @@ -68,13 +81,7 @@ jar {
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}

Expand Down
9 changes: 5 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/versions.html
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.10
loader_version=0.11.6
loader_version=0.14.9

# Mod Properties
mod_version = 0.3.0
mod_version = 0.9.beta-1.16.5
maven_group = com.kqp
archives_base_name = inventorytabs

# Dependencies
fabric_version=0.36.0+1.16
clothconfig_version=4.11.26
fabric_version=0.42.0+1.16
clothconfig_version=4.14.54
modmenu_version=1.14.14
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 5 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
jdk:
- openjdk17
before_install:
- sdk install java 17.0.1-open
- sdk use java 17.0.1-open
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
gradlePluginPortal()
}
}
Loading