#Blocks General
1 messages · Page 12 of 1
Tested this already but in case I miss something, does the tick component with looping false restart when the chunk reload, game reload, etc.?
what's are the rotation permutations of glazed terracotta blocks?
i know it uses cardinal direction
for the molang in block permutations, is it possivle to look for 2 individual values, like q.block_state(cmd:balls) = 2 || 3
#1368811254583660584 message
Any idea how to fix this error
Yes I literally triple checked every single state and permutation to make sure I wrote them correctly
When using alpha_test_single_sided_to_opaque on a block for some reason all the surrounding blocks that only use alpha_test end up like this is this normal?
#1359280442745815140 message
Yes, but I think you have to write it like q.block_state(cmd:balls) = 2 || q.block_state(cmd:balls) = 3. I'm not positive if there's an easier way to do it.
Has this been a common issue beforehand? And could someone post a screenshot of how it looks with it being broken?
Has been an issue before item visuals component even. I always thought is simply geometry related.
I'm not using minecraft:item_visual here, just a custom geometry:
In the normal fence, the yellow square shows the bug where the render of the top face of that bone is inside of another, while the red square shows how part of that other bone is rendered cut because of the other bone
Hope this helps!
Yeah this bug is probably more geometry related, thanks for the help!
Happy to help!
I solved it by removing the minecraft:item_visual component. That makes the hotbar icon use the block geometry with correct rendering. I then use a state to track whether the extra bones should render or not, and then a permutation test to set those bones invisible when it's placed.
It's definitely a hack, but it achieved what I wanted.
Thanks
Yeah, definitely can find ways around it, but the issue is still there, unfortunately.
Interesting, if using two geometries and just one material instance component, using bone name instances in minecraft:material_instances wont work
Which makes me need to use the component twice in permutations, or one in permutation and the other in component
any idea why this happen? (the red cube should have be an inner cube, it is inside another gray cube)
the item in hand look fine
-# fixed, the gap between the cubes was too small
how to fix this?
What’s the issue?
am I allowed to use this on my add-on?
yes
you can do it per material instance
the black face bellow
i might just switch to block entity and call it a day
Does anyone know how much faster each level of efficiency increases mining speed by, I can’t find anything concrete online
Anyone possibly have a leaves decay method
anyone's know how to make a custom glowstone to look likes glowstone?
and how can I make the blocks act like sand, dirt, and farmland
what
part of sand/dirt do you want your block to have
make sure ambient_occlusion and face_dimming are set to false in your material instances
I want cactus, plants, and crops to be placed in a custom block
Set face_dimming to false
I’m late sorry lol
I already did
thanks
Is it possible to have a flipbook change textures randomly instead of sequentially?
how do you code vanilla like slabs and stairs?
https://discord.com/channels/523663022053392405/1362693525111836742
In this template there are working stairs an slabs included
but not quite like vanilla
Can someone help me understand wtf is going on with versioning in addons?
child "minecraft:on_step_on" not valid here
Unexpected version for the loaded data
I've tried various combinations for min_engine_version and format_version (I'm on 1.21.80) and nothing gets the pack to load. I'm just trying to add 1 custom block with a component and events.
Ahh, I see
Thanks a lot
How can I avoid entities with translucency being rendered on top of custom blocks with blend?
Is there a way to use a mesh model for blocks or is that exclusively entitys and attachables
How would you make a block not be able to have silk touch used on it?
how do you make sink touch used on it in the first place? meaning drops only with silk touch like grass block
Is the bone below the grass block?
Is there a way to get dry grass to be allowed to be placed on a block
I tried the sand tag but it only allows cactus
Nope, they are way above the bottom of the block
block model pivot points are always assumed to be at the model origin, so if your model has pivots not at the origin, rotated cubes will be translated in unexpected ways.
Even with all pivot points set to 0,0,0, it still renders funky
what does your bone structure look like?
I've attached the model so you can see
try this
Which render method are you using
hasn't this been fixed for years
Using blend, because i have semi-transparent pixels
blend is the thing causing cubes to be rendered in the wrong order
no way to avoid it other than removing translucency
Would i need to do per bone rendering then? and only use blend for the translucent bones?
that's bugged
Damn
Is it possible to make blocks absorb explosions like the slab does?
Blast resistance
Is this what absorbs the explosion?
Basicly yeah just set it high. There should be so.ething that tells you what the resistances are for blocks
Is there a way to tap in to the "pick block" with an addon? I have a block that I am using as a base for multiple different display entities, and I want to either set a specific item when the player tries to pick block, or if I can't then I just want to prevent that action all together for this block.
I find it strange because the Minecraft wiki says that the resistance is low but they absorb explosions.
It is not possible to prevent the pick block, and to pick up an item with a pick block the item must have the same id as the block
Is it possibile to make a custom door without entities??
Yeah
would you happen to have a template or atleast rough explanation on it?
Create a custom item to place your block using minecraft:block_placer, and set replace_block_item to true.
Your item must have the same ID as your block.
I have one but is a bit outdated; https://github.com/Kaioga5/Kaioga-s-Block-Templates/tree/main/templates/1.20.80/door
It can help you understanding a bit how it works.
Unfortunately, I can't do that because multiple different items are placing the same block.
Oh well
In that case you'll probably have to do some hacky solutions with scripting
Or split up your block into different ones
Can I make a vanilla block have a custom texture when renamed with a specific name?
No
What kinda funky stuff happened when you go past the world permutation limit
Like say start with like 10k over
Then 20k
Then 30k
Also what in the cinnamon toast fuck are these errors
In my experience, nothing happened. It just gave a warning. I suspect it takes up more RAM, which is why they emphasized that it impacts lower end devices more. But I've got a metric shit ton of RAM in my PC and I noticed no issues.
Does anyone know why putting transparent pixels on doors makes them invisible?
I need solve it
a vanilla door? you can't change the material of vanilla blocks
so no translucency
OK, I'm stumped. How do we run a command when a block is placed?
The wiki says to use world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry }) => { but then at runtime it complains that my custom component isn't registered. Additionally, it's not evident to me that a block object has the runCommand function.
A lot of alternative sources say to use world.events.blockPlace.subscribe(event but when I do that, nothing runs at all. I.e. something like the following should run a say command whenever any block is placed, but it does nothing.
const block = event.block;
const player = event.player;
const { x, y, z } = block.location; // Get block coordinates
player.runCommand("say ${player.nameTag} placed ${block.id} ${block.typeId}");```
And ignore any syntax errors here; I got all the parentheses and curly braces right, but omitted some of them here for brevity. It's not a compilation/structure issue (at least not one that VSCode nor Minecraft is catching at runtime).
your script probably isn't being ran
is your manifest set up correctly?
Before this I setup some item components. Those still work, and are part of the same JS file. So I don't think that's the issue. But thanks for the recommendation 👍
if you want to use the world event, it's
world.afterEvents.playerPlaceBlock.subscribe
I will try that, thanks!
That worked, thanks! Also, you were right about the manifest; I did some refactoring and my manifest was still pointing to an old/stale js file. Working now. Thanks again!
How block variation weight works?
Let's say I have 2 grass textures and I didn't set weight for both, how much chances for 2 texture to display?
Or I'll set weight to 0.5 for 1st texture and other texture is weight: 50, what will happen?
bro what the hell
my texture pack is turingin command blocks into seweed
ik command blocks have animated textures
but what the hell
does anybody know the conversion between java and bedrock explosion resistance and block hardness?
bedrock's custom block destruction stuff is broken
but seconds_to_destroy represents block hardness
istg theres always SOMETHING broken on bedrock
explosion resistance is 5x java's i think
Oh i've got a whole list of broken stuff i found 💀
It cant be the same tho
or example for stone, when no tool is on, it takes around 4 seconds to break
while its hardness is 1.5
also what about tool specific values?
the item determines the destroy speed, not the block
I'd also just pretend that item_specific_speeds doesn't exist since it doesn't match how vanilla destruction works
so those tags work?
the is_*_item_destructible tags work
but there are other issues with destroy speed
cant remmeber the name but thee are 4 tags for tools. bedrock has like 4 tags total lol and i didnt evne think those worked
ignore the *_pick_diggable tags, they do nothing and aren't applied to any new blocks
this is what im talking about
that will work
it won't match vanilla, but shovels will destroy the block faster
as usual there isnt a perfect match... 💀
when they implemented the custom item/block mining speeds they seem to have completely forgot about the "best tool" feature
any custom digger will be treated as a suitable tool for any vanilla block
i can only say that hardness value is NOT equal to seconds to destroy, just testing with stone as a reference that has 1.5 hardness. setting seconds to destroy to around 5 seems to be around the same length
it is, the missing best tool logic is what's causing any inconsistencies with vanilla blocks
let me put it a different way. The custom block/items system is dogshit. its a competing system to the existing ones, I know that they have it like that internally. It caused a slew of issues and inconsistencies because the 2 use completely different pipelines
so the tag isnt doing its job i see. on java you do get a penalty when using wrong tool, not other way around
tho item specific speed is working for me. Is that the one you said was bugged?
yeah it should be the tool that decides. plus those values are not multipliers so it would be come very cumbersome to calculate the accurate ones for each tool
also seconds_to_destroy and destroy_speed do not describe what those properties represent at all
increasing "speed" should not lead to increased destroy time
yeah another thing i complain. it shouldnt be called destroy speed as its not even used like that when you use tools
should be called just hadness
or destroy_speed_multiplier
ok so i think i found what gets around their issue
they are missing this
so setting second to destroy to hardness * 10/3 and destroy_speed to hardness itself seems to be the same
as it pre applies that in reverse
stone: hardness=1.5 ->
So anybody else having issue with loot table conditions?
This doesnt match any item BUT DOES match shovels AND empty hand
found a soluton to this bug too. Bugrock problems require bugrock solutions
How tf is this number even calculated because it feels like mojang is just pulling it out of their ass rn
I apparently have 450k+ states using the same combination of addons that got me that number there
could you go into more detail
I believe the issue they're describing was fixed a while ago
ah
What is the best way for me to make my blocks only drop themselves when destroyed with the proper tool type that doesn't involves making a loot table for every single block?
Write a script to do that
Okay, thanks!
Why does the dirt also green? I use material_instances and grass tint_method
Because it tints the entire texture.
So how to make the dirt look normal?
You cant.
Oh well...
Make a model with 2 cubes and give a different material instance to each
whats the point of loot tables if they get copletely ignored when you break anything with silk touch?
sucks
hello i have a custom crop there is a way to change the block break sound?
This is the result of mixing blend and opaque render methods
Idk how long it will stay working for but it works perfectly fine
Just blend leads to this clusterfuck
you are not supposed to do that
although mixing non-opaque render methods should work but it doesn't
Spill, please
sure
-
fixed by setting
fit_to_frametofalse -
fixed in custom components v2
-
If anyone would like to vote https://bugs.mojang.com/browse/MCPE-177866
You know maybe when they added the "to_opaque" list of render options maybe then it became incidentally possible to mix blend and opaque
Forgot to add that translucent blocks don't render at all unless another vanilla translucent block is in same chunk. Relevant for this discussion here, unless it was fixed very recently
Where does fit to frame to btw? Obviously that's not on the wiki
it's in gui, with rotation and the other parameters
Can you mix the to_opaque render methods and stuff like blend
No, use cutout. Also there's that bug
Cutout?
Also what bug you are referring to?
.
Pressing esc while doing /reload will deadlock the game? Like brick the game forever or what?
Sounds scary
Yeah
It just gets stuck there forever
Force close doesnt fix?
Also has a bug where downloading anything from marketplace would crash the game
Premium experience
Ok wth 😭
Yeah you just close the game
Ah ok
Look at em
Why are my blocks invisible?
the window chalet block has invalid geometry/material instances
if a subchunk contains any invalid custom blocks, no custom blocks will render
Could you see what's wrong, because i dont see what's wrong with it?
there should be an error in the content log
[Scripting][error]-Plugin [R6S Test - 1.0.0] - failed to create context.
[Scripting][error]-Plugin [R6S Test] - module [R6S Test - 1.0.0] depends on unknown module [@minecraft/server-net - 1.0.0-beta].
[Scripting][error]-Plugin [R6S Test] - module [R6S Test - 1.0.0] requesting invalid module version [@minecraft/server-ui - 1.0.0-beta].
Current [beta] version is [2.0.0-beta].
Available versions:
0.1.0
1.3.0
2.0.0-beta
3.0.0-alpha
[Scripting][error]-Plugin [R6S Test] - module [R6S Test - 1.0.0] requesting invalid module version [@minecraft/server - 1.0.0-beta].
Current [beta] version is [2.0.0-beta].
Available versions:
0.1.0
1.19.0
2.0.0-beta
3.0.0-alpha
[Scripting][error]-Plugin [R6S Test] - version conflict for module [@minecraft/server].
[1.0.0-beta] requested by [R6S Test - 1.0.0],
[2.0.0-beta] requested by [@minecraft/server-gametest - 1.0.0-beta]
[Scripting][error]-Plugin [R6S Test - 1.0.0] - run failed, no runtime or context available.
[Blocks][warning]-bridge:cobblestone_cube: trying to override the Geometry component with blocks.json settings for a custom block. This isn't supported. Please remove any legacy texture definition or block shape specification for this block.
[Blocks][warning]-bridge:window_chalet: trying to override the Geometry component with blocks.json settings for a custom block. This isn't supported. Please remove any legacy texture definition or block shape specification for this block.
[Blocks][error]-Block name = 'bridge:window_chalet' | geometry.window_chalet contains 3 boxes outside the error bounds of (-0.875, -0.875, -0.875) to (1.875, 1.875, 1.875).
[Blocks][error]-Block name = 'bridge:window_chalet' | Error with geometry component: cannot find geometry.window_chalet geometry JSON.
[Blocks][error]-A block must have baked material data in order to tessellate!
I still dont understand why it won't work, can I not do custom geometry for blocks?
Error with geometry component: cannot find geometry.window_chalet geometry JSON.
geometry.window_chaletdoesn't exist in your resource pack
odd, because it is there in the file
[Blocks][warning]-bridge:cobblestone_cube: trying to override the Geometry component with blocks.json settings for a custom block. This isn't supported. Please remove any legacy texture definition or block shape specification for this block.
[Blocks][warning]-bridge:window_chalet: trying to override the Geometry component with blocks.json settings for a custom block. This isn't supported. Please remove any legacy texture definition or block shape specification for this block.
removetexturesfrom blocks.json
what's the identifier?
oh I didn't see this
[Blocks][error]-Block name = 'bridge:window_chalet' | geometry.window_chalet contains 3 boxes outside the error bounds of (-0.875, -0.875, -0.875) to (1.875, 1.875, 1.875).
your model is too big
also block textures have to be square
Oh, alr then
BTW what's this?
[Blocks][error]-A block must have baked material data in order to tessellate!
it's saying the block can't be rendered (because of the lack of valid geometry)
Ah ok
i have a block custom there is a way to recreate the "chain" of the lantern when there is a block upper the my custom block?
use permutations and either create 2 models or have 1 model with multiple lanterns and use bone visibility OR you can change the material instance with a texture that has that chain when placed in the block_face up position
Is there a way to make it so blocks turned into items have two textures?
if not then I'll just scale the texture then merged them
Finally got my addons upgraded to v1.21. In a local world, everything works, but in a realm, the block events seem to do nothing. This one is supposed to summon an NPC, but they never appear. Other stuff (items/armor) work fine. I'm guessing this isn't supported in Realms? Any workarounds?
world.afterEvents.playerPlaceBlock.subscribe(event => {
const block = event.block;
const player = event.player;
const { x, y, z } = block.location; // Get block coordinates
if (block.typeId === "magic:home_terminus") {
player.runCommand(`summon magic:npc_eye_blue ${x} ${y + 1} ${z} facing @p "" HomeTerminus`);
player.runCommand("dialogue change @e[type=magic:npc_eye_blue,c=1,r=5] home_terminus_main");
player.runCommand(`tickingarea add circle ${x} ${y} ${z} 5`);
};
Even custom block components don't work on realms ... wow
/** @type {import("@minecraft/server").BlockCustomComponent} */
const XPGeneratorOffInteract = {
onPlayerInteract(event) { // Doesn't work
...
const XPGeneratorOnInteract = {
onTick(event) { // Doesn't work
...
At least for playerPlaceBlock events, the wiki hinted this might now work (though the wording implies it's specifically the beforeOnPlayerPlace event, not all events).
I can't believe I wasted my time on this just for Mojang to sabotage me yet again.
Never heard of an issue where CC dont work. Are you using block placer for the placeBlock event?
Assume you're referring to the item component (https://wiki.bedrock.dev/items/item-components#block-placer)? Not using that right now but could try that. I used to use block placer since block crafting recipes were broken pre ~1.20. But since it seemed to be fixed now, I skipped that.
In terms of CustomComponents, I've double-checked and I don't see anything different from the examples. Using world from Minecraft/server, world.beforeevents.initialize, etc
Works in a local world but not in realms
https://github.com/thebearup/magic_expansion_for_minecraft/blob/master/magic_behavior/scripts/main.js
idk if this is causing the issue but remove this from your manifest.json
{
"module_name": "mojang-minecraft",
"version": "1.19.0"
}
Nope, even with that change it works locally but not in realms. Is there any guidance on getting addons to work in realms? Toggles to use etc?
Even the item customcomponents don't work. Only thing that does is armor effects via tick.json
How are the total amount of permutations in an addon are calculated
Because every god damn time i update my cubits addon it goes up drastically
Currently it's at like 570k+ despite not adding any more states
whats the friction value of ice?
They are calculated how all permutations are calculated
From the states of all blocks
it's the total number of permutations registered in a world https://wiki.bedrock.dev/blocks/block-permutations#what-are-permutations
How so?
Actually I'd need to know more about how minecraft stores block states
Bit still I'm mad
Does it matter? It's not like we know how their (bedrock) implementation is done under the hood
I mean i need to know that if I can call it stupid or not
But I can assure you the more permutations the more objects created and the more ram stuff takes, models for each, components for each, so on so forth it quickly adds up
Unlikely. That limit they set might be tho. But given they made this game to run on mobile it's understandable that you would have limits
I've seen people with 100k blocks once
On java
Blocks, not blockstates
Those would take 20gb of ram just to load them in. No way you get that on a switch
The limit is almost always due to stability and performance.
Still imo 64k permutations laughably small. So much for more perfromant game, in my example above the permutations were in the millions
That's way too much. Why you have so many for a single block
Micro blocks. Yea you are out of luck
?
(yes that would be one bazzilion)
What is the most efficient and lag friendly way to make leaves decay & falling leaves particles?
You got a cube made up of 64 small cubes. That's 2^64 no?
No?
Ah so you can just fill up the edges
You probably want to randomly check blocks... If you can't replace the vanilla leaves that's how you would do it
vanilla leaf decay is handled through random ticks
falling leaves would be client side if possible, i think people have done it by playing an animation on the player
Well your permutations are too many. You'd have to simplify it to work.
Any more efficient way to do the leaves decay? Hundreds of leaves with random ticking is super laggy
The random tick happens anyways game picks a handful of blocks every tick, if they can random tick their random tick component will be called
hundreds of leaves with random ticking shouldn't be laggy
when i was testing my copper oxidation it was fine
It’s very laggy for me even though I made them decay just to the north, instead of the taxicab check vanilla leaves do. It’s most likely because my trees have around 200 leaves and I’m loading more than 20 trees at once
I find it better to do it without randomness every 3000-5000 ticks. But I still think there should be a more efficient way, even if not the most vanilla accurate, to do leaves decay.
are the leaves checking after every random tick they receive? you could try decreasing the likelihood a bit
also caching the Block objects will help
Do you think it would theoretically be possible to have 1 leave ticking per tree, random ticking, which would be the one making the other leaves decay?
Making the check in the other leaves etc etc
Get a profiler and see what part is the most consuming. Chances are it's the setting the block one
Light update might also be another one, direct cause of setting the block to air
the largest slow down will be from getting blocks
I doubt changing the number of blocks that tick will have much impact
Idk how they did the implementation here but they must be checking for a component that a block has so that should already be getting the block before the random tick method is even called
I assume they are making something to handle this more easily, I remember hearing it being mentioned
A taxicab check, which is how vanilla already works, is extremely bad for performance
if we had chunk unload events then the caching method would be very easy
without resulting in the world being shut down
Still testing is easy. Make them tick. Just get the block and get a profile. Then get and set the block to another block and finally try to air
Will try more ways to do it the most efficient possible, thanks
In the same topic, how can I destroy a block with scripting without commands?
You cant
Not set type… destroy. I want loot & destroy particles to show up. I believe it isn’t possible, but in said case, what would be my best workaround
Just fire the command
Sad
Doesn't really make much of a difference
Other than commands are pointless overhead
Probably not terrible tho
leaves don't make particles when they decay do they?
Last time I checked they did, unless I remember incorrectly. I’ll have to check again
Oh no they don’t! Hm, why do I remember seeing them..
Or somehow get more RAM 😭
Which I can do
Well limit remains. It's not a hard limit tho, just blocks it from the marketplace
Wasn't planning on releasing an addon that has specifications on ram size to run to the public
Hello there! I'm trying to make a block drop/break when the block behind is broken. Here's what my test block component contains:
"minecraft:placement_filter": {
"conditions": [
{
"allowed_faces": ["north"]
}
]
}```I would've thought this would pop the block off when the supporting block is removed. But it does not.
You'll need to list all the blocks supported allowed. We dont have support block component.
Dang it, what a hassle. I'll use jsonte to have a re-usable blocks list then I guess
Mind sending it after? 🥺
Yeah I'd like that
I did get it to run but it crashed after a while
No just when broken or destroyed by player/command
1 deep cleaning of my phone and a ram swapper later and we are in business
How can I prevent bamboo from breaking when it has a custom block below?
i have a custom crop but it doesnt grow for some reason, and has the missing texture block for its particles when broken. It also doesn't drop anything. I followed the tutorial in the wiki, I asume i messed up somewhere.
there's a ] at the end of the state name in your permutation conditions
the item format version needs to be at least 1.21.60
the particle issue is due to MCPE-219143
you havent changed the name of the custom component in the script
thanks!
is there a way to remove custom block shadow?
move the model out of the ground
is that the only way?
yes
aw okay, thanks!
Yeah its weird that the released geos freak out but in game vanilla geos dont
Is it possible to modify vanilla block models? Like fences.
no
how can i import java multi texture and convert it into single texture for bedrock with correct geo?
idk with blockbench or what
The model is multi-cube
block textures should be 16x16
if whatever you're aiming to do involves making a texture larger than that, it probably isn't the best solution
ohh
so i should anyhow convert it to 16x16?
well when i stich the texture from java's, the result is 32x48
(in blockbench)
then i export the bedrock geo
and it looks cursed asf
you can give blocks multiple textures
how???
set different material instances for certain cube faces
https://wiki.bedrock.dev/blocks/block-models#changing-material-instances
Yoo
i just removed the shaft which was as separate texture
and it looks nice now
idc bout the shaft
it is just for the looks
okay i figured out the whole material thing
does item_visual's geo & materials accept bone_visibility & render_method respectively?
It should.
Also how can i make block texture that makes it go out of bounds
like 3x3 texture 1 block in the middle
tnx
Hello! Is it normal that tag:minecraft:is_pickaxe_item_destructible still requires item_specific_speeds in the minecraft:destructible_by_mining component to make blocks destroy speed match vanilla blocks?
I tested with tag:minecraft:is_axe_item_destructible and I don't require of item specific speeds, but I do for pickaxes.
Here is a video showing this situation
In the video, none of the blocks had item specific speeds.
they didn't implement the best tool stuff correctly
I wouldn't bother trying to correct it personally
since when they correct it, your blocks will have incorrect destroy times
So I assume is a bug with the pickaxe tag
I already fixed it with item specific speeds for most of blocks, just to find out that item specific speeds arent needed for the axe tag 😂
Well, Block Mojangster reading this someday, here's a bit of info & a showcase vid!
I'd make a bug report for each issue to do with custom block destruction but it takes ages
Ages it takes to guess the destruction value of a block haha
The Minecraft Wiki doesn't gives the correct values at all
if it worked properly, the hardness value would be used for "seconds_to_destroy"
ideally they'd rename "seconds_to_destroy" to "hardness" since it doesn't define a number of seconds
seconds_to_destroy is not even true anyway
I remember talking about this a really good while ago
That property is being multiplied by some weird decimal
Without any tool
it seems like they tried to give "hardness" a nicer sounding name without knowing what "hardness" represents
Perhaps, my guess though is that seconds_to_destroy is simply an outdated system that haven't been looked at as much as it should
Because if I set seconds to destroy to 2, it does not means the block takes 2 seconds to destroy
from my testing, seconds_to_destroy determines the block hardness
the lack of a functioning best tool system means that, even if the block hardness (seconds_to_destroy) matches a vanilla block, the destroy time will not
and all custom diggers are treated like a suitable tool for blocks meaning a custom axe would be able to mine stone faster
From my testing, it determines the time it takes to destroy a block rather than the seconds it takes to destroy a block. I guess they confused time with seconds. Even in the docs they define it as:
Sets the number of seconds it takes to destroy the block with base equipment. Greater numbers result in greater mining times.
Which isn't any true, since a value of1.975will result in a destroy time of~2.95seconds, instead of1.975seconds.
This is a very annoying system to deal with
I added some clarification to the wiki a while ago https://wiki.bedrock.dev/blocks/block-components#destructible-by-mining
Yeah, and even that is wrong too, this part specifically:
By default, the number of seconds it takes to destroy a custom block is 1.5× its hardness.
given the values you mentioned earlier, it is
2.95 ÷ 1.975 = 1.49367089
if the values were in ticks it would be exactly 1.5
The way you wrote it made me think I could just get the hardness and multiply it by 1.5 to get the correct seconds to destroy
But that is not the case.
Or, at least not for all blocks
it says that, to get the number of seconds it takes to mine a custom block, you multiply its hardness (seconds_to_destroy) by 1.5
Yep, exactly.
The hardness for cobblestone is 2, multiplied by 1.5 is 3, 3 is not the correct value nor near to the correct value of seconds_to_destroy
cobblestone is not a custom block, custom blocks are missing tool detection
also you're still misunderstanding what I said
Maybe I just don't see any type of need of knowing the 1.5 value since it doesnt adds anything
It's okay
The real problem here is this fairy tale system lol
if mojang implemented it correctly then we wouldn't have this sort of confusion
"seconds" not representing seconds is really weird
Yeah, it's unfortunate there is absolutely no way to make custom blocks match vanilla blocks destruction times without trial & error.
the solution that would work currently to match vanilla is:
set the block seconds_to_destroy to 3.33 x hardness
add a specific_item_speeds entry that checks for the correct tool (including tier) that sets the destroy_speed to the block's hardness
I think that will also not work for all blocks, planks, for example
The 3.33 x hardness
might be to do with whether the block should drop if destroyed with the wrong tool
If that's the case it makes this even worse haha
?
huh
you mean the geometry?
would be more performant if it's just blocks.
i mean in 1x1 block space to have block that has it's texture expanding upon 3x3
is there an on exploded script event for blocks?
world.afterEvents.blockExplode
it will work
i am making custom tnt
but i want them to ignite when blown up
how do i
do that
I think this would work
world.afterEvents.blockExplode.subscribe(event => {
if (event.explodedBlockPermutation.matches("my:tnt")) {
event.dimension.spawnEntity("my:tnt", event.block.bottomCenter());
}
});
ty 🙂
ok now how do i filter so the ignite with flintandsteel event only fires if they hold the item, rather than every time they click
how are you detecting the block interaction?
blockComponentRegistry.registerCustomComponent("bears:dense_tnt", {
onPlayerInteract({ dimension, block, player }) {
player.runCommandAsync(`execute if entity @s[hasitem={item=flint_and_steel,location=slot.weapon.mainhand}] run summon bears:dense_tnt ${block.location.x} ${block.location.y} ${block.location.z}`);
}
});
you can get the item in the main hand slot like this (you need to import EquipmentSlot)
const equippable = player.getComponent("minecraft:equippable");
const mainhand = equippable.getEquipment(EquipmentSlot.Mainhand);
then check the item in the main hand slot and spawn the entity
if (mainhand === undefined) return; // Exit if the main hand is empty
const enchantable = mainhand.getComponent("minecraft:enchantable");
const hasFireAspect = enchantable?.hasEnchantment("minecraft:fire_aspect");
if (mainhand.typeId === "minecraft:flint_and_steel" || mainhand.typeId === "minecraft:fire_charge" || hasFireAspect)) {
dimension.spawnEntity("bears:dense_tnt", block.bottomCenter()); // Spawn the TNT
}
it still fires the interact event
so it takes a right click
but does nothing
unless you have the correct items
there's no way to prevent that
Is it possible to also control mobs? How to use the item on a creeper and make it explode
Any way to fix leaves not decaying possibly because of being hand placed or structure loaded?
Is there any way to make it so a block can perodically drop items, like a chicken dropping eggs?
yes.
you need to use custom components and use onRandomTick or OnTick
requires js knowledge.
I'm very new to all this and have no idea how to do that 😔
Thank you though, I'll look through it some more and see what I can figure out
Is something like the following heading in the right direction
/** @type {import("@minecraft/server").BlockCustomComponent} */
const EggDropperComponent = {
onRandomTick(event) {
const { block } = event;
// Create egg item
const egg = new ItemStack(MinecraftItemTypes.egg, 1);
// Drop egg above block
const location = block.location;
const dropPosition = new Vector(location.x + 0.5, location.y + 1, location.z + 0.5);
world.getDimension(block.dimension.id).spawnItem(egg, dropPosition);
}
};
world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry }) => {
blockComponentRegistry.registerCustomComponent(
"custom:egg_dropper",
EggDropperComponent
);
}); ```
adding the dirt tag will allow some to be placed on the block
you can't do anything about the others
thank you
ok im like 5 seconds away from crashing out
does anyone have any idea why i keep getting these errors when using the new minecraft:tick
im relatively certain it has to do with the format version, maybe im using the wrong one..?
Im currently using 1.2150
Show your block code.
GOT IT!!
it was because i was storing minecraft:tick in perumutations and not the main components section
Is it possible to create a custom loot table for suspicious sand/gravel in a structure?
There are 1 routes I thought about:
- You recreate the vanilla block as a custom block (and hope that there are components that lets you do this, and ideally without scripts. Why? Because I would rather avoid learning a whole coding language for something this simple). And use them in generated structures (or customised ore veins, whichever works best).
- If possible, use the vanilla suspicious sand/gravel block in your structure. But somehow assign them the loot table you want to use.
I have seen these blocks drop nothing a player places them. Assumingly because they don't have the loot table (similar to pick blocking a loot chest normally). That is, unless you have the nbt data attached to them.
That said, would it be possible to to modify this nbt data for an addon?
Why am I looking do try this in the first place?
I want to make an addon that adds dinosaurs for a friend. And one idea was using suspicious sand/gravel to excavate the fossils from them.
These fossils are required to craft the eggs for these dinosaurs.
Yes you jigsaw structures.
ooh. I heard of them. I'll look into that. Thanks
Does anyone know if it's possible to cut a UV like this for a block?
No
It's not possible
would anyone know how to make a red stone ore like block
Where the particles appear
I know the particle name but it just doesn’t appear like it should be
does anyone have a template for a block that utilizes the randomized textures? Like when you place it down in different locations and it uses a different texture.
is it possible to add my block to the minecraft:planks entry?
Give the proper tag.
You'll need a block placer though.
They are.
do you have example?
yes, but you need to create an item, and put the tag on it, putting the tag on the block doesn't work
{
"format_version": "1.21.60",
"minecraft:item": {
"description": {
"identifier": "biomes_and_beyond:redwood_planks",
"menu_category": {
"category": "construction",
"group": "minecraft:itemGroup.name.planks"
}
},
"components": {
"minecraft:tags": {
"tags": [
"minecraft:planks"
]
},
"minecraft:fuel": {
"duration": 15
},
"minecraft:display_name": {
"value": "tile.biomes_and_beyond:redwood_planks.name"
},
"minecraft:block_placer":{
"block": "biomes_and_beyond:redwood_planks",
"replace_block_item": true
}
}
}
}
thank you
I'm making a block with variations (vertical slabs). Is it possible to make it share the same texture as the normal block instead of having another one?
If so, what should I change to share the texture?
why do you need to create a separate texture?
@balmy quiver i got a template jf you want
Do you know if there is a template to create a custom category in the creative inventory?
i dont sorry, there is for custom groups though https://learn.microsoft.com/en-us/minecraft/creator/documents/craftingitemcatalogdocumentation?view=minecraft-bedrock-stable
Hey, so i am trying to export this bedrock model with given texture, but the result looks like complete potato.
(via blockbench, converted from java)
(shaft is actually being displayed tho)
heres how it looks like
large_cogwheel.json
https://pastebin.com/Hx6L66eT
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
How can I fix this?
I am learning how to make a crafting table.
It works just like the vanilla one, the reason why having this being a variant of it is to have items only craftable on there.
This helps keep recipes in reasonable groups for scrolling through suggested recipes with the standard crafting table.
I know of and used the crafting_table component.
However, the block in the game does not show its UI.
Am I missing something?
Is there a file I should add to ensure the UI shows up?
only the crafting table component is needed
could you send your block code?
,
"minecraft:crafting_table": {
"grid_size": 3,
"crafting_tags": [
"custom_crafting_table"
],
"table_name": "Custom Crafting Table"
}
Is this component correct?
The rest of the code is the standard.
falmmable, material instances etc.
The block does show up in the game and places without issues.
It is when you interact with it, the UI does not show up at all.
ahhh... ok. let me check
btw, there is no ui folder in my addon. I was not sure it would need one if it would use the vanilla crafting ui
it will use the vanilla ui
sadly no dice, still missinig ui.
Will remove the other code to see if any of that might be interfering
Show your entire file.
crafting table is 1.19.50+ so you should be fine
would be best to update the format version anyway
ahhh, true. will have a look there.
i've just copied your block into my BP and it works
btw the table_name will be the block's display name by default so you could remove it too
Any content log?
not for me
other than the missing textures since i don't have those in my terrain texture
oh, ok that is odd.
I loaded a new world with the addon on its own and now it loads.
I see this is likely from another addon that is interfering with it.
Will have to adjust the load order in this case.
Am happy to see it works without errors at least.
lol silly, but am 100% sure that another addon that uses custom UI was the culprit.
Note to self, test addons separately. Then try them in a batch.
And if there is an issue, move back to separate worlds before going to the batch.
I suppose is an error and not a feature right?
#1070606638525980753 message
?
Can blocks have collision outside of the normal 16x16x16?
No.
Ty
Is there a quick and easy way to make a block not considered a full block so that walls won't connect to it?
No.
Is there a NOT easy way?
There is no way.
Well, that's a bummer.
I bet if you destroy the wall it won't connect
If one can add sounds to blocks (eg. stone, wood, etc.)
Would it also mean if you use amethyst, does the block make the sounds of the vanilla blocks?
Namely when you step on them, the soft ringing they do, aside from breaking and placing them? 🤔
yes
unless Mojang lets players have more control on how they want their custom blocks to be treated in the game.
We are sadly bound to the limitations that the devs have enabled in Bedrock's code.
Wanna make a blue pig? sure
Want to make it grow wings and fly? Maybe if you know how to do that?
Can you make custom block that is not treated like a full block? nah....
I need a help from someone
some users said that my mod caused lag in there world, but i didn't experience because im using a high end device
I think this is because I have too many states in my blocks, minecraft automatically calculates how many permutations my block has
but the thing is, i dont use permutations, i use the states for the bone visibilities
Those go to the state.
i have 12 states with 2 values each and it comes out to 4096 permutations but i dont even have a single permutation
i mean there are 16
https://mcpedl.com/connected-textures-optifine-ctm/
this is my pack
also a user said that the glass panes didnt connect, but for me it worked properly
Its not about the permutation, its the amount of states. Which can be permutations.
oh, is there anyway i can reduce the states?
wait ill send the states
"states": {
"gao:connected_north": [false, true],
"gao:connected_east": [false, true],
"gao:connected_south": [false, true],
"gao:connected_west": [false, true],
"gao:connected_up": [false, true],
"gao:connected_down": [false, true],
"gao:connected_north_b": [false, true],
"gao:connected_east_b": [false, true],
"gao:connected_south_b": [false, true],
"gao:connected_west_b": [false, true],
"gao:connected_up_b": [false, true],
"gao:connected_down_b": [false, true]
}
i have 17 blocks that has this many states
the b means its connected to a full block
Yikes...
I think this is just a case of waiting dor Mojang to introsuce the connectable block trait(or component, they havent fully decided)
i mean i can still remove 6 states and have 64 calculated permutations, but it wont connect to a block
does anyone have tips how i can make a workaround to lessen the states
I actually have an idea but i dont know if this will work
state 1 : 16 values ( if same block )
state 2 : 16 values ( if a block is connected to a full block )
connected_up : 2 values
connected_down : 2 values
@vestal marsh do you think this will work, sorry for the ping
16 values for the same block? Wdym?
i meant if same block connects
the state 1 is the four cardinal directions
it detects where the same block is
for example, 1 = there is no connected blocks, 16 = all 4 sides are connected
nvm, i'll just try it, anyways thanks for the help
are there any slab templates around
i tried to make one but there's a noticeable delay when you place the 2nd slab over
registry.registerCustomComponent('custom:slab', {
onPlayerInteract: (event, payload) => {
const { block, face, player } = event;
const into = payload.params?.into;
if (
block.permutation.getState("minecraft:vertical_half") !== "bottom" ||
face !== "Up"
) return;
const heldItem = player.getComponent("minecraft:equippable")?.getEquipmentSlot(EquipmentSlot.Mainhand);
if (!heldItem || heldItem.typeId !== block.typeId) return;
const permutation = BlockPermutation.resolve(into);
if (!permutation) return;
block.setPermutation(permutation);
}
});
since we don't have client side scripts there will be no way to fully reduce the delay
unless a component is added
that's unfortunate
https://discord.com/channels/523663022053392405/1202997066612346970
It might be outdated
that's actually useful thanks!
is it possible to make a block like a redstone block, that always emits a redstone signal?
is alpha_test_to_opaque non experimental?
yes, but in the last previews it became unusable
that is, it does not become opaque, but this is temporary.
thanks
I convert a block model used in java as bedrock block, but when I open the file back, blockbench opens the model as bedrock entity. Is this a problem?
if the model is in a models/blocks folder it will be opened as a bedrock block
oh, 😅 thanks
any one know the display dimensions for first person for the trap door is? i have all the other displays for it basicly 1:1 but the first person is being annoying in bb
this is what I have
"item_display_transforms": {
"firstperson_righthand": {
"translation": [0, 2.6, 0]
},
"thirdperson_righthand": {
"translation": [0, 3.35, 2.25],
"rotation": [70, 225, 0]
},
"fixed": {
"translation": [0, 3.45, 0]
},
"gui": {
"fit_to_frame": false,
"translation": [0, -0.15, 0],
"scale": [0.625, 0.625, 0.625]
},
"ground": {
"translation": [0, 4.65, 0]
}
}
"format_version": "1.20.30",
"minecraft:block": {
"description": {
"identifier": "mosaicmania:oak_mosaic",
"menu_category": {
"category": "construction",
"group": "itemGroup.name.planks"
}
},
"components": {
"minecraft:geometry": "minecraft:geometry.full_block",
"minecraft:material_instances": {
"*": {
"texture": "oak_mosaic",
"render_method": "opaque"
}
},
"minecraft:collision_box": {
"enabled": true
},
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 2
},
"minecraft:destructible_by_explosion": {
"explosion_resistance": 3
},
"minecraft:map_color": "#D2B48C",
"minecraft:flammable": {
"flame_odds": 30,
"burn_odds": 60
},
"minecraft:block_sound_type": "wood",
"minecraft:is_axe_destructible": {},
"tag:wood": {}
}
}
}
Why doesn't it work?
Remove collision box
The axe destructible tag is not applied correctly https://wiki.bedrock.dev/blocks/block-tags
Block sounds don't go in the BP https://wiki.bedrock.dev/blocks/block-sounds
https://wiki.bedrock.dev/blocks/block-format-history#_1-19-10
Updated
minecraft:flammable
- Can now be set to a boolean, with
falsemeaning the block is non-flammable andtrueusing the default flammability values.- Renamed
flame_oddsparameter tocatch_chance_modifier- Renamed
burn_oddsparameter todestroy_chance_modifier
Thank you very much 
How do i change All blocks appearance, like switching the textures while in game?
Elaborate please. Do you mean like interacting it with changes the texture or do you mean you updated the texture on an external app and you want to see it in game?
If the first use block states and permutations
If the second type /reload all
change block texture while in game, rendering blocks not changing permutations
can anyone explain what's causing my block json not to work here?
{
"format_version": "1.21.50",
"minecraft:block": {
"description": {
"identifier": "block:brown_sand",
"category": "construction"
},
"permutations": [
{
"condition": "q.block_position_x % 4 == 0",
"components": {
"minecraft:material_instances": {
"": {
"texture": "brown_sand_0",
"render_method": "opaque"
}
}
}
},
{
"condition": "q.block_position_x % 4 == 1",
"components": {
"minecraft:material_instances": {
"": {
"texture": "brown_sand_1",
"render_method": "opaque"
}
}
}
},
{
"condition": "q.block_position_x % 4 == 2",
"components": {
"minecraft:material_instances": {
"": {
"texture": "brown_sand_2",
"render_method": "opaque"
}
}
}
},
{
"condition": "q.block_position_x % 4 == 3",
"components": {
"minecraft:material_instances": {
"": {
"texture": "brown_sand_3",
"render_method": "opaque"
}
}
}
}
],
"components": {
"minecraft:collision_box": {
"origin": [0, 0, 0],
"size": [1, 1, 1]
},
"minecraft:selection_box": {
"origin": [0, 0, 0],
"size": [1, 1, 1]
},
"minecraft:destructible_by_mining": {
"value": false
},
"minecraft:destructible_by_explosion": {
"value": false
},
"minecraft:geometry": "geometry.brown_sand",
"minecraft:map_color": "#ffffff"
}
}
}
almost everything
would be best to start by creating a post explaining what you're trying to create
just a block with " random textures" like texture changes depending on where the block is put down
how can you check for destroyed blocks in general?
BlockComponentPlayerDestroyEvent is only for player destruction sadly
Maybe just with tick, I'm not sure
is it possible to add custom sounds to blocks?
Yes.
How
nvm
are events still relevant?
No.
custom components now?
Yes.
Yes, we are actually moving to API 2.0.0 and custom components have changed their format, becoming stable in 1.21.90
NICE! thanks
{
"format_version": "1.21.20",
"minecraft:block": {
"description": {
"identifier": "tm:shirne"
"menu_category": {
"category": "construction",
"group": "minecraft:itemGroup.name.concrete",
"is_hidden_in_commands": false
}
},
"components": {
"minecraft:display_name": "Custom Block",
"minecraft:flammable": false,
"minecraft:light_dampening": 0,
"minecraft:collision_box": true,
"minecraft:custom_components": [
"tm:shrine"
],
"minecraft:tick": {
"interval_range": [
1,
1
]
},
"minecraft:geometry": "geometry.tm.shrine",
"minecraft:material_instances": {
"*": {
"texture": "shrine",
"render_method": "alpha_test"
}
}
}
}
}
got this block working I can setblock it however I can't find it in the creative menu nor I can /give it
Any content log?
oh it works now
the group was just wrong
"group": "minecraft:itemGroup.name.concrete"
also I need your opinion which on is better to name blocks in RP or just display_name?
You can utilise both depending on your use case.
Version 1.21.20 does not support namespace in group space
it works now though
{
"format_version": "1.21.20",
"minecraft:block": {
"description": {
"identifier": "tm:shirne",
"menu_category": {
"category": "construction",
"is_hidden_in_commands": false
}
},
"components": {
"minecraft:display_name": "Custom Block",
"minecraft:flammable": false,
"minecraft:light_dampening": 0,
"minecraft:collision_box": true,
"minecraft:custom_components": [
"tm:shrine"
],
"minecraft:tick": {
"interval_range": [
1,
1
]
},
"minecraft:geometry": "geometry.tm.shrine",
"minecraft:material_instances": {
"*": {
"texture": "shrine",
"render_method": "alpha_test"
}
}
}
}
}
are there any requirements for a generated en_us.lang file?
I've generated a file with 300 entries for tile and item names but it seems like it does not link to the actual items
I get a correct value when using tellraw to see the translations tho
Whats the translation id look like?
tile.blocks:stripped_sycamore_wood.name=Stripped Sycamore Wood
item.blocks:stripped_sycamore_wood.name=Stripped Sycamore Wood
blocks is the identifier of the addon
Ah, for item remove the .name.
Old: item.sirlich:hoe.name=Hoe
New: item.sirlich:hoe=Hoe
Essentially you just need to remove the .name
any reason you haven't set the item display name to the same translation key as the block?
I can take a guess and say that they probably want to make their block a fuel source
I would set the item's display name to tile.blocks:stripped_sycamore_wood.name
Also, if anyone might know, I am trying to make a placement filter for my flower pot.
If block below is air, then I want the block to break
I tried using allowed_faces and setting it to up, in and outside of the condition, but neither worked
we'd need improved placement filter conditions to do that properly
script api playerBreakBlock event for the block below
it won't detect any other form of the block below being removed though
That would mean anytime I break a block this would run
yes
Yeah that is not worth it
ok guess what
I don’t know how
But I figured it out. (Edit nvm, still more testing)
lol
Yeah I couldn’t figure it out unfortunately, if air had a tag it would be nice
i think separate support tags would be best
e.g.
"conditions": {
"allowed_faces": ["up"],
"block_filter": [
{ "tags": "q.any_tag('minecraft:top_support')" }
]
}
I don't like the idea of collision box being used outside of collision
I also had an idea of an attachment box but tags seem to align better with what vanilla does
Ah yeah I’ll use that
Do most blocks have that tag?
no that doesn't exist
just an idea based on how vanilla blocks are categorised
It would be nice if you could simply put a ! behind the block you don’t want it to be on
lol
shouldn’t be this hard to make a block break on there being an air block below it with the placement filter
more molang
"condition": "q.any_block('example:block') || q.any_tag('dirt', 'sand')"
what if I just checked for all the tier destructible tags
Bedrock doesnt have that.
that's the is_*_item_destructible tags
yes
that’s what I meant
mb
I could just use those but it would be too much
might as well just allow it to be placed on any block even air
it’s unfortunate but it’s fine I guess
Even a prevented_block_filter object would be nice
I think copying entity filters with all_of, any_of and none_of would be good too
honestly lol
But if they wanted something out that would be simply and quick, i’m just saying i’d love to see a prevented blocks filter
why isn't there a wood_tier_destructible tag?
Do tier tags have any utility anyway?
It makes mining faster.
The tier tags?
Last time I checked they didn’t do that
Yes the tool tags, but not the tier ones
they're also supposed to reflect whether a block needs the tool to drop afaik
no, it (should) make mining with the wrong tool slower
but it doesnt
Thats the is _ item isnt it?
the is_*_item tags cause tools to mine the block faster
the tier_destructible tags currently do nothing, but should result in a 5x multiplier being applied to seconds_to_destroy if the wrong tool is used instead of 1.5x
we would also need a wood tier for that to be possible though
I was thinking of digger.
I assumed this but they don’t yeah… had to do a script for that
would be nice if they did
is there any way to make an block that is placeable by an item only placeable on solid blocks?
beforeOnPlayerPlace custom component didn't work
It should work now in 1.21.90
is there any way for custom hitboxes for blocks?
Multicollision? No
Normal collision? Yes
Stairs, cauldron, things with not one collision.
Is it not possible to use different loot for different states of a block?
I'm trying but my loot doesn't change
Yeah just add the loot table component to each permutation.
So it's very strange, my block is like the leaf litter, I put different loots for each state each one giving the corresponding amount but regardless of which state it always gives me 1, as if it were the base loot
Thanks, I ended up finding out it wasn't working because I made a pretty stupid mistake
We've all been there, glad to hear it's fixed!
alright, how with normal colission?
With the collision box component
Are we able to make smooth transitions between textures to mimic things like furnace's when on? I'm looking at the texture and it's not flickering but transitioning textures
ah wait, guess they're just using a flipbook texture?
yeah nvm. just a flipbook texture with blend_frames
the more frames the smoother it is. timing takes a few trys though
well I had it all working without using material_instances and blocks.json, but that doesn't allow me to switch states. Moved it into material_instances and updated the block geometry to include material instances for down, east, north, south, up, west. Unfortunately that doesn't seem to have worked and I'm not quite sure why.
followed the wiki guide 😔
the direction material instances are built in and don't need to be defined in your geometry UVs
the material instance selection priority for the north face of a cube is
UV material_instance > north > *
make sure you have have a * instance since that's required
if each side of the block has a different texture, I'd personally use * for down
thanks, didn't realize it was built in
'*' is not required, at least the errors are gone and the block visuals are showing correctly
oh
they must have changed that at some point
Can you use > in molang for permutations
Like if cmd:balls > 7
The permutation is active
Yeah.
Ok
Also if multiple permutations are met like
One is cmd:balls > 7
Another is minecraft:block_face == "up"
Can you have components from both of them combine so long as they dont share any components
Like the cmd:balls > 7 one has a minecraft:collision components
And minecraft:block_face == 'up' has a minecraft:light_emission component
If a the blocks values meet both values both will active
Does match_tool only prevent the block from being dropped when broken in the hand? Isn't it possible to make it not drop if it doesn't have a supporting block?
like short or tall grass
yes they would combine
Is it possible to make a block with a 45degree angle like this?
I don't like the look of my slanted framed blocks, so I'm trying to explore better options again
From my understanding, the mesh thing is only entities
Not really no.
Guess I'll have to stick with this then
Looks ugly from certain angles, because all you see is just the little indents
Minecraft is the game of squares, not triangles 🤭
with the new script version, how can i now make custom components?
it's very similar to how it used to be from the scripting side
https://wiki.bedrock.dev/blocks/block-events#registering-custom-components
i meant custom components
that page is about custom components
can i also ask if i checked a block every 10 ticks using the custom component will it lag the world
the block im talking about are ores that spawn naturally
what are you checking about the block
im gonna make an connected outline mod
for ores
so it checks the permutation
i mean, it checks the adjacent blocks of it sorry
I've personally been avoiding connection using permutations since it's slow and it's quite easy to run into the permutation limit
i dont use permutations, i use bone_visibilities
im just wondering if i check all the ores for like 10-20 ticks will it cause a lag
because there are prolly hundreds of ores even if the render distances are low
understandable misconception given the name of the permutations array,
if you're using states, your block has multiple permutations
https://wiki.bedrock.dev/blocks/block-permutations#what-are-permutations
Stairs for endermite
that might slow things down
i remember trying to make custom walls and things being quite slow
oh now i get it, but my other mod have 60+ blocks that has 64 permutations and still not a problem for a lag
ohh.
"minecraft:tick": {
"interval_range": [10, 20],
"looping": true
}
maybe if i set looping to false, does it check only once?
this also uses the custom component tick btw
yes
but if you break an ore the others won't update
I've also heard that ticking can be unreliable in world generation
yeah i can do that with onplayerplace and break
yeah maybe ill just make a workaround after a world generates
thanks for the help
Can we set custom blocks to be placeable with dispensers?? like shulkers and powdered snow??
Why does the custom block I made look darker than the vanilla block? Is there a way to make them share the same color?
they use the same texture
Hey chat, what block component is it that causes vanilla fences to connect to a custom block? Trying to get the fences to unstick themselves.
No.
You may need to mess around with ambient occlusion and face dimming.
You cannot modify that.
How does the game know what blocks to stick to?
Would it stick to every custom block?
yes
and where in the block file is that
Well dang.
I'm not sure if there's a way to avoid this
ambient occlusion affects custom blocks differently and changing the intensity might not fix things
I think it's the same issue that causes cross geometry blocks to become dark
anyone knows why my recipe isn't working at all?
You need to create a block item.
Block tags arent transferred to items automatically.
As some other thing you need an item block as recipes only accept item tags not block tags
Anyone know a way to mod Vibrant Visuals glowing sign text so it looks the same as Fancy Graphics?
The black text looks terrible
is this how uv lock is formatted?
"minecraft:geometry": {
"identifier": "geometry.geo",
"uv_lock": [
"up",
"down"
]
}
Anyone knows if it's possible to use a custom breaking flipbook without entities?
is it possible to add custom components on vanilla blocks?
No.
Can you add flipbook textures to blocks containing multiple textures w/per-face UV?
Don't know if it's as simple as just putting the texture path in with the others and it just inherently knows which one it is or if there's something special I need to do/it's not possible
oh nvm, they all need to be listed out as separate terrain_textures, I left some old stuff in there with the last block I had that copied and forgot to remove
is there a list of updated block components that are locked behind experimental toggles / preview version?
can I make a block's loot table change based on the item held while breaking it?
eg block is broken with shears > drop seeds
block is broken with hand > drop block
hello peolle, how do yall do block animations?
As in how entity animations work, is not possible. You have to do flipbook animations
yeah flipbook animations like the sculk shrieker, can you link some references or documentation?
i downloaded a custom Fluid template but the blocks are from below the 1.21.21 update, ¿there's a custom Fluid template for the current versions of Minecraft?
how do you manipulate the UV and the direction of a flipbook animation?
you have to replace the block events by scripts, in wiki.bedrock.dev there is a section on event migration
yo, i'm placing some "block".json files into the behavior pack folder, but they don't appear in game, what could i be doing wrong?
Guys, I have this block with a "blend" render method. As you can see it has a colored box inside it. But when I'm holding it, I can't see the box. That's because of the render method, I assume. But is there a workaround so I can actually see the box when I'm holding the block?
If I recall, try reordering the bone hierarchy.
Also, I remember reading in the Bedrock Wiki about arranging the cubes position in Blockbench so the block icon in the inventory is shown as it's supposed, but I couldn't find it again...
That's precisely what I'm looking for! 😅
I remember reading about it in the wiki... but now I'm trying to find it and I can't get to that page...
I dont recall it being on the wiki actually. I think it was in this Discord.
Hmmm... do you recall where can I find it?
it was on the wiki but I thought that issue was fixed
might be only be fixed for certain render methods
looking at that block, you could use alpha_test_single_sided instead
I'm looking in the wiki right now but I cannot find it 😦
Here's my current hieracy:
- "frame" is the wood frame
- "box" is the crystal box
- "core" is the colored cube
let me try that...
Ok, it kinda works... I mean, the "box" frame has a transparency (it's 50% white), but I can work with a white frame too if transparencies are out of the table
oh i didn't see that
I don't think the translucency there is worth the issues blend has
hmm..., now the outer "box" is rendering on and off
Agree. But alpha_test_single_sided makes the transparent box ticks, like, dissapear and reappear
oh nvm
it was a texture issue
what's the difference between alpha_test_single_sided and alpha_test alone?
alpha_test_single_sided / alpha_test
You can use blockbench to see how's gonna be rendered? Or you just made this mockup by hand?
no I did that by changing the preview settings
can I ask you how you did that exactly?
ty!!
how do I set block break particle? mine is just a a question mark dirt block
"texture": "wiki:particle_texture"
}```
or the "*" in material_instance iirc
this might not work because of a bug (MCPE-219143)
it will be fixed in 1.21.100
To Do (Open)
Unresolved
I see thanks a lot
was down also a fallback or am I wrong
nice
for the particle texture what is it supposed to be?
my blocksuddenly went unknown
oh just wrong format version
I moved to 1.20.70 and the customComponents no longer works
the destruction particles component needs 1.21.70+
and custom components need 1.21.10+
[Scripting][error]-ReferenceError: Module [@minecraft/server-gametest] is unrecognized. If this is a Native module, did you remember to add it to your manifest.json?
[Scripting][error]-Plugin [Template - 0.0.1] - [main.js] ran with error: [ReferenceError: Module [@minecraft/server-gametest] is unrecognized. If this is a Native module, did you remember to add it to your manifest.json?]
[Scripting][warning]-Component 'tm:shrine' was not registered in script but used on a block
it gave this after I changed to 1.20.70
should use 1.21.70 not 1.20.70
welp nevermind
the issue was copilot imported some random stuff on the custom component
where can i find those options on the program? i'm trying to make a transparent block but the other side of the texture is showing
in Minecraft?
oh so you can only see the change in game?
changing your blockbench settings won't affect how it looks in-game
but it's in File > Preferences > Settings i think
so, i was able to import the block into the game, but it's texture is invisible, what can i do about it?
yeah but in this link only shows blocks event when the player steps on it
do tags in block desciptors accept custom tags? or just vanilla ones
how do i correct this?
Be specific and include relevant details about the question upfront.
- What are you trying to accomplish?
- If you have code, which part is not working? Any content logs?
- What have you already tried?
- Have you searched the Bedrock Wiki?
sorry for the lack of intel, basically the problem is, if i'm facing any other direction, the block the block is placed on level with ground (as it should be), but when i'm facing north, the block is placed on a 90 degree angle
how do i use the minecraft:multiface_feature
That is a #1067869232395735130 question.
oh, i thought i was a block feature, i would try it on the block i'm working on to make it work like it's supposed to 
How the heck do you do carried textures for non full blocks with block sprites. I made my own vertical slabs pack and I’m trying to do waxed copper vertical slabs that have the carried textures to show that they are waxed like the bedrock tweaks add on. I downloaded that add on and tried to decipher it and reverse engineer it and I can’t make it work..
I know it’s something to do with the blocks.json but it’s so confusing and I can’t find straightforward documentation on it..
You can use item visuals to display the hotbar differently than the actual block.
Is that in the blocks.json?
No its a componeng.
You should not be using blocks.json except for sounds.
Bless. I’ll check it out. Thank you Smokey❤️
Do you know if there is a bedrock.dev page about that? I cant find anything..
Or any documentation
pffffft nvm I found it.
can I do a 3D icon thats different than the block itself though?
Yes.
For example, your actual block can be geometry.vertical_slab but your icon can be a different geometry, say geometry.wacky_model
Got it. thanks for the help sorry to bother:)
how can i add the top part of a slab and make them stack as a full block?
oh, do you any source where i could find a template script for that?
Good way to make blocks oxidize a. At the same rate as vanilla copper, and b. Change into another block but maintain its orientation?
Using custom components.
Aghhhh haha ok.. I need to brush up on my scriptingXD
does this block rotation method still works?
"properties": {
"block:rotation": [ 0, 1, 2, 3, 4, 5, 6]
"permutations": [
{
"condition": "query.block_property('block:rotation') == 2",
"components": {
"minecraft:rotation": [0, 0, 0]
....
Yeah, you just need scripting to set the states
as on this one?
{
"format_version": "1.21.90",
"minecraft:block": {
"description": {
"identifier": "wiki:custom_block",
"states": {
"wiki:string_state_example": ["red", "green", "blue"],
"wiki:boolean_state_example": [false, true],
"wiki:integer_state_example": [1, 2, 3],
"wiki:integer_range_state_example": {
"values": { "min": 0, "max": 5 } // The same as [0, 1, 2, 3, 4, 5]
}
}
},
"components": { ... },
"permutations": [ ... ]
}
}
oof, sorry i'm am beginner on this addon stuff, could we continue discussing there?
It would be better if you created a post in this same channel
how do I prevent fences from connecting to my custom block?
Cant.
is there a way to make custom leaves that actually look correct?
Not fully as far as I know. You can almost do it with some complicated culling rules.
is there at least something that works pretty good
It appears that "condition": "default", is no longer valid in block culling
Use same_block
yeah it doesn't work
What's the problem?
fixed it
this template has multiple issues
hmm well not quite fixed
is there a way to cull if a different solid block is on a side?
for anyone using this template, use this block culling instead
whats the best way to recreate the effect where leaves surrounded by leaves / solid blocks turn opaque?
does world gen of blocks* trigger onPlace?
It should last I remember. Maybe not.
thanks
Does anyone have the vines' block file? I couldn't find it
There is no vanilla block files.
is there a way to change leaves model?
No.
This is not a vanilla behavior
does enyones know a script template for a block to summon an entity when broken?
it absolutely is and pretty much always has been
https://wiki.bedrock.dev/blocks/block-permutations#maximum-amount-per-world
Just remembered this. Does this mean that the sum of permutations of each block cannot be > 65536? For example, I have two blocks, one has 4 permutations, the other has 6. Therefore registered = 10?
I'm just not sure what it means "sum of permutations of blocks that are in the world" or "sum of registered permutations"? I tried to get this warning, considering the first option, but having placed blocks in total for 113,246,208 permutations, but I did not receive the warning. So I think it is the second option, but I want to make sure
yes it is the total number of permutations each block type registered to the world has, but there are also around 50000 vanilla permutations
the number of blocks placed in the world is irrelevant
Are they taken into account?
I mean vanilla blocks
I'll double check
oh apparently not
weird that it doesn't specify custom blocks anywhere
I wonder what it is about them specifically that would cause performace problems
is there a way to fix this?
no

you can if just by visual by command setblock it or use a permutation controller addon
fence connection is not handled with block states
set the block to what?
ohh nvm they still autoconnect when setblock
just tried it
I thought they wont auto connect by command setblock
my bad
I’m trying to put together a “copper_behavior” script that has block maps for the different oxidation, de-oxidation, waxing, and unwaxing stages, and incorporates the vanilla behaviors with the axe and honeycomb, and replaces the blocks when they are interacted with correctly/oxidize on their own, with the correct block but maintaining the permutations of the previous block. It’s proving difficult.. anyone have something like this already?
How are you setting the permutations?
Cardinal Rotation based on facing direction when placed.
I meant via scripts. It seems youve gotten it to change different blocks but not maintain the states.
I haven’t.
I’m not versed in JavaScript and am working with code mostly written by gpt. So obviously it’s not workingXD
Ah, well I don't have something like that but I do have a script that mimics a waxed item: https://github.com/SmokeyStack/adk-lib/blob/main/experimental/scripts/item/item_wax.ts I'd recommend learnign the basics of the ScriptAPI and custom components as well.
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:
Bedrock Wiki
- Block Events
- Block Events Migration to Custom Components
- Item Events
- Item Events Migration to Custom Components
MS Docs
I’ll check this out, thanks
I keep getting the error culling condition specified is same_culling_layer, but geometry has no culling layer defined. My custom blocks will cull against opaque vanilla blocks, but not against each other, and I'm trying to figure out why.
Culling rules:
{
"format_version": "1.21.80",
"minecraft:block_culling_rules": {
"description": {
"identifier": "namespace:cube"
},
"rules": [
{ "condition": "same_culling_layer", "direction": "north", "geometry_part": { "bone": "root", "cube": 0, "face": "north" } },
{ "condition": "same_culling_layer", "direction": "south", "geometry_part": { "bone": "root", "cube": 0, "face": "south" } },
{ "condition": "same_culling_layer", "direction": "east", "geometry_part": { "bone": "root", "cube": 0, "face": "east" } },
{ "condition": "same_culling_layer", "direction": "west", "geometry_part": { "bone": "root", "cube": 0, "face": "west" } },
{ "condition": "same_culling_layer", "direction": "up", "geometry_part": { "bone": "root", "cube": 0, "face": "up" } },
{ "condition": "same_culling_layer", "direction": "down", "geometry_part": { "bone": "root", "cube": 0, "face": "down" } }
]
}
}
Block definition:
{
"format_version": "1.21.70",
"minecraft:block": {
"description": {
"identifier": "namespace:block"
},
"components": {
"minecraft:material_instances": {
"*": {
"texture": "namespace:texture",
"render_method": "opaque"
}
},
"minecraft:geometry": {
"identifier": "geometry.cube",
"culling": "namespace:cube",
"culling_layer": "minecraft:culling_layer.undefined"
},
"minecraft:collision_box": {
"origin": [ -8, 0, -8 ],
"size": [ 16, 16, 16 ]
},
"minecraft:selection_box": {
"origin": [ -8, 0, -8 ],
"size": [ 16, 16, 16 ]
},
It looks like this:
I believe it is an issue with the game recognizing it as a full opaque block.
how can i apply this to a custom block so when i break it, it summons an entity?
onPlayerBreak(event) {
event.block // Block impacted by this event. This is the block after it has been broken.
event.brokenBlockPermutation // Permutation of the block before it was broken.
event.dimension // Dimension that contains the block.
event.player // The player that broke the block. May be undefined.
}
One update broke the culling :c
Hiii who knows how to increase chances of getting mob heads in more mob heads pack so that it becomes 100% drop rate
Does anyone know how to fix it?
