#Blocks General
1 messages Β· Page 11 of 1
Is there anyway to make the player's camera go through a custom block?
make that it doesn't have a collision but has a selection box?
Seems like that works. Interesting that it still collides when its ontop of your head
Events are already deprecated or disabled, you can't use it anymore... Use scripts
Gotcha thanks
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
here @uneven hamlet if you don't know it yet...
is there a way to make the text better like neat and clea should be (awnings only, i tried en_us and the display_name
Yeah use lang files.
Does anybody know if making the friction low will it still slow you down if your in the block and it has no colision?
Is it possible to rotate a texture 90 degrees without making a new texture?
Yes. Use uv rotation.
In block geometry.
If I use a different block geometry, will that mess with lightning and rendering if it's intended to be a full block?
which block geometry are you currently using?
geometry.full_block
But to get the textures rotated properly, I have copies facing different directions
Oh then you cant use uv rotation. My bad.
full_block has a load of hardcoded stuff so that's probably the best solution for now
It would be interesting if Mojang released more vanilla models for some common blocks as well as for double blocks or technical blocks like stairs.
Double blocks would be hard since we cant even make proper double blocks yet.
And likewise stairs as well.
They need to release the tech first.
really, but what I said was just some examples and dreams that maybe one day or not will be realized
but one question, with the new collision component for entities, is it possible to create fake stairs, with entity?
i tried to use that but it doesnt change, maybe i am wrong with my code. Can you give an example?
#add-ons message
is it should be on bp or rp? I tried in rp and it doesnt change
RP.
What does your code look like?
No spaces
Hi all. Are there any tutorials/templates out there for making slabs capable of double-slabbing?
Probably. It's quite simple though. Search this discord or mcpedl.
I've made one myself.
I managed to find something that I was able to duplicate... but it seems that the script breaks the waterlog capability of the slab. Any idea what I need to add to allow the slab to allow both double-slab, and water-logging? maybe that's more a scripting question
Add the waterlog component?
already has it. If I disable the script, the waterlog component works, but as the script is using beforeEvents to add the double slab, it's not recognising the water bucket interaction
Ah that could be it.
I can waterlog the slab if I place it in a water source, but not the other way round... although, it waterlogs successfully if I target a side-adjacent block. So what would I need to add to my script to allow me to waterlog it on interaction?
oh.... crouch.
How do I make a door that is larger than 16x32?
Use multiple blocks.
but when you right click they open. That's what I'm looking for.
for example. A door 24 wide and 24 high
Youll need to do advance coding for that using scripting.
can someone please explain how item_specific_speeds work??? I can't get it to work reliably
anyone have issues with the geo full_block making plants or flowers textures freak out? no parts of the texture touch any sides of blocks. and its only with full block geo that does this
nvm changing render method to opaque fixed it
Anyone know how to make the maximum height of the model in the bedrock block more than 30? Same reason why I saved the texture, so I didn't know it
Can't, you just have to place more blocks after placing the first block. Just how tall plants do it.
So need to make multi parts
For blocks
"As far as I'm aware"
Owh okay
What's the maximum amount of numbers that's allowed to be assigned to one state?
is it 0-9?
16
Each state may have up to 16 valid values defined
-# https://wiki.bedrock.dev/blocks/block-states
whatβs wrong?
I was able to fix the Rose Gold Ore, but Emeraldite, Sapphire & Ruby i donβt understand what is done incorrectly.
It saying that the block does not exist
Look into the block file and log for any related error
Everything seems fine, i exported it, rose gold, ruby came back with sapphire, now rose gold is gone with ruby and emeraldite after another reexport
soft diamond went missing after having sapphire reappear?? without changing anything
Did you check the file itself?
Bot in bridge but using file manager itself.
#1350113886392553595
i dont really see any interesting in waterlogging
why people make blocks waterloggable
ask why waterlogging exists in general.
hmm
load up a minecraft world before update aquatic and place a door underwater.
it breaks? or what
whats the format version for the blocks.json in RP
I like having thw water logging cause i use it for my grate block
"1.21.40"
i set it to 1.10.0 and some ores had wrong format. I fixed it!
How do I make a slab place on bottom and top half of a block
You'd probably need to use scripting detect what block it is and handle that directly.
"format_version": "1.21.20",
"minecraft:block": {
"description": {
"identifier": "eidolon:crucible_on",
"states": {
"eidolon:flesh_purification": {
"values": { "min": 0, "max": 4 }
},
"eidolon:arcane_gold": {
"values": { "min": 0, "max": 4 }
},
"eidolon:sulfur": {
"values": { "min": 0, "max": 2 }
},
"eidolon:sprouting_fungus": {
"values": { "min": 0, "max": 5 }
}
},
"menu_category": {
"category": "nature",
"group": "itemGroup.name.ritual"
}
},
"components": {
"minecraft:tick": {
"interval_range": [
5, 5
],
"looping": true
},
"minecraft:geometry": "geometry.crucible",
"minecraft:material_instances": {
"*": {
"texture": "crucible_water",
"render_method": "alpha_test"
}
},
"minecraft:display_name": "Crucible\nΒ§9Eidolon",
"tag:ore": {}, "minecraft:destructible_by_mining": {
"seconds_to_destroy": 1.0
},
"minecraft:collision_box": true,
"minecraft:selection_box": true, "minecraft:custom_components": [
"eidolon:interact",
"eidolon:tick"
]
},
"permutations": [
{
"condition": "q.block_state('eidolon:arcane_gold') >= 1",
"components": {
"minecraft:material_instances": {
"*": {
"texture": "crucible_blue",
"render_method": "alpha_test"
}
}
},
"condition": "q.block_state('eidolon:flesh_purification') >= 1",
"components": {
"minecraft:material_instances": {
"*": {
"texture": "crucible_yellow",
"render_method": "alpha_test"
}}}}]}}```
Does anyone know why the arcane gold texture doesn't work?
The items in the permutations array need to be separate
"permutations": [
{
"condition": "q.block_state('eidolon:arcane_gold') >= 1",
"components": {
"minecraft:material_instances": {
"*": {
"texture": "crucible_blue",
"render_method": "alpha_test"
}
}
}
},
{
"condition": "q.block_state('eidolon:flesh_purification') >= 1",
"components": {
"minecraft:material_instances": {
"*": {
"texture": "crucible_yellow",
"render_method": "alpha_test"
}
}
}
}
]
formatting the JSON would make it easier to read
It worked, thanks.
hey guys how do i make my looting table work with fortune?
that is in the loot tables in pretysure
already got it, now i need to figure out how to make blocks work with efficiency
π
im tryna figure how i can make it work with a pickaxe
i cant find the tags
to use
bro i cant either
i just found this,
https://wiki.bedrock.dev/blocks/block-tags#list-of-vanilla-tags
π so its just tag: then whatever the tag is?
yeah
idk if thats right but ill test
uhhhh
this is how minecraft puts it
"tag:minecraft:is_pickaxe_item_destructible": {},
"tag:minecraft:diamond_tier_destructible": {},
"tag:example_namespace:custom_block_tag": {}
π confusing puting multiple :
and i also gotta animate my block
which i think ive done
but some angles have a missing texture
idfk, i have the same problem on most of my blocks
btw i figured how to make the pickaxe break work
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 16.666,
"item_specific_speeds": [
{
"item": {
"tags": "query.all_tags('minecraft:is_pickaxe')"
},
"destroy_speed": 5
},
{
"item": {
"tags": "query.all_tags('minecraft:is_pickaxe', 'minecraft:stone_tier')"
},
"destroy_speed": 2.5333
},
{
"item": {
"tags": "query.all_tags('minecraft:is_pickaxe', 'minecraft:iron_tier')"
},
"destroy_speed": 1.666
},
{
"item": {
"tags": "query.all_tags('minecraft:is_pickaxe', 'minecraft:golden_tier')"
},
"destroy_speed": 0.8666
},
{
"item": {
"tags": "query.all_tags('minecraft:is_pickaxe', 'minecraft:diamond_tier')"
},
"destroy_speed": 1.2666
},
{
"item": {
"tags": "query.all_tags('minecraft:is_pickaxe', 'minecraft:netherite_tier')"
},
"destroy_speed": 1.1333
}
]
},
"tag:minecraft:is_pickaxe_item_destructible": {},
format version 1.21.40
now i need to animate the texture on attachables
π i also need to find away to stop silktouch from working on it
is it on format version 1.21.40?
yes
cuz mines working
Min engine version
Nono I mean in the manifest what version you used...
mine is currently: "min_engine_version": [1, 21, 60]
yes and im using bds
Try local world.
Set your format version to latest.
what is the actual latest?
1.21.60
YOOO
i can edit the base item look
soooo, i figured it out
what was the issue?
my bds wasn't the most current version... i feel so stupid
nah its alr
Many such cases.
soooo, now i have another problem, i need fortune to work on this block, i know its in the looting table and i kinda did it but kinda didn't.
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:amethyst_shard",
"weight": 1,
"functions": [
{"function": "set_count","count": {"min": 1,"max": 1}},
{"function": "set_count","count": {"min": 1,"max": 2},"conditions": [{"condition": "match_tool","enchantments": [{"enchantment": "fortune","levels": {"min": 1,"max": 1}}]}]},
{"function": "set_count","count": {"min": 1,"max": 3},"conditions": [{"condition": "match_tool","enchantments": [{"enchantment": "fortune","levels": {"min": 2,"max": 2}}]}]},
{"function": "set_count","count": {"min": 1,"max": 4},"conditions": [{"condition": "match_tool","enchantments": [{"enchantment": "fortune","levels": {"min": 3,"max": 3}}]}]}
]
}
]
}
]
}
it works for dropping 1 when there isnt fortune on the pickaxe but when there is any level of fortune on it, it acts like every level is on it.
for example, if i have fortune 1 on my diamond pickaxe and i break it, it will drop 3 of the item.
Any fixes?
@vestal marsh @feral kindle any fixes?
Mb its 3am when u said this and it's like 5am that I'm replying
Idk how to use fortune it's best to look at the v
Vanilla loot table for diamonds
took me a while but i figured it out.
Added known functionality of vanilla block tags to https://wiki.bedrock.dev/blocks/block-tags#list-of-vanilla-tags
ty ππ»
anyone has typeIds of all of the ore blocks
Are you not able to add vanilla tags like "minecraft:is_pickaxe_item_destructible" to blocks?
I added them to my blocks with no change to their mining speeds
I am curious why they support different block destroy speeds being set both within items and in blocks
You can.
Im guessing format version.
that's what I was thinking, letm e see
did not seem to fix it unfortunately
updated item format to 1.21.70
π
What are the odds that the one tool I decide to test this with is the one where I forgot to put the minecraft identifier prefix in the digger component
88%
Can i rotate a texture for each block sides?
Vanilla geo? No
Custo geo? Yes
Ah okay
Does anyone have any idea what the vanilla path / definition is for 'stripping wood'
It sounds like a nice crunch sound. But cant find it in vanilla examples
Nevermind found it!
use.wood
It is possible to let a block mine faster when using different tool?
I think this is removed...
No that works.
It is not working
When I mine that, it only uses the "seconds_to_destroy"
Whats your format version? Any particular reason youre using specific item instead of the block tag?
My format version is 1.21.10
Use the latest format version.
I don't know how block tag works
What is the latest format version?
I cannot find that from any docs
Is it 1.21.60?
It worked.
Thanks
@vestal marsh There is something wrong when I try breaks the block
It seems like breaks and recover until the time reachs the seconds_to_destroy
should be fixed in 1.21.70
Do you know how to let effiency enchantment works on that custom block
are you trying to replicate vanilla pickaxe destruction?
Just trying to make ore blocks with same property but different id
I have done everything including the loot but not the hardness one
the proper way to make a block mine faster with a pickaxe is to add the minecraft:is_pickaxe_item_destructible tag
that should work with efficiency
Add this to the end?
yes, you should also remove item_specific_speeds
It is useless after adding this tag?
it would probably mean that the block gets mined too quickly
Should I add that tier tag too for the different ore?
should the ore only drop if mined with a good enough pickaxe?
No, I mean different speed
The drop controller is written in script JS
the tier tags do not affect destruction speed
okay
the tier tags don't have any functionality, but if the ore only drops when mined with an iron pickaxe or better, the iron tier tag should be added to the block
the vanilla hardness (seconds_to_destroy) of diamond ore is 3 if you want to use that
oh
I need to rewrite the seconds_to_destroy then...
seconds_to_destroy needs to input hardness instead of the seconds?
for deepslate diamond ore it's 4.5
seconds_to_destroy is called the wrong thing
it should be called hardness, since it doesn't refer to how many seconds it takes to destroy the block
(mojang issue)
It has totally faked me
I am a script api coder but I always face huge difficulty with the JSON based api as the poor document
Coal ore and iron ore both have the same hardness of 3
But the breaking time is different
How can Minecraft determine them
for custom blocks the seconds to destroy is always hardness x 1.5
this isn't including tools speeding up the mining
there might be a workaround
let me check
I need this because I am making an anti xray system works by replacing the vanilla ore block and stone/netherrack block
https://github.com/jasonlaubb/Matrix-AntiCheat/tree/rewrite/Matrix_BP/blocks
this seems to be correct
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 9.99, // Hardness x3.33 - mined with incorrect tool
"item_specific_speeds": [
{
"item": {
"tags": "q.any_tag('minecraft:is_pickaxe') && q.any_tag('minecraft:iron_tier', 'minecraft:diamond_tier', 'minecraft:netherite_tier')"
},
"destroy_speed": 3 // Hardness - mined with correct tool
}
]
},
"tag:minecraft:iron_tier_destructible": {},
"tag:minecraft:is_pickaxe_item_destructible": {}
you'll probably have to wait until 1.21.70 for it to work properly
Not possible to have perpendicular collision if that's what you mean.
No no
I mean like just the bones
I can sort the collision out, those are fine
I guess I could do a full block side bone with a custom texture, but I'd need to then make an edited texture for all the textures to match
That would be hundreds of textures π
No longer supported
I think the only way for me to actually make it is to fake it
Just use the pickaxe mineable tags instead of the ones specific to certain pickaxes
ex:
{
"format_version": "1.21.30",
"minecraft:block": {
"description": {
"identifier": "minere:enderon_ore",
"menu_category": {
"is_hidden_in_commands": false,
"category": "nature"
}
},
"components": {
"minecraft:custom_components": ["minere:custom_ore"],
"tag:minecraft:iron_tier_destructible": {},
"tag:stone": {},
"tag:minecraft:is_pickaxe_item_destructible": {},
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 4.0
},
"minecraft:destructible_by_explosion": {
"explosion_resistance": 60
},
"minecraft:map_color": "#DDE3B0",
"minecraft:loot": "loot_tables/blocks/enderon_ore.json"
}
}
}
The custom component "minere:custom_ore" links to a script that handles fortune/XP drops
Does texture animation doesn't work when using vanilla geometry?
Nvm. I forgot to put the 's' in the 'flipbook_textures.json' file's name
{
"format_version": "1.21.60",
"minecraft:block": {
"description": {
"identifier": "matrix:deepslate_diamond"
},
"components": {
"minecraft:destructible_by_explosion": {
"explosion_resistance": 15
},
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 15,
"item_specific_speeds": [{
"item": {
"tags": "q.any_tag('minecraft:is_pickaxe') && q.any_tag('minecraft:iron_tier', 'minecraft:diamond_tier', 'minecraft:netherite_tier')"
},
"destroy_speed": 4.5
}]
},
"minecraft:custom_components": ["matrix:diamondLoot"],
"minecraft:loot": "loot_tables/air.json",
"tag:minecraft:is_pickaxe_item_destructible": {}
}
}
}
Finally finish the all the ores for anti xray
@grim pagoda What rendering method did you use for these custom leaves? They look quite amazing.
Tried doing custom leaves with alpha render but then they de render at a certain distance
Blend inside the tree
And alpha test outside
Because blend show blend particles
Like a glass
Its ugly
But using alpha_test in the entire tree, its ugly too, when you go away
We need a new render method for leaves

Is the tree silhouette not going to look weird if the outer lay of the tree starts to derender at a certain distance?
Or am I misunderstanding
I made a kind of alpha test layer on the outside
And the rest of the leaves are all blend, so it doesn't look "naked" when seen from a distance
Alpha test is for so that particles do not appear behind the tree, as if it were transparent
I have been developing this technique for a long time, making modifications whenever I discovered something
Ah yea I tried that before, unfortunately my trees are quite thin so if the outer layer disappears they look quite weird
Yeah
Can i make a custom geometry block as a full block?
Define full block.
Just like a vanilla geometry
Why not use the built in one?
I have a custom texture, its more than 16 pixel
And?
Oh wait nvm, i can just cut each texture
New tint method docs at https://wiki.bedrock.dev/blocks/block-tinting#tint-methods
How to make it so its breakable with everything like vanilla ores but only drops the loot table when its mined with certain picks?
Why cant my block drop itself when i break it with shears?
{
"condition": "match_tool",
"item": "minecraft:shears",
"count": 1,
"durability": {
"range_min": 1
},
"enchantments": []
}
How would I know if my poly mesh is working?
I tried to make a poly mesh the other day and I think I was successful, but not entirely sure since there was no texture or outline, but when I went near it, I got stopped by a very tiny corner
Polymesh is only for entities.
ah
hmm, I'll have to see about maybe using tile entities in the future then for testing
anyone has a public stairs pack?
Custom stairs isn't truly possible, you can search #1072983602821861426 or #1046947779118895114 for workarounds.
You could possibly fake it with an entity, maybe?
actually, that's something I should really look into
Yeah you can in 1.21.70
With an entity?
Hmmm
I mean tou can fake the outside but what about the collision box?
Yeah, you cant with blocks but entities you can.
Wait so Mojang thought about walls but not stairs? π
Walls are much easier to make
Since they don't require rotating a collision
#1303850367846711326 message
Walls isn't even 100% perfect.
I'm unsure if this is outdated atm
probably is since it's 5months old, but shouldn't be too hard to fix if it is
is there a default mob_spawner geometry i can use for custom block?
this was just a guess but doesn't work
No.
The only built in we can use is full block and cross.
awh ok, so use full block? what does that look like?
minecraft:geometry.fullblock?
full_block
ok ty
works great ty
I can fix it
Tell me your block typeId
Well, my block is a custom grass block, between several plants that I have added
But I don't know what the "typeId" is or how can I find out?
the typeId is the identifier of the block
like "minecraft:oak_planks"
ok, I didn't know that
My block identifier is: "yp:grass2_taiga"
and this is what happens to my block, And this is what happens to my block, as you can see the layer of snow is floating on top of the block.
how will you fix it?
don't tell me with scripts, because tick drop would be insane.
thats what I thought
{
"format_version": "1.20.62",
"minecraft:recipe_shapeless": {
"description": {
"identifier": "myname:lapis_bricks_cutter"
},
"tags": ["stonecutter"],
"ingredients": [
{
"item": "minecraft:lapis_block"
}
],
"result": [
{
"item": "myname:lapis_bricks"
}
]
}
}```
is there a mistake?
import { world, system } from "@minecraft/server";
system.runInterval(() => {
for (const player of world.getAllPlayers()) {
for (const eachSnowBlock of player.dimension.getBlocks(new BlockVolume(playerBoundaryA(player), playerBoundaryB(player)), { blockFilter: { includeTypes: ["yp:grass2_taiga"] }}).getBlockLocationIterator()) {
const topSnowBlock = player.dimension.getBlock(eachSnowBlock).above();
topSnowBlock.setType("minecraft:air")
}
}
}, 100)
function playerBoundaryA(player) {
const { x, y, z } = player.location;
return {
x: x + 128,
y: y + 128,
z: z + 128
}
}
function playerBoundaryB(player) {
const { x, y, z } = player.location;
return {
x: x - 128,
y: y - 128,
z: z - 128
}
}
This will fix it
I made this on mobile, so the formatting could be hilarious, sorry
@odd dagger looks like I'm not wrong
lol
Y'know what funny? This is unnecessary.
If it's already custom block, why not use onTick? And high delays?
Just like how 100 ticks delay in your runtInterval
The problem with onTick is that it asks to put a tick component on the block, the problem is that when I put the "minecraft:tick" component, the block stops working
You cannot fix this unless you use random tick or ticks btw
is this correct? or is the syntax different?
You can also make it entity-based so when any entity is around the block the top snow are removed but random ticking is better
onRandomTick asks to put the tick component?
No
So only onTick is the one that asks me to put that component, right?
Correct
Oh, okay, then I'm going to use onRandomTick
Will this work? I'd like to use a custom component so I can reuse it in new blocks. ```import { world, system } from "@minecraft/server";
world.beforeEvents.worldInitialize.subscribe((initEvent) => {
initEvent.blockComponentRegistry.registerCustomComponent("custom:plant", {
onRandomTick: (event) => {
const { block, dimension } = event;
const abovePos = { x: block.location.x, y: block.location.y + 1, z: block.location.z };
const aboveBlock = dimension.getBlock(abovePos);
if (aboveBlock && aboveBlock.typeId === "minecraft:snow") {
system.run(() => {
aboveBlock.setType("minecraft:air");
});
}
},
});
});
And by the way, what is the name of the block that is a layer of snow? Because the idea would be to remove those blocks since they are the ones that accumulate.
You can simplify it extremely:
import { world } from '@minecraft/server';
world.beforeEvents.worldInitialize.subscribe(eventData => {
eventData.blockComponentRegistry.registerCustomComponent('custom:plant', {
onRandomTick({ block }) {
const blockAbove = block.above();
if (blockAbove?.typeId === 'minecraft:snow_layer') {
blockAbove.setType('minecraft:air');
}
},
});
});
Oh, thank you very much
Is it possible to add recipes to the stone cutter?
Similar to using the crafting bench or a furnace. I dont see an option for that on the official documentation.
If yes, that would be a nice way for an input block and its variants.
If no, then I suppose the crafting bench could work. But then defeats the purpose of the stone cutter because of a block with multiple outputs.
Alternatively, is it possible to make a custom block that mimics the stone cutter's function?
Hypothetically, a carpenter bench where you add a block and it gives multiple options for you to craft.
Ex. Adding a log and you get a single chair, or a small desk, or even a stool.
Yes, use the tag stonecutter in your recipe file
fantastic. thank you
{
"format_version": "1.21.60",
"minecraft:block": {
"description": {
"identifier": "dmframes:tall_wedge7",
"states": {
"frame:block7": {
"values": {"min": 0, "max": 15}
}
},
"traits": {
"minecraft:placement_direction": {
"y_rotation_offset": 180,
"enabled_states": [
"minecraft:cardinal_direction"
]
}
}
},
"components": {
"minecraft:collision_box": {
"origin": [-8,0,-8],
"size": [16,12,16]
},
"minecraft:selection_box":{
"origin": [-8,0,-8],
"size": [16,12,16]
},
"minecraft:geometry": {
"identifier": "geometry.tall_wedge"
},
"minecraft:material_instances": {
"*": {
"texture": "frame_block7",
"render_method": "alpha_test"
}
}
},
"permutations": [
{
"condition": "q.block_state('minecraft:cardinal_direction') == 'north'",
"components": {
"minecraft:transformation": { "rotation": [0, 0, 0] }
}
},
{
"condition": "q.block_state('minecraft:cardinal_direction') == 'west'",
"components": {
"minecraft:transformation": { "rotation": [0, 90, 0] }
}
},
{
"condition": "q.block_state('minecraft:cardinal_direction') == 'south'",
"components": {
"minecraft:transformation": { "rotation": [0, 180, 0] }
}
},
{
"condition": "q.block_state('minecraft:cardinal_direction') == 'east'",
"components": {
"minecraft:transformation": { "rotation": [0, -90, 0] }
}
}
]
}
}```
I'm confused why the wildcard won't work with custom geometry
I have each bone/side with their corresponding side name
like "up", "down", "east", "west", "north", "south"
so I don't know why it won't work
Like it won't apply the textures based on its state like regular 16x16 blocks do
I really don't want to use permutations for every single texture, that would be over 900 permutations
Is there anything I'm missing?
are there any updated slab templates?
What is the issue?
Custom geometry not allowing the wildcard for textures
It is allowed, any content log errors?
Mine is outdated, but it is easy to update, just change:
blockTypeRegistry to blockComponentRegistry and you are all set. The same with 99% of my templates.
btw, the textures is a list
so it changes the texture depending on state value
You indeed have to do that with permutations
ye
Can you explain your issue? I don't understand it.
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?
Your texture shows as magenta and black? No texture? Just the first texture of the array? What is the problem?
It shows as the first texture of the array only
Which is the base frame texture of the block
Since it's showing the first texture, I think it's an issue with what I'm doing
I'm sorry if I can't explain it properly
Custom geometries cannot use texture variants/multiple textures like solid blocks. You have to define each texture separately.
Add material instances to your geometry to be able to use more than 1 texture in the geo
I tried that but it just decided to use the cardinal direction states instead
even though the other state is higher up
The wildcard in minecraft:material_instances simply states that all bones and cubes of your geometry will use the texture frame_block7
"minecraft:material_instances": {
"*": {
"texture": "frame_block7",
"render_method": "alpha_test"
}
}
If you want to use more, you have to setup your geo to allow for more, and also the material instance component, as shown below:
"minecraft:material_instances": {
"*": {
"texture": "frame_block7",
"render_method": "alpha_test"
},
"fill": {
"texture": "frame_block8",
"render_method": "alpha_test"
}
"frame_background": {
"texture": "frame_block9",
"render_method": "alpha_test"
}
}
nope, that's not working
I call each of the bones the regular cardinal directions for them in the geo file
Here, it'll be fine, I'll just do the permutation way
I'm probably missing something in a different file
you need to have the texture defined in terrain_texture.json too
i keep getting "unexpected version for the loaded data" on one of my custom blocks. can anyone help me?
Change the format version to match to current t version of your manifest
^
Is it possible to slope UVs?
With 1 cube, instead of the 16 I need to use to make it kind of "sloped" with jagged edges on just one side
The top is easy to slope, But the problem is the sides where it connects to that top slope, because otherwise if I wanted an actual straight texture to connect properly, I'd need to make the texture way too big and use custom textures, which would lose the functionality of being compatible with texture packs
hi there, is the minecraft:destruction_particles defined inside material_instances or at same level?
so what is wrong here, I did it but still shows unknown particles json "minecraft:material_instances": { "*": { "render_method": "alpha_test_single_sided", "texture": "dark_oak_trapdoor" } }, "minecraft:destruction_particles": { "texture": "dark_oak_trapdoor", "tint_method": "none" },
the version is set to "1.21.70"
do you have upcoming creator features enabled
btw you don't need the component if you want the texture to be the same as the one used in material instances in 1.21.80
I should have if they havent changed the name of the property in the files, the reason I m trying to add it is because all my blocks got unknown particle now, not only when broken but by just sprinting over the blocks the particles that went out from the feets is also unknown and is very ugly to keep like this
but .80 is on preview yet
how would I go about making a Jewelry Box that u can open and take the jewels out of it
I want to be able to interact with jt then it opens the case and the jewels are accessible to grab
scripts.
make a states for blcoks where it has jewels, detect which part of block player interacted and go
If I have a block with 15 states, but I don't declare any permutations, will the states still count towards the permutation limit?
Yes
hmm, fuck
I guess I do need to make a new block every 16 states so I don't multiply them
Umm that's not how it works when there's limit on states on blocks there's also limits on whole world too
Yes, ik, but with using different blocks, the states become additive instead of multiplicative
anyone else using minecraft:geometry cross have z fighting now?
make sure you're using the right render method https://wiki.bedrock.dev/blocks/vanilla-block-models#list-of-vanilla-models
yeah its using alpha_test it didnt z fight before the update
the model was updated so that it looks the same from each side
oh good so the wiki is now accurate lmao
alpha_test_single_sided now works correctly sweet
too bad their isnt alpha_blend for blocks
using blend with the cross geo is still messed up
Question about spawn rules:
Does "minecraft:density_limit" only apply per-biome? I have an "Eagle" mob that spawns in river biomes, but it doesn't seem to be respecting the density limit I set. Could the issue be that they fly out of the river biome and then no longer count towards the cap so they keep spawning?
{
"minecraft:spawns_on_surface": {},
"minecraft:density_limit": {
"surface": 3
},
"minecraft:brightness_filter": {
"min": 7,
"max": 15,
"adjust_for_weather": false
},
"minecraft:weight": {
"default": 12
},
"minecraft:biome_filter": {
"none_of": [
{
"test": "has_biome_tag",
"operator": "==",
"value": "frozen"
}
],
"any_of": [
{
"test": "has_biome_tag",
"operator": "==",
"value": "mountain"
},
{
"test": "has_biome_tag",
"operator": "==",
"value": "mountains"
},
{
"test": "has_biome_tag",
"operator": "==",
"value": "mesa"
},
{
"test": "has_biome_tag",
"operator": "==",
"value": "river"
}
]
}
}
Correct me if im wrong wince i have been of of technical bedeock for 2 years now, but @tender valley , isnt density limit the game checking in a 9x9 chunks and if there are that many mobs in that area it wont spawn that mob.
Yes. There are three caps, one of which is the local density cap, which is controlled by the spawn_rules of said mob. Density_limit says the following:
if the mob spawns in a certain biome, it checks how many mobs there are in a 9x9 chunk area, centered on the chunk the mob is spawning in.
If the density limit is not reached, the mob proceeds to spawn. If the density limit is reached, the spawn attempt gets canceled
So i your case in frozen biome it has a density limit of 3 mobs for the surface
Anyone able to get the isotropic to work in material instance? If so what version are you using. I can only get 1.21.50 to work
as long as your format version is past 1.19.40 it should work
unless it requires 1.21.80 for it to be released from experimental
is there some proper way to implement solid blocks except using blocks.json?
I'm slowly becoming annoyed by all the issues with "non solid" blocks
no
im thinking it does. 1.21.70 is broken for me for some reason and and breaks all my blocks
do you have upcoming creator features enabled?
yeah i do
what did you do?
i don't remember anymore
i can check and see if i still have the files
Actually i think i used blend render method + blocks.json texture
maybe
i don't have the files anymore
rip
glowing version of the redstone ore block
Do anyone have a code structure of redstone dust power level
is there a custom log template?
Check the wiki.
okie
{
"format_version": "1.21.50",
"minecraft:block": {
"description": {
"identifier": "myname:lapis_block_lines",
"menu_category": {
"category": "construction",
"properties": {
"bridge:block_rotation": [
0,
1,
2
]
},
"traits": {
"minecraft:placement_position": {
"enabled_states": ["minecraft:block_face"]
},
"permutations": [
// X axis
{
"condition": "q.block_state('minecraft:block_face') == 'west' || q.block_state('minecraft:block_face') == 'east'",
"components": {
"minecraft:transformation": { "rotation": [0, 0, 90] },
"minecraft:material_instances": {
"*": {
"texture": "mc:lapis_block_lines"
},
"end": {
"texture": "mc:lapis_block_lines_top"
},
"up": "end",
"down": "end"
}
}
},
// Y axis
{
"condition": "q.block_state('minecraft:block_face') == 'down' || q.block_state('minecraft:block_face') == 'up'",
"components": {
"minecraft:transformation": { "rotation": [0, 0, 0] }
}
},
// Z axis
{
"condition": "q.block_state('minecraft:block_face') == 'north' || q.block_state('minecraft:block_face') == 'south'",
"components": {
"minecraft:transformation": { "rotation": [90, 0, 0] }
}
}
]
}}}}}```
It should auto rotate if youre using material instance.
hmmm
ok I'll try
"minecraft:material_instances": {
"*": {
"texture": "mc:lapis_block_lines",
"render_method":"opaque",
"ends":{
"texture":"mc:lapis_block_lines_top",
"render_method":"opaque"
},
"up":"ends",
"down":"ends"
}
}
},
this is the right way to do multiple texture right?
Nup I mean like I want to custom texture line, cross, corner of redstone wire
But I dont know how to make a code. I can only make simple structure code
That why i wanna know and see how template of redstone wire look like and how work
How can I check my video settings and modify the state of a block depending on the defined configuration?
smokey said it was possible, now I really want to know how
I can see that I will be ignored by people
How can I break a custom block when it is next to lava?
is it known that custom blocks don't show up on consoles, specifically xbox?
What version?
Never heard this before.
very interesting
e.g. the event server with it's dozens of blocks works fine on the xbox
lemme check the content log on the console
what -
Content log is completely empty on my phone
all while the xbox throws a fit about missing geometry's?
the working screenshot is mobile, rest xbox.. I guess I'm making a bug report, lol
Hm, tested with another pack, it seems like it's caused by geometry being rejected
are you sure the xbox had the resource pack downloaded?
yeah, it prompted downloading and I accepted the download
I do agree that it looks like it rejected the pack. No clue why given that it loads fine on android/win11
https://bugs.mojang.com/browse/MCPE/issues/MCPE-201636 opened a bug report
Do you know if that gets compared with the biome?
As in if the mob wanders out of the biome, does it no longer count towards the cap even though it is in the 9x9 range?
Biome is only matters in the location of the mob that spawns not the biome of where the other mobs are. The other mobs only count if they are in the 9x9 chunk range
is there a way to rotate the texture with minecraft:transformation?
or with
since I'm using it to rotate the slab
like keep it locked?
Not yet, it is planned
is there a way around it?
How could I make an entity that acts as a block(collision, etc) and not be a spawn egg?
Is minecraft:tick good on the performance compared to run.Interval?
Whoa, that improved my performance. But I feel like using a non-time-based event.
Then use random tick.
Thanks, I'll try that.
what slab.geo do you use?
and yes there is by using the custom slab geo you can flip any of the sides uv to match which ever direction you want it to be.
Can you make custom blocks 2 blocks high
No.
Oh
Then how was this done
https://learn.microsoft.com/en-us/minecraft/creator/documents/customblockoversized?view=minecraft-bedrock-stable
They make an umbrella that's larger then 16 x 16
I think basically they just make a oversized geometry but idk 100%
What did that article do for the tall umbrella
Yes
But I still dont get it which is why im asking here
So is it the case of you can do it but at your own risk because there wont be a collission with it because realistically its too big?
No, its still collision wise limited to 1 block. Models at most can be 30 pixels in any axis.
Right so what your saying is I can do it but with no collission surrounding the upper half meaning its liable to collide with other blocks?
Yeah.
Then how on Earth does tall grass work?
Cause tall grass doesnt have that issue/ situation
Earth?
Because...its two separate blocks.
?
This feature isn't properly supported yet, but for now you can use the transformation block component to scale a hitbox up to another blockspace. This will require you to shrink the model accordingly, however.
?
it has two separate selection boxes that visually merge
this is a button with the upper block of tall grass on top
Does a lot of blocks with the minecraft:tick component and an ontick custom component in an area cause lag
Entirely depends on what its doing.
Mostly just checking if it or the blocks around it are powered, it checks if it is powered first
That alone, probably not.
Does anyone know how to remove shadows from blocks with custom geometry? Everytime the block gets close to a full block, it becomes shaded.
If I add rotation to my block, can I add more than just the vanilla angles?
Yeah. That would require scripting though.
hmmm...Then can I rotate an entity based on the blocks rotation?
Yeah.
Like I made sure to set ambient_occlusion and face_dimming to false, yet when the model intersects with a full block, the block faces becomes extremely dark.
You already set the ambient_occlusion to false? If so, change it into 0 instead of false
I tried it, but the face still dims.
Hm, setting the face_dimming to false should fix this problem...
That's the thing, face_dimming is already set to false.
Let me dm you
it's a bug
no fix afaik
Yeah, I kinda figured, as no matter what I did there was still a shadow...
hello, did you find an alternative to the breathability component ?
last time i checked, a block is breathable if it has the material instances component
they may have changed it to all custom blocks being breathable at some point
Does anybody know how to fix this?
can different faces of a block have different ambient occlusion and face dimming values
yes (remember that material instances do not merge so the ambient occlusion set in * is not applied to the south face in this example)
"minecraft:material_instances": {
"*": {
"ambient_occlusion": 10
},
"south": {
"face_dimming": false
}
}
are the precise rotations for blocks permutations? if so, how can i access them through the script api?
Does anyone know how to use the BlockLocationIterator class in scripting? I have made a ListBlockVolume and am trying to iterate over each block in it, but I can't get the iterator to give me anything except the first entry.
for (const location of volume.getBlockLocationIterator()) {
}
Iβm trying to get it so when you place a block it summons an entity on that block how do I do this
playerPlaceBlock afterEvent and the spawnEntity method.
https://stirante.com/script/server/1.18.0/classes/PlayerPlaceBlockAfterEvent.html
https://stirante.com/script/server/1.18.0/classes/Dimension.html#spawnentity
Documentation for @minecraft/server
Documentation for @minecraft/server
if its a custom block, you can use a custom component to check when it places.
https://wiki.bedrock.dev/blocks/block-events
https://stirante.com/script/server/1.18.0/interfaces/BlockCustomComponent.html#onplace
Perfect, thank you.
Now that I can iterate over each block, I'm trying to destroy each block with the script. I am seeing that there is no scripting API for destroying the block, so instead I just tried replacing with air, but it's giving me an error: [Scripting][error]-ReferenceError: Native function [Dimension::setBlockType] does not have required privileges. at <anonymous> (commands.js:48)
So then I tried using a command to destroy the blocks, but I can't run commands at all. Just testing with player.runCommand('say hello!') throws a similar error: [Scripting][error]-ReferenceError: Native function [Entity::runCommand] does not have required privileges. at <anonymous> (commands.js:49)
What is the best way to remove all of these blocks from the dimension?
are you running this from inside a beforeEvent subscription?
Yes. I'm trying to make a custom chat command to remove all of my custom blocks while I'm testing and debugging. Running from world.beforeEvents.chatSend
you can wrap the loop in a system.run() to cause the code to run at the next opportunity
system.run(() => {
for (const location of volume.getBlockLocationIterator()) {
// destruction
}
})
My hero. You're a genius.
you can't modify the world when handling a before event because it could delay the event (the chat message being sent), leading to bad performance
is it possible to have both Distant Culling and Translucency
Wdym distant culling?
The best you can do is blend_to_opaque
that what the wiki called it
idk, i am referring to the model rendering stuff behind it
Link?
blend_to_opaque doesn't seem to be accepted value
alpha_test_single_sided work best for me, but that without Translucency
It's in preview.
how would i get the rotation of the block below?
And maybe make it global, like the entity always finds the rotation for every block
That's a bit more of a #1067535382285135923 question. You would need to get the entity's location->go down 1-> get block.
Thats what I thought, and I actually did get something. I'm thinking of just making the rotated blocks each a different block and then rotating the number of degrees based on the rotated block below
Thanks for the reinforcement of that, I'm still not sure about how to do this yet π
does anyone know the vanilal geometry for crops?
bcuz im too lazy too open blockbench and add 4 planes
hi there, can someone help me with that:
these are custom blocks, after the update I tried everything to fix the particles, even when sprinting over them the particles is like unknow, I cannot fix that even setting the destruction_particles, what am I doing wrong here? json { "format_version": "1.21.73", "minecraft:block": { "description": { "identifier": "awp:full_grass", "menu_category": { "category": "construction", "is_hidden_in_commands": false } }, "components": { "tag:grass": {}, "minecraft:material_instances": { "*": { "texture": "grass_top", "render_method": "opaque", "tint_method": "grass" } }, "minecraft:destruction_particles": { "texture": "full_grass_01", "tint_method": "grass" }, "minecraft:map_color": { "color": "#79c05a", "tint_method": "grass" }, "minecraft:geometry": { "identifier": "minecraft:geometry.full_block" }, "minecraft:destructible_by_mining": { "seconds_to_destroy": 2 }, "minecraft:friction": 0.4, "minecraft:light_emission": 0, "minecraft:light_dampening": 5, "minecraft:destructible_by_explosion": false } } }
I have the upcoming creators feature enabled and the version of the blocks is also 1.20.70+
try lowering the format version to 1.21.60
Is it possible to make it so that entities cannot pass through a block?
blocks have collision by default
Is it possible to use multiple textures on a block that has complex geometry? For example, I have a block with three cubes (top, bottom, base). I want to use one texture for the cube 'base', and a different texture for the cubes 'top' and 'bottom'. Is that possible?
Yep! You'd specify the individual textures for each bone in material_instances rather than using a *
Right click the bone > Click "Edit Material Instances" > Name your new instance > Use that name in your minecraft:material_instance component like you would use north, *, sides and others
OH, so those custom named material instances can be used throughout the minecraft:material_instance? I was under the impression I was just renaming north to custom_name or something. I can make as many of those names as I want?
Yep! I believe there is no limit
Your impression isn't wrong at all, but you have to do the first steps too
Dude, that worked perfectly. Thank you so much!
Happy to help!
I tried it too, doesn't work unfortunately
Use 1.21.62
same thing
Weird, mine does work using that version
can I see one of your block code?
Here
yea... no idea.. I cannot see anything that would impact it for me, the only thing I can see is to wait next stable release and see if it was fixed
I'm using 1.21.50 and it works fine
but I believe I wont be able to use tint_method on that version, can you?
tint_method should work for any format version where material_instances exists
tried .50 but still same behavior, can you guys show me what experiements are enabled on yours? mine are basically enabling everything [2025-04-14 16:10:08:195 INFO] Experiment(s) active: biom, ucft, gtst, exca, ddjs, ddi_, mola
is "minecraft:cardinal_direction" a block permuation?
It's technically a trait as its inherent to all the blocks, but yes, when enabled for use like this it is accessed just like any other permutation state.
it's a state
the value is set by a trait
it doesn't do anything by itself, you need to use the permutations array to set the rotation of each state value
Can someone tell me why I get this error?
{
"condition": "q.block_state('minecraft:cardinal_direction') == 'north' && q.block_neighbor_has_any_tag(0, 0, 1, '#####:stairs_east')",
"components": {
"minecraft:geometry": {
"bone_visibility": {
"top_north_east": "true",
"top_north_west": "false",
"top_south_east": "false",
"top_south_west": "false"
},
"identifier": "geometry.#####.stairs"
}
}
},```
That query doesn't work anymore.
is there a alternative?
so only scripts?
I'm trying to make a block that can rotate around like a furnace, but for some reason it won't do it
I have all my permutations correct and have the cardinal direction trait.
the block is in the world and all the textures are there, but they refuse to rotate and i can't figure out why
condition can only check for the block's own permutation, which is determined by state values (so only q.block_state can be used)
scripts would work, but they are server side so the connection wouldn't be instant and depending on how you make your scripts, it will either be laggy or not work all of the time
alright, thanks
the transformation component only affects a block visually if it has the minecraft:geometry component (instead of textures in RP/blocks.json)
errmmmm, time to learn block geometry :)
Sorry to interupt, what was the thing for particles upon destruction called again?
minecraft:destruction_particles https://wiki.bedrock.dev/blocks/block-format-history
Thank you!
there's a built-in full block geometry
tbh why doesnt destruction particles uses the block's own texture as a default?
it does in 1.21.80
ahh
How would i go about useing bedrock block componets to use a script to set a block ontop a custom block
Does anyone have an example block showing how to set the destruction speeds correctly?
there isn't really a correct way to set destruction speeds (that match vanilla) since it's bugged
Hello
How do I use the category menu on a block? I want to put the block in minecraft:crafting_items_catalog
just like how you do it with items
put the block name in a group within minecraft:crafting_items_catalog, and remove the group in the block.json if you have it defined.
when I use group in block it stops working
but it is not
@odd dagger the problem was the block version, it was at 1.21.50 instead of 1.21.60
Impossible as of today unless you do some gymnastics with scripting
How can I make my custom block drop itself when exposed to an explosion?
you can use scripts
detect when your block gets impacted by an explosion and spawn the item
So i cant use loot tables then?
no
Okay, thanks
Is it possible to have an icon for a block but it's invisible when placed? (border/barrier block influence)
or should I just do geometry of a full block with 0 alpha and a normal collision box?
yes, use the item_visual component.
your format version for the block must be 1.21.60 or higher.
It was set to 1.21.50 from the block wizard and seems to be okay
But thank you very much, it works!
does stopping a liquid flowing from the up direction do anything
It's used to block water flowing downwards and/or when you rotate your block.
Wth is this error? Never seen it before
Sounds like two item files with the same id
iirc there is a minimal size a block model should have in it origin, what was it? 10%?
1x1x1
a pixel?
yes
I'm conquesting it
can I have a block that has a 2d icon when in its item form without adding an item?
Yes.
how tho?
why don't you want to?
the proper way to give a block a 2D icon would be replacing its block item https://wiki.bedrock.dev/blocks/blocks-as-items
becuase of a bug
What causes my block to have the missing texture breaking particle despite having a perfectly valid texture?
Iirc it uses bottom texture, maybe you don't have that?
I have it
Use the new component.
there's a new component for that?
iirc it's the destruction particles thing?
You could check the bedrock.dev for it
minecraft:destruction_particles
Is it for 1.21.80?
how do I make a custom egg that's kinda like a sniffer egg? my current attepts have the mob spawn around 0 0 0 and not at the blocks location
Should be a simple fix. Show your code
here's the code for the script and the block
The position is running from the command source's location, which is currently set to the event dimension.
Here is how you could do it using this same method:
const { block } = event; const { location, dimension } = block
dimension?.runCommand(`summon mc:velociraptor ${location?.x} ${location?.y} ${location?.z} 0 0 from_egg`)
block.setType('minecraft:air')
Alternatively I'd recommend doing it solely in scripting for better performance, like this (I believe this should work, haven't used this particular spawn event feature in a while):
const { block } = event; const { location, dimension } = block
dimension?.spawnEntity('mc:velociraptor<from_egg>', location)
thank you, it works now
awesome np
Guyssss, Can someone Help?!
How do I allow multiple textures onto 1 face of a block?
how can i make a block affect AO?
Blocks with custom models currently cannot
is there a way to create a custom block with a weirdo_direction state?
You can add any properties to blocks, you just have to handle the state yourself since it isn't a minecraft trait.
weirdo_direction is equivalent to minecraft:cardinal_direction
vanilla stair connection does not use states
how would I enable this state for a custom block? it wouldn't be possible with traits right?
why do you want to enable it for a custom block?
I'd like to use it for custom stairs that I'm making, I want it to be as similar to vanilla as possible in terms of behavior and defenitions
ideally vanilla would use minecraft:cardinal_direction
they're slowly moving vanilla blocks over to the new states
welp I get what u're saying, but I still want to make it with a weirdo_direction, got any tip for me?
It's impossible to add a state without a namespace to a custom block
the best you could do is <namespace>:weirdo_direction and then handle setting the state value with scripting (which currently will not work on servers/Realms)
Umm, quick question... Idk how v2 custom components works but those param values are only read only and can't be changed?
are there any requirements for q.block_neighbor_has_any_tag?
I get an error "Failed to resolve query. Either the query does not exist or it is not supported in this context."
That's not really useable anymore.
What are you trying to do?
I'd like to apply premutations for my block based on it's neighbors
You'll need to use ScriptAPI and apply the proper block states.
The permutations your block has are not determined by the permutations array. Permutations are based on the states your block has https://wiki.bedrock.dev/blocks/block-permutations
I have multiple cubes on 1 face, but they share the same texture even though I specified they should each use different ones
how did you specify that
How can I make a block not cull in the distance + allow for transparency? Without blend
alpha_test_to_opaque would be the best option
That's on preview right
then it's impossible
are q.block_neighbor queries not usable in block permutations?
Block permutation can only use block_state
kk got it
{
"format_version": "1.21.70",
"minecraft:block": {
"description": {
"identifier": "lv_zo:corrupted_bush",
"menu_category": {
"category": "nature"
}
},
"components": {
"minecraft:destructible_by_explosion": true,
"minecraft:destructible_by_mining": true,
"minecraft:collision_box": false,
"tag:plant": {},
"minecraft:placement_filter": {
"conditions": [
{
"block_filter": [
{
"tags": "q.any_tag('dirt')"
}
]
}
]
},
"minecraft:display_name": "Corrupted Bush",
"tag:minecraft:is_shears_item_destructible": {},
"minecraft:geometry": {
"identifier": "minecraft:geometry.cross"
},
"minecraft:material_instances": {
"*": {
"texture": "lv_zo:corrupted_bush",
"face_dimming": false,
"ambient_occlusion": false,
"render_method": "alpha_test_single_sided"
},
"down": {
"texture": "lv_zo:corrupted_bush"
}
}
}
}
}```
I know this question was asked just yesterday but why do the destruction particles keep showing the default missing particle?
I even added the down and the * material instance, since 1.21.80 is still in preview I am not going to use it, why is the old way not working?
Just found the issue:
For everyone wondering you have to declare the down texture inside the blocks.json in the resource pack aswell
Is there a way to make a block geometry bone visible only in the gui but not when it's actually placed?
is there a component for making a block break if a supporting block is broken?
something like breaking the grass block below a sapling
No.
could someone please send an example of beforeOnPlayerPlace#premuationToPlace event?
I'm having a hard time to get it working, idk why, updating the variable doesn't do anything for me
Try #1067535382285135923 and post your code there.
how can I disable the breaking particles of a custom block?
you have to check for specific blocks (or block tags)
"components": {
"minecraft:placement_filter": {
"conditions": [
{
"allowed_faces": ["up"],
"block_filter": [
{ "tags": "q.any_tag('dirt')" }
]
}
]
}
}
Has anyone ever seen this error before? It goes away if I remove one of the states from a block in my add-on... What does it even mean?
[Blocks][warning]-Collision in hashed Block Network ID. One of the blocks' hash has been adjusted. Block being added: TAG_Compound: 3 entries
If I change one of the state names from wfir:status to wfir:status2, then the issue goes away.
That doesn't help me in this use case because I have multiple blocks that reuse that status state in the scripting logic, so the name needs to be the same. Why am I even getting this warning? Confusingly, nothing seems to actually NOT WORK when I'm testing the addon...
Why does my custom slab displayed incorrectly in the inventory, but not on the hotbar?
does anyone know how to make costum geometry blocks rotatable (I am verry new in creating addons)
You have to set a permutation to tell it how to rotate. Here's an example:
"permutations": [
{
"condition": "query.block_state('minecraft:facing_direction') == 'down' || query.block_state('minecraft:facing_direction') == 'up'",
"components": {
"minecraft:transformation": {
"rotation": [90, 0, 0]
}
}
},
]
Note that you have to enable the placement direction traits in the block description:
"description": {
"identifier": "your_namespace:your_block",
"menu_category": {
"category": "items"
},
"traits": {
"minecraft:placement_direction": {
"enabled_states": ["minecraft:cardinal_direction", "minecraft:facing_direction"]
}
}
}
I believe that is related to block state names being similar to ones in vanilla, but not exactly sure. I think restarting the game should clear the error
What does it has of different with other block's rotations?
the up/down directions also have cardinal rotation (north/east/south/west)
we can't access the orientation state using traits so the best solution currently is to combine minecraft:cardinal_direction and minecraft:facing_direction
honestly, no clue how to do it, kinda lost in traits ^^'
wait, nvm I think I do
Or I thought so, I'm having issues
This is the content log
Like glazed terracotta?
that only has north/east/south/west
You have a typo. you put north, and you should put it as a string in quotes like 'north'
oh
either way it is not working after fixing the typo
Did you fix only the north one? Looking at your file, you made the same mistake for east, west, and south as well.
Also, you can remove the translation and scale fields if you are leaving them at 0 and 1, respectively like you are.
I gave it a quick edit. Try this:
I've also never seen "y_rotation_offset": 0 in the placement direction trait. I'm not sure you need that, either.
The facing_direction needs the state cardinal directions like north east south west in an array and placement direction needs the minecraft:block_face state of up and down to work
Idk why the weird italic lol
Ping me if anyone know the answer
no clue how to do that honestly
How do I fix this?
ok well it is currently 8 states that use 19 bits
the 8 states are:
cmd:relative_cube_position:
top left, top middle, top, right, middle, right, middle, middle left, bottom left, bottom middle, bottom right and dead center,
cmd:(insert direction here)_bit, which has 0,1,2 as values and there are 6 of them,
and finally minecraft:block_face
and i assume its counting the 0, 1, and 2 from the directional bits only oncw
multiplying these up you'd get 10 x 3^(6) x 6 which would give you 43740
which is less than 2^16
so how tf do I make this work
What are my workarounds for blocks generated with world gen not ticking?
I though that was fixed.
If I use different minecraft:light_dampening values in different block states, it will only check what was initially set unless I leave the world? Because I did some tests, the default comes as 0 and one of the states is 15, but the update of this value does not happen, should this really be like this?
I discovered another bug, if you place geometry in your block, redstone will always pass the redstone signal even using the geometry that Minecraft itself provides(minecraft:geometry.full_block)
and the minecraft:redstone_conductivity component has no effect on the transfer of the redstone signal when you use a geometry
how do i calculate blast resistance for blockbenchs block wizard plugin
it says stone has a resistance of 30
but the wiki says it has a resistance of 6
In Add-on documentation for Bedrock Edition, these values are multiplied by 5 when used for the "explosion_resistance" value in the "minecraft:destructible_by_explosion" component
Can I make a placement filter say βany block AND this one specificβ?
thanks β€οΈ
I'm having a similar issue where it doesn't display correctly in either, being centered and scaled up no matter what item transforms I use. Would you mind sharing your model?
Guys, do you know why these 2 textures looks different? The left block is the mushroom stem block, and the right one is a block I created using that same texture for the background. What I've tried so far:
- Different in-game light settings (they look different no matter what)
- Different light emission and dampening settings
- Overwriting the vanilla stem texture with one that I've saved in Photoshop (in case PS changed the color profile or smth)
- Different render methods and ambient occlusion settings
in what usage?
I noticed one thing, if you have a block with multiple states and each one has different settings it may end up not working very well, an example is light_dampening if the default state is for example 0 a block that lets light pass, and one of its states is 15, that is, it does not let it pass, what will happen is that it will continue to pass even when you change the state it will only stop passing when you leave the world and enter again, another example is in relation to redstone_conductivity if the default is to let the redstone pass, that is, not to cut if its state cuts the redstone it will cut it but it will remain energized if it was already before the state update, it only stops being energized if you place or break a block near the redstone, I believe that these things should NOT happen, but unfortunately they currently do.
Is it possible to make my block opaque if I have a simple graphic and transparent if I have beautiful graphics?
Is not possible to change a custom block's render method based on user settings.
Oh
Could you tell me how you made custom destruction particles?
These are not custom particles its the vanilla one with custom texture
Simply add your block in the blocks.json and declare the texture there aswell
How to create a custom cobweb block?
you can't replicate how it slows the player down
Whats wrong with my script?
import { world, system, GameMode, EquipmentSlot } from '@minecraft/server';
world.beforeEvents.worldInitialize.subscribe((data) => {
data.blockComponentRegistry.registerCustomComponent("aca:sieve_interact", {
onPlayerInteract: ({ block, player }) => {
const sieveItems = [
"minecraft:sand", "minecraft:red_sand", "minecraft:gravel",
"minecraft:dirt", "concrete_powder", "minecraft:mud", "minecraft:clay"
];
const equippable = player.getComponent("minecraft:equippable");
const heldItem = equippable?.player.getComponent(EquipmentSlot.Mainhand);
const hasSieveItem = heldItem && sieveItems.includes(heldItem.typeId);
const isCreative = player.matches({ gameMode: GameMode.creative });
const { x, y, z } = block.location;
const { a } = block.above;
if (hasSieveItem) {
if (!isCreative) {
player.runCommandAsync(`loot spawn ${x} ${a} ${z} loot "blocks/sieve"`);
player.runCommandAsync(`clear ${player.nameTag} ${heldItem} 1`);
} else {
player.runCommandAsync(`loot spawn ${x} ${a} ${z} loot "blocks/sieve"`);
}
}
}
})
});```
It doesnt do the interation for some reason idk
The script is on main.js and the block does have the custom component
this is wrong
const heldItem = equippable?.player.getComponent(EquipmentSlot.Mainhand);
it should be
const heldItem = equippable?.getEquipment(EquipmentSlot.Mainhand);
and remove const { a } = block.above;
you can do const a = y + 1;
ok, ty
It is recommended to always use the newest ones
for me too, but only in pocket mode and only in the blocks where I configured the item_display_transforms
I think it's because item_display_transforms is universal, and the slot size in pocket and classic mode is different
Oh I didn't know that. Thanks for the info. I guess weβll just have to wait for a fix in the next update
yes, maybe a separation of item_display_transforms for pocket and desktop mode
how to make a custom cobweb block?
{
"format_version": "1.20.80",
"minecraft:block": {
"description": {
"identifier": "gen:coal_block",
"menu_category": {
"category": "construction"
}
},
"components": {
"minecraft:material_instances": {
"*": {
"texture": "coal_block",
"render_method": "alpha_test"
}
},
"minecraft:geometry": "minecraft:geometry.full_block"
}
}
}```
Where do i put this in resource/behavior pack?
well i did it. found all the bugs in the stair placement for ALL directions and directional checks(afaik) its as close to vanilla placement and checks as i can get it with the current api
now for the block break -_-
Is it possible to make a custom container block?
how do i make a full block be culled away? (no experimental features)
I'm in spectator here and this fully submerged blob of my blocks is not being culled despite being surrounded
https://wiki.bedrock.dev/blocks/block-culling
i wouyld check this
that sortof works but not really
meaning it can cull some faces but other neighboring blocks dont cull theirs
using this has best results
"minecraft:geometry": "minecraft:geometry.full_block",
thing is that only works for full blocks. I cant even assing a different texture to the faces. I wish there was alist of all those
also using that geometry makes them affect AO too
I tried to make a specific group have a texture on material instances, but for some reason it didnt work(the group name is correct) and the block just have the * texture
"minecraft:material_instances": {
"*": {
"texture": "jungle_planks",
"render_method": "opaque"
},
"Item": {
"texture": "papyrusI",
"render_method": "alpha_test"
}
}
}
}```
material instance names are completely separate from group (bone) names
Is it possible to declare different render methods for different bones in a custom block?
you can give different material instances different render methods, but it won't work properly due to this bug https://bugs.mojang.com/browse/MCPE-190430
To Do (Open)
Unresolved
do someone know how to fix sliding blocks? I keep sliding when i stand of my block model
what do you have the friction set to
Does anyone know how to change the breaking particles of a block with custom geometry, itβs just defaulting to dirt particles
it'll be fixed in 1.21.80
which format version are you using?
1.20.80
do you have upcoming creator features enabled?
Yea
that might be causing the issue since there are experimental changes to destruction particles in game version 1.21.70
shouldn't be long until 1.21.80 is released though
yes
Okay thanks
how do i make a waterlogged block?
Add the liquid detection component.
I added this before but it didnt work.
"can_contain_liquid": true,
"detection_rules": [
{
"liquid_type": "water",
"on_liquid_touches": "blocking"
}
]
},```
What your format version?
i thought about that and i had it all bumped to 1.21.70
using "no_reaction" instead of "blocking" makes water pass through but thats not what normal waterlogged blocks do
but waterlogged blocks let water through
Hello, kinda new to creating add-ons here
Is there actually a way to have shadows cast around a block on the ground with material instances and geometry in the .json file?
Removing both of these removes the blocks ability to rotate and that sucks since I am creating a custom road block
Did you use "minecraft:geometry.full_block"?
Thanks! I wasn't using that the whole time and it did cast shadows around the ground, however, I see using it breaks UV textures so I have to manually set each of the faces texture?
Yup
can_contain_liquid goes in the detection rule, with liquid_type and on_liquid_touches
That's not what the docs say π
the ms docs seem to be organised weirdly
https://wiki.bedrock.dev/blocks/block-components#liquid-detection
They seem to be a mess tbh. Many times I've found invalid json in there. Bet they are written by some intern
no they dont
they can contain water
but wont let it through
yeah official docs are super often misleading or incomplete or both, certain things you may need to extensively test yourself
like >50% of the things I know are not documented anywhere
multi billion dollar company
how are you even supposed to get that info? we dont have access to the source code dont we?
Well I think I should advise against pursuing that lul
Just need to throw about a thousand things at the wall
the data driven block stuff they have is super buggy anyways. its like they are using an entirey different system than what they use internally
well yeah
but like how? randomly mashing random strings of characters in the json hoping to match one of their values π
that has been the solution to more things than i care to admit π
how do you implement the updated "minecraft:destructible_by_mining" with the "item_specific_speeds" parameter?
what do you want to use it for
Did the bug with beforeOnPlayerPlace get fixed with components v2?
which one
Where if you have replace block item set to true it never fires
that was not fixed
Pain
I'd avoid using it personally since it doesn't align with how vanilla works
not really sure why they added it
if you want to make a block get mined faster with tools, block tags should be used
but it looks like this
"item_specific_speeds": [
{
"item": "stick",
"destroy_speed": 0.5
}
]
Don't the speeds due to tags not line up with vanilla?
I don't think anything about custom block destruction lines up well with vanilla
Fair
they have no "best tool" detection afaik
and also seconds_to_destroy and destroy_speed are some of the worst names they could have used
Any custom item with the digger component is treated as a suitable tool for vanilla blocks
{
"format_version": "1.21.10",
"minecraft:block": {
"description": {
"identifier": "ckey:green_screen_block",
"menu_category": {
"category": "items"
}
},
"components": {
"minecraft:geometry": {
"identifier": "geometry.block"
},
"minecraft:material_instances": {
"*": {
"texture": "green_screen_block",
"ambient_occlusion": false,
"face_dimming": false,
"render_method": "alpha_test"
}
},
"minecraft:light_emission": 1,
"minecraft:light_dampening": 0,
"minecraft:collision_box": {
"origin": [-8, 0, -8],
"size": [16, 16, 16]
},
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 1
},
"minecraft:display_name": "Green Screen Block",
"tag:chroma_key": {}
}
}
}```
Why does it have face dimming still?
idk but why are you using alpha_test
Copy pasted code..
I'm working on a custom block that can take on the texture of any of the vanilla wood plank types. I'm curious what your thoughts are on if you prefer a single block with the ability to change its texture by interacting with your planks of choice, or if you would prefer a completely different block for each plank type? For example, there are different blocks for each plank type of stairs, slabs, etc.
Completely different block. Gameplay wise, is better. Think about builders, for example. Or simply a survival player who wants to build a simple base, having to βplace the block of desire twiceβ.
Additionally if you want to follow vanillaβs own logic, this is the way.
I asked my 10 year old too, and he told me the same thing like I was an idiot π
Haha I mean, it really depends on what type of gameplay are you looking for and for who it is intended to
I prefer to stick to the vanilla mechanics as much as I can. So this makes it a straightforward decision. I'm glad I asked to work through it in my own head, though.
I remember when I made my chameleon layer. That didnβt follow vanilla logic because it was intended for a very specific usage only, where this method was better.
Here it is if you want to see it: https://discord.com/channels/523663022053392405/1142662209449758721
Yep, for most of the things, it is better to stick to vanilla.
what about destroy time
Guys, I can't get the "minecraft:destructible_by_mining" component to work. I want my custom block to be only breakable with a vanilla diamond AXE (not pickaxe). So I gave it a 9999 destructible speed by default, and tried to add an specific item speed, but is not working... Here's my current json:
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 9999,
"item_specific_speeds": [
{
"item": {
"tags": "q.any_tag('minecraft:is_axe')"
},
"destroy_speed": 1
}
]
}
Ps. I'm working with format verion 1.21.0 since I'm working in Education stable
I mean, maybe there's another way to make it destructible ONLY by the axe that I don't know of. I don't want to add different destroy speeds
Item specific speeds was released from experimental in 1.21.50 https://wiki.bedrock.dev/blocks/block-format-history#_1-21-50
I see. Then there may be another approach
Because this is what I'm actually trying to achieve π
cancelling the PlayerBreakBlockBeforeEvent might be an option
just checked, it's available in edu
Oh wait, I may use NBT commands to give the player the axe that can destroy specific blocks, since the entire world is breaking protected
that would be better
Yeah, that's the way! Thank you!
Hmmm but since I'll have to add allow blocks (blocks that allows you to break/place anything in a column above them), then that means the player can actually break the blocks by hand too, and the axe becomes unnecessary...
So using PlayerBreakBlockBeforeEvent may be the right call
would be great if we could define allow/deny volumes without the blocks
Why is geometry.cross causing all of this z-fighting?
block textures just flicker back and forth
not sure if I'm supposed to have my texture file set up in any specific way to be using geometry.cross, but it's just a 16x16 of the plant
make sure you're using the right render method https://wiki.bedrock.dev/blocks/vanilla-block-models#list-of-vanilla-models
Use alpha_test_single_sided in material instance
They changed the geo last version
ah that explains it
didn't know they added a single sided material, haven't followed a lot of that stuff
thank you
No problem. It's been there for a long time now tho
The problem is they changed the geo, because before alpha_test worked just fine
Idk why they changed it
was about to just go back to using my own geometry
I think it was something to fix a vanilla thing
Haha no need
Just open your plants folder and mass replace all
I'm noticing that a block's minecraft:item_visual component seems to just layer one cube on top of another into a giant mess. Is there a way around this so the item visual actually looks like the block with the appropriate face rendering order?
Are you trying to make an item have the geo visual in hand and in inventory?
It renders exactly as you would expect when placed, floating as an item on the ground, and in my hand both 1st person and 3rd person.
But the item visual in the hotbar is an overlapping mess of cubes. It looks like it's rendering them one cube at a time and just overlapping the image as it goes.
i thought they fixed this
guess they added it back
it's based on the order of the cubes in the geometry
Well that's unfortunate.
Eww lol I am not redoing my stairs for that unless I absolutely have too
I just use a normal item for woods and stuff I'm sure you could do the same. Just match the id of both have the item have no texture
That's how I do my items
That use the geo as a render
that would have the same rendering issue
Nope works fine for me
then your cubes must be ordered in a way that avoids it
I've moved bones around in my geos plenty of times
what does this have to do with incorrect block rendering
How can I make blocks act as fuel?
replace the default block item https://wiki.bedrock.dev/blocks/blocks-as-items#replacing-block-items
like this
Thanks!