Git Product home page Git Product logo

fabricmc.net's Introduction

fabricmc.net

This repository contains the source code and content for https://fabricmc.net/. Jekyll is used as the static site generator. A small TypeScript Svelte project located in /scripts powers the interactive parts of the site.

License

The code is licensed as MIT as detailed in LICENSE, unless otherwise indicated.

The contents of this website, unless otherwise indicated, are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Develop using Docker dev container.

Install Docker and VSCode on the host, no need to install NodeJS or Ruby on the host.

  • Open dev container with vscode
  • Run bundle install && bundler exec jekyll serve in a terminal
  • In a second terminal, run: cd scripts, npm i, npm run dev
  • http://localhost:4000/

Build

Prerequisites

Install Jekyll

Ensure that the Ruby dependencies are installed locally, not system-wide:

bundle config set --local path 'vendor/bundle'
bundle install 

From then on, run Jekyll using bundle exec jekyll <args> to use the local version.

Build JavaScript Assets

Install the JavaScript dependencies by running npm install in the javascript subdirectory.

Then build the JavaScript bundle using npm run build.

Build Site

bundle exec jekyll build

This will build the site into the _site folder.

Developing the Site

To run a local development server to more comfortably edit the site, run:

bundle exec jekyll serve

Then open http://localhost:4000 in your browser of choice. The site should update automatically as you change the files.

Docker

Used to build and run a production like server.

  • docker build -f Dockerfile.dev -t fabricmc-net .
  • docker run -p 8080:80 fabricmc.net
  • http://localhost:8080/

fabricmc.net's People

Contributors

apple502j avatar deirn avatar imb11 avatar its-miroma avatar jamieswhiteshirt avatar juuxel avatar kdkasad avatar kevinthegreat1 avatar lino-levan avatar michaelhillcox avatar modmuss50 avatar omay238 avatar shnupbups avatar sydist avatar tahmid-23 avatar tiphainelaurent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fabricmc.net's Issues

Hide snapshot versions on the "develop" page

With over 300 entries, the Minecraft version selection dropdown is becoming too cumbersome to navigate. I suggest hiding snapshot versions by default (except maybe the most recent ones of the current development cycle), and adding a Show Snapshots checkbox next to the dropdown, like in the Fabric Installer:
image

Downloading the installer can be confusing for new users

I am helping over a few communities and I have observed that people are confusing the installer version for fabric with the version that they want to install, and to be fair it can be confusing.
Imagine this, someone never used fabric before and is asked to install version 0.15.0 specifically to play a desired mod, they go to the page and first thing they see is this. What do you think that person would think, that the 0.11.2 refers to the fabric version that will be installed or refer to the version of the program that will install fabric?
image

I can tell you that there are people that see just the first option which is fair and try to change that version to 0.15.0 but can't find it there, going back to ask what to do in that situation. After all, this line is even before the download, so it appears like "download xxx fabric version".

I would recommend changing it to be less confusing for these people. Perhaps moving it below the download button next to jar option, saying "Previous versions of the installer" or "Archived versions" or something like that. That way, people that waned to download an older version of the installer could still do that and wouldn't be confusing for anyone. And besides that, why would an average user of fabric even care for the installer version? They just want to install fabric and have fun with mods, and thus I don't see a point in showing it in the main page for download as it draws confusion.

Download page is broken in Firefox and Edge

I suspect something in the recent changes is the culprit here, but nothing jumped out when I was looking at the code. There is a JS error on the page about a re-declaration of a variable (see screenshots below).

Environment:
Windows 11
Firefox and Edge (Chrome seems to work)

image

image

Edit:
For reference, this is the entirety of the download page. I have tried multiple browsers and both light/dark themes.

image

Bug

The fabric 0.6.0.41 jar is can't download
Please use the PCL2 launcher to download the fabric 0.6.0.41 and you will see the 404 error.

mod template generator forces kebab-case over snake_case for mod ids

hey!
first off, the mod template generator is amazing, great work with it! I just have one little nitpick that is the generated mod id using kebab-case over snake_case. At Quilt we encourage snake_case, and it would be fantastic if Fabric could adopt this convention too.

