#Technical blocks

1 messages · Page 2 of 1

charred pasture
#

as soon as you add in a registry entry

#

not when the registry freezes

#

so i don't think that's possible

dire blade
#

hmm

#

this is where the exclusion list would be handy

charred pasture
#

that would be a big exclusion list

#

it would be for every single

#

block bop has

dire blade
#

hmm

#

then why

#

doesn't it crash

charred pasture
#

maybe for you

#

illicit blocks slows down

dire blade
#

for me everything generates and loads just fine

charred pasture
#

and bop manages to register block items

#

before illicit blocks can finish checking whether to add a block item

#

for a block

dire blade
#

maybe compilation or something?

charred pasture
#

it happen on run time

#

maybe you can

#

get it to happen

#

with more mods

#

installed

#

i don't think a lot of mods

#

expect their

#

identifier to be already taken

#

messing with other mod's namespaces

dire blade
#

oh

#

nevermind

#

terrestria crashed

#

it just failed to get info for render extensions apparently

charred pasture
#

erm

dire blade
#

only with illicititems does it do this

charred pasture
#

right here

#

Caused by: java.lang.IllegalStateException: Adding duplicate key 'ResourceKey[minecraft:item / terrestria:redwood_log]' to registry
at knot

dire blade
#

oh boy

charred pasture
#

imagine having to make an exclusion list

#

for every single mod

#

that adds blocks

#

and all the blocks in the mod

dire blade
#

just individual ones

charred pasture
#

it would be for all the blocks

#

that don't have yet a block item form

#

which the other mod (not illicit) is trying to add

#

but illicit intercepted it before that

dire blade
#

then no crash

charred pasture
#

like

#

you are going to have

#

to make your own exclusion list

#

that's gonna be like over hundreds of lines

#

especially in a mod pack

#

but a problem is

#

a block that illicitblocks is supposed to add in a block item for

#

it looks the same as a regular block

#

you just have to keep on excluding

#

see if it crashes or not (if the mod eventually registers a block item for it )

#

if you want i could probably

#

do something more invasive:

#

using a mixing to hook into minecraft registration code

#

and see if it already exists, if it is then stop continuing

#

because illicit blocks handled those

#

instead

#

this could break mod compatibility

dire blade
#

hmm

#

could that be a config option

charred pasture
#

the easiest way again is just adding in _illicit to the end of the items

charred pasture
dire blade
#

_illicit would break world upgrades and stuff

#

from like 1.7 to 1.21

#

I feel like with this

#

_illicit for duplicates only

#

or an exclusion list

charred pasture
#

a custom block

#

with _illicit

#

theres no block

#

biomesoplenty:white_sand_illicit

#

it will only make an item called

#

biomesoplenty:white_sand_illicit

#

but the actual block in game is still

#

biomesoplenty:white_sand

#

so it will survive world updates

dire blade
#

but I mean in chests and stuff

#

let's just say you have a lit redstone lamp

charred pasture
#

theres no actual block items being registered

#

if you have a piston_head block item in the chest

#

and then you remove the mod

#

the piston_head block item is gone

#

because the item doesnt actually exist

#

in the base game

dire blade
#

but

#

1.7 -> 1.21.5

dire blade
#

no _illicit and everything is fine

#

with _illicit gone

charred pasture
#

huh

#

the item is gone

#

the block item is gone

#

but if you were to actually

#

middle pick the block

#

or break it

#

it would still be fine i believe

#

even without the _illicit

#

i dont think thats how

#

it works

#

minecraft utilizes

#

something called datafixerupper

dire blade
#

no

#

this is upgrading a world

charred pasture
#

to upgrade blocks of old format

#

to new format

dire blade
#

yeah

charred pasture
#

my mod does not do that

dire blade
#

but 1.7 partially had it

#

IDs to blocks

charred pasture
#

well thats because it had their own vanilla stuff

dire blade
#

pretty sure the illicit ones would be the same

dire blade
#

others did too

charred pasture
#

i think as it stands

