#Blocks General
1 messages · Page 6 of 1
Anyone know how to stop x/z infighting on blocks
fixed it by using blend
Is there any simple way for making a custom block unpushable pistons, like setting some property/component? Or do I have to use scripting events?
They removed the components. Indeed, use scripting.
Cant use scripting bc they removed that event
Didn't it come back???
Im not sure, last I heard it got removed. Didnt see or remember about its return
Dont you need the pistonpushbefore event?
1.20.80-preview.20
Well good to know then
Oh, let me see.
The event is here, but its only an after event. So you can't cancel it like you would with a before.
Yeah, no before event. Gotta do something fucky.
This is a tragedy 😢
It should just be a tag…
yeah
Raaaah
Is it minecraft:geometry.full_cube or minecraft:geometry.full_block?
The update page says full_cube but the generated docs say full_block
minecraft:geometry:{
"identifier": "minecraft:geometry.full_block"
}
Logged an issue on the docs
How do I get a custom sapling that can grow into a tree?
I'm doing that the old way with on_interact component with bone meal to trigger an event. Then into the event I randomize 3 different commands to load randomly 3 different structures that contains my custom trees. As block events will be deprecated you would need to find a way to do the same with scripting
I recommend using playerInteractWithBlock or wait for custom components
What do I even use for coding?
How do I stop my block texture from turning black like this?
Context:
The 2d parts are 1-sided, currently have material instances set to alpha_test, ambient occlusion= true, face dimming = true
Is there any way to make the border block invisible? Or with the same behavior as the barrier (visible when placing the item in your hand)?
Have you ever tried using block shapes? To hide the particles use the command
/gamerule showbordereffect false.
Use this in blocks.json:
"border_block": {
"blockshape": "invisible",
"sound": "stone",
"textures": "border_block"
}
Hi.
It's working
Ty 
Can you make custom item groups in behavior packs?
No
from what I know, you can just make them appear next to each other, but not like the ones with the + on them like slabs
Ohhh, okay
Yeah, you can’t make categories with just a BP
So, what's causing this to not work? Textures are in the blocks/textures folder, and this is in the blocks json in the root of the resource pack
Is format_version 1,1,0 acceptable within blocks? 
You should set this to the latest 98% of the time 😄
That being? Because 1,1,0 was the version on the wiki
1.20.70
oh wait I understand that's your format version in blocks.json not your block
Remove format version
It works well for me without format version, I don't think this is accepted anymore
Pretty sure textures on custom blocks are set in the block behavior file, not blocks.json.
Under Minecraft:material_instances
they can be. but you can also define all of your textures in the blocks.json file as a central area to define it
{
"format_version": [
1,
1,
0
],
/*"block:name": {
"sound": "<sound>",
< "textures": "terrain_texture">
||
< "textures": {
"up": "terrain_texture",
"down": "terrain_texture",
"east": "terrain_texture",
"north": "terrain_texture",
"south": "terrain_texture",
"west": "terrain_texture" >
}
}
}*/
"dma:stone_sixteenth": {
"sound": "stone",
"textures": {
"up": "stone",
"down": "sand",
"east": "brick",
"north": "birch_leaves",
"south": "spruce_planks",
"west": "diamond_block"
}
}
}```
you can define sound there, and a few other stuff also
It is possible to add a texture pack for a block that 16x16 for each side??
Huh? Of course, that's literally just a normal block.
Blocks.json is definitly where you would do that for vanilla blocks, bt other than sound, blocks.json doesn't do anything for custom blocks if you are using current version number custom blocks
what?
current custom blocks ignores block.json when it comes to textures
No, custom blocks is encouraged to use material_instances not blocks.json unfortunately
this is why we can't have carried textures for custom blocks
Hopefully Mojang will revisit this once HCF is gone to be similar to MC Legends where each block's texture is defined in its own json file not an overall blocks.json file
I feel like this is where they are headed. I think they will implement everything blocks.json can do for a block into the blocks behavior file. One stop shop
Im conflicted honestly 😂 one one hand i LOVE a one stop shop
On the other hand I hate how client stuff is defined in server file. @west ledge also hates this too iirc
I just want carried textures
I hate making a whole new item just to make it a block placer
when a single line of code could do the same thing by allowing carried textures on custom blocks
maybe 2 lines of code 😆
it doesn't
I use blocks.json a lot and it my custom blocks doesn't ignore it
must be a naming issue if it's ignoring it for you
What format version are your blocks in?
There's really no reason to use blocks.json currently
I use it keep the textures all together mainly
literally only reason
1.20.70 for blocks and 1,1,0 for blocks.json
🤔 I guess if it works for you, great. Last time I tried, it didn't do anything. Best to use Material_instances anyway, so that your blocks are future proofed.
How do I fix this? When trying to set a block state it autofills to that but says its wrong. Whats the proper way?
"sequence": [
{
"run_command": {
"command": "execute if entity @e[type=player,r=10] run fill ~-1 ~-1 ~-1 ~1 ~1 ~1 retr:runaway [${1:active}] keep"
}
},
{
"run_command": {
"command": "execute if entity @e[type=player,r=10] run setblock ~ ~ ~ glass"
}
},
{
"run_command": {
"command": "execute unless entity @e[type=player,r=10] run setblock ~ ~ ~ white_stained_glass"
}
}
]
},
Firstly, i do not recommend using Holiday Creator Feature blocl events as theyll be removed. See #announcements message
Secondly, it should just be "1:active": <value>
Ah, thank you. Should I try to do stuff in script instead?
That would be easier since you dont need to do an exevute command you could jist getEntities
Easier is not the right word in that sentence
hmmm i wonder if this issue is gone now, i cant reproduce it in 1.20.71
Got some new block components today in the preview
Blocks
Added ‘minecraft:entity_fall_on’ block component behind the Beta API experiment
Added ‘minecraft:tick’ block component behind the Beta API experiment```
wonder how minecraft:tick will be used
They're the replacements for the HCF events. Those two are required for the custom components to work #1220035290723254273 message
Anyone got the new fullblock geo thing for me to use since unit_cube left the chat
"minecraft:geometry": "minecraft:geometry.full_block"
(this only affects your blocks visually, it doesn't make them functionally solid)
As long as it can replace unit_cube haha. Thanks!
(I think it is still glitchy)
cool some of my blocks is just 1 color 
Seems to be a UV error or something. Applied to all my blocks that I think used unit_cube
I knew it
Please read this: #announcements message block events are being removed. Use custom components and scripting instead
It doesn't matter, I always ask something and no one answers lol
[Blocks][warning]-Collision in hashed Block Network ID. One of the blocks' hash has been adjusted. Block being added: TAG_Compound: 3 entries
{
// name
TAG_String: fnaf:vertical_big_stage_bricks_tile_slab
// states
TAG_Compound: 6 entries
{
// fnaf:check
TAG_Byte:
// fnaf:placed
TAG_Byte:
// fnaf:placedSecondPart
TAG_Byte:
// fnaf:rotation
TAG_Int: 1
// fnaf:secondPart
TAG_String: fnaf:vertical_checkered_tiles_slab
// minecraft:cardinal_direction
TAG_String: west
}
// version
TAG_Int: 18103297
}
, block collided with: TAG_Compound: 3 entries
{
// name
TAG_String: fnaf:vertical_big_checkered_tiles_slab
// states
TAG_Compound: 6 entries
{
// fnaf:check
TAG_Byte:
// fnaf:placed
TAG_Byte:
// fnaf:placedSecondPart
TAG_Byte:
// fnaf:rotation
TAG_Int: 0
// fnaf:secondPart
TAG_String: fnaf:vertical_big_rancid_wall_tile_alt_slab
// minecraft:cardinal_direction
TAG_String: south
}
// version
TAG_Int: 18103297
}```
does anyone have a clue what does this mean?
i never had this error
Seen that a few times, no idea what caused it though but it should be fine? Restarting your game shuold clear up that error
they better let us activate block events through scripting then
Wdym?
block events
what are the performance difference between the two
through scripting vs json events
Wasn't up to their standards and besides, scripting is much more powerful
yea i mean it's not causing any issues for now if im not wrong
but the error still happens
what does thie mean?
You need a geometry component
Show your geometry component

How do I make the block can be placed on every block except it self, no scripts pls
Use placement filter
I know now someone helped me already
what do i use to make the data part of a give command change a component in a block
i already know about the states and permutation stuff, i just dont what what to do in those
What?
like, when you do /give, theres a data part after the count
and i wanna know how i can make that number effect components on the block
You dont, blocks are moving away(and have been) from auxvals now
how to you use different states in crafting recipes then?
They should support block descriptors iirc
👍
How do I do this with just part visibility...
wait for 1.11.0 beta api
and i may rewrite that
i could add visibilirt geometry but there's a limit on states. like 15 (i think)
the block above have 16 frame only
my block have 60 states
I mean geometry visibility hahahaha
This wouldn't work out. I really need to use a frickin unkillable entity
Can you elaborate?
Is there a way to get all tags in all blocks?
Wdym? It's on the video hehehe
The rotation made with bone_visibility?
You'll have each frame of the animation in the geometry, and activate it accordingly
I have the geometry already but I don't how to make it a sequence. From 0 60 cause the states are only 16
Blocks have a limit of 16 valid values per state that cannot be exceed. This guide will explain how to avoid reaching the limit.
TIP
This tutorial does not show you how to have more than 16 states values, however using this method will simulate that!
Yeah, I wrote that page
Is the method I used for https://discord.com/channels/523663022053392405/1103295128782766142
How many part visibility does it havr
Also, your block itself can store up to 64 state values, but only 16 state values per state
48 frames because I don’t needed more, but I could have more than 128 frames if I wanted
All using this method
Read the page, you’ll find it useful
"states": {
"wiki:value_1": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
"wiki:value_2": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
"wiki:value_3": [20, 21, 22, 23, 24, 25, 26, 27, 28, 29],
"wiki:value_4": [30, 31, 32, 33, 34, 35, 36, 37, 38, 39],
"wiki:value_5": [40, 41, 42, 43, 44, 45, 46, 47, 48, 49],
"wiki:value_6": [50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
}
}```
It's not possible if like this right @white bobcat
Eh, I mean, you can do that… but that would be a really bad use of resources
Sorry if I ask too much, I'm gonna a make a post later
Yes please, do a post
Yeah it's just the same as before @white bobcat
"states": {
"wiki:division": [0, 1, 2, 3, 4, 5],
"wiki:value": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
}
"condition": "q.block_state('wiki:division') == 0 && q.block_state('wiki:value') == 0"
"condition": "q.block_state('wiki:division') == 0 && q.block_state('wiki:value') == 1"
...
"condition": "q.block_state('wiki:division') == 5 && q.block_state('wiki:value') == 10"
"condition": "q.block_state('wiki:division') == 5 && q.block_state('wiki:value') == 11"
I mean what I did above is just sames as what I sent before. Sorry bad English
Here
No, it is not
Men I'm really really stupid, I can't understand some of it haha
I will answer you in your post
Stupid general question: is it possible to create custom blocks with custom data attached (like inventories)?
No
What are you trying to make?
I am the maintainer of chisels and bits on java
And some body asked if I could port at least a reduced version to bedrock
So I have been researching ways to store the material information for each bit position in the block
But without the ability to store the bit positions material outside of the blockstate I don't see a way to do this
I could use entities
But that would potentially be heavy on Performance
So ...
Not really an option either I think
Any suggestions if it is even possible?
Not really, you might need to wait for dynamic block properties or better block support to store data
Okey thanks!
how do you make custom workbenches?
add the crafting table component to your block, for example this would make the block act like a vanilla crafting table:
"components": {
"minecraft:crafting_table": {
"table_name": "container.crafting", // Shows in the UI above the crafting grid, translated
"crafting_tags": ["crafting_table"] // Referenced by "tags" field in recipe files
}
}
thanks 
What the hell is this?
do blocks not have a tag component anymore?
bedrock.dev doesn't show "minecraft:tags" as a component in latest stable
I figured that one would have been updated to be the same as items
Blocks are the only one not to have a tag component yet. They use the old system per above
weird
Blocks do indeed have a component
For tags
oh wait it was just removed, what? (Joke for 04/01/24)
blocks have only ever had the "tag:my_tag": {} format
How can I create the same cardinal directions in the geometry of the model?
This is how I have it now, how can I make it like in the example above
"format_version": "1.12.0",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.unknown",
"texture_width": 128,
"texture_height": 128,
"visible_bounds_width": 2,
"visible_bounds_height": 2.5,
"visible_bounds_offset": [0, 0.75, 0]
},
"bones": [
{
"name": "Xerox",
"pivot": [0, 0, 0],
"cubes": [
{"origin": [-4, 0, -3], "size": [11, 6, 9], "uv": [1, 33]},
{"origin": [-3, 6, 3], "size": [9, 6, 0], "pivot": [1, 6, 3], "rotation": [-17.5, 0, 0], "uv": [21, 58]},
{"origin": [-1.5, 6, 2.9], "size": [6, 5, 0], "pivot": [1, 6, 3], "rotation": [-17.5, 0, 0], "uv": [0, 75]},
{"origin": [-7.5, -0.5, -4], "size": [4, 8, 11], "inflate": -0.5, "uv": [0, 55]},
{"origin": [-6, 5.5, -4], "size": [1, 1, 1], "uv": [1, 58]},
{"origin": [-3, 1, -7], "size": [9, 0, 4], "uv": [27, 66]}
]
}
]
}
]
}```
if you're using blockbench go to file > project and change the UV mode to per-face
thx
y dont ppl ever make blocks like this w baseboard? would it cause issues
That was a joke don’t worry
I don’t see why it would, I didn’t had any issues with my item display case block
I need some help in my problem you saw in the blocks section about block rotation
Oh fr? Cause whenever I use query.any_tag it can't detect my custom block.... r/woosh
It is Aprıl 1șt no longer
I'm not freaking kidding hahahaha
Lemme show you the code later
Not sure what you are trying, but you should do q.block_neighbor_has_any_tag
Though, block events will be dead soon
maybe I should try that cause the query is used is query.any_tag
are there any components that can be used to make a block work like plants and break from water and lava?
No
First you tell me no in the mod channel
then you tell me no in the blocks channel
stop following me
I really want to avoid having to use a constant ticking component for crops
but looks like I might have to
I guess I can't even use a constant ticking component, there's no way to tell how much water is left in a flow to know when the block needs to break
is there a way to specify a default block state like how we can set defaults for actor properties?
Bruh what'd you expect he's an admin here...
The only thing is scripting cause we can't use queued ticking now, afaik
the first item in the array is used as the default
You can use ticking plus execute if commands. That’s what I do for my plants
You don't need to use commands if you have access to ScriptAPI
Can the script api detect for a specific state of a vanilla block near your custom block?
Can i get a BAsic Block JSON? like for a custom block
Check the wiki
Okay
No need to crosspost
Hey guys is there a way to allow snow layers to pass through a block?
I posted in the worldgen general chat
Maybe someone here would have the answers
so I was curious how one would diagnose an issue, some block textures work while others don't, the files and everything are identical, just image is different.
just got back into modding and now im getting a registry error? apparently multiple of my blocks "does not exist in the registry" but everything is perfectly fine, they behave the same as always and look the same
That may happen if you changed your blocks id. The game is reading the old id in the chunks palette
i want to cancel when the player jump on the farmland to still like what is it not changing to the dirt anyone can help me with that?
That's more of a #1067535382285135923 thing. We cannot modify vanilla blocks
Does anyone have an example file that creates a block with the properties of a light block without the light? Trying to make what is basically an invisible spawner,
preferablly that can only be broken or seen with the item in hand
Welp.
Is there a way to make custom blocks waterloggable without using any structure editing
no
oh
Using scripting sure
How exactly?
You still need structures for that though 🤷♂️
It’s using the Structure API
You can create the structure dynamically and then delete it.
Hello everyone, the question is how can I make a frame with 8 pixels inside so that it is not completely transparent
You just do 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?
can someone pls put my block in game
Did you follow the wiki?
N O
For some reason my custom block wont drop. I have a loot table, the loot table works, and I have the loot component in my block with said loot table. Yet, it still does not drop. Is there anything else I'm missing?
Guys how do I make a bed like block?
(I mean the rotatable two blocks thing not functionality)
using facing rotation and with scripts detect if theres another air block to put the second one
Facing rotation doesn't work on the second block
Why is there an error????
BTW I am trying to place another block on top of it
And based on it's direction the other block's direction will be the same
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?
- I am trying to place a block on top of a block but based on the first block's direction
- The placing part, the second block doesn't get placed
- I have tried setting the block with the command which is
json fill ~ ~1 ~ ~ ~1 ~ pvz:lawn_grass_dark["block:rotation"=2] replace air - Yes
Does doing this command work normally?
Yes, at least in chat commands
It says that the problem is in =
Oh I think I know what's wrong
In json, a string is created: \"like this\". As you can notice, the \" character is used to show the beginning and the end of the string.
If you want to write a string that includes quotes, you need to "escape" it, by using backslashes: \"a json \\\"string\\\" with quotes\". In Minecraft, the backslash character will disappear before being outputted.
Examples:
\"/execute @e[type=item,name=\\\"Rotten Flesh\\\"] ~~~ give @p stonebrick 1 0\"
\"/tellraw @a {\\\"rawtext\\\":[{\\\"text\\\":\\\"Hello World!\\\"}]}\"
I will try it and tell you
Now the block doesn't appear anymore
I am going to lose my mind
how are custom blocks ordered in the creative inventory?
I believe alphabetically
file name? or identifier? both didn't work?
Then who knows lol. That's a bit annoying, last i checked it was id based
it's giving me a different order every time i try something different 🤔
Because you need to put "" like
setblock ~~~ crafting_table[\"<state>\"=<value>]
Dw I found an alternative but thx for the help
How do I make the block act like signs.
When the block behind or below it are broken or air it will destroy itself
So with the new HCF removal, what is an alternative to block states?
Because my block changes texture and executes commands upon different states.
Block states and permutations aren't getting removed, they've been out of HCF for a while. For the command execution, you can make it so that custom components are only applied on certain permutations of your block.
Alright, lemme rephrase that, how do I change a block's texture and execute commands from it upon changing to different states?
Because my block works similarly to that of a sniffer/turtle egg.
Besides, how do I even make permutations run commands in the first place?
Using custom components
If you need a visible example, check out my templates in the preview module https://discord.com/channels/523663022053392405/1191215197168336996
Still yet to use custom components...
IMO they are easier than what I originally expected
I DID read them, and I still don't quite understand them.
Sure, I'm getting something done right now and it seems to have no errors so far, but at the same time, I was wondering how I could...
Ya know what, nevermind.
I think I know how to do it.
From what I'm reading, it just provides a custom component class that allows you to listen to all the custom component events depending on it's type and you're able to add you're own behaviors for the specific object that triggered that event.
Sort of yeah
I mean y’all can check my templates, I made sure to explain literally line by line
Alright, so another question. How do I set the onRandomTick interval ranges? Because I want my egg blocks to take a while to hatch.
Sorry, I meant BlockComponentRandomTickEvent.
Not sure about the event listening methods being a non .subscribe and .unsubscribe 
Oh wait...
That was stupid...
Wrong event.
No, wait. Yep.
BlockComponentTickEvent doesn't have it either.
So, how do I set the tick interval ranges?
Custom components questions should be at #1067535382285135923
You’ll get better help there 
Fine.............
And be patient. You are pretty much learning a whole new language, which is a really big learning curve.
Sorry bro but I don't really know how to implement what I want, all I know to do is how to make the block cannot be placed on itself not break itself if there's an air or no block behind it.
(Sorry for ping) yeah this code works but idk how to implement as what I have saidp
"minecraft:placement_filter":{
"conditions": [
{
"allowed_faces": ["side"],
"block_filter": [
{
"tags": "!query.any_tag('custom:tnt')"
}
]
}
]
}
With placement filter, that behavior is implemented. So seeing your code, it looks like your block can only be placed in any side faces in blocks with custom:tnt tag, which means that when the block with the tag gets destroyed, your block will too
Ohh ok how do I make it air? Cause I can't detect air using tags
Why would you need air in this case?
Cause I wanna act my block to be like signs, when there's is no block behind or support block, it will break itself
Cause I did here was I cannot place my custom block on a block with that tag
So use placement filter, it’ll make just that
Check my torch template if you want, though the code you provided will work just fine
Where haha sorry. GitHub or in this server
Sorry but I can't really get it. I want my block to be placeable on any block except air.
"minecraft:placement_filter":{
"conditions": [
{
"allowed_faces": ["side"],
"block_filter": [
{
"tags": "!query.any_tag('air')"
}
]
}
]
}
Air tag does not exist
Yeah I know I just put that there. Looks like I need to use scripts on that then. But I don't want to cause I'm on 1.20.73 ( I forgot ) and it's doesn't have custom components so yeah, I don't want to edit my blocks again until 1.20.80 is released
You don't need custom components for this
You can't place any block on air
I'm stupid okay sorry
Im really, really confused
Okay I wanna explain I again, I wanna make my block to be placeable on any block in side only, acting like a sign but once there's no support block on it, it will pop itself off.
Like this
Yess
"minecraft:placement_filter": {
"conditions": [
{
"allowed_faces": [ // Decides in which faces the sign can be placed.
"up",
"side"
],
"block_filter": [
{
"tags": "q.any_tag('grass','stone','wood')" // Allowed blocks to place the sign at.
}
]
}
]
}
Ok I get but umm do all blocks have tags?
No
Sorry for asking too many questions.
Pretty much I really gonna use ticking on this.... sighhhh, cause it's not possible to make my block placeable on any block but if the supporting block behind it are destroyed, it will pop itself off.
Use scripting to detect if players break blocks
And if the neighbouring block is your block, destroy your block
"*": {
"texture":{"body":"sner","Snammer":"snammer"},
"render_method": "alpha_test"
}
},```
how can i add multiple texture files to material_instances
Could you elaborate
so my block has two parts, body and Snammer, both using different texture files
so i have to add two texture files in material_instances right?
I think this explains it https://wiki.bedrock.dev/blocks/block-models
from "Editing Material Instances" onwards
tysm
anyone give me some help here?, ive successfully gotten one block into the game, i come back a few hours later after messing with sounds and crafting recipies and the likes and then use the template to add another block, after that i go into blocks.json and add the same object im using to define what textures go on what sides (see first image) and copy over some parameters to the block definition .json (see second image) and it doesnt show up anywhere and i cant give it to myself,
The geometry, the texture the collision and the selection are not in your block so how do Minecraft show that?
i dont really know how bedrock calculates that but the standard block template doesnt seem to have a defenition for that?
its not a defined property
working block
forgot to add this as a response but ^^^^^^
so question, can we make a custom block bouncy?
or sticky?
for the bouncy part, i was thinking of reading the vertical speed of the player when falling on the blocks, multiply it by -0.5 and give it back to the entity. is there a better way?
That's the only way
what's about making it sticky?
This is my implementation of https://github.com/SmokeyStack/adk-lib/blob/main/scripts/blocks/on_entity_fall_on.ts bouncy
No easy way afaik since we cannot detect collission
well, we can detect location
you know that honey and soulsand require the entity to be at the same location as the block to stick to them?
it's impressive that you already have done it with custom components, and hilarious that i just theorized it as if i knew of it. you even multiplied the speed by -0.5 just like i said 😂
Whats more beneficial
Texture change with multiple bone but one image file
or
Texture change with multiple image file but less model bone
I think i personally prefer multibone one image file, so it work like the painting image file
Depends on your use case. What are you trying to achieve?
Nothing really, just asking randomly
Like people preference
I find having multiple images quite spammy on my phone gallery 🥲
So i just do it on one canvas
I get that haha. Personally prefer multiple images with just one model/bone. Easier to organize the textures and describe what each texture is
true
Ill probably do that if i had the chance to have a laptop 😔
Hmm
Its kinda funny that when u look at the threats here... most of them are just "u can use costum components "
And here i am still in confusion
🗿
can you make a block similar to beehive? can keep mobs in it
:<
Do I need to use typescript to use the new BlockCustomComponent? 🤔
I never worked with typescript, and the mojang example of implementing classes says it:
(obs: using JavaScript)
You don’t, just remove the stuff that are underlined with red and the colons that are before them
assuming you have the npm type definitions installed, you can use JSDoc comments to keep autocompletions that typescript would provide
/** @type {import("@minecraft/server").BlockCustomComponent} */
const MyCustomComponent = {
onStepOn(e) {
e.block.setPermutation(BlockPermutation.resolve("dirt"))
}
}
Ohh, so I don't even need to do this comment to get it working?
I'll keep it anyway. Thank you, guys
Is there a way to prevent the lava surface from being hidden with my custom block?
because I can see what's under the lava
Is there anyway to have a block model bigger than 30x30? Besides splitting it into more models?
No
Okay
What was the old size limit if you know?
Idk
Okay
Old size limit of blocks models are 16x30x16, now they changed it to 30x30x30
Yeah found out, been using an older version for some testing
What do I use to change a block's texture according to its state?
"permutations": [
{
"condition": "q.block_state('namespace:name') == 0",
"components": {
"minecraft:material_instances": {
"*": {
"texture": "idk",
//add here ur stuff
}
}
}
},
{
"condition": "q.block_state('namespace:name') == 1",
"components": {
"minecraft:material_instances": {
"*": {
"texture": "idk2",
//add here ur stuff
}
}
}
}
]
@kind finch
Ok, so i was doing the right thing earlier, but now I notice im getting query:block_state is making use of non-registered block state
Fixed that problem, but textures still dont show
Ima come back to this tomorrow
hi there, I m trying to make a fake block (the one that is an entity), but when I place the normal block which will turn into the entity, how can I make the entity (fake block) face the same direction that the previous block was placed?
place a dot before the resource pack folder
you can read the player facing direction, round it to the nearest 90 multiple and give it to the entity when creating it
Wait, what kind of event? Is there a block transform event? Or do I just set the block at position with the state I want
Is this a bug?
The bottom texture of rotated logs is not aligned or the same as on other side textures.
Maybe.
Ok nvm. Apparently all I was missing was geometry.full_block. Is this a key component or?
why can't i make my blocks transparent? my format version for the block file is 1.19.30, and the material instances render method is correctly set to blend.
Set it to alpha_test, does it work?
no
Custom geometry? UVs are correct?
not using custom geometry
im making a new block that just gets the default glass texture
Make sure you are used the updated pack and not a cached one
Here's mine from my repo
i know that everything else updates just fine
ohh yeah i see the error now
material_instances on the docs didn't explicitly say that it's required to get directions
It is not required, you can just use wildcard
i just didn't have render method in any object is what i'm saying
can i make a custom itemGroup ?
No
ok
can we make custom blocks take the color of the biome?
No
thank you
Can we use different render methots on a custom geometry block?
Like a different rm to each bone or something like that
How?, Ive tried that but it looks bugged in Game,
What do you have so far?
Wdym
Your code, your material_instances code
Ahhh, i have a custom geometry using vanilla textures, i'm using silver glass, planks and coral
The planks and the coral things are using opaque rm
And glass is set to blend
When i place the block it looks okay, but if i place it in other part of world the glass become invisible
I don't have the code rn but i can send it as soon as i get home
To do what you asked, your material instance component would look like:
"minecraft:material_instances": {
"bone_1": {
"texture": "texture",
"render_method": "double_sided"
},
"bone_2": {
"texture": "texture",
"render_method": "opaque"
}
}
When you have the code available, please create a post here in #1067876857103536159
Yes, something like that
Okay ty
Just a question
Does uv thing affect the rm?
They are related, so yes. The render method used to render a geometry will affect the geo, so it affects the UVs.
Was your block the fish tank-like block? If so, I don't think you'll need any more render methods other than alpha_test
Nope, it is a bottle, but as im using silver glass alpha test do not work since it makes everything transparent instead of having different opacitys
What should i do
The block property is deprecated now. Also update your pack we're 1.20.70+ now so yeah
i wanted to add precise rotation to my block
which version should i use
Scripts
Check wiki.bedrock.dev
There's a pre made precise interaction
gotcha
It's q.block_state not block_property anymore
Oh
What does this mean?
Nvm I had holiday creator features turned off
You should start moving your stuff out of holiday creator features as that toggle will be removed soon™️
Oh
I was using the on_player_placing trigger
How can i replace it
Using ScriptAPI and custom components
Oh ok
Guy, how to make cobwebs in bedrock like in Java?
AFAIK it's not possible but you just need to be creative, you can copy the geometry of the cobweb
where can I get codes for items, blocks and more?
You can't modify item except food item, you can't modify blocks too
Only thing you could modify is Entities and I forgot the other one
I thought that causes a content log error if you use two different render methods. Did they change that?
Don't remember, but I do remember it worked anyway
my block textures stopped showing up on blocks in game and i dont know how to fix it
can someone help me to add rotation to my connecting block pls
are/will blocks events still be a thing?
They will be removed soon, according to Kayla it may be as early as July
can we make a custom block indestructible by the ender dragon?
not sure
Kinda dumb question, but how do I make a block placed from different facings rotate?
Think like a chest or piston
try making it a stair, but the model is different
Well, I'm looking at that and typing it in, would there be any reason why VSC's bedrock plugin would be telling me
"Property traits is not allowed"?
Idk about that plugin, I didn't use it. If you done it correctly and it says that, maybe it's outdated.
if you're using the blockception one make sure you've updated it
Are you defining your textures in material instances or blocks.json?
The textures are defined already, this is in the blocks personal json
The block renders in game, the top just doesn't rotate
As in like, doesn't look any different
Again, where is the textures defined is what I asked? in material_instances?
Blocks.json
Yeah that's the issue, it needs to be in the material_instances component
Can we add custom paintings to bedrock, if yes then what's the resolution limit
02:48:00 [main] [INFO ] Loading server.properties ...
02:48:00 [main] [INFO ] Selected English (eng) as the base language
02:48:00 [main] [INFO ] Starting Minecraft: BE server version v1.20.70
02:48:00 [main] [INFO ] Selected Zlib provider: 3 (cn.nukkit.compression.LibDeflateThreadLocal)
02:48:00 [main] [INFO ] Opening server on 0.0.0.0:26501
02:48:00 [main] [INFO ] This server is running PowerNukkitX version 2.0.0-SNAPSHOT (git-5485ef7) (API 2.0.0)
02:48:00 [main] [INFO ] PowerNukkitX is distributed under the LGPL License
02:48:02 [main] [INFO ] Loading recipes...
02:48:03 [main] [INFO ] Loaded 2715 recipes.
02:48:03 [main] [INFO ] Successfully loaded 0 resource packs
02:48:03 [main] [INFO ] Enabling PowerNukkitX v2.0.0-SNAPSHOT
02:48:03 [main] [ERROR] Could not load plugin "FastAsyncWorldEdit": Wrong API format
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null```
Help plz.
All I can see is at the end the 'this' is taking the value of the ' text ' variable of an object but it is null
I need help installing some plugins on my server.
I created the server with a PowerNukkitX json egg, but I don't know how to install the Java plugins, I don't know if I have to do anything else, can anyone help me?
Sorry I don't have any experience with Java Servers
And Java plugins
Literally nowhere I put the code does it work, I actually have 0 clue where you're telling me to put this
In the material instancee compinent
So it's neither one of these?
Either I need more details or I need someone to explain it, because the more you say the same thing and link me resources the more confused I get
Nope, I suggest you learn the basics of how to make a block first
Bro, I made the damn block
I have it rendered
The code your telling me to plug in, you're not specifying where, I even sent my file names and asked you if it went in one of them and you never answered me
You just keep repeating a file name and sending a link without elaborating, this part of the server is literally where you're supposed to be able to ask questions and get help, not just get wiki links and told to "do it yourself"
If I add a new block called: wet_sand, what component or property do I have to add to the json file to make the sand "fallable"? TYsm
You can't easily make falling blocks unfortunately
ah, that´s good and bad to know TY!
easy baby question: does Bed support translucidity in glass pane blocks like if Iwanted to make stained glass for a church building? sorry, I haven´t played Bed for maybe over a year so I don´t remember. I´m coming back to it now.
Yes
Can we add more paintings to bedrock or can we only replace the existing ones
Painting is an entity. Hence you can add custom entity, therefore you can.
Is there a template for paintings?
Not sure
You can create your own custom painting blocks. Note that they’ll probably require multi-blocks
Hey how I make that my block facing the player like a furnace excluding the up and down
But I can place it everywhere,
Whenever I use "minecraft:cardinal_direction" it shows an error
I said it already, whenever I use "minecraft:cardinal_direction" it throws an error
Then show code
Here:
Cardinal_direction is not placement position, it's placement direction.
"traits": {
"minecraft:placement_direction": {
"enabled_states": [
"minecraft:cardinal_direction"
],
"y_rotation_offset": 180
}
}
No worries, we all made mistakes.
But I want to add a 4×2 one and It would be weird if I can just place block on top of it
You will not be able to if you make it properly
I can't make collision boxes bigger or in this case longer than one block can I
I am still pretty new to making addons so I don't have much knowledge about different I can use
No you can't, but that doesn't has anything to do with the first concern
What you'll make is that when Paint A gets placed in the world, Paint B, C and D will be placed accordingly, if any of these is unable to be placed all will be destroyed.
I have a script at home I can post that has cardinal and player facing. It'd based off bum stairs script just modified for directional blokcs
We got it figured out, thank you for the offer though
Block tags on data driven blocks are stable, or required an experimental option ?
Stable
so confusing question. i made a custom mycelium that spreads to dirt through the replace block command and i was wondering if i can specify grass as itself now instead of it being part of the dirt family?
whats command?
how do I use the "minecraft:queued_ticking" the wiki's way of doing it doesn't seem to work and the Microsoft docs isn't descriptive enough?
Queued_ticking is being removed soon and requires an experimental toggle to work. I'd recommend waiting for the custom ticking component to release instead (it's the replacement and uses the script API). Here's some examples for those: #1221643160413929523 message
Yeah I'm confused on how they work. Do I have to script each individual block like that or just put the on_random_tick in the json like other components?
So far the blocks I'm worried about still work and dont use events to funtion
Can we put more than one loot table for a block. For some reason I can't get a custom block to drop itself with more blocks able to be dropped by it in certain conditions. Like dirt and grass. I'm trying to get it to drop my custom dirt without the silk touch but either it gives me both or only the custom grass
Silk touch unfortunately cannot be overriden for custom blocks. Your block will drop itself if silk touch is present
So it's not possible to mimic vanilla grass drop wise?
It's possible, you just need to use scripting to detect if a block is being broken -> check if the tool has silk touch. If it has silk touch, drop its own block, if it does not have silk touch, set the block too air and spawn the non silk touch drop
Ahhh. I have no clue how to do that lmao. Just got comfortable with js
I got it to work with the spawn loot event into my loot table for the drop. It now drops both with each condition 🙂
With each corresponding condition sorry
Now it'd damn near vanilla the spreading is a bit jank cuz idk how to randomize the replace fill command it uses to replace the dirt version
Not sure if that's going to depreciate but if it does I guess I'm learning to script
how do I slow down a event to prevent crashing?
What do you mean slow down an event?
I want to have a block not instantly activate an event but I also don't want to have the player interact with it too much.
Well you just need to do system.runTimeout to delay the event or the waitTicks function that was introduced in this week's preview I believe
were do I find the info for those?
You can find all the scripting docs on the ms docs website
You can add the loot component to point at an empty table
but i need to loot component
im using the loot component to drop other item
but i dont want it to drop itself?
Oh so youre talkimg about from silk touch?
no
im breaking by hand
but for some reason it drops itself?
I have never experienced this
Maybe i used some component so it always drops itself?
is there any component like that?
No
does a block auto drop itself if it has a loot table regardless of the loot table doesnt include the block as the item?
It should not
im so confused right now
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:spawn_egg",
"weight": 1,
"functions": [
{
"function": "set_actor_id",
"id": "test:music_disc"
}
]
}
]
}
]
}
Sorry for tagging @vestal marsh
but this is my loot table
the block when destroyed will active this loot table
the block has identifier as test:golem_music_block
can we make an 8×8 slots container block?
can we substitute blocks with bedrock MC editor? I refer to selecting an area and then replacing all specified blocks to another block type.
i didn´t see this mentioned in the web doc
Probably not
You can create an extension
But last I checked there wasn't a replaced function
TY - I am yet to check out this alternative though: (example)
give @p repeating_command_block
/execute as @p at @p run fill ~-15 ~-15 ~-15 ~15 ~15 ~15 lime_concrete replace grass_block
get a lever and set it in the block then activate
Hi, i'm having trouble with the colored_terracotta facing direction.
I try to cancel and remove this auto rotate.
I've tryied multiple test without success 😦
Is it hardcoded ? Or is there a way to lock the rotation?
You cuold use scripting
is it working for a full map builded with terracotta ? XD
sorry to ask i'm not familiar with scripting but could you share documentation of it please ?
#1067535382285135923 for more info
Is there a way, in the current 1.20.80 stable, to run a command/script on block place? It doesn't seem to be happy with me having components > minecraft:on_placed.
Stable? No
You can use custom components
But that's experimental
On second thought, I believe playerPlaceBlock in scriptAPI is stable as well
Oh interesting. It's accessible now. Unfortunately I'd prefer it for more of a general place than just player.
Thanks. 😄
You'll need to wait for custom components then
Set it to drop the item itself. It looks like you're trying for more than one thing which won't work for the same roll
Are custom block sounds a thing?
I just want to add a custom break and step on sound for my custom block?
Unfortunately seems to be bugged
That sucks...
Really hurts my polish on the block, I was doing ehhh. If custom scripting components were out of exp. I could probably get away with an unpreformant way for doing custom sounds but still not the best.
As a current work around you could use playerPlaceBlock which I believe is stable
yeah, doesn't cover other edge cases though.
It wouldn't be polished to include just 1 sound without all the rest.
- Stepping on, off, etc.
I was going to use that just couldn't replicate the stop on / step off.
Without majorly hurting performance
Is not possible as for now, sadly.
Its possible but scripting methods are jank and hard core not performant for this sort of thing in stable. You have to check the block under the player and implement cooldown system.
etc.
just eh.
Yeah that's why I said is not possible, as you want to not hurt performance
Yeah, just wish I wasn't stuck waiting.
For the features, I need to be stable.
Thank you anyway for the pointers, atleast I'm not crazy and now know its not possible.
uhh... my block does not show up... this is my very first time puting up the first custom block but it´s so many steps I get lost - if a blessed soul could fix it for me, I will then follow up making others with that fix and so I can have lots of custom blocks from then on
terrain_texture.json not terrain_textureS.json
oh gosh!
fixed the naming, but still nothing, if you could look into the zip to see where the mistake is.. I´d really appreciate!
what's the issue?
this should be the same name as what's in your blocks.json "textures": "azulejo_diagonal_branco"
which json file was that?
terrain_texture.json
one question, do I really need the lang file or I can live without it?
thank you so much it worked 😍
if you don't want to translate the names into different languages you could use the "minecraft:display_name" component instead of a lang file
(this is your behaviour pack block file with it)
{
"format_version": "1.20.60",
"minecraft:block": {
"description": {
"identifier": "vvelha:azulejo_diagonal_branco",
"menu_category": {
"category": "construction", // The creative inventory or recipe book tab that the block is placed into
"group": "itemGroup.name.concrete", // The expandable group that the block is a part of. (Optional)
"is_hidden_in_commands": false // Is the block hidden from use in commands? (Optional)
}
},
"components": {
"minecraft:display_name": "Azulejo Diagonal Branco"
}
}
}
if I add a new custom block to go along with this first one, all I gotta do is add it to both terrain and blocks.json correct?
you'll also need a behaviour pack file like the one above
ok I´ll take a look here
see I´ll only use English punctuation so no funny symbols in the words, so that´s why I have this basic behavior text file
´´´{
"format_version": "1.20.60",
"minecraft:block": {
"description": {
"identifier": "vvelha:azulejo_diagonal_branco",
"menu_category": {
"category": "construction", // The creative inventory or recipe book tab that the block is placed into
"group": "itemGroup.name.concrete", // The expandable group that the block is a part of. (Optional)
"is_hidden_in_commands": false // Is the block hidden from use in commands? (Optional)
}
},
"components": {} // Must be here, even if empty!
}
}´´´
so then the answer is I have to put it in 3 places:
1- terrain_texture.json (RP)
2-blocks.json (RP)
3-custom_blocks.json (BP)
yes, you'll need a separate BP file for each block in the blocks folder, you could have one at BP/blocks/azulejo_diagonal_branco.json for example
I get it now - I will rename this one with the custom block name then add more with the new names of new blocks.. got it 🙂 - TY
Is something wrong with my terrain_texture json? I have 2 blocks listed:
"texture_name": "atlas.terrain",
"resource_pack_name": "Vila Velha Pack",
"padding": 8,
"num_mip_levels": 4,
"texture_data": {
"azulejo_diagonal_branco": {
"textures": "textures/blocks/azulejo_diagonal_branco",
"texture_data": {
"alimentos": {
"textures": "textures/blocks/alimentos.png"
}
}
}
}
Yes it wrong
"texture_name": "atlas.terrain",
"resource_pack_name": "Vila Velha Pack",
"padding": 8,
"num_mip_levels": 4,
"texture_data": {
"azulejo_diagonal_branco": {
"textures": "textures/blocks/azulejo_diagonal_branco"
},
"alimentos": {
"textures": "textures/blocks/alimentos"
}
}
}
oh ok I figured it out thanks 🙂
so a friend of mine told me that he thinks Bedrock only accepts power of 2 texture.
1- Is that true? because I have a 16x41 plant texture which I plan to add in.
2- Also is it true we can (besides the obvious Box UV) use per face textures as well?
I ask because I am in the process of mass blocks and models migration into Bedrock from my java mod, so I´ll be using Blockbench to save hundreds of models into bedrock geometry
Also is it true we can (besides the obvious Box UV) use per face textures as well?
Yes we can
Bedrock only accepts power of 2 texture sizes - true / false?
Idk
Just put into a 5 line note how to make custom geo bedrock blocks:
1- put all the 3D bedrock geometry geo models inside the resource pack´s \models\blocks folder
2- individual blocks behavior jsons must be made with their components (BP folder)
3- add block info into terrain_texture.json (RP folder) to tell where texture is
4- add block info into blocks.json (RP folder) to define the blocks textures details and sound
5- add block info into en_US.lang (RP folder/texts) so block names appear in inventory```
understanding the essence of things in quick steps helps a ton
for custom geometries you don't put the textures in blocks.json, instead you add the "minecraft:geometry" and "minecraft:material_instances" block components to you BP file
{
"format_version": "1.20.80",
"minecraft:block": {
"description": {
"identifier": "custom:block"
},
"components": {
"minecraft:geometry": "geometry.my_custom_model",
"minecraft:material_instances": {
"*": {
"texture": "my_texture" // Defined in RP/textures/terrain_texture.json
}
}
}
}
}
{
"format_version": "1.19.50",
"minecraft:block": {
"description": {
"identifier": "bridge:lucky_block1"
},
"components": {
"minecraft:geometry": "geometry.lucky_block1",
"minecraft:material_instances": {
"*": {
"texture": "bridge_lucky_block1",
"render_method": "alpha_test"
}
}
}
}
}```
How can I fix this?
Is it ok to use numbers behind similar blocks in this file? thanks, I will now read the answer to my question above
I ask because notepad did not color the names green like the rest above! it could just be notepad being overcautious
[Geometry][error]-models/blocks/pandorka.json | Required child geometry\.[a-zA-Z0-9_.'-:]+ not found
[Geometry] [error]-models/blocks/pandorka.json | geometry file didn't validate
``` And this error
Hey I’ve got a few questions. First, can I just use the default text app on windows to edit the code for my blocks or should I use a software? If so what one should I use? Also I was wondering how to make a door open and close? I know how to make the two models for opened and closed but I’m unsure on how to code it to open and make a noise whilst opening it. Barely any info online about doors.
I don’t really know much about coding just modelling and texturing
Yeah as long as the namws match the blocks and textures you want
hi there
is it possible to change the block texture based on the custom states?
Yes
ggg
I'm touching blocks after a very long time and I'm surprised that the breathability component according to bedrock.dev is in experimental. Is it really in experimental ?
It's been removed afaik
can anybody help me with my code, honestly i dont know what is wrong, but i know that is related to properties
this is my code
👍 Please open a post with your code and any content logs
okay thanks
has anyone made mob head rotations without HCF yet? I'm not seeing a way to get it functioning without events
https://github.com/Bedrock-OSS/bedrock-wiki/blob/hcf-rewrite/docs/blocks/precise-rotation.md @desert vector wrote an updated article on the hcf-rewrite branch of the wiki
ahh okay, he used beforeOnPlayerPlace
I didn't even think of looking at it because I was staring at onPlace that has no source
thanks
How can I make a custom block be able to be waterlogged?
ok anyone knows, I am trying to make a bedrock block in BB, but it says the exporter is only available in the Desktop version. Is this trully a problem? if so, I may have made several blocks as entities instead of real blocks... funny the web version, but it says that it does export to bedrock block...
You cannot
There's no file/format difference between an entity model and block model
Smokey, (I´ve spoken to several other people, 2 have tried to help) maybe you are my only hope! I have tried several model edits to one of my models and it still shows up invisible in-game and if I place it down it makes all other custom models become invisible. If I brake it, then they return visible. My model is 30px wide (at the limit) so it should not have been a problem. Registratiosn asfaik are all ok. The name appears in the inventory.
Any guess? here is the model json
Any content logs?
oh yeah let me get the picture
but I´ve tried shrinking it to even 16x and still the same problem - I´ve made it 1px 2px in height, still
Your geoemtry is out of bounds is what it's saying
well it is still touching the inner 16x grid tho
The y axis is below which isn't allowed
good now?
Try it and see
still says the same thing, but as you can see it says 30 (it´s supposed to be in the limit)
Have you tried making it smaller to test
yeah even to 16 But at that time it might have been below, like you pointed.. I will try shortening it One pixel (29) to see if it works, well let´s go with 28px and see
same thing at 28px
also I have even deleted all the UV faces except the up face which is the displayed one here - this simple, yet troublesome model has been stubborn like this since yesterday
Ah, the y axis size is 0 that's why I believe
I tried 1px and even 2px on the Y thickness but still problem remains But at your word and I can try again
Funny enough I'm also running to the same error in my geo
ok I thickened it to 1 pixel, but can I make it positioned close to the floor at 0.09? because the hopscotch drawing should be very near to ground.. is that ok you think? otherwise the hopscotch drawing it will be too elevated from the floor - we all know a hopscotch you draw on the floor with a chalk
I´ll try this and let you know!
same thing
I found the issue for me, it isn't the size, rather the position
can't have decimals
so the position can be at 0 then, right? is zero fair?
Should be
99% of the problem is gone as there is no error in the content log regarding the actual amarelinha1 model now, but its texture still does not show up like you can see in the picture above! its render method is alpha_test. Any guess? that is the UP face in Blockbench
could it be these negative numbers? but then if they become positive... the number on the hop won´t be in the correct facing
Only other issue I know is that you're not properly defining your textures
and that would be in what json so I could verify..
because all other models of mine show up fine
this is in the BP
this here as you can see by notepad does not color it green for having numbers after the name, but someone said it´s not a breaker
maybe the problem is here? someone told me that here is the texture name... but I guess it may be the model name Then the textue name below it... if this is the problem then we have found the current issue
as where it is written amarelinha it may be amarelinha1 then the amarelinha.png which is its texture
this is how my common sense is telling me how it is supposed to be - I´ll try and see how it goes
Can we create a block that has the collision of a composter? how do we make custom collisions?
You cannot
No
please
Smokey, the final fix was resorting to a power of 2 texture! that made the texture appear! so this means Bedrock only supports power of 2 textures then - but I guess I remember you might have said that is not the case...
Noice
I have a model which texture size is 8x32 which works - so then it may mean that Bedrock does support non power of 2 but the texture must be divisible by 2 like 8x32 is ok 8x16 or 64x128 - those kinds
You still need to create a power of 2 texture, but you will not just fill it up. For example if your block is 8x38, create a 32x32 textures but you wil only use 8x32 in it.
Also, learn how UV works so you can customize more the texturing.
why are some parts in the texture dark? I couldn´t figure out.. the texture is the same
I just figured out that it is because those faces are the down faces and the up faces are lighter. But please, why? how can I disable this... omg! shading is to be done in game not on blockbench
Disable the shading in blockbench, it has a sun icon. I can't see that in your screenshot, just find it.
now, my stuff (in-game) have black shading in it.. any guess? my current renders are as follows (I have tried all of them)
"render_method": "alpha_test",
"ambient_occlusion": false,
"face_dimming": false
The geo is below 0
hii everyone
is it possible to open a chest when a player is clicking on a custom block?
or anything that has slots that can store items?
the container doesn't need to belong to the custom block
You'd need to use an entity. Spawn the entity with a script when you place the block, and give it an inventory component. Then make it so that it's hit box lines up with the block so you can open the inventory. Despawn the entity when the block is broken
on pc this might work but on mobile it has this ugly "open" button and hitting it doesn't open, is there a way to make it open similar to pc on mobile?
Like, for uploading files? I'm not really sure. I usually just go to my pc when I need to send files over discord
No offense brother but it's so messy.
Here....
Also I want to clarify somethings....
Pls don't use block events now, they I'll be removed soon if they have been removed you are needed to edit the block with scripts, Minecraft:on_interact, step_on, fall_on will be removed.
#announcements message
Try reading this.
i meant opening an inventory of enitity😅
Ah, my bad. I'm not sure in that case
Guys guys. Question....
I have a custom block, I want that I could place a block on my custom block, is it possible, nope not scripting
What do you mean by "place a block on my custom block"
@vestal marsh How make charged creeper drop custom item?
if a custom block is 16x16x3 and the texture is 22x22 (3+16+3=22 for the sides to be textured).
Why would the game render the 16x16 face with a weird stretch effect?
Is the game throwing a hissy fit for the odd size of the image texture?
Why are you asking in #1067876857103536159 ?
Oh sorry
#1067876948858118185 message
I hadn't realized it yet, I thought it was entities
can you answer me?
@vestal marsh
thank you ❤️
Sorry I meant is i could not place block so like if I have block holding if I interacted with the block it doesn't place
You'll need to use scripting
Hmm k, just a hunch
@desert vector I recommend just removing the cardinal direction trait entirely. Since you are already using a rotation trait that goes from 0-15, you can use that for the base rotations as well.
I spent the past 3 hours having a massive headache with this because using the cardinal_direction trait will cause anything that would rotate 67.5 degrees to be rotated from an undesired direction. Professional drawing for an example of what happens.
This ended up being my mob head file, my permutation transformations are a bit different since the geometry on my mob heads are always facing north
the block face (not cardinal direction) state is used to define which side of the block it is attached to. I feel using the "rotation" state and an additional "attachment: ["up", "side"]" would be more confusing (setting somewhat random numbers for the rotation) and would further worsen the block's interaction with vanilla: being able to place it while inside where its collision would be; completely disabling the structure rotation feature which will work with the example on the wiki if the block is placed on a side face
it doesn't look like your block connects to side faces so it isn't needed for you
@vestal marsh the subpage was only error 404
okay i know everything in that but i need to know
how to set up
feature rule
Did you try searching the wiki?
tbh not or slightly yes
thank you so much
this wiki is so useful
like if it possible to make stairs using only blockshapes
@vestal marsh have you ever tried to make a stairs using only the blockshape?
Blockshapes are not allowed to be used for custom blocks
okay i see info about that
but i will try anyways, i will fail for sure
but i will better remember than
when i would not try on my own
i will try to cheat that blockade
i will let you know if i will succeed
ok wow Bedrock is really picky and I have to say I like that 😄 - what´s wrong here? 2 models are not rendering right - in this screenshot all looks well, but the in-game screnshot proves otherwise
the above model is not the magenta black one but the one to the left of it
this is its RP model json
btw this was a model I had made using the blockbench block wizard
and this is its BP block json
The magenta and black block model are the following jsons (Model and BP) below
BP json
RP block json
Open a post in #1067876857103536159
Unknown texture.
oh ok sure!
Also post the whole pack
oh you mean the whole Addon correct? cause I had only sent the corresponding files
can I have a custom block be placeable in a flower pot?
interesting. permutations that would affect rotations inside of a blocks json file on the bp side will affect how it is rendered in the menu
Yeah!!
so now I have to redo all my mob heads so they render in the correct rotation
had them all North facing
Not really no, you can just change the default value of the state
If you want to redo them then sure
well, that is the only option for them to render properly in the menu
so that is the only way to do it
rotate the model?
they're all rotated already so that they are placed correctly with the players direction
changing the rotation of the model will ruin all the values, and then force me to do additional changes in the actual block
which will have the exact same outcome
but how is one of them not rotated correctly-?
I don’t understand-
all of the blocks themselves are rotated correctly when placed
however, in the menu, the block is rotated in the wrong direction
Oh, I was talking about the one in the UI
dang. I don't think I can change it either without drastically modifying the texture files
haha, I'm a clown. It wouldn't work regardless because the same rotations would need to be applied, it's just a dead end and the capabilities just aren't there
You didnt know?
I had to create an extra block state for my stair block just to get it ti render properly
how do I check what block is under the custom block?
ScriptAPI or a molang query for block tags. The first method is much more flexible, the second method is limited
I thought it was something I made a mistake on, not that it just wasn't doable lol
Really cannot wait for Mojang to give blocks their own icon component
Is there any way to make a block that places two different blocks on top of each other? Like for the angel statue in this pic, it’s an entity model but I want to make it into a block so it’s rendered from max distance however I cba having to always place two separate blocks to make the full statue. Can I just make two blocks (bottom half and top half) and then code them to join together and place when I place a certain block?
It would also save me space in the construction tab
Also is there a way to flip the blocks if I left click them? A mod which I use has that feature for some blocks and it would also save me space in the construction tab as the diagonal parts of the pediment have blocks for the left and right, if I could just have one block that I could flip when I click on it that would be a timesaver
✨ All the answers you seek requires #1067535382285135923 ✨
what am I doing wrong?
Care to elaborate?
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?
With the new thing added to allow pots the block stopped appearing in the creative inventory and I think that it's just not showing
the block's "permutation" is based on which states the block has. That means you can only use q.block_state in permutation conditions
bedrock is kinda screwed up
with all of these weird rules made up by Mojang
to make for us making addons harder
to disable us from making good addons
and make people only use paid ones from marketplace
(i am bedrock player and enjoyer and some little addon creator and this is my opinion)
Team bedrock since 1.13
I don't think the marketplace is why mojangs making the decisions they do. As marketplace creators need to deal with all of the quirks as well
so how do I use q.block_state to do this?
I'm a bit fearful that Mojang is slowly throwing stuff towards more complicated ways (script API) instead of simplifying like Minecraft would prob. Benefit with an official model maker like Hytale has and will be one of the main apps for mod creation once it releases
Change your render method
to blend or alpha test
im trying blend
opaque worked but only for 1 side
how can i make them transparent?
Alpha_test or blend
I cannot see anything
the red outlined part is rendering over the bluie
Are you using a custom geo or the minecraft cross geo?
I recommend using the built in vanilla geo: minecraft:geometry.cross
okk
"minecraft:geometry": "geometry.blueberries_bush_empty",
here?
Yeah
unless you need translucent pixels (like stained glass) you should avoid blend because it does weird stuff like that
yeah i used alpha test
it's still not working and I don't know what i'm doing.
how do i make the block check if a has snow layer on top and if it has it breaks it?
Need to use scripting I guess cause block events will be deprecated and be removed soon....
"minecraft:random_ticking": {
"on_tick": {
"condition":"query.has snow on top",
"event": "btm:snow"
}
},
ok
import { world } from '@minecraft/server';
world.beforeEvents.worldInitialize.subscribe(initEvent => {
initEvent.blockTypeRegistry.registerCustomComponent('custom:block', {
onTick: e => {
const { block } = e;
block.dimension.runCommand(`fill ${block.above().x} ${block.above().y} ${block.above().z} ${block.above().x} ${block.above().y} ${block.above().z} air replace snow_block`);
}
}
});```
Do you mean destroy the snow block or your block?
You need to add a new component on your block....
"custom:block"
]```
onTick also requires the minecraft:tick component with an interval_range
"minecraft:tick": {
"interval_range": [
5,
5
]
}
Ohh yeah I forgot about that too 😅
okay now i tried
and minecraft didn't allow me that
Just like he said, it's NOT allowed.
does anyone know why blockbench does not have a slab preset in their block wizard? I went through the whole process but the "slab" showed up like a full block in Bedrock
Ask in the blockbench server?
I have done so as well... anyhoos, I believe it is possible to just change the inner of the BP block with the slab info from the bedrock wiki... it´s more complicated.. but we´ll see
Good news yesterday i have posted my/our Addon called Terras Capixabas (Capixaba Lands) that changes many blocks to Mcepdl.. it´s awaiting approval
hi there, is there any tag that makes the block a damage type that interact directly with entity`s filter avoid_damage_blocks?
No, I don’t think so
I made slabs but top part isn´t showing, I was successful I guess yesterday but I ended up removing the slab now I forgot what I used instead of unit_cube that worked... I already tried geometry full block but that did not work here. What should I use there? thanks!
Umm unit cube doesnt work right now, a lot of documentation already stated that....
Yes I remember reading about it not working I guess a couple of days ago, i even read it in the official site but they don´t say what works or what we should use instead
What do you want to try again? You want to have a half block geometry?
yeah (slab)
If yes, I think you need to add your own Geom cause there's no built-in Geometry for that
Good for you then.
the problem seems to be in the BP file
it is complaining about the unit_cube.. but so what do we use instead that´s what I´d like to know
I guess maybe what I did is change the version number to an older version
You used this?
Not recommend
Delete it then.
what is recommended?
Use latest format version
where do I find the latest format json then?
Remove the unit cube component then change format version to 1.20.80
it´s not showing the top part though
My bad
Replacement?
That has been replaced with minecraft:geometry.full_block
Scrap what I said lmao
That's a geometry not component
minecraft:geometry": "minecraft:geometry.full_block"
guess I am going to have to pay my friend again to help me. I´ve already spent 40 dollars on him 😄
this is my troublesome file
You pay? Lol
yeah! in Brazilian money though
if I lived in the USA like I did in 1998 onwards till 2013 i woul pay in dollars, but I came back to my home country and here things are 5 times the price and the dollar is 5 times the money so that´s why I would not be able to pay 5 times as much to you all living outside brazil
Why you guys love paying 😭
got it!
honestly from the bottom of my heart I love paying haha but too bad I don´t find brazilian guys, I only Have ONE!
if any of you know bedrock coders who live in brazil, send them my way for money - at least I can afford them with this country´s currency. I´m 51, an old man, so.. that´s why I am not as patient as a young coder is haha
Got it 🙂 thanks a lot will try it
it gave errors
I´ll have some milk and cookies now but I´ll come back in a bit
51 year old man?
yeah hahah I can safely say I am the oldest Minecraft player here, add to that (the fact) that I do not play/enjoy the game like most people do.
no multiplayer
no redstone
no adventure
no mining
no fighting monsters
oh thank you so much! this worked flawlesly! wow I am so happy 🙂 thanks to you I now have my very first custom slab! but I know smokey is an amazing guy he´s been patiently helping me along the way too! - you all have a good night cause it´s 23:42pm here and I´m about to go to sleep.
anyway my addon is already posted in Mcpedl.. I will send a link on the (I guess) showcase channel?!
if anyone could tell me which channel I could send a link to an mcepd addon.. cause maybe it is not allowed in this discord (and I would understand, if not)
shot question
how can i use the grass texture with out it being gray using material instances
Use the carried texture instead
i need it to be rtx compatible so i need the main texture
Why not just edit the carried grass texture set then?