(Template Generator Suggestion) Parchment Mappings

What ?

  • Add a tick box option to use Parchment mappings.

Why ?

  • For the convenience of Parchment-lovers don't have to spend 10 more minutes to lurking around times to times just to add the mappings in their project every time whenever they start a new fabric mod project.

any command doesn't work

any command doesn't work
chat says this in red color:
cannot invoke com.mojang.brigadier.commanddispatcher.execute (String, Object) because net,fabricmc.fabric.impl.command.client.ClientCommandInternals.activeDispather is null
re-launching game or re-entering the world does not work too.

Mod template generator: fabric-language-kotlin version is wrong

When generating a template with "Kotlin Programming Language" option enabled, the output has incorrect version specification of fabric-language-kotlin in src/main/resources/fabric.mod.json.

expected

"fabric-language-kotlin": ">=1.11.0"

actual

"fabric-language-kotlin": ">=2.0.0"

It results in following error:

net.fabricmc.loader.impl.FormattedException: Some of your mods are incompatible with the game or each other!
次の解決策を試してみてください:
- Mod 'Fabric Language Kotlin' (fabric-language-kotlin) 1.11.0+kotlin.2.0.0 を バージョン 2.0.0 またはそれ以上 で置き換える。
満たされていないModの依存関係:
- Mod 'test' (test) 1.0.0 は バージョン 2.0.0 またはそれ以上 の Mod 'Fabric Language Kotlin' (fabric-language-kotlin) を必要としますが、異なるバージョンのModが読み込まれています: 1.11.0+kotlin.2.0.0!

Template mod generator: Allow selection of license other than CC0

In my experience as a moderator for Modrinth, one of the most common rejection reasons is invalid metadata. Most commonly it relates to licensing, where they will select one license on Modrinth but still have the default CC0-1.0 license in their LICENSE file and in the fabric.mod.json.

If this template generator is going to eventually become the recommended way of creating a new mod, the one improvement I would like to see the most is to not assume that everyone is going to use CC0. Instead, the user should be prompted to select their own license, like how the MinecraftDev plugin does it:
image
Or how Modrinth does it:
image

Ideally there would also be a link to one of the many useful guides for choosing a license, such as GitHub's choosealicense.com or Modrinth's licensing guide.

[Suggestion] Docs not indexed by search engines

Hey !

Sometimes, I want to search from my browser a mapping of yarn for a specific version of minecraft. The
perfect query for that is site:https://maven.fabricmc.net/docs/yarn-1.19.4+build.2/ class_1234 but there is one condition. In this case, Google, need to have indexed the page http://maven.fabricmc.net/docs/yarn-1.19.4+build.2/index.html but because nothing is refering to this page, Google (or other search engines) doesn't know that this page exist...

This could be really easily implemented with sitemaps.

Sitemaps contain the list of all url of page with important content in it. And good news, in the sitemap, you only need to provide the maven.fabricmc.net/docs/<project>/index.html because the search engine will scrap the rest of the page ! Also, sitemaps doesn't need to be at the root of the domain ! It could be for example be at maven.fabricmc.net/docs/sitemap.xml and be ref on a robots.txt (that need to be at root... but can be hided like the docs/ dir)

So if you don't have the time to open your best IDE and only have your phone but no tools other that a web browser to check quickly, you could do it !

PS: Sorry if it's not the right place to make a issue for maven.fabricmc.net, but I didn't found a better choice

Template mod generator not including src/main/generated in build.gradle

specifically this code:

sourceSets {
    main {
        resources {
            srcDirs += [
                    'src/main/generated'
            ]
        }
    }
}

a previous version of the generator did put that in build.gradle but now it doesn't
this issue causes the files to generate correctly but when running ./gradlew runClient the game just ignores the src/main/generated folder
(src/main/generated is all the assets and data generated by datagen)
(with the data generation option enabled)

Data generation should use the Loom DSL

Currently, the template specifies source sets and run configurations explicitly for projects using data generation:

<% if (it.dataGeneration || it.splitSources) { %>
loom {
<% if (it.splitSources) { %> splitEnvironmentSourceSets()
mods {
"<%= it.modid %>" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
<% } %><% if (it.dataGeneration) { %> runs {
// This adds a new gradle task that runs the datagen API: "gradlew runDatagen"
datagen {
inherit server
name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}"
vmArg "-Dfabric-api.datagen.modid=<%= it.modid %>"
runDir "build/datagen"
}
}<% } %>
}
<% } %><% if (it.dataGeneration) { %>
// Add the generated resources to the main source set
sourceSets {
main {
resources {
srcDirs += [
'src/main/generated'
]
}
}
}<% } %>

The fabricApi.configureDataGeneration DSL added in FabricMC/fabric-loom@8c7c14e can be used instead to simplify configuration and make the configuration more resistant to smaller details such as reproducibility.

Mod template generator: various improvements

Here are a few improvements I can think of.

  • Create a test(mod) entrypoint along with the main and client entrypoints
  • Change tabs (\t) in ExampleMod and in ExampleModClient to spaces
  • Fix the entrypoint being com.example.ExampleMod(Client), as it should be com.example.examplemod.ExampleMod(Client)
  • Add inputs for the mod description, license, etc

Server crash

crash-2022-10-24_14.46.39-server.txt
---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.

Time: 2022-10-24 14:46:39
Description: Exception in server tick loop

java.lang.RuntimeException: Mixin transformation of net.minecraft.class_2535 failed
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:419)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at net.minecraft.class_3242.method_14354(class_3242.java:87)
at net.minecraft.class_3176.method_3823(class_3176.java:142)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:636)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:414)
... 9 more
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [carpet.mixins.json:Connection_packetCounterMixin from mod carpet] from phase [DEFAULT] in config [carpet.mixins.json] FAILED during APPLY
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:589)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:379)
... 12 more
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @Inject annotation on packetOutCount could not find any targets matching 'Lnet/minecraft/class_2535;method_10764(Lnet/minecraft/class_2596;Lio/netty/util/concurrent/GenericFutureListener;)V' in net.minecraft.class_2535. Using refmap fabric-carpet-refmap.json [PREINJECT Applicator Phase -> carpet.mixins.json:Connection_packetCounterMixin from mod carpet -> Prepare Injections -> -> handler$zel000$packetOutCount(Lnet/minecraft/class_2596;Lio/netty/util/concurrent/GenericFutureListener;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V -> Parse]
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.validateTargets(InjectionInfo.java:656)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.findTargets(InjectionInfo.java:587)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.readAnnotation(InjectionInfo.java:330)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.(InjectionInfo.java:316)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.(InjectionInfo.java:308)
at org.spongepowered.asm.mixin.injection.struct.CallbackInjectionInfo.(CallbackInjectionInfo.java:46)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo$InjectorEntry.create(InjectionInfo.java:149)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parse(InjectionInfo.java:708)
at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1330)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1043)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:393)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325)
at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421)
at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
... 12 more

A detailed walkthrough of the error, its code path and all known details is as follows:

-- System Details --
Details:
Minecraft Version: 1.19.1
Minecraft Version ID: 1.19.1
Operating System: Windows 10 (amd64) version 10.0
Java Version: 18.0.2.1, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
Memory: 318132232 bytes (303 MiB) / 574619648 bytes (548 MiB) up to 5368709120 bytes (5120 MiB)
CPUs: 4
Processor Vendor: GenuineIntel
Processor Name: Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
Identifier: Intel64 Family 6 Model 42 Stepping 7
Microarchitecture: Sandy Bridge (Client)
Frequency (GHz): 2.49
Number of physical packages: 1
Number of physical CPUs: 2
Number of logical CPUs: 4
Graphics card #0 name: NVIDIA GeForce GT 525M
Graphics card #0 vendor: NVIDIA (0x10de)
Graphics card #0 VRAM (MB): 1024.00
Graphics card #0 deviceId: 0x0df5
Graphics card #0 versionInfo: DriverVersion=23.21.13.9135
Graphics card #1 name: Intel(R) HD Graphics 3000
Graphics card #1 vendor: Intel Corporation (0x8086)
Graphics card #1 VRAM (MB): 2108.00
Graphics card #1 deviceId: 0x0126
Graphics card #1 versionInfo: DriverVersion=9.17.10.4459
Memory slot #0 capacity (MB): 4096.00
Memory slot #0 clockSpeed (GHz): 1.33
Memory slot #0 type: DDR3
Memory slot #1 capacity (MB): 2048.00
Memory slot #1 clockSpeed (GHz): 1.33
Memory slot #1 type: DDR3
Virtual memory max (MB): 7699.94
Virtual memory used (MB): 4724.28
Swap memory total (MB): 1664.00
Swap memory used (MB): 69.13
JVM Flags: 1 total; -Xmx5G
Fabric Mods:
carpet: Carpet Mod 1.4.82
carpet-fixes: Carpet Fixes 1.19-1.11.2
com_github_llamalad7_mixinextras: MixinExtras 0.0.6
conditional-mixin: conditional mixin 0.3.0
fabric: Fabric API 0.58.5+1.19.1
fabric-api-base: Fabric API Base 0.4.9+e62f51a395
fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.7+9ff28f4095
fabric-biome-api-v1: Fabric Biome API (v1) 9.0.15+d5533c0195
fabric-command-api-v1: Fabric Command API (v1) 1.2.9+f71b366f95
fabric-command-api-v2: Fabric Command API (v2) 2.1.5+0c17ea9695
fabric-commands-v0: Fabric Commands (v0) 0.2.26+df3654b395
fabric-containers-v0: Fabric Containers (v0) 0.1.31+df3654b395
fabric-content-registries-v0: Fabric Content Registries (v0) 3.2.1+07df213e95
fabric-convention-tags-v1: Fabric Convention Tags 1.0.8+37622d2495
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.3+bd0a0d4a95
fabric-data-generation-api-v1: Fabric Data Generation API (v1) 5.1.5+a680b9b495
fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.28+a6d2f78595
fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.16+9ff28f4095
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.26+9ff28f4095
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.26+df3654b395
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.19+1899036195
fabric-item-api-v1: Fabric Item API (v1) 1.5.5+35a03c4395
fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.26+9ff28f4095
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.1.0+33fbc73895
fabric-loot-api-v2: Fabric Loot API (v2) 1.1.1+03a4e56895
fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.1.4+9e7660c695
fabric-message-api-v1: Fabric Message API (v1) 5.0.1+4e0178f495
fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.1.11+33fbc73895
fabric-networking-api-v1: Fabric Networking API (v1) 1.2.1+3082331495
fabric-networking-v0: Fabric Networking (v0) 0.3.18+df3654b395
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 4.0.8+9ff28f4095
fabric-particles-v1: Fabric Particles (v1) 1.0.8+dc39553a95
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.9.21+23c4cfef95
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.12+9ff28f4095
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.0.5+9ff28f4095
fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.0.9+e62f51a395
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.5.6+5f1a85e095
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.2.10+9ff28f4095
fabric-transfer-api-v1: Fabric Transfer API (v1) 2.0.9+e62f51a395
fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 1.1.1+9e7660c695
fabricloader: Fabric Loader 0.14.9
java: Java HotSpot(TM) 64-Bit Server VM 18
minecraft: Minecraft 1.19.1
nochatreports: No Chat Reports 1.19.1-v1.8.1
skinrestorer: Skin Restorer 1.1.0
voicechat: Simple Voice Chat 1.19.1-2.3.9
Server Running: true
Data Packs: vanilla, Fabric Mods
World Generation: Stable
Is Modded: Definitely; Server brand changed to 'fabric'
Type: Dedicated Server (map_server.txt)

Suggestion:Add a Fabric fourms

can you add a website like: fourms.fabricmc.net thanks

topics:
announcements
User Help
Mod development help
Off-topic
Post your Projects here

fabric is the only one that does not have a forums page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.