#

even without the _illicit

#

so like

#

minecraft:moving_piston

#

its never gonna be saved

#

if you upgrade minecraft versions

dire blade
#

later I'll test this idea of upgrading

#

can't at the moment

charred pasture
#

if you want i can make a mod

#

for 1.7

dire blade
#

no

charred pasture
#

that does something

dire blade
#

just no

#

forge is awful

charred pasture
#

i forgot

#

i dont even know how to use forge

dire blade
#

yeah

#

I think

charred pasture
#

fabric legacy exists

dire blade
#

yeah I know

charred pasture
#

i dont know if the vanilla datafixerupper would work with my mod

#

because

#

these block items are not really

#

considered in the datafixerupper

#

also

#

modded dfu is not really a thing

#

apparently it would be ground breaking

#

don't think there is a dfu to convert from ID versions of the custom blocks that illicit blocks have

#

to the string versions

#

maybe there is

#

im inexperienced with dfu

charred pasture
#

we would somehow have to map ids to current block items for the mc version upgrade to work

dire blade
#

leave it for before blockstates

#

so that would make the roadmap

#

exclusion list or whatever solution we come up with -> backwards compatibility -> blockstates

charred pasture
#

i'll add in exclusion list

#

but i'll test without

#

other mods

#

the user will have to create the exclusion list

#

for themselves

#

even then i dont believe backwards compatibility will exist

charred pasture
#

i pushed an update

#

put in ignored block identifiers to

dire blade
#

yay

#

thank you so much

#

this mod so far has just been a dream come true

charred pasture
#

so like what else should be added

dire blade
#

lang stuff

#

copying over any missing item lang from blocks

dire blade
#

only terrestria causes a crash

#

normal powder snow is fine

#

I think we can test different mods and make a default config

#

the problem is though that finding mods that potentially add blocks like these could be difficult

#

I think

#

this system is perfectly fine

#

but just needs some documentation for end users

charred pasture
#

whenever mc crash add that block to the exclusion list

#

maybe i guess

#

have the lang file

#

like

#

somehow make it so

#

it reuses the same name as the block the block item is copying off of

dire blade
#

block names -> the item names

dire blade
#

back on my computer

#

will test the new system

charred pasture
#

done

#

that was very easy

#

okay well

#

some translations are still broken

#

but thats fine

#

instead of

#
            BlockItem blockItem = new BlockStateBlockItem(block, new Item.Settings()
                    .registryKey(RegistryKey.of(RegistryKeys.ITEM, Registries.BLOCK.getId(block)))
            );
#

all i had to do was

#
            BlockItem blockItem = new BlockStateBlockItem(block, new Item.Settings()
                    .registryKey(RegistryKey.of(RegistryKeys.ITEM, Registries.BLOCK.getId(block)))
                    .useBlockPrefixedTranslationKey()
            );
#

the rest someone can add themselves

dire blade
#

OH

#

@charred pasture remember my world conversion thing

#

I put water and lava into a 1.7.10 chest

#

when upgrading they were preserved

charred pasture
#

Thats crazy

#

did they get turned into the illicit blocks

#

i have an idea

#

i'll just forego the backward compatibility for

#

other mods

#

but keep it for minecraft

#

so for other mods i'll just add in a _illicit

#

but for minecraft none

#

maybe add it in

#

as a default option

charred pasture
#

nice

dire blade
#

also

#

what can I use

charred pasture
dire blade
#

to detect the duplicate crash items

charred pasture
#

you can probably

#

like

charred pasture
#

ctrl + f

#

on your crash log

#

every time

dire blade
#

yeah

charred pasture
#

or automate it

#

with python

#

launch the game

#

parse log

#

relaunch

#

repeat

dire blade
#

so

#

is it exists in item reg: true

#

that is indicative of a crash

charred pasture
#

no

#

IllegalStateException

dire blade
#

hmm

#

rendering crashes

#

like literally nothing shows a proper block in the crash

charred pasture
#

send a crash log

dire blade
#

