Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: FabricMC/fabric
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.115.1+1.21.1
Choose a base ref
...
head repository: FabricMC/fabric
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.115.2+1.21.5
Choose a head ref

Commits on Aug 18, 2024

  1. Port to 24w33a (#4033)

    Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
    Co-authored-by: hypherionmc <hypherionmc@gmail.com>
    (cherry picked from commit 952fb19)
    modmuss50 committed Aug 18, 2024
    Copy the full SHA
    1bb677a View commit details

Commits on Aug 21, 2024

  1. Copy the full SHA
    236902d View commit details
  2. 24w34a (#4046)

    Co-authored-by: PepperCode1 <44146161+peppercode1@users.noreply.github.com>
    modmuss50 and PepperCode1 authored Aug 21, 2024
    Copy the full SHA
    2be8990 View commit details

Commits on Aug 26, 2024

  1. 24w34a porting fixes (#4054)

    * Fix elytra events not working
    
    * Add note on paused dedicated server
    
    * Add note on thrown tridents in `CustomDamageHandler`
    
    Thrown tridents are handled in a different method to ensure they do not break after
    successful use (you cannot throw tridents that are almost broken). To make the API simple
    (as you cannot use this with vanilla items anyway), exclude them from coverage.
    
    * Fix javadoc in VillagerInteractionRegistries
    
    * Fix javadoc
    apple502j authored Aug 26, 2024
    Copy the full SHA
    01f3a03 View commit details
  2. Translation updates (#4027)

    * New translations en_us.json (Korean)
    
    * New translations en_us.json (Japanese)
    
    * New translations en_us.json (German)
    
    * New translations en_us.json (Chinese Simplified)
    
    * New translations en_us.json (Italian)
    
    (cherry picked from commit 9b16164)
    FabricMCBot authored and modmuss50 committed Aug 26, 2024
    Copy the full SHA
    024d2db View commit details
  3. Dont invoke ItemGroupEvents.MODIFY_ENTRIES_ALL for the OP tab, when t…

    …he OP tab is disabled (#4045)
    
    (cherry picked from commit 3fc0e55)
    AshyBoxy authored and modmuss50 committed Aug 26, 2024
    Copy the full SHA
    ca1fb63 View commit details
  4. After Damage Event (#4051)

    * after damage event
    
    * add after damage event to testmod
    
    * remove amount > 0 check to capture shield blocking
    
    * add javadoc
    
    * dont fire event if killed
    
    * clarify javadoc a bit more
    
    * fix checkstyle issue
    
    * fix other checkstyle issues lol
    
    * rename damageDealt to baseDamageTaken
    
    (cherry picked from commit 2122d82)
    TheDeathlyCow authored and modmuss50 committed Aug 26, 2024
    Copy the full SHA
    6cca2be View commit details
  5. Bump version

    modmuss50 committed Aug 26, 2024
    Copy the full SHA
    9c280a9 View commit details

Commits on Aug 29, 2024

  1. 24w35a (#4062)

    apple502j authored Aug 29, 2024
    Copy the full SHA
    2cd4845 View commit details
  2. Copy the full SHA
    6c0945c View commit details
  3. Join a dedicated server in the automated client test. (#4057)

    * Join a dedicated server in the automated client test.
    
    * Add missing header
    modmuss50 authored Aug 29, 2024
    Copy the full SHA
    f14f8b0 View commit details
  4. Bump versions

    modmuss50 committed Aug 29, 2024
    Copy the full SHA
    42a8e21 View commit details

Commits on Sep 4, 2024

  1. Copy the full SHA
    2ade441 View commit details

Commits on Sep 5, 2024

  1. 24w36a (#4068)

    * 24w36a
    
    * Some fixes
    
    * More work
    
    * Fixes
    
    * Update yarn
    
    * Update fabric loader
    
    * Bump versions
    modmuss50 authored Sep 5, 2024
    Copy the full SHA
    d48ec15 View commit details

Commits on Sep 10, 2024

  1. Add c:animal_foods tag (#4080)

    * Add `c:animal_foods` tag
    
    * checkstyle
    
    * Spotless
    
    * Add to lang generator
    
    * Actually use the generated lang file
    
    ---------
    
    Co-authored-by: modmuss50 <modmuss50@gmail.com>
    (cherry picked from commit 3d2379b)
    TelepathicGrunt authored and modmuss50 committed Sep 10, 2024
    Copy the full SHA
    d0d4386 View commit details
  2. New Crowdin updates (#4059)

    * New translations en_us.json (Portuguese, Brazilian)
    
    * New translations en_us.json (Malay)
    
    * New translations en_us.json (Korean)
    
    * New translations en_us.json (Malay (Jawi))
    
    * New translations en_us.json (Malay (Jawi))
    
    * New translations en_us.json (Malay (Jawi))
    
    * New translations en_us.json (Polish)
    
    * New translations en_us.json (Portuguese, Brazilian)
    
    (cherry picked from commit aa34100)
    FabricMCBot authored and modmuss50 committed Sep 10, 2024
    Copy the full SHA
    338fe96 View commit details
  3. Add missing minecraft:enchantable/vanishing to c:enchantables (#4058

    )
    
    (cherry picked from commit 4053855)
    TelepathicGrunt authored and modmuss50 committed Sep 10, 2024
    Copy the full SHA
    64afec5 View commit details
  4. Print the full stack trace from the dedicated server watchdog (#4052)

    * Port FullSTackWatchdog
    
    * spotless
    
    * checkstyle
    
    * fixed package
    
    * added test mod
    
    * checkstyle
    TelepathicGrunt authored Sep 10, 2024
    Copy the full SHA
    4854df7 View commit details
  5. Add TransferVariant.getComponentMap() (#4074)

    * Add TransferVariant.getComponentMap()
    
    * used the cached stack
    
    * Even better
    modmuss50 authored Sep 10, 2024
    Copy the full SHA
    0771530 View commit details
  6. Fix Recipe Provider not calling generate (#4078)

    * Fix Recipe Provider not calling generate
    
    * Commit data generated files to repo
    modmuss50 authored Sep 10, 2024
    Copy the full SHA
    a3dc8b6 View commit details
  7. Copy the full SHA
    f83d9a4 View commit details
  8. Bump version

    modmuss50 committed Sep 10, 2024
    Copy the full SHA
    a6aa5fa View commit details

Commits on Sep 11, 2024

  1. 24w37a

    modmuss50 committed Sep 11, 2024
    Copy the full SHA
    9ed063b View commit details

Commits on Sep 18, 2024

  1. Copy the full SHA
    91470af View commit details
  2. Remove deprecated FRAPI fallback consumers (#4091)

    - Remove appropriate default method implementations
    - Move some common code between AbstractBlockRenderContext and ItemRenderContext into AbstractRenderContext
    PepperCode1 authored Sep 18, 2024
    Copy the full SHA
    75ef59d View commit details
  3. Copy the full SHA
    67421c4 View commit details
  4. 24w38a (#4101)

    * 24w38a part 1
    
    * Fix tests
    
    * Bump version
    modmuss50 authored Sep 18, 2024
    Copy the full SHA
    50ed0fa View commit details

Commits on Sep 23, 2024

  1. Modify Enchantment and Fabric Component Map Builder Extensions (#4085)

    * modify effects event
    
    * give impaling fire aspect
    
    * add fabric component map builder
    
    * change interface name to match event
    
    * gametests for weird impaling enchantment
    
    * fix checkstyle issues
    
    * fabric map builder javadoc
    
    * modify effects javadoc
    
    * fix checkstyle issues
    
    * prefer extension methods over add
    
    * add enchantment source
    
    * fix missing asterisk on fabricitemstack javadoc
    
    * switch to enchantment builder
    
    * fix effects list
    
    * fix checkstyle
    
    * add note on exclusive set to javadoc
    
    * add fabric component builder extensions to default component testmod
    
    * remove threadlocal usage from mixin
    
    * remove modid prefix from accessors
    
    * remove unused import
    
    * fix recursive invoker
    
    * add test to automatically check modified item name
    
    (cherry picked from commit d5debae)
    TheDeathlyCow authored and modmuss50 committed Sep 23, 2024
    Copy the full SHA
    ebc0bc7 View commit details
  2. New Crowdin updates (#4086)

    * New translations en_us.json (German)
    
    * New translations en_us.json (Turkish)
    
    * New translations en_us.json (Chinese Simplified)
    
    * New translations en_us.json (Polish)
    
    * New translations en_us.json (Czech)
    
    * New translations en_us.json (Japanese)
    
    (cherry picked from commit 9d3173d)
    FabricMCBot authored and modmuss50 committed Sep 23, 2024
    Copy the full SHA
    db08159 View commit details
  3. Create c:obsidians block and item tag (#4088)

    * Create `c:obsidians`
    
    * Add obsidians subtags
    
    (cherry picked from commit 9d22c5f)
    TelepathicGrunt authored and modmuss50 committed Sep 23, 2024
    Copy the full SHA
    6de299b View commit details
  4. Add access to ClientConfigurationNetworkHandler in context (#4097)

    (cherry picked from commit c7469b2)
    Earthcomputer authored and modmuss50 committed Sep 23, 2024
    Copy the full SHA
    d3cf6d4 View commit details
  5. Add ItemVariant#withComponentChanges and FluidVariant#withComponentCh…

    …anges (#4082)
    
    * add ItemVariant#withChanges and FluidVariant#withChanges
    
    * withChanges -> withComponentChanges
    
    * add TransferVariant#withComponentChanges
    
    * make TransferVariant#withComponentChanges throw
    BasiqueEvangelist authored Sep 23, 2024
    Copy the full SHA
    1d5c243 View commit details
  6. Copy the full SHA
    464f0e8 View commit details
  7. Add fuel registry events (#4038)

    * Add fuel registry events
    
    * Allow removing individual items from fuel registry builders
    
    * Expand fuel registry events test coverage
    
    * Fix incorrect fuel registry documentation
    
    * Review changes
    
    * Use a context object
    
    * Checkstyle
    
    ---------
    
    Co-authored-by: modmuss50 <modmuss50@gmail.com>
    haykam821 and modmuss50 authored Sep 23, 2024
    Copy the full SHA
    d38542c View commit details
  8. Fix post merge issues

    modmuss50 committed Sep 23, 2024
    Copy the full SHA
    7076b16 View commit details
  9. Bump version

    modmuss50 committed Sep 23, 2024
    Copy the full SHA
    e1e5711 View commit details

Commits on Sep 26, 2024

  1. Copy the full SHA
    7dcfcf9 View commit details
  2. Bump version

    modmuss50 committed Sep 26, 2024
    Copy the full SHA
    8b2c555 View commit details

Commits on Oct 2, 2024

  1. Update mod to Minecraft snapshot 24w40a (#4136)

    * Update mod to Minecraft snapshot 24w40a
    
    * Bump versions
    
    * Add new items to tags
    
    * Add more missing boats
    
    * Turns out they werent missing
    
    ---------
    
    Co-authored-by: modmuss50 <modmuss50@gmail.com>
    haykam821 and modmuss50 authored Oct 2, 2024
    Copy the full SHA
    86ae0e5 View commit details

Commits on Oct 8, 2024

  1. Update mod to Minecraft 1.21.2 pre-release 1 (#4148)

    * Update mod to Minecraft 1.21.2 pre-release 1
    
    * Bump version
    
    ---------
    
    Co-authored-by: modmuss50 <modmuss50@gmail.com>
    haykam821 and modmuss50 authored Oct 8, 2024
    Copy the full SHA
    5763228 View commit details

Commits on Oct 10, 2024

  1. 1.21.2-pre2

    Just mappings
    modmuss50 committed Oct 10, 2024
    Copy the full SHA
    488720f View commit details
  2. Copy the full SHA
    344e053 View commit details

Commits on Oct 11, 2024

  1. Copy the full SHA
    c811259 View commit details
  2. Add mixin audit unit test (#4153)

    This is useful when porting to a new version as you don't need to wait for the game to load to check for mixin errors.
    modmuss50 authored Oct 11, 2024
    Copy the full SHA
    e618fef View commit details
  3. Don't sync recipe serialisers (#4156)

    * Don't sync recipe serialisers
    
    * Suppress error
    
    * Actually fix...
    modmuss50 authored Oct 11, 2024
    Copy the full SHA
    90e7264 View commit details
  4. Rename CustomIngredient.getMatchingStacks & add CustomIngredient.toDi…

    …splay (#4152)
    
    * Add CustomIngredient.toDisplay
    
    * Imports
    
    * Rename to match yarn.
    modmuss50 authored Oct 11, 2024
    Copy the full SHA
    6eee591 View commit details
  5. Copy the full SHA
    47870f2 View commit details
  6. Update to loom 1.8 (#4122)

    * Trial loom 1.8
    
    * Fix testmod jar classpath
    
    * Update
    modmuss50 authored Oct 11, 2024
    Copy the full SHA
    a783049 View commit details
  7. Bump versions

    modmuss50 committed Oct 11, 2024
    Copy the full SHA
    7413c62 View commit details
  8. Update Loom

    modmuss50 committed Oct 11, 2024
    Copy the full SHA
    118941c View commit details
Showing 1,230 changed files with 28,122 additions and 11,336 deletions.
5 changes: 2 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
*.java text eol=lf
*.json text eol=lf
*.bat text eol=crlf
* text=auto eol=lf
*.bat text eol=crlf
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -43,10 +43,11 @@ jobs:
with:
distribution: 'microsoft'
java-version: '21'
- name: Run Auto test Client
- run: mkdir run && echo "eula=true" >> run/eula.txt
- name: Run Client Gametests
uses: modmuss50/xvfb-action@v1
with:
run: ./gradlew runProductionAutoTestClient --stacktrace --warning-mode=fail
run: ./gradlew runProductionClientGametest --stacktrace --warning-mode=fail
- uses: actions/upload-artifact@v4
if: always()
with:
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ classes/
run
*.log
*.log.gz
focus.txt

# Windows
*.db
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -99,6 +99,9 @@ Fabric API makes strong backwards compatibility guarantees, by which contributor
- If vanilla exposes optionals in return types, then returning an optional is fine.
- Avoid requiring the user to cast to a subtype if possible.
- Adding methods to vanilla types can be done via interface injection.
- Avoid exposing java `record`s as public API.
- Records expose more than is necessary for most APIs, which makes them difficult to evolve.
- Prefer to expose an interface that is implemented by an impl record.

### API design patterns to consider

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ Essential hooks for modding with Fabric.
Fabric API is the library for essential hooks and interoperability mechanisms for Fabric mods. Examples include:

- Exposing functionality that is useful but difficult to access for many mods such as particles, biomes and dimensions
- Adding events, hooks and APIs to improve interopability between mods.
- Adding events, hooks and APIs to improve interoperability between mods.
- Essential features such as registry synchronization and adding information to crash reports.
- An advanced rendering API designed for compatibility with optimization mods and graphics overhaul mods.

122 changes: 78 additions & 44 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@ plugins {
id "idea"
id "maven-publish"
id 'jacoco'
id "fabric-loom" version "1.6.11" apply false
id "fabric-loom" version "1.9.2" apply false
id "com.diffplug.spotless" version "6.20.0"
id "org.ajoberstar.grgit" version "5.2.2"
id "me.modmuss50.remotesign" version "0.4.0" apply false
id "me.modmuss50.remotesign" version "0.5.0" apply false
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}

@@ -215,7 +215,7 @@ allprojects {
}

allprojects.each { p ->
if (metaProjects.contains(project.name)) {
if (metaProjects.contains(p.name)) {
return
}

@@ -242,24 +242,11 @@ allprojects {

testImplementation "net.fabricmc:fabric-loader-junit:${project.loader_version}"
testImplementation sourceSets.testmodClient.output
testImplementation 'org.mockito:mockito-core:5.4.0'
testImplementation 'org.mockito:mockito-core:5.13.0'
}

test {
useJUnitPlatform()

afterEvaluate {
// See: https://github.com/FabricMC/fabric-loader/pull/585
def classPathGroups = loom.mods.stream()
.map { modSettings ->
SourceSetHelper.getClasspath(modSettings, getProject()).stream()
.map(File.&getAbsolutePath)
.collect(Collectors.joining(File.pathSeparator))
}
.collect(Collectors.joining(File.pathSeparator+File.pathSeparator))

systemProperty("fabric.classPathGroups", classPathGroups)
}
}

tasks.withType(ProcessResources).configureEach {
@@ -271,18 +258,28 @@ allprojects {
}

spotless {
lineEndings = com.diffplug.spotless.LineEnding.UNIX

java {
licenseHeaderFile(rootProject.file("HEADER"))
removeUnusedImports()
importOrder('java', 'javax', '', 'net.minecraft', 'net.fabricmc')
indentWithTabs()
trimTrailingWhitespace()
}

// Sort the en_us translation files
// The other languages are handled by Crowdin
json {
target 'src/**/lang/en_us.json'
targetExclude 'src/**/generated/**'
gson().indentWithSpaces(2).sortByKeys()
}
}

checkstyle {
configFile = rootProject.file("checkstyle.xml")
toolVersion = "10.12.1"
toolVersion = "10.20.2"
}

tasks.withType(AbstractArchiveTask).configureEach {
@@ -329,6 +326,7 @@ allprojects {
addNestedDependencies = false
includesClientOnlyClasses = true
clientOnlySourceSetName = sourceSets.testmodClient.name
classpath.from(sourceSets.testmodClient.compileClasspath)
}
build.dependsOn remapTestmodJar

@@ -365,8 +363,7 @@ apply from: "gradle/module-validation.gradle"
apply from: "gradle/module-versioning.gradle"

loom {
// Required as the item-group API uses access widened classes in its API, without this the javadoc generation fails.
accessWidenerPath = file("fabric-item-group-api-v1/src/main/resources/fabric-item-group-api-v1.accesswidener")
accessWidenerPath = file("gradle/javadoc.accesswidener")
}

javadoc {
@@ -399,7 +396,7 @@ javadoc {

classpath = files(sourceSets.main.compileClasspath, sourceSets.client.compileClasspath)
include("**/api/**")
failOnError true
failOnError = true
}

tasks.register('javadocJar', Jar) {
@@ -420,18 +417,18 @@ loom {

// Enable the gametest runner
vmArg "-Dfabric-api.gametest"
vmArg "-Dfabric-api.gametest.report-file=${project.buildDir}/junit.xml"
vmArg "-Dfabric-api.gametest.report-file=${project.layout.buildDirectory.file("junit.xml").get().getAsFile()}"
runDir "build/gametest"
}
autoTestServer {
inherit testmodServer
name "Auto Test Server"
vmArg "-Dfabric.autoTest"
}
autoTestClient {
clientGametest {
inherit testmodClient
name "Auto Test Client"
vmArg "-Dfabric.autoTest"
name "Client Game Test"
vmArg "-Dfabric.client.gametest"
vmArg "-Dfabric-tag-conventions-v2.missingTagTranslationWarning=fail"
vmArg "-Dfabric-tag-conventions-v1.legacyTagWarning=fail"
}
@@ -443,18 +440,23 @@ loom {
ideConfigGenerated = false
}

autoTestClientCoverage {
inherit autoTestClient
name "Auto Test Client Coverage"
clientGametestCoverage {
inherit clientGametest
name "Client Game Test Coverage"
ideConfigGenerated = false
}
}
}

runGametest {
outputs.file project.layout.buildDirectory.file("junit.xml")
}

test.dependsOn runGametest

def coverageTasks = [
runGametestCoverage,
runAutoTestClientCoverage
runClientGametestCoverage
]

jacoco {
@@ -490,20 +492,26 @@ configurations {
extendsFrom configurations.minecraftRuntimeLibraries
}
productionRuntimeServer
productionMods {
transitive = false
}
}

dependencies {
productionRuntime "net.fabricmc:fabric-loader:${project.loader_version}"
productionRuntime "net.fabricmc:intermediary:${project.minecraft_version}"

productionRuntimeServer "net.fabricmc:fabric-installer:${project.installer_version}:server"
productionMods project(':fabric-client-gametest-api-v1')
}

import net.fabricmc.loom.util.Platform

def productionMods = project.files(configurations.productionMods, remapJar.archiveFile, remapTestmodJar.archiveFile)

// This is very far beyond loom's API if you copy this, you're on your own.
tasks.register('runProductionAutoTestClient', JavaExec) {
dependsOn remapJar, remapTestmodJar, downloadAssets
tasks.register('runProductionClientGametest', JavaExec) {
dependsOn productionMods, downloadAssets
classpath.from configurations.productionRuntime
mainClass = "net.fabricmc.loader.impl.launch.knot.KnotClient"
workingDir = file("run")
@@ -525,8 +533,8 @@ tasks.register('runProductionAutoTestClient', JavaExec) {
}

jvmArgs(
"-Dfabric.addMods=${remapJar.archiveFile.get().asFile.absolutePath}${File.pathSeparator}${remapTestmodJar.archiveFile.get().asFile.absolutePath}",
"-Dfabric.autoTest",
"-Dfabric.addMods=${productionMods.collect { it.absolutePath }.join(File.pathSeparator)}",
"-Dfabric.client.gametest",
"-Dfabric-tag-conventions-v2.missingTagTranslationWarning=fail",
"-Dfabric-tag-conventions-v1.legacyTagWarning=fail"
)
@@ -550,7 +558,7 @@ tasks.register('serverPropertiesJar', Jar) {
}

tasks.register('runProductionAutoTestServer', JavaExec) {
dependsOn remapJar, remapTestmodJar, serverPropertiesJar
dependsOn productionMods, serverPropertiesJar
classpath.from configurations.productionRuntimeServer, serverPropertiesJar
mainClass = "net.fabricmc.installer.ServerLauncher"
workingDir = file("run")
@@ -559,7 +567,7 @@ tasks.register('runProductionAutoTestServer', JavaExec) {
workingDir.mkdirs()

jvmArgs(
"-Dfabric.addMods=${remapJar.archiveFile.get().asFile.absolutePath}${File.pathSeparator}${remapTestmodJar.archiveFile.get().asFile.absolutePath}",
"-Dfabric.addMods=${productionMods.collect { it.absolutePath }.join(File.pathSeparator)}",
"-Dfabric.autoTest",
)
jvmArgs(debugArgs)
@@ -732,7 +740,10 @@ subprojects.each {
}

// These modules are not included in the fat jar, maven will resolve them via the pom.
def devOnlyModules = ["fabric-gametest-api-v1",]
def devOnlyModules = [
"fabric-client-gametest-api-v1",
"fabric-gametest-api-v1",
]

dependencies {
afterEvaluate {
@@ -750,19 +761,42 @@ dependencies {
}
}

remapJar {
afterEvaluate {
subprojects.each {
if (it.name in devOnlyModules || metaProjects.contains(it.name)) {
return
}
configurations {
nestedJars {
transitive = false
}
}

// Include the signed or none signed jar from the sub project.
nestedJars.from project("${it.path}").tasks.getByName("signRemapJar")
dependencies {
subprojects.each {
if (it.name in devOnlyModules || metaProjects.contains(it.name)) {
return
}

nestedJars project("${it.path}")
}
}

remapJar {
nestedJars.from configurations.nestedJars
}

// Attempt to create a single jar with all files from all nested jars, this will fail if there are duplicate files.
tasks.register("checkNoDuplicateFiles", Zip) {
inputs.files configurations.nestedJars
destinationDirectory = layout.buildDirectory.dir("test")

from {
configurations.nestedJars.files.collect { zipTree(it) }
}

// We expect these files to be duplicated, so exclude them.
exclude 'META-INF/**'
exclude 'fabric.mod.json'
}

check.dependsOn "checkNoDuplicateFiles"

publishMods {
file = signRemapJar.output
changelog = providers.environmentVariable("CHANGELOG").getOrElse("No changelog provided")
5 changes: 5 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -208,5 +208,10 @@
<module name="MatchXpath">
<property name="query" value="//VARIABLE_DEF[./TYPE/IDENT[@text='var'] and not(./ASSIGN/EXPR/LITERAL_NEW)]"/>
</module>

<!-- Prevent public records in API packages -->
<module name="MatchXpath">
<property name="query" value="//RECORD_DEF[./MODIFIERS/LITERAL_PUBLIC][//PACKAGE_DEF//DOT/IDENT[@text='api']]"/>
</module>
</module>
</module>
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.15.11",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-command-api-v2": "*"
},
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.15.11",
"fabricloader": ">=0.16.10",
"fabric-api-base": "*",
"fabric-command-api-v2": "*"
},
Original file line number Diff line number Diff line change
@@ -174,12 +174,13 @@ boolean isVerbose() {
createMapEntry(RegistryKeys.ITEM, "hoes", ItemTags.HOES),
createMapEntry(RegistryKeys.ITEM, "shovels", ItemTags.SHOVELS),
createMapEntry(RegistryKeys.ITEM, "swords", ItemTags.SWORDS),
createMapEntry(RegistryKeys.ITEM, "wrenches", "tools/wrenches"),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "axes"), ItemTags.AXES),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "pickaxes"), ItemTags.PICKAXES),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "hoes"), ItemTags.HOES),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "shovels"), ItemTags.SHOVELS),
createMapEntry(createTagKeyUnderFabric(RegistryKeys.ITEM, "swords"), ItemTags.SWORDS),
createMapEntry(RegistryKeys.ITEM, "wrenches", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.WRENCH_TOOLS),
createMapEntry(RegistryKeys.ITEM, "tools/wrenches", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.WRENCH_TOOLS),
createMapEntry(RegistryKeys.ITEM, "barrel", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.BARRELS),
createMapEntry(RegistryKeys.ITEM, "chest", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.CHESTS),
createMapEntry(RegistryKeys.ITEM, "glass", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.GLASS_BLOCKS),
@@ -215,7 +216,12 @@ boolean isVerbose() {
createMapEntry(RegistryKeys.ITEM, "stews", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.SOUP_FOODS),
createMapEntry(RegistryKeys.ITEM, "candy", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.CANDY_FOODS),
createMapEntry(RegistryKeys.ITEM, "candies", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.CANDY_FOODS),
createMapEntry(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "music_discs")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.MUSIC_DISCS)
createMapEntry(RegistryKeys.ITEM, "pie", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.PIE_FOODS),
createMapEntry(RegistryKeys.ITEM, "pies", net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.PIE_FOODS),
createMapEntry(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "music_discs")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.MUSIC_DISCS),
createMapEntry(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "tall_flowers")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.TALL_FLOWERS),
createMapEntry(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "flowers")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags.FLOWERS),
createMapEntry(TagKey.of(RegistryKeys.BLOCK, Identifier.of("minecraft", "tall_flowers")), net.fabricmc.fabric.api.tag.convention.v2.ConventionalBlockTags.TALL_FLOWERS)
);

@Override
@@ -234,7 +240,9 @@ private static void setupLegacyTagWarning() {
// We only care about vanilla registries
dynamicRegistries.streamAllRegistries().forEach(registryEntry -> {
if (registryEntry.key().getValue().getNamespace().equals(Identifier.DEFAULT_NAMESPACE)) {
registryEntry.value().streamTags().forEach(tagKey -> {
registryEntry.value().streamTags().forEach(listEntry -> {
TagKey<?> tagKey = TagKey.of(registryEntry.key(), listEntry.getTag().id());

// Grab legacy tags we migrated or discourage
if (LEGACY_C_TAGS.containsKey(tagKey)) {
legacyTags.add(tagKey);
Loading