neoforged / documentation Goto Github PK
View Code? Open in Web Editor NEWThe repository containing Neo's documentation
License: MIT License
The repository containing Neo's documentation
License: MIT License
Since we yeeted PlantType system, might be good to document the replacements so people know about it and to check it out.
Pr with all the details: neoforged/NeoForge#971
ToolAction -> ItemAbility
ToolActions -> ItemAbilities
The PR with the info if needed: neoforged/NeoForge#1148
A glossary explaining some general terms related to modding in 1-2 sentences, as well as stuff not really applicable elsewhere (e.g. the question "What is a Level
?"), would probably be nice.
Will be linked into this gist
https://gist.github.com/TelepathicGrunt/4de77c67adb661c9380e594d20b6a58b
ITagManager
Forge wrapped registries provide an additional helper for creating and managing tags through
ITagManager
which can be obtained viaIForgeRegistry#tags
. Tags can be created using using#createTagKey
or#createOptionalTagKey
. Tags or registry objects can also be checked for either or using#getTag
or#getReverseTag
respectively.
Forge no longer wraps registries and ITagManager
does not exist.
添加多种文字语言,或者添加其他国家的语言
Add multiple written languages, or add languages from other countries
The PR:
neoforged/NeoForge#789
This need updating
https://docs.neoforged.net/docs/resources/server/recipes/ingredients
Will be linked into this gist
https://gist.github.com/TelepathicGrunt/4de77c67adb661c9380e594d20b6a58b
In FancyModLoader DistExecutor is marked deprecated and will be removed. so we should now stop directing users to it.
https://github.com/neoforged/Documentation/blob/main/docs/concepts/sides.md?plain=1#L31-L66
This section should be rewritten to demonstrate other ways of checking physical sides without class loading issue.
Commands can be very simple on face value but when you start wanting to include custom argument types then it can become quite complex. Having documentation to help people on how to write and register custom commands could be really helpful, as well as documentation on how to create and use custom arguments too
There's one minor issue here, which is in 1.20.5+ the docs still reference RegisterPayloadHandlerEvent
(singular) instead of the RegisterPayloadHandlersEvent
(plural).
Then there's a slightly larger issue, which is we actually have no instructions on how to send CustomPacketPayload
(s). There are no references to PacketDistributor
anywhere. I don't think we need comprehensive instruction on that class, but we need to mention that it exists.
https://docs.neoforged.net/docs/resources/server/recipes/#terminology has duplicate use of minecraft:recipe_shapeless
by the RecipeType
bulletin point.
Will be linked into this gist
https://gist.github.com/TelepathicGrunt/4de77c67adb661c9380e594d20b6a58b
The 1.19 versions of the docs were removed in the move to Docasaurus [8dbb7fe], but the versions dropdown menu still contains the 1.19 link and it now leads to a Docasaurus quick-start tutorial.
The "Access Transformers" topic page doesn't reflect the changes made in NeoForge 20.2. This page should be updated to reflect the new support for multiple AT files and the added mods.toml
configuration.
New ingredient should be added here: https://docs.neoforged.net/docs/resources/server/recipes/ingredients
Original PR here: neoforged/NeoForge#976
My code for sorting creative categories, this should work yet it doesn't
`private void addAfter(BuildCreativeModeTabContentsEvent event, Item beforeItem, Item item) {
event.getEntries().putAfter(beforeItem.getDefaultInstance(), item.getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
private void addAfter(BuildCreativeModeTabContentsEvent event, Block beforeItem, Item item) {
event.getEntries().putAfter(beforeItem.asItem().getDefaultInstance(), item.getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
private void addAfter(BuildCreativeModeTabContentsEvent event, Item beforeItem, Block item) {
event.getEntries().putAfter(beforeItem.getDefaultInstance(), item.asItem().getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
private void addAfter(BuildCreativeModeTabContentsEvent event, Block beforeItem, Block item) {
event.getEntries().putAfter(beforeItem.asItem().getDefaultInstance(), item.asItem().getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
private void addBefore(BuildCreativeModeTabContentsEvent event, Block beforeItem, Block item) {
event.getEntries().putBefore(beforeItem.asItem().getDefaultInstance(), item.asItem().getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
private void addBefore(BuildCreativeModeTabContentsEvent event, Item beforeItem, Item item) {
event.getEntries().putBefore(beforeItem.getDefaultInstance(), item.getDefaultInstance(), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
public void creativeItemGroups(BuildCreativeModeTabContentsEvent event) {
if (event.getTabKey() == CreativeModeTabs.COLORED_BLOCKS) {
addAfter(event, Blocks.PINK_GLAZED_TERRACOTTA, KekeBlocks.TERRACOTTA_SHINGLES.get());
addAfter(event, KekeBlocks.TERRACOTTA_SHINGLES.get(), KekeBlocks.TERRACOTTA_SHINGLE_STAIRS.get());
addAfter(event, KekeBlocks.TERRACOTTA_SHINGLE_STAIRS.get(), KekeBlocks.TERRACOTTA_SHINGLE_SLAB.get());
addAfter(event, KekeBlocks.TERRACOTTA_SHINGLE_SLAB.get(), KekeBlocks.TERRACOTTA_SHINGLE_WALL.get());
}`
Result is items being the correct category but unsorted
I asked someone for help to see if my code was the issue and they said this!
The contributing guidelines have recently been established, so every page needs to be updated to support the new guidelines. To that end, every page will be reviewed and rewritten/reformatted as required. The changes should target the at-the-time latest version of NeoForge.
I have assigned myself since I will eventually redo all the pages, but anyone is welcome to help contribute.
These are a list of docs that are needed or highly recommended to have on NeoForged.
onBlockStartBreak
does not exist on 1.20.6 but it is still mentioned here: https://docs.neoforged.net/docs/blocks/#the-actually-breaking-stage
The current documentation is in these gists
https://gist.github.com/Matyrobbrt/832c0d88a90ae15f5f665bb794a48198
https://gist.github.com/Matyrobbrt/cac2427748a51ff2bfc82fcd03606b55
It requires a dependency of net.neoforged:testframework
using the same version as NeoForge and ran with runGameTestServer
runs.
The init method needs to be called in a mod entry point.
Step 4 under "From Zero to Modding" contains outdated information for run configs. genIntellijRuns
and genEclipseRuns
no longer exist. This issue was already reported on the MDK repository in this pull request a few weeks ago.
Documentation needs to be written up for entities. However, entities themself are such a broad topic, making it difficult to condense into a reasonable writing and review process for a single PR. As such, this issue is mean to track what should be documented about entities, which can then be split into separate PRs as necessary
In section about armor and ArmorMaterial
:
// Optionally, you can also override #getArmorTexture here. This method returns a ResourceLocation
// that determines where the armor location is stored, in case you want to store it in a non-default location.
// See the default implementation in Tier for an example.
#getArmorTexture
is not defined in both ArmorMaterial
and Tier
. Instead it's method from IItemExtension
which is for 3d model. It's mentioned later in same section:
Besides the usual resources, armors also need a worn armor texture that will be rendered over the player model when the armor is equipped. This texture must be located at
src/main/resources/assets/<mod_id>/textures/models/armor/<material>_layer_1.png
for the helmet, chestplate and boots textures, and in the same directory at<material>_layer_2.png
for the leggings.
https://github.com/neoforged/Documentation/blame/main/docs/datastorage/saveddata.md#L21
DimensionDataStorage#computeIfAbsent
takes in three arguments: a function to load NBT data into a SD and return it, a supplier to construct a new instance of the SD, and the name of the.dat
file stored within thedata
folder for the implemented level.
On 1.20.2, it takes in 2 arguments instead. The first argument is a record instead of function. The record in which takes in default constructor for the Saved Data, NBT deserializer, and nullable DFU Type.
Nowadays, the PayloadRegistrar sends all handlers to the main thread by default. However, the documentation (https://docs.neoforged.net/docs/networking/payload/) not only doesn't mention that it can do that but explicitly says the handlers run on the network thread.
something like RegistryObject still in it...
Add docs on TriState
as well.
It is a common question from new users for how to view Minecraft sources. It would be nice to have a page that helps new modders know to use the tools of their IDE and where the mc source library itself is.
From there, the modders can learn more about their IDE which they can explore the IDE docs themselves for more stuff. We also then help them know what the recommended ways of viewing mc sources are (not trying to decompile mc source files from prod or something lol)
Many documents still use RegistryObject
and ForgeRegistries
. These should be updated.
So, I'm starting in minecraft modding, and found it very unclear when trying to change the name of my mod. As it reads on the document, on the section "Customizing Your Mod Information"
"Many of the basic properties of your mod can be changed in the gradle.properties file. This includes basic things like the mod name or the mod version."
Further by investigating, you stumble across mod files and find the definition of the property "mod_id"
"The id of your mod. This should be something unique and memorable, as having two mods with the same id will prevent the game from loading. The mod id shows up in a lot of places, for example as the namespace for all your registered things, or as the namespace for your resource and data packs."
One starting would think that in order to change the mod name you would only need to change this variable, but it turns out that there are more elements that interfere when building the mod and are related to the name, so if you only changed that property, it would cause trouble for mods to properly build.
Might be redundant for some but wouldn't it be more clear to say or suggest in the for example that in order to change the name of the mod, there are other properties that need to be changed properly?
For example, in the definition of "mod_id":
"Note that this is not the only property related to the mod name, only changing this variable can create issues".
Regardless of that issue, thanks in advance for the support.
Description: I want the team to consider moving the current docs to use Starlight rather than Docusaurus 2.
As much as both documentation builders are great, in my opinon, I think starlight provides a more organised and faster approach to documentation with alot of features packed in. Since Starlight is built on top of Astro, you can use Astro's features inside Starlight to have more functionality with the docs.
I know I have mentioned 'alot of features' and you may be wondering what features does it have that makes is better than Docusaurus. Well, I can name a few but not all for example: Astro / Starlight is more faster and lightweight compared to Docusaurus. This means that it will take less time to build and load the pages up. The docs are very customisable and flexible, this means that the docs can be customised with plugins or add extra language support if needed. Extra language support means that markdown can be extended to support extra features outside of the markdown scheme. Finally, the looks and feel of Starlight, in my opinion, are so much better. I know that the last point is personal preference, but I truely believe that Starlight looks and performs much better than Docusaurus.
Now to the downsides of Astro / Starlight, luckily there is only one which is versioning support. Versioning support can really help organise your docs into seperate versions like the NeoForge docs have now (1.20.x and 1.19.x). In Starlight, there is no way to setup versioning for your docs however, this feature is being discussed and worked on here. I am not sure if NeoForged needs versioning desperately since NeoForge only has 1.20.x support, I know it will probably be needed for 1.21 for when that releases. That won't release for a couple of months so, the feature should be out by then.
Overall, I am sorry if this issue feels like I am in love with Starlight. This issue is mainly to try and convince the team to consider and maybe switch to using Astro / Starlight. Also, I am happy to help out the migration to Starlight if this issue gets accepted.
Currently sections in AT document is ordered like this:
Although it follows general progress of:
There isn't distinction between sections about AT syntax and Gradle config. I think all sections from Comments
to Examples
should be wrapped in new section Writing AT Specification
In sub-section Textuers, it says this:
Textures are drawn through blitting, hence the method name #blit, which, for this purpose, copies the bits of an image and draws them directly to the screen. These are drawn through a position texture shader. While there are many different #blit overloads, we will only discuss two static #blits.
The first static #blit takes in six integers and assumes the texture being rendered is on a 256 x 256 PNG file. It takes in the left x and top y screen coordinate, the left x and top y coordinate within the PNG, and the width and height of the image to render.
There isn't static method in GuiScreen
. and method it refers to seems to have this signature now: public void blit(ResourceLocation pAtlasLocation, int pX, int pY, int pUOffset, int pVOffset, int pUWidth, int pVHeight)
Because it is the only method with 256 constant
Hello i use neoforge-21.0.0-beta.
when i want to create an armor as shown on the site an error occured
Required type: Holder <net.minecraft.world.item.ArmorMaterial> Provided: ArmorMaterial
when i want to have more detail i noticed that i don't have the same
MDK-main/.gradle/repositories/ng_dummy_ng/net/neoforged/neoforge/21.0.0-beta/neoforge-21.0.0-beta.jar!/net/minecraft/world/item/ArmorMaterial.class and MDK-main/.gradle/repositories/ng_dummy_ng/net/neoforged/neoforge/21.0.0-beta/neoforge-21.0.0-beta-sources.jar!/net/minecraft/world/item/ArmorMaterial.java
i download the beta frome neoforge's site
public void onClientTick(ClientTickEvent event) {
if (event.phase == TickEvent.Phase.END) { // Only call code once as the tick event is called twice every tick
is wrong.
Packet handler is no longer passed a Supplier<NetworkEvent.Context>
it is passed the NetworkEvent.Context
directly.
public static void handle(MyMessage msg, Supplier<NetworkEvent.Context> ctx) {
ctx.get().enqueueWork(() -> {
// Work that needs to be thread-safe (most work)
ServerPlayer sender = ctx.get().getSender(); // the client that sent this packet
// Do stuff
});
ctx.get().setPacketHandled(true);
}
becomes
public static void handle(MyMessage msg, NetworkEvent.Context ctx) {
ctx.enqueueWork(() -> {
// Work that needs to be thread-safe (most work)
ServerPlayer sender = ctx.getSender(); // the client that sent this packet
// Do stuff
});
ctx.setPacketHandled(true);
}
Unsure if anything else there needs updating.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.