oh wait

#

in the actual crash log it tells you

charred pasture
#

yea

charred pasture
#

i'll probably make it a

#

option

#

default is true

dire blade
#

WHY DOES IT TRUNCATE THE LOG AAAAAAAAAAAAAAA

charred pasture
#

i can't imagine

#

launching septillion times

#

to find one block

#

to add to the ignore list

#

gotta automate it

dire blade
#

yeah

#

how can we

#

un-truncate logs

charred pasture
#

wdym

#

like

#

are you thinking of automating it

dire blade
#

but minecraft is truncating the logs

#

so instead of the full log we get and 9 more...

charred pasture
#

how are you viewing the log

dire blade
#

prismlauncher

#

opening in a text editor it is still truncated

charred pasture
#

huh i gotta rest

#

test

dire blade
#

we don't have many options

#

we need some way to automate this though

#

hmm

#

cursed idea

#

what if the mod name starts with a Z

#

biomes o plenty works and terrestria seems to load last

charred pasture
#

alphabetically

charred pasture
#

i opened it and it looks fine to me

#

in the .minecraft/crash-reports

dire blade
#

hmm

#

no 9 more?

#

at this point

#

wait

#

in the json

#

why not have ignored namespaces

#

and include too

#

so like this

charred pasture
#

huh

#

okay

#

then maybe

#

ignored identifiers

#

ignored namespace

#

include identifier (overrides everything else)

dire blade
#

exactly

#

I have tried excluding terrestria blocks and it seems like there isn't much hope

charred pasture
#

wdym hope

#

is it just

#

too much

dire blade
#

yeah

#

I excluded every wood type

#

but there's more stuff and I just don't feel like launching the game 50 times

#

maybe if

dire blade
#

illicititems were to automatically generate a file containing all unregistered blocks when you're ingame

#

and just save it somewhere

#

then that would be nice

#

autosaving to the exclusion list would be a bit destructive though

charred pasture
#

maybe i can include

#

a command

#

/dumpunregisteredblocks

#

that dumps unregistered blocks

#

to a txt file

dire blade
#

or maybe

charred pasture
#

or should it like

#

do it on startup

dire blade
#

not on startup

#

maybe once everything is frozen

charred pasture
#

idk how would you track that

dire blade
#

world entry

charred pasture
#

probably a command would be nice

dire blade
#

yeah

charred pasture
#

world entry

dire blade
#

or a function keybind

charred pasture
#

on world entry

dire blade
#

a function keybind would just work

charred pasture
#

a key bind?

#

to dump

dire blade
#

yeah

#

like maybe F4+X

charred pasture
#

maybe uhm

dire blade
#

although F4+I would probably be better

charred pasture
#

i'll have to add in a

#

config option

#

so that it doesn't

#

try adding block items

#

that crash the game

#

just puts them in a list

#

then once you want to actually use it

#

you turn it off

dire blade
#

so generate nothing

charred pasture
#

have to make it

#

you know not crash

dire blade
#

and run the command

#

it'll generate a file

#

then when you start the game again everything will register

charred pasture
#

command or key bind or both

dire blade
#

yeah

charred pasture
#

once you run the keybind

#

it'll set the add in block items

dire blade
charred pasture
#

option to true

#

so you don't need to set it manually

dire blade
#

my idea is

#

set config option to true

#

start the game

#

run F4+I or /illicitgen

#

it generates a file

#

and when you start the game again it reads the unregistered blocks so it knows what to register on startup

#

also with F4+I it would be nice to have it be universal

#

so not restricted to gameplay

#

making it as easy as waiting for the game to load to the menu and pressing F4+I

charred pasture
#

ok

dire blade
#

this system

#

would make everything way easier

#

you lose the dynamic part

#

but no compromises on namespaces or names

charred pasture
#

so

#

if there are

#

is like

#

if there is a file

#

called like

#

illicit_static.json

dire blade
#

yeah

charred pasture
#

it would dump everything to that file

dire blade
#

in config or something

#

