Jump to content

[Request] Documentation for all Forge-provided 1.8 model features


williewillus

Recommended Posts

I am a very strong proponent of everyone updating and moving to 1.8 and the newer, faster ways of doing things. However, I think that part of the reason why migration and adoption is so slow is because there is little to no documentation for any of Forge's additions to the model system, and we as modders are simply not aware of the things that we can (still) do with Forge's provisions in 1.8. (For example, I did not know something like Botania's animated lexica opening animation was possible with 1.8's static models, but apparently it is!)

 

I'm talking about everything from flexible models, perspective aware models, to ModelStates, smart models, animations in b3d and obj, the model baking pipeline (how do you even use it?), transforms, the custom state file format, etc.

 

Documentation is nearly nonexistent and the classes are not documented very clearly - I've tried trudging through the code and for people who aren't very versed in computer graphics, it's not immediately clear how everything fits together ("what's a TRSR? why is there scary linear algebra everywhere? I want my ISBRH's back! *sob*"). The examples on the forge debug folder are simply debug tests, and do not cover most common use cases either.

 

My request is that we get together and write some sort of "complete guide" to the 1.8 rendering system. This could range from simple descriptions of the classes and what to use when, to the full runtime code path of what happens when (mainly focusing on Forge stuff and where Forge hooks in, etc.). We could do it here and I'll add it to the main post as information comes along. As it gets fleshed out, we can move to the readthedocs repo

 

Thoughts?

 

The full block model rendering system:

 

 

Loading: ?

Rendering: ?

 

 

 

The full item model rendering system:

 

 

Loading: ?

Rendering: ?

 

 

 

Useful features added by Forge:

 

 

ISmartBlockModel:

ISmartItemModel:

Forge Blockstate Jsons:

 

 

Link to comment
Share on other sites

1. Don't do this here. It's forum, everything not pinned will be lost or not really "official" in a long run.

 

2. See that "Wiki" in forum's header list? If you have time - be my guest and start contributing. That is probably ONLY place that will presist through modders coming and going in future relases.

 

3. Someone has to start, and trust me - starting is the hardest part. Once there is something - maybe people will realize that it would be much better for everybody if instead of posting everyting 1000 times on this forum, just go and spend some time to write few times longer page on wiki, covering all future cases. Seriously - there is about 50+ same threads regarding one topic, sometimes they can be counted in hundreds. But when you think about it - forum will get quiet without questions, therefore - less "public discoveries" and "community thinking".

 

4. Official documentation won't help - if you are lazy, even code on plate won't be enough. To find out what can be done in 1.8+, you just need to literally sneak-peak on this forum and read few threads. Then - just look at code. Indeed - some of it is confusing, but then again: covering all cases is impossible, and there will always be questions.

 

5. I guess that writing post on forum (and debates) with helpful content gives much more satisfaction that just hitting buttons to put info on wiki. Human interaction (through forum) is quite important part of why this community exists, I personally would get bored after some time writing wikis (which I did a lot and still do, not Forge tho), knowing that there is possibility of noone reading it.

 

6. Finally: There has been a LOT of talking about making "official", more static knowledge base - but it was almost always only talking, most of tutorials are created by singularities and when it comes to creating something bigger - they are left alone to their development and only talk that presists is this forum (and maybe others). If you expect something that will PRESIST, you (in terms of "someone") should be one to start it and keep it going. People will come and go, but there must be this feeling that somebody is there - both creating it and using it. If that is not your (again in terms of "someone" not OP particular) intention, then I am pretty sure that MAIN reason why someone would want that it to make things easier for him (ofc. him will result in whole community, but creating public stuff for own benefit is less noble than creating something for others).

 

Now that this (very inspiring... xD) monologue is done - everyone who read it should really consider if they'd be up to actually making something useful and say it. It is NOT a big deal to make few wiki pages and put stuff in there - every forum user has access to editing.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Sounds like a very good idea to me. Reading threads and trying things I have been able to get a handle on many things around Forge modding, but the rendering pipeline and custom network packets are two things that always prove elusive. I figured out simple blocks and the basic json model format, and TESR's are pretty simple, but as soon as you move beyond that I've had a hard time keeping track of things, and while the MinecraftByExample samples are certainly helpful, they aren't always easy to follow.

 

The only problem I see with using the wiki for this is that the vast majority of the information in there is very out of date (or seemingly is anyway). Any time I've ventured in there to figure out how to do something, I've only been able to find examples from Minecraft 1.4 or 1.5, or just links back into these forums (and occasionally to broken links) and thus quickly end up back on the forums reading through threads. Keeping information up to date is definitely the difficult part of such an endeavor, and while a forum might not be the best format for that, I question if the wiki in its current form is very much better.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
    • It is an issue with quark - update it to this build: https://www.curseforge.com/minecraft/mc-mods/quark/files/3642325
    • Remove Instant Massive Structures Mod from your server     Add new crash-reports with sites like https://paste.ee/  
    • Update your drivers: https://www.amd.com/en/support/graphics/amd-radeon-r9-series/amd-radeon-r9-200-series/amd-radeon-r9-280x
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.