#How to switch my block components to 1.21
1 messages ยท Page 1 of 1 (latest)
"format_version":"1.20.80",
"minecraft:block":{
"description":{
"identifier":"ce:dirt",
"register_to_creative_menu":true,
"is_experimental":false
},
"components":{
"minecraft:loot":"loot_tables/entity/empty.json",
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 0.3
},
"minecraft:destructible_by_explosion": {
"explosion_resistance": 1000
},
"minecraft:display_name": "Dirty Dirt",
"minecraft:ticking":{
"looping":true,
"range":[15, 15],
"on_tick":{
"event":"ce:tick",
"target":"self"
}
}
},
"events":{
"ce:tick":{
"run_command":{
"command":[
"setblock ~~~ air",
]
}
}
}
}
}```
The Holiday Creator Features experimental toggle has been removed. Along with it includes JSON block and item events. This functionality has been replaced with custom components.
Please take a look at the following links to learn more about custom components:
i already read that but I do not understand, isnt there a component list that i can look from?
Thank you
when doing block events, is it now moved to scripts?
Yes
The wiki is in the process of migrating, hopefully by tomorrow you'll see the upgrade guides
Ok, I see... I have this replace air one then. I kind of liked that I can /reload the behaviors and it would still run the event where it replaces the block with air. Is that possible with scripts
Oh cool nvm it works like this right
"description": {
"identifier": "content:my_block"
},
// Base Components
"components": {
"minecraft:custom_components": ["content:turn_to_air"],
"minecraft:loot": "loot_tables/blocks/my_block.json",```
```class TurnToAirComponent implements BlockCustomComponent {
constructor() {
this.onStepOn = this.onStepOn.bind(this);
}
onStepOn(e: BlockComponentStepOnEvent): void {
e.block.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.Air));
}
}
world.beforeEvents.worldInitialize.subscribe(initEvent => {
initEvent.blockTypeRegistry.registerCustomComponent('content:turn_to_air', new TurnToAirComponent());
});```
Unfortunately, if i read your messsage right, you cant use /reload for block custom components. Youll have to leave and rejoin
Oh no, thats not what I meant, sorry my English isnt that good. I meant like if you already had a custom component for blocks, such as an event for it turn into air after you place the block.
In the old update, I could place the custom block, /reload, and then it will still turn into air.
Did I make a bit more sense?
The truth is this sucks, for my part I will withdraw from the addons, I will not do 50 hours of work again for Mojang to change it again
Lesson learned: dont rely on experimental features
custom components not working can anyone help me asap here
I'm trying to add an entity to a block to make a sittable furniture
BlockTypeRegistry is now BlockComponentRegistry
Basically all addon development, got it
Did you know you can make addons without using exp features? ๐ฑ
ya I got lucky and only need to change a few blocks, but it still sucks :/ still havent figured out how to convert my blocks just yet
My custom blocks are all wrecked.
And converting them into the 1.21.20 block format is actually long.
I have a lot of blocks.
I have a lot of blocks. There is no way that I'll convert 20 of the custom blocks into a new .Json format for bedrock edition.
Yes, custom entities. Custom blocks require HFC.
Nope
90% of the HCF content has been stabilised for months
Ive been making custom blocks without that toggle before this update released
How?
is there such thing as interval in the components or do i have to use system.runTimeout in scripts for block custom components
Queud ticking
ty ๐
What does your json look like for one of your blocks?
Addons of that style do not offer a quality comparable to Java mods, although no addon really does, they are much further away, at least for me it looks bad to base everything on invisible entities or directly make entities that act as blocks, and honestly scripting is a quite complicated programming way to learn if you don't speak English, at least for me, it is even easier for me to program in Java
But...Java is in English
I only hope that content creators adapt to these changes, which for now look double or triple as complicated, of course for an expert that is not a problem, but many of us would have to learn from 0 a new method of making blocks
from 0 a new method of making blocks
Dude...only events got changed. The basics of a block has stayed the same
Now it's all scripting-based, it gives me a headache to read these kinds of codes and all those mixed words together, but that's okay
Only events are scripting based
Look
Ofc I know it's stable.
I meant like what type of json did you use.
Because some of the custom blocks that I've created on bridge works, and most off the others that I've created on bridge doesn't even work.
wdym type of josn?
I dont use bridge
Here are the errors for the block,
What does your blocks.json file look like @verbal moth ?
Here
Download it.
Ohh, I'm so sorry.
I've sent the wrong file, I'm so stupid. ๐
I mean the blocks.json file located in the resource pack. It contains a list of all your blocks as well as a directory for their textures. It looks like this
{
"format_version": "1.20.20",
"amethyst_lamp": {
"textures": "amethyst_lamp",
"sound": "amethyst_block"
},
"blaze_lamp": {
"textures": "blaze_lamp",
"sound": "amethyst_block"
},
"copper_lamp": {
"textures": "copper_lamp",
"sound": "amethyst_block"
},
"diamond_lamp": {
"textures": "diamond_lamp",
"sound": "amethyst_block"
},
"emerald_lamp": {
"textures": "emerald_lamp",
"sound": "amethyst_block"
},
"gold_lamp": {
"textures": "gold_lamp",
"sound": "amethyst_block"
},
"iron_lamp": {
"textures": "iron_lamp",
"sound": "amethyst_block"
},
"nether_lamp": {
"textures": "nether_lamp",
"sound": "amethyst_block"
}
}
Yes now define what textures to use for your blocks as shown in my blocks.json and change it's format version to 1.20.20 like mine.
After that head back to you lu_wires.json in your behavior pack and change it's format version to 1.20.20 and see what happens.
So I change both of them to 1.20.20?
And can I remove the 1,0,0 in that file too?
Yes because that is the old format version
Did you figure it out?
Remove the png and texture files shouldn't use spaces
Remove the last comma.
That too lol
Since the texture name is that, it should be called in the block.json file
texture(10)
What will happen if I recreate the custom blocks, and make it have the same identifier as the old ones? Will the updated look alike block will change into the updated custom blocks?
You can try to keep it and see what happens ๐ Same Identifier is recommended, if you change it here you have to change it everywhete
Did it work?
I didn't try it yet.
Another question, instead of the custom blocks being in an separate mod, like for example thr tunnel cable is in a separate mod, and the platform block is in another separate mod, if I recreate the custom blocks and put all of them in one mod and make them the same identifier as the old one, will they appear where it was before the update?
Like in the same exact position and place?
I've also complained in the minecraft bedrock channel on the official minecraft discord server, and an admin replied to me saying "womp womp"
@nimble stone It works
I've took a shortcut, and made the new custom blocks components on bridge. So whenever I import the geo.json as a custom block, it should automatically set the file format so it can be compatible with 1.21.20. Luckily bridge sets it automatically.
lmfao
And they call that "customer service"
well how did you complain exactly
In fact, why tf don't they do separate threads, it will work better. When they make the bedrock mechanics channel public and ask help, they seem to be against you.
I've said "Help, my custom blocks aren't working after the 1.20.21"
1.21.20*
But it was unexpected.
I didn't even know that update was going to come out
If I knew, I would've changed everything asap
it was experimental and they were working on api stuff to get it out of experimental
Can't minecraft just add an alternative from holiday creator features, to "custom blocks features" or something.
...
What
so you are suggesting there to be a new experimental toggle lol
it just became stable
Wait, so if I decided to make a new custom block component for my mod, and it worked. Will it be like that forever?
should've kept up with the news
change the unit_cube in code if used
there's alot more to change than that.
depending on how fancy your block is
yeah but at leash to model will have textures
you don't need components unless you want them to function
it would only be a block
with no use
Wait, so now can I make a custom block any size that I want before 1.18.60? Like you can make it any size you want before there was a certain limit within the 16x16 grid?
use full_block with 16x16 textures
Good deal I am glad it works now. ๐ Also, I know it seems like a lot but 20 blocks is not all that much considering. I believe you can do it! Going forward try to just use stable stuff to avoid breaks in the future if you can help it ๐
Thanks. Even tho it works, it still doesn't work at the same time. It appears in the game without applying the rotation code, but whenever I apply the rotation code in bridge, it doesn't work.
Do newly placed blocks rotate correctly?
No. In fact, they don't even appear in game at all whenever I apply the rotation code to it.
#1263653967171289099 message
@verbal moth Here is a post with solved rotation. It might help, just read through it all to try to understand
I know what to do, but its way too much coding.
Before the 1.21.20 update happened, making custom blocks that rotate is easy. Now it's a complete challenge.
Well once it's done once, then all you have to do is copy and paste. It's worth doing @verbal moth
What happens if I copy and paste it from an existing mod that is already working?
And change the identifier and texture
And I would just need to change the block.json in the rp file?
That's what I do for all my blocks, it saves time ๐ As long as it's working just change what you need to change and keep the rest. If you add new blocks then you do need to update your blocks.json
Ah, I see. ๐๐ฟ. Another question. So if I make all my previous blocks in bridge and combine all the blocks together into one mod instead of it being separate mods like before, and I make it the same identifier as before. Would it still be in the same position like they use to be.
And the rotation would remain the same?
@nimble stone It works, I applied the rotation to it.
Thank you so much for the help.
Does anyone kow do you make redstone pass through custom blocks?
I don't really mind if its facing the wrong way. It's still rotated after all.
Now, cya yall.
Why ask in this thread?
Oh yeah haha
Glad it worked, not sure sure on retaining previous rotations, you just got to try ๐ At any rate, further questions ought to be contained in a new separate post as this one should be resolved by now
So if I managed to revive all my old custom blocks, then there's like a 50/50% that the custom blocks that are previously in the old world will be in the same position when it's rotated or not?
Just rotate the model in block bench and it should be correct
Okay.
I got a question. If I want the model to be the same one as the old one, where do I find the identifier.
From the rp or bp?
Bp
Bad news
My friend has made some of the custom blocks that use to work in my world, and the thing is its a custom identifier. I normally make the custom blocks on bridge
But my friend made half of it from scratch with a different identifier. The thing is, whenever I make custom blocks on bridge, the identifier will always be "bridge:
A different identifier that is unique is recommended, just change it everywhere and it will work
Like mine is luna:whatever_the_block_is
Oh...... the thing is, that identifier is everywhere on my world.
Like that platform block that you modified 2 years ago.
You Can still use the old one, it's okay, just make sure that it is the same everywhere, BP and RP ๐
It's alright to use different identifiers throughout your addon. So you can have 2 different blocks with different ones and still be fine as long as it's correct and consistent throughout your pack
So you want me to upload those platform blocks on bridge, and change the identifiers?
It's up to you, you can keep the bridge identifier if you want and they will still work. What I was saying is that most people do not use bridge so they make up their own. Both will work fine. You can even do a mix, some with bridge, some with a different identifier and it will work fine ๐
Thr thing is, if I do put the bridge identifier in, then I'll have to replace thr unknown blocks with the bridge identifier.
Good news, I've done the first half.
And luckily, due to 1.21.20 changing the rotation components, I've managed to change the rotation degrees so it rotated like before the 1.21.20 update came out.
@nimble stone I've changed it to a custom identifier. So now it isn't the bridge identifier, so now it should be compatible like the old ones.
how can you do that? The fewer experimental features an addon uses, the better it works.