it is configurable I guess

#

but you don't want to touch it

dire blade
#

in .minecraft/mods

#

also a small thing

#

small thing big difference with this one

#

loading item models as block models

#

quite a few would be broken but at least you can differentiate some stuff

charred pasture
#

what's going on

#

okay so for the static idea

#

illicitblocks.json

#

two new config stuff

#

use_static_list: true/false

#

static_list:

dire blade
#

yep perfect

#

if undefined

#

should static_list be ../mods/illicit_static.json

charred pasture
#

im thinking

#

it should be

#

an array of strings

#

so wait

#

use_static_list: false

#

if false then it's dynamic

#

respects the (ignore identifier, ignore namespace, include identifier)

#

if true then

#

it only registers the block items for the block identifiers in static_list

#

which by default is nothing

dire blade
#

yep

charred pasture
#

so nothing is loaded

dire blade
#

yeah exactly

charred pasture
#

then when you press keybind/run command

#

static_list gets updated

#

automatically

dire blade
#

yeah

charred pasture
#

so you relaunch

dire blade
#

and it reads

#

and registers accordingly

charred pasture
#

it should also respect the

#

ignore identifier/namespace

#

and include identifier

dire blade
#

yeah

#

yeah

charred pasture
#

so like no matter what include identifier array is loaded

dire blade
#

yeah

#

this is becoming quite the mod lol

charred pasture
#

but for

#

the ignore namespace/identifier

dire blade
#

yeah

charred pasture
#

if the thing is ignored should it still be added to the static_list

#

or not added

dire blade
#

yeah

#

but just ignored I guess

charred pasture
#

okay

dire blade
#

well actually

#

wait

dire blade
charred pasture
#

so ignore_identifiers/ignore_namespace

#

it will check if the block is in any of those

dire blade
#

they will have to regenerate

dire blade
dire blade
charred pasture
dire blade
#

yep

charred pasture
dire blade
#

put it in the inclusion list

charred pasture
#

yeah so uh

#

if it's in the included identifiers

dire blade
#

if a block is excluded they'll either have to regenerate or include

dire blade
charred pasture
#

then it gets loaded no matter what

dire blade
#

yeah exactly

charred pasture
#

okay

charred pasture
#

btw i dont think minecraft supports

#

modifier keys for the normal keybinds you see in controls

#

f4 + I

#

ill just make it right bracket for now

dire blade
#

hmm

#

I'm quite eager to test every change lol

#

also with the mod

#

from my ideas with it

#

you can probably tell that it's more about just

#

sort of like purity and cross compatibility

#

cross compatibility is pretty important though so the mod can be used backwards and forwards

#

essentially making the mod last as long as possible

charred pasture
#

trying to check if the registry is frozen

#

rn

#

because having it

#

be on the main menu

#

the keybind for it

#

maybe the registries arent frozen yet

#

theres no simple isfrozen thing

#

its also not gonna be configurable in game

dire blade
#

if it is frozen for the keybind

#

that's fine

#

it'll just enumerate and filter

dire blade
#

I don't think anyone would really need to set a different binding

charred pasture
#

okay i pushed some updates

#

press right bracket ] to dump

#

delete your old config file too

#

i forgot to add something

#

okay you can test now by compiling

#

pushed another commit

dire blade
#

yay

#

where is the list

#

uhh

#

so the keybind works

#

but it generates nothing

charred pasture
#

try pressing it again

#

the right bracket

#

]

#

did you also remember to

dire blade
#

yeah

charred pasture
#

delete your old config file

dire blade
#

yeah

charred pasture
#

does it say anything

#

in the log

dire blade
#

when dumping no errors

#

but at launch

#

it ignores literally everything

#

the config has no static data

charred pasture
#

what does it say

dire blade
#

in config

charred pasture
#

the logs

#

config too

#

i have an idea why

dire blade
#

ignoring block because not included in identifiers or whatever for the logs

charred pasture
#

does it say

dire blade
#

and "static_list": [] is in the config ignoring other stuff

#

nothing is manipulated using the 3 identifier things

charred pasture
#

Ignoring block because not in static and not in included identifiers

dire blade
#

static list is enabled

charred pasture
#

disable static list

#

use_static_list = false

#

then dump

#

the mod only dumps

dire blade
#

I can't launch it though due to terrestria

charred pasture
#

wowa

#

probably should uh

dire blade
#

what I had an idea for

#

was after the registry is frozen

#

just check through it as is used in startup

#

then write missing block -> item pairs

charred pasture
#

right now what it does is

#

it adds in the pairs (block item for block)

#

and adds it to an array

#

then whenever you press the ]

#

it saves that array into the config

#

i don't really check to see if the registry is frozen

#

i should make it so uh

#

maybe add in another config option

#

disable_blockitems

#

if true then it doesn't register the block items at all

#

though the logging is still kept

#

then you can use it

#

to dump

#

without crashing

#

seems very inflexible to me rn

#

but it'll do

#

okay done

#

i pushed another commit

#

delete old config file

#

so for your usecase

#

it would be

#
{
  "excluded_identifiers": [],
  "excluded_namespaces": [],
  "included_identifiers": [],
  "use_static_list": false,
  "register_block_items": false,
  "static_list": []
}
#

shouldn't crash and should dump

#

to static list when you press ]

dire blade
#

ok

#

it dumps properly this time

#

oh no

#

opening the inventory somehow does this

#

oh no

#

terrestria duplicates

#

hmm

#

I have an idea

#

before dumping

charred pasture
#

erm

dire blade
#

list all items in non minecraft namespaces that have items

#

dump

#

then delete anything in the dump from that list

charred pasture
#

so

#

in the initial dump list

dire blade
#

it somehow also

#

with this

#

it registers nothing new

#

no water

#

no moving pistons or potted plants

charred pasture
#

wdym

dire blade
#

like no items are generated from the list

#

the list exists in the config

charred pasture
#

what's your config

dire blade
#

static list is true

#

register block items is false

#

and static list is

charred pasture
dire blade
charred pasture
#

if you want it to register block items

dire blade
charred pasture
#

woaw

#

it crashes with what

dire blade
#

hmm

dire blade
charred pasture
#

wait what

#

i believe it's just uh

dire blade
#

yeah

charred pasture
#

it registers stuff only in static list

dire blade
#

yeah

#

but still

charred pasture
#

but then the other mod already like

dire blade
#

] gives duplicates

charred pasture
#

registered so duplicate

dire blade
#

yeah

charred pasture
dire blade
charred pasture
#

oh

#

i think i get what you mean

dire blade
#

yeah

charred pasture
#

it's bc uh

#

my mod when it's dynamic loading

dire blade
#

yeah

charred pasture
#

it tries to do add everything

#

so like terrestria redwood log

#

my block tries to add a block items for it with the

#

same

dire blade
#

yeah

charred pasture
#

id

#

then terrestria adds in their own block item

#

crashes

#

so then

dire blade
#

yep

charred pasture
#

in the dumping

#

i should instead

#

check to see if the item existed

dire blade
#

in-game

charred pasture
#

it should exist now

dire blade
#

see what there is

charred pasture
#

because registry

#

should be frozen

dire blade
#

yeah exactly

charred pasture
#

so the block items should already

#

be associated to the blocks

dire blade
#

yeah

charred pasture
#

when registry is frozen

#

alright

dire blade
#

and just dump everything that has no name equivalent item

#

so like

#

/setblock vs /give

#

or something

charred pasture
#

wdym

#

setblock is the block registry

#

give is the item registry

dire blade
#

yeah

#

block registry vs item registry

#

compare the two

charred pasture
#

wdym no name equivalent item

#

oh

#

yea

dire blade
#

in game when stuff is frozen

#

this would be the way to go

charred pasture
#

this all happening with the keypress

#

pushed a commit

#

okay wait it didn't go through yet

dire blade
#

yeah the exact same thing happened as earlier

charred pasture
#

my push to github not working

#

wait a bit

#

ok i pushed

#

git pull and retry

dire blade
#

@charred pasture

#

I see logic

charred pasture
#

wdym i see logic

dire blade
#

and terrestria looks a lot better

dire blade
charred pasture
#

yea

#

if its true it removes, bc theres already a block item associated

#

if its false it keeps

dire blade
#

yay it works now

#

can you make it load block models to items

charred pasture
#

hmm

dire blade
#

so there's at least something instead of purple and black checkered things

charred pasture
#

okay

#

how do the block models look like

#

as in like

#

do they actually have block models

#

im gonna try messing with it

#

to see if i can generate something at least recognizable and unique

dire blade
#

if you point each new items model

#

you know like

charred pasture
#

hmm

dire blade
#

there's minecraft/blockstates and minecraft/items

dire blade
dire blade
charred pasture
#

yeah but uh

dire blade
#

if all of them just point to their respective block models

charred pasture
#

wait erm

dire blade
#

then that works

#

things will be dark and stuff but whatever

charred pasture
dire blade
#

an item model

charred pasture
dire blade
#

{
"model": {
"type": "minecraft:model",
"model": "minecraft:block/acacia_planks"
}
}

#

like this

#

so we have this

charred pasture
#
                BlockItem blockItem = new BlockStateBlockItem(block, new Item.Settings()
                        .registryKey(RegistryKey.of(RegistryKeys.ITEM, Registries.BLOCK.getId(block)))
                        .useBlockPrefixedTranslationKey()
                        .modelId(Identifier.of("minecraft", "water_bucket"))
                );
dire blade
#

and just throw in every block

charred pasture
#

this makes everything have the model of a water bucket

dire blade
#

hmm

charred pasture
#

rn

#

there is no item model for the block

#

cause like

dire blade
#

hmm

charred pasture
#

let me see

#

if there exists an actual model

dire blade
#

we need to manipulate the minecraft/items part

#

and not minecraft/models/item

#

so pointing blocks to their own models

charred pasture
#

minecraft:piston_head

charred pasture
#

im looking under

#

assets/minecraft/items/

#

no piston_head in sight

#

maybe look into

#

/assets/minecraft/models/block

#

instead of item

#

which is for piston_head

#
{
  "parent": "minecraft:block/template_piston_head",
  "textures": {
    "platform": "minecraft:block/piston_top",
    "side": "minecraft:block/piston_side",
    "unsticky": "minecraft:block/piston_top"
  }
}
dire blade
#

creating custom item things

dire blade
#

and for each block

#

making the name the block name .json

#

and change acacia_planks to the block name

#

so in (block name).json in (namespace)/items

charred pasture
#

i dont know if thats possible to do

dire blade
#

{
"model": {
"type": "minecraft:model",
"model": "(namespace):block/(block name)"
}
}

dire blade
#

throw in the namespaces

#

throw in the block name

#

and done

#

there it is

charred pasture
dire blade
#

we could just make it autoload a resource pack it generates

#

so imagine like

#

2 layers

#

base

#

block based, hardcoded, and autogenerated models

#

however hardcoded would likely be in base already

charred pasture
#

thinking of using a

#

ModelLoadingPlugin

#

might restrict it to later fabric api versions

#

though

charred pasture
#

what do you think

dire blade
dire blade
charred pasture
charred pasture
dire blade
#

just remember though

dire blade
#

with the model loading stuff we can just use this template and load it in for every new item

charred pasture
#

hmm

dire blade
#

{
"model": {
"type": "minecraft:model",
"model": "namespace:block/illicitblock"
}
}

#

like this

#

for each item just copy off of this, search and replace, then load

#

so for instance

#

search and replace means like

#

namespace and illicitblock are replaced with actual things

#

{
"model": {
"type": "minecraft:model",
"model": "terrestria:block/potted_agave_plant"
}
}

#

like this

charred pasture
#

trying random things to make it work

#

nothing is working

dire blade
#

hmm

#

a pretty cursed screenshot that isn't super obvious

charred pasture
dire blade
#

yeah

#

I did the rest of the minecraft models

dire blade
#

the benefit to manually making models

#

is that then we know how autogenerated ones should work

charred pasture
#

ermm

dire blade
#

why is it stone

#

maybe try this

#

like

#

autogenerate a resource pack

#

then do the find and replace thing for every block and put everything generated into the pack under assets/namespace/items

dire blade
#

make a folder in resourcepacks

#

copy over a pack.mcmeta file into the folder

charred pasture
#

well

#

for now you can i guess use a python script to automatically do that

#

ill make one

dire blade
#

yeah

charred pasture
#

i havent had luck doing it

#

the modelloaderplugin

#

way

dire blade
#

yeah

charred pasture
#

the python script will

#

analyze your static_list

dire blade
#

yeah

#

and just make a resource pack that points everything to its block form

charred pasture
#

hm

#

this is only gonna work

#

after you compile the mod

#

its the built in resource pack

#

not a generated one at runtime

charred pasture
#

its kind of bad but

#

well it works for some stuff

#

the python script

#

ive already pushed

#

ill just leave it at that until

#

someone else knows how to do

#

ModelLoadingPlugin

#

run ./gen_models.py

#

and it'll check your static_list

#

and generate

#

the models.json

#

it's not a nice solution but it's there

dire blade
#

THAT'S EXACTLY IT

dire blade
#

maybe make the mod run it or something on startup

#

or possibly rewrite in java and integrate it

charred pasture
#

im not sure if it will work

#

in a jar

#

probably only works in dev environment

dire blade
#

like it works in .minecraft

charred pasture
#

ill think of

#

having a built in resource pack maybe

dire blade
#

yeah exactly

#

because then generation is easier

dire blade
#

so

#

for the resource pack

#

right now I can't create it as I'm not at my computer

#

but not too long from now I can do it

charred pasture
#

it'll be automatically generated i think

#

you can add your own

#

which will override it

#

i believe

dire blade
#

we will need to hardcode bubble columns, end gateways, and end portals

charred pasture
#

how

#

do you think

#

it'll work

#

does it not work rn

dire blade
#

make the inventory render them and hope it works

#

with this method if it works then all blocks could have proper and correct models

charred pasture
#

oh you mean

#

like the item models for them

#

or the placement

dire blade
#

like

#

placement

#

this will probably go horribly wrong

dire blade
#

end portals would have their weird texture

#

wall signs would be rendered as they would be

#

stuff like that

charred pasture
charred pasture
#

let me test

#

placing those blocks

dire blade
charred pasture
#

huh

#

end gateway seems to be fine i think

#

end portals work fine

#

bubble columns work only when theres a soul sand beneath

#

i think everything works as expected

dire blade
#

what I mean though by this

#

like rendering the block itself

#

but inside the inventory

charred pasture
#

so like

#

you want it to

#

hardcode specific blocks

#

the models for them

#

so it'll look correct

dire blade
#

yeah

#

like sorta physically rendering them but in the inventory

dire blade
#

also

#

before trying this thing

#

in our current system we need to fix certain types of blocks

charred pasture
dire blade
#

the dumping system should probably dump tags too

#

so we know what models to use

#

so this would fix crops, liquids, fire, etc.

woven nest
#

I think I've got a working mixin though

dire blade
#

hmmmmmm

#

I think if you've been following this

#

you probably know the idea here

charred pasture
dire blade
#

and now it's kinda just more stuff like doing different things for crops and liquids

charred pasture
#

finally can map dynamic json models to minecraft block item models

dire blade
#

hmmmmmmmm

charred pasture
#

🥺

#

11:17 pm here i am going to sleep

woven nest
#

enjoy your sleep

woven nest
dire blade
#

I want the mod to be backwards compatible down to possibly 1.14.4

woven nest
#

good luck concern

#

second

#

it wouldn't, as the way to do this was recently removed from fabric api

#

so you'd just use the old way when in the old version

#

and the new way in the new version

dire blade
#

hmm

dire blade
#

so the core mod functionality could probably go way back

dire blade
#

also do you know of a way

#

to render a block in the inventory as if it was rendered in the world

#

because for most blocks this seems it would work

#

and then blocks like end portals would work

woven nest
#

that's what this is

#

aside from ber's

#

which are special, and different

woven nest
#

it's going to take a lot of porting

#

mojang has changed item registration no less than 4 times

dire blade
#

I have like an idea for the mod

#

like of course it'll be made for modern versions and be quite interesting

#

but there's also the part of it spanning across many versions

#

I feel like this is the type of mod that would last for a pretty long time

#

I want it to be useful for everyone

#

personally after venturing into the world of having these blocks it's hard to imagine not having them

#

oh also the community around making modern minecraft look old would like this

#

I have not told anyone anything about this because of course it is quite the new mod

#

this is all I sent them

#

once the mod gets to a stage where it's quite "presentable"

#

probably once it goes on modrinth or something

#

then they'll know

#

but for now I'm keeping everything pretty quiet as the mod evolves

dire blade
#

and lava in a bush

#

but yeah

#

so it's like at this point blockstates are quite far into the future

#

now the big hurdle is trying to make item models

charred pasture
#

does it only support adding models

#

then having to use static json files

#

for said models

charred pasture
#
  1. Make it use the new way of registering addition item assets (no longer need to use resource packs, on demand changing on launch)
#
  1. I dont believe there is a way of dynamically adding block items to all blocks that are missing block items, because my mod steals the block item identifier before the other mod gets to add their own (if they even add one later). This is fine for Minecraft blocks because they're already finished with their initialization, however fabric launcher doesn't guarantee mod loading order, and I don't think there is a way to wait until all other mods finish their registration because then other mods may use this method causing a race condition. Unless there is way where if I am able to mixin into the registration process and somehow unregister my own block items if another mod adds in their own to prevent this IllegalStateException. I think static_list will have to stay.
#
  1. Then for BlockStates, I have an idea. I should be able to add in "variants" of existing block items by setting a component containing the BlockState, from which my own implementation of BlockItem can use when placed. I think it should be
ItemGroupEvents.modifyEntriesEvent(ILLICIT_GROUP).register(entries -> {
    // loop over the intended blockItem's block states
    // create a unique item stack for each blockstate, by adding a component onto that item stack

    entries.add(customStack); // Add it to the tab
});
#
  1. Then comes the issue with differentiating the variants of the BlockItem from each other; how should it be done? I believe the easiest way is for a tooltip that dynamically changes based on the BlockState of that ItemStack. So then it should look like
                      |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|
                      | Item Name                      |
                      | short = false                   |
                      | type = sticky                   |
                      | minecraft:piston_head|
                      | Data: 11 component(s)  |
                      |____________________|
|‾ ‾ ‾ ‾ ‾ ‾ ‾|
| Item Icon |
|_________|
charred pasture
#

If I wanted different item models for each block state, I don't know if this is possible using this #1380192601516408984 message (I have not tried)

#

Or if there is another way to do so, so that is why I recommended doing the tooltip way

#

Well, it looks like it's baked into the item model definition now

#

I think we should hardcode certain item models to make it easier, but if it isn't possible then fall back to the dynamic item model generation

charred pasture
woven nest
#

It's meant to create a freestanding model not bound to anything that can be rendered in the world more efficiently

charred pasture
#

okay

woven nest
#

Still planning to ask pepper when they're online.

charred pasture
#

yes

#

so it's basically

#

creating your own model type

woven nest
#

Yeah, I guess that describes it well

dire blade
#

do you think

#

that the mod should dump the first time you press a button every launch

#

so then it can have a list of items it can use every time except first launch

woven nest
#

I'm sure you'll also notice, I added a way to tell what models are already provided, so you can probably just make it so a resource pack can override any of them

dire blade
#

ooo