#Blocks General
1 messages · Page 10 of 1
What vanilla blocks are to trying to mimic?
The normal animation, that of all the blocks
the breakage animation is different
a customized geo
you mean geometry.built?
ty
I have this texture so I will need to divide it by faces right?
hello, i have a block with this material instances ```js
"minecraft:material_instances": {
"*": { "texture": "white_concrete_powder", "render_method": "alpha_test"},
"glass": { "texture": "orange_stained_glass", "render_method": "blend"}
}
why does the blend part not render when the block is placed in a positive x coordinates?
All instances must have the same render method.
Material Instances
it doesn't matter if i have them both blend or not
that's not the issue here
oh wait, this seems to have fixed it 🤨
but now i am getting a separate issue where face culling is missed up
Do vanilla blocks use the new tags that got introduced for our custom blocks so that vanilla tools can mine them efficiently?
Yes.
Alright, thanks Smokey
Uhh, do you know how to properly apply it?
Just add the tag to your block.
I mean for a custom tool, like how would you apply it to the digger component with all the tiers n everything, sorry for the confusion
Not sure I understand what you mean.
Alright, let's say I wanna make a custom tool, right? In the digger component, I can assign tags to make the tool break blocks with those tags. How would I add that in?
More specifically, would I simply put all the tiers I want in a query.has_any_tag?
Yes
Pickaxe tag for breaking all pickaxe destructible blocks and then additional tag to check if it supports the tier
Question. Is there anyway to Export and Import a Structure between two worlds that’s roughly 200x100x150?
I know .mcstructures can only do 64x64 (as far as I’m aware). Which is why I’m asking to see if the ONLY option would be to break the structure up in sections and piece them together one by one.
Also beside planet Minecraft, what a good source for downloading .mcstructures by other people?
is it possible to have custom logs use the pillar_axis block states like vanilla logs?
You can always create your own states. If you mean vanilla, then to my knowledge you can only use block traits.
damn. is their anyway to play the swing animation in a script for vanilla item use?
NOPE.
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "sam:aluminium_ingot",
"conditions": [
{
"predicate": {
"item": "sam:aluminium_ingot",
"tag": "minecraft:iron_tier_destructible"
}
},
{
"predicate": {
"item": "sam:aluminium_ingot",
"tag": "minecraft:diamond_tier_destructible"
}
}
]
}
]
}
]
}
loot ?
?
Umm. Is there a way to detect what direction the shulker box is placed?
#1067535382285135923
Yeah, I just asked if ever
Umm, how do I add a block that is not solid (a player can pass through it)?
Set collision box to false
You can check the block states to see what rotation it has
Is it possible to give blocks different names depending on blockstates? I'm trying to use permutations and the display name component but it doesn't seem to be working
Well permutations only trigger during placement.
Alright, thanks
is there anyway to find the vanilla ore breaking speeds?
or do I just have to guess and test
{
"format_version": "1.21.40",
"minecraft:block": {
"description": {
"identifier": "jay:coal_ore",
"menu_category": {
"category": "construction"
}
},
"components": {
"minecraft:custom_components": [
"jay:ore_component"
],
"minecraft:display_name": "Custom Ore",
"tag:minecraft:is_pickaxe_item_destructible": {},
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 6
},
"minecraft:destructible_by_explosion": {
"explosion_resistance": 12
}
},
"minecraft:loot": "loot_tables/coal_ore.json"
}
}```
the minecraft wiki has it
help my block error : unexpected version for the loaded data, n 'block.json' file does not exist in the registry
Oh, thank you!! :3
Anyone know how to react that fence effect with the transformation component? Cuz it works with other packs, yet trying to recreate it does not work for me.
You mean the 1.5 collision box bug?
I got a fence template that I made some months ago with it on my block templates repo discord server
I saw that one! It was a good template, but I just had issue with way blocks had to be placed on top of the fence.
Though I am thinking of a way to solve that... if I have the time.
No not that one, that template uses two blocks because I want to avoid using bugs for my templates
But on my personal discord server that I made for that projec, I made another fence template that makes use of a bug to not use two blocks.
Wait really? Where you can access that link?
#1191215197168336996 message
Thanks!
No problem!
Is there no longer any way (besides scripting shenanigans) for translucent full blocks to have interior face culling? Just wanted to double check. I can't get translucency now without specifying a geometry (using minecraft:geometry.full_block).
What do you mean without specifying a geometry? Translucency is defined in material instances.
I've created a post to show my code. Story short, the block will only render translucent as long as a geometry is defined. https://discord.com/channels/523663022053392405/1322374401680867350
eh
why is the "minecraft:placement_filter":{"allowed_faces":["up","side"]}, makes my block unplacable?
i just want to make it unplacable on the down side of the block ( u can place the block in any face(s) but not the down face )
it should be inside of a "conditions" array
"minecraft:placement_filter": {
"conditions": [
{
"allowed_faces": ["up", "side"]
}
]
}
understood
"minecraft:placement_filter":{"conditions":[{"allowed_faces":["up","side"]}]},?
yes
it works, ty buddy
yesss
"minecraft:material_instances": {
"*": {
"texture": "oak_planks",
"render_method": "blend"
},
"plate": {
"texture": "plate",
"render_method": "blend"
},
"dark_parts": {
"texture": "dark_parts",
"render_method": "blend"
}
}```
Guys, the textures for the blocks...
Does this make the block have 3 textures? Or the plate has the texture plate and other are unaffected
These leaves sticking out, is it custom geometry or another block with plant geometry?
Seeing how vanilla block geometry cannot be modified, it is likely the latter.
it is applied to faces with the "shade" material instance
https://wiki.bedrock.dev/blocks/block-models.html#changing-material-instances
is there something that can change blocks color ingame?? like the grass and foliage color?
we don't have biome-based tinting yet
In my script I have an onTick() event running on a block, it is pretty important to be able to use the block's current position when using commands such as "setblock ~ ~ ~ air" (I know i could use setType but i would like to know how to use ~ ~ ~ for future commands). However just using dimension.runCommand("setblock ~ ~ ~ air") does not seem to work. I even tried onTick( block ) {block.runCommand("setblock ~ ~ ~ air")} but that also does not work. Any help would be welcome
Block's can't runCommand. Only Dimension and Entity.
ohhh, so how would I use the blocks current position when running commands through dimension?
block.dimension.runCommand
what would I use for the event type for onTick(blank)
onTick({ dimension, block }) {
}```
just pick in these two
and beware that using ~~~ isn't possible and you need to get the location instead
so if i were to want to structure something at this blocks location how would I do that?
block.location
it's vector3
Hello, has anyone had issues with custom block breaking speed not matching what's set?
Here is the related portion of my block's code: json "tag:minecraft:is_pickaxe_item_destructible": {}, "tag:minecraft:wooden_tier_destructible": {}, "minecraft:destructible_by_mining": { "seconds_to_destroy": 7.5, "item_specific_speeds": [ {"item": {"tags": "query.any_tag('minecraft:wooden_tier')"}, "destroy_speed": 1.15}, {"item": {"tags": "query.any_tag('minecraft:stone_tier')"}, "destroy_speed": 0.6}, {"item": {"tags": "query.any_tag('minecraft:iron_tier')"}, "destroy_speed": 0.4}, {"item": {"tags": "query.any_tag('minecraft:diamond_tier')"}, "destroy_speed": 0.3}, {"item": {"tags": "query.any_tag('minecraft:netherite_tier')"}, "destroy_speed": 0.25}, {"item": {"tags": "query.any_tag('minecraft:golden_tier')"}, "destroy_speed": 0.2} ] }And here is the proper breaking times for a vanilla stone block as according to the wiki article (I have matched these values in my code)
However, when mined by hand, the custom block takes roughly 11.3 seconds, whereas vanilla stone takes 7.5.
You scared the shit out of man 😭😭
About your problem, the docs states that the block mining you put 2x than the actual speed
I've tried that, but then my custom block takes 22.6 seconds to break by hand instead of the vanilla 7.5
7.5 - 2 = 5.5
It seems to my like the relationship is nonlinear, because when using a netherite pickaxe, my custom block is mined instantly whereas vanilla stone takes time
Can you try 5.5 that?
Breaking, digging, punching, or mining is a common activity in Minecraft, performed (by default) by holding the left mouse button or right trigger while the cursor is pointing at a block, or by long-pressing on the block on touch screens. Breaking is the primary way to remove unwanted blocks and acquire blocks for future placement or crafting.
Shucks
This shit is confusing as hell
so like 7.5 - 5?
or 7.5 ÷ 5?
"tag:minecraft:is_pickaxe_item_destructible": {},
"tag:minecraft:wooden_tier_destructible": {},
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 7.5,
"item_specific_speeds": [
{"item": {"tags": "query.any_tag('minecraft:is_pickaxe')"}, "destroy_speed": 1.5}
]
}```This sample works and matches all tool expected times, but the breaking by hand is still ~11.3 seconds when I have set it to 7.5 seconds
it's 3.8
What's 3.8?
Why? Wouldn't you do 7.5 * (7.5/11.3)
If the block takes 11.3 seconds to mine, and I want it to take 7.5, I need to find the ratio between expected vs actual.
that ratio is 0.75/11.3 = 0.663..,
so I should then multiply 7.5 by that ratio to get my new breaking speed, so that in-game it is 7.5
ohh make sense... But the seconds to destroy is still confusing asf
Yeah that's why I feel like I'm doing something wrong
Yes it seems to
I assume the ratio is 0.666 (or 2/3) just because I was using my phone stopwatch to time the breaking initially so I may have been off
The destroy speed works fine just the seconds to destroy is kinda confusing
Wait I'll do a better test to find the ratio
sorry If I am being redundant, but I am not very good at scripting (yet) how would the setup be for using block.location?
first question the custom components are already setup?
yeah do you need a screenshot of what I am working with?
nah no need.
in your block add, it can be anything but the name you out here should match the one you will use in the scripts ..."minecraft:custom_component": [ "custom:block" ]
and the script should look like this.
world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry }) => {
blockComponentRegistry.registerCustomComponent('custom:block', {
onTick({ block, dimension }) {
block.dimension.runCommand(`say ${block.typeId} at (${block.location.x} ${block.location.y} ${block.location.z})`);
}
});
});```
I've used scripting to time block breaking, and can confirm it matches vanilla stone with all different tool types
so what's the fix?
That sample works for stone, not sure why when I tested it it measured to be 11 seconds. Reloading the world changed it
so for a setblock command i would use 'setblock at (insert block location data) air'
Hmm
and just use the API version of it not runCommand
You could also do block.setType('minecraft:air')
I'm running more tests because now custom iron blocks don't have the same mining time as vanilla lol
something to do with the hardness value maybe
dude thanks, I'll see if it works in a sec
yeah but I was wondering how to replicate the ~ ~ ~ for other commands such as /structure or /loot or whatever
Then yes yeah.
Which is why I also proposed renaming that stupid property.
https://discord.com/channels/1138536747932864532/1246645206066135090
Well oddly enough I'm having the same scaling issue as before...
That is when you mine using your hand, but when you use an iron pickaxe the ratio is the other way around
Oh no way
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 25, // This should be set to what wiki says for default breaking time
"item_specific_speeds": [
{"item": {"tags": "query.any_tag('minecraft:is_pickaxe')"}, "destroy_speed": 5} // destroy_speed is the hardness of the block
]
},```
@vestal marsh ^ seconds_to_destroy shouldn't be renamed to hardness as per your feedback post, it seems like destroy_speed should be...
Well, this was pre block tags. And this doesnt factor the item specific speeds.
Yeah I don't know why it's so strangely setup
all I know is that using those values works
import { BlockPermutation, system, world } from "@minecraft/server";
const overworld = world.getDimension("overworld");
const testBlocks = [
"minecraft:iron_block",
// Add your custom blocks to compare speeds
];
let testBlockIndex = 0;
let blockPlacedAt = -1.0;
const blockLocation = { x: -155, y: 68, z: -388 }; // Set this block location as required
function placeBlockAtTestLocation(typeId: string) {
let tmpBlock = overworld.getBlock(blockLocation);
if (tmpBlock === undefined) return;
system.runTimeout(function() {
tmpBlock.setPermutation(BlockPermutation.resolve(typeId));
blockPlacedAt = system.currentTick;
}, 20);
}
system.afterEvents.scriptEventReceive.subscribe(function(data) {
if (data.id == "test:mining_speed") {
const sourceEntity = data.sourceEntity;
if (sourceEntity === undefined) return;
testBlockIndex = 0;
placeBlockAtTestLocation(testBlocks[testBlockIndex]);
}
});
system.runInterval(function() {
if (blockPlacedAt == -1) return;
let tmpBlock = overworld.getBlock(blockLocation);
if (tmpBlock === undefined) return;
if (tmpBlock.typeId == "minecraft:air") {
let currentTick = system.currentTick;
let miningDuration = currentTick - blockPlacedAt;
let miningDurationSeconds = miningDuration / 20.0;
world.sendMessage(`${testBlocks[testBlockIndex]} takes ${miningDurationSeconds} seconds to mine.`);
blockPlacedAt = -1.0;
testBlockIndex++;
if (testBlockIndex < testBlocks.length) {
placeBlockAtTestLocation(testBlocks[testBlockIndex]);
}
}
})```
A very rough testing setup. Set the block coordinate ideally on top of a bedrock block, and after you run the scriptevent start mining the bedrock
This is what I have, It does not appear to be working. have I inputted it wrong? '{onTick({ block, dimension }) {
block.dimension.runCommand(setblock at (${block.location.x} ${block.location.y} ${block.location.z}) air);}'
You can do
// Make sure to import BlockPermutation
import { BlockPermutation } from "@minecraft/server";
block.setPermuation(BlockPermutation.resolve("air"));```
He's trying to replicate the location
No errors?
But isn't what he sent effectively just replacing the current block with air?
That's just a test
But idk lmfao
@vivid oxide What are you trying to achieve?
I used to be able to use custom blocks to achieve random structure generation using the run command function in the old block events, I am trying to be able to re-achieve that effect, but the normal ~ ~ ~ don't work while scripting
all this is for nothing if I cant find a way to replicate the randomize function that used to be part of the block events anyway
that was the whole backbone of the system
You definitely can
option two would be I just learn how to use jigsaw blocks but I have no documentation
ok i figured it out
block.dimension.runCommand(setblock ${block.location.x} ${block.location.y} ${block.location.z} air);
Thank you all for helping me 🙂
You can use world.structureManager.place to create structures
https://stirante.com/script/server/1.16.0/classes/StructureManager.html#place
So, when the block ticks I assume you'd want to create a structure centerd at the block location?
// in the body of your tick callback:
world.structureManager.place(
"mystructure:identifier",
block.dimension,
{
x: block.location.x - some_x_offset_to_center,
y: block.location.y - some_y_offset_to_move_into_ground,
z: block.location.z - some_z_offset_to_center
}
);```
Documentation for @minecraft/server
YES dude.... huge
thank u so much
its not centered but i do need offsets
what about rotation?
world.structureManager.place(
"mystructure:identifier",
block.dimension,
{
x: block.location.x - some_x_offset_to_center,
y: block.location.y - some_y_offset_to_move_into_ground,
z: block.location.z - some_z_offset_to_center
},
{
rotation: "None",
waterLogged: true
}
);```
Documentation for @minecraft/server
Perfect. Got that working
now what about the randomize problem
Any ideas?
Also happy new year guys
🎉
how do I add a light outline thing to my block?
Light outline? You mean a selection box?
That’s a question for #1067869022273667152, please create a post there
I got the error "Failed to register Block with identifier: glass_bottle" : { "format_version": "1.21.40", "minecraft:block": { "description": { "identifier": "g:glass_bottle" }, "menu_category": { "category": "items" } }, "components": { "minecraft:collision_box": { "origin": [ -3, 0, -3 ], "size": [ 6, 9, 6 ] }, "minecraft:selection_box": { "origin": [ -3, 0, -3 ], "size": [ 6, 9, 6 ] }, "minecraft:destructible_by_mining": { "seconds_to_destroy": 0.4 }, "minecraft:destructible_by_explosion": { "explosion_resistance": 0 }, "minecraft:geometry": "geometry.glass_bottle", "minecraft:material_instances": { "*": { "texture": "glass_bottle", "render_method": "blend", "face_dimming": false } }, "minecraft:light_dampening": 0, "minecraft:map_color": "#edf9ff" } }
Your components are outside of minecraft:block
and menu_category is outside of description
no like the block produces light but not really
You mean glow? You need to use deferred
that light effect thing that the lanterns had for some events?
or like an thick outline thing for a cartoon effect?
Per world.
Like if I have 10 of these blocks on the ground, does it add up to 2400?
Yep.
Dawn
The worst part is that I need to save a 1 day timer in each block, but using onTick is not an option
Because onTick resets when you leave the world, or when the block reloads

This is your chance to pester give Mojang feedback to add block dynamic properties. Your other workaround is to save the local position and the timer into the world dynamic proeprty or an entity.
Yo im back with another question. Does anybody know how to turn off the auto shading feature blocks have? I have tweaked the ambient_occlusion and face_dimming to false, but it still has that slight shading. I want this to look like a never ending void, but corners are super obvious, and any of the four different materials in material_instances don't fix it.
setting face dimming to false should remove that
I have the feeling we need way more block tags...
how do i apply a break sound to the block?
Yup.
you define that in blocks.json
Im rn implementing some deco block and holy shit I dont know and quite cant know which blocks are full/solid via tags
thats so annoying xD
but air tag is overrated
if it's in scripts, you can do block.isSolid
i don't think that should be determined by tags
nope, I sadly need to deal with the placement filter component..
okay, so.. how would I set the blocks for the placement filter component then?
I think this guy has a cold
unfortunately it does not. I am using bridge so is there a spot where face_dimming is being overwritten as true? Or is this just a bug
isn't there a way to randomize block positions, like a flower?
yay smokey saving the day with his great ideas!
No. Youll have to use permutations and the transformation component.
That's good, thank you
what is the component to make a block file non-stackable as an item?
You'll need to make an item proxy for that.
just the beh side/
like custom_item.json?
under items?
Yep.
i was reading it up actually lol
Make them have the same id and all that.
okay cool
how would i fix this issue?
custom block looking funky
i guess its corrrect, could be my texture
??
is there a way to do transparent blocks?
change the render method https://wiki.bedrock.dev/blocks/block-components.html#render-methods
why are my blocks with the cross geometry not lighting properly?
i know it's not much to offer in terms of "potential problems", but it's something i've run into with several now
i'm using alpha_test rendering, they're custom plants
if you want to have the same rendering as a mob spawner you need to define textures in RP/blocks.json, remove "texture" from material instances and remove the geometry component
is there a way to make a block emit particles every couple seconds?
i imagine it can be done with custom components, i just don't know how to make the timer for something like that
Use the onTick with the tick component for that.
tick component? the only two parameters i'm seeing for the custom component are block and dimension
i am stupid. thank you ^^
i thought onTick fired from GLOBAL tick
is there a way to stop custom blocks (i.e. a plant) from turning the grass below them to dirt?
Add plant tag
thx ^
I'm completely new here but I'd like to ask what I'd use to make custom blocks, I wanna make blocks from MC Dungeons for my new Project.
@orchid flint👆
"conditions": [
{
"allowed_faces": [
"up",
"down"
],
"block_filter": [
"blushrooms:popple",
"blushrooms:popple_vine"
]
},
{
"allowed_faces": [
"down"
],
"block_filter": [
"blushrooms:popple_sprout"
]
},
{
"allowed_faces": [
"down"
],
"block_filter": [
"blushrooms:blue_grass",
"minecraft:dirt",
"minecraft:grass_block"
]
}
]
},```
why is this not a thing
What do you mean?
Able to have multiple blocks with different allowable faces per block instead of an array of blocks with an array of allowable faces if that makes sense
It is a thing though? https://discord.com/channels/523663022053392405/1313114546122260500
Hmm maybe I typed something wrong
nope nvm its the script, i have to freakin crouch to place another one
is that avoidable?
Known issue with custom components.
ahh atleast atleast im not the only one
A sea floor block, like sea-grass or kelp or coral fan, how do I make a custom block to be ocean/river floor placed AND seem like in water? I know this has to do with waterlogged. I am not up on the stuff around this. What are my options? Fake water in whitespace with no collision? or ??? help!!
I found this.. is this it? json "minecraft:liquid_detection": {"detection_rules": [{"can_contain_liquid": true}]},
Will that make my dreams come true?
Further reading... I am assuming this will do it? right? json "minecraft:liquid_detection": { "detection_rules": [ {"can_contain_liquid": true}, {"liquid_type": "water"}, {"on_liquid_touches": "no_reaction"} ] },
Sorry, what are you trying to achieve?
You just want it to be waterlogged is all?
If so, then yes, this should suffice.
Making a sea-sponge.. tubular ocean floor plant.. so needs to do what kelp can do.. and be one with the water
Then yeah, code above should suffice.
no, you have each property as a separate detection rule
"detection_rules": [
{
"can_contain_liquid": true,
"liquid_type": "water",
"on_liquid_touches": "no_reaction"
}
]
hey did something big change about blocks recently? my on_placed trigger doesnt work anymore
"components": {
"minecraft:on_placed": {
"event": "setblock"
}
Holiday Creator Features was removed
You need to use custom components instead
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
ah...
thanks
do i just add these custom components to a main.js
like they dont have to have their own files or anything right
imo it's better to have them in separate files
e.g. BP/scripts/myComponent.js
import { world } from "@minecraft/server";
const MyBlockComponent = {
// Hooks
onPlace(event) {
// do something on place
}
};
world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry }) => {
blockComponentRegistry.registerCustomComponent("my:component", MyBlockComponent);
});
and then import into main.js
import "./myComponent.js"
for organisation i guess
but still works if i just have a list of components in 1 file
yes
okay cool thank you
Thanks... but that seems weird. Seems like it should not be an array then. I am not imagining a reason for another object in the array then.
it's for when other liquid types (e.g. lava) are supported
okay, yeah... then that makes sense. Thanks again. Been working on a pack from scratch, trying to see how error f ree I can get it before giving it it's first GO.
Not as far as I know.
No
Just trash workarounds
Hey! I see the plants. I’m also doing custom plants. Have you had issues with plants turning the grass below them to dirt in certain light?
I’ll confirm tmrw, but I think I added the plant tag, so if there’s something else it may be it’d be great if you could pass it along
nope, haven't had that issue
Just gonna make it myself
your block is preventing the light from passing through
Ohhh, I need to turn the light dampening to 0 ^^
Genius! Thank you
turns out i have set light dampening to 0, i'm unsure what is causing this anymore
this is what i'm talking about. i've set dampening to 0, added the plant and fertilize_area tags, i'm not sure what's causing it
Is the geometry in the block by a pixel?
What do you mean? It's the geometry.cross geo, if that's any help
Ah wait, I misunderstood your question. Are you asking how to prevent turning grass to dirt. If so it isn't possible last I checked.
That's exactly my problem. It's working just fine while in daylight, but in darkness this happens. Ah well- it'll be possible someday
Yeah, Mojang is planning on hammering out "solidity".
How do I change the rotation of a block in my hand?
Use item_display_transforms
thank you!
Anyone know where I can find help on creating a block that takes two block spaces simmular to a bed?
Can I make a block unstackable in stable?
As in, in your inventory. Only 1 per stack in your inventory. I'm aware of item switching or whatever it's called in experimental but am looking for a fix in stable
Stable? No.
Rip
Could someone help me convert this to a block please?
How do I combine multiple blocks into one
and make it work something like the pink petals
you'd create a block model with 4 bones like this
did someone already help you or do you still need help
and then use bone visibility and a custom component to change a state determining how many are visible
ok
can you show me how?
don't have time to explain but this is an example I made earlier
there is an issues in index.js
it should be mainhand.setItem rather than mainhand.setItemStack
I still need help 😔
aight bet
is it supposed to be a block or a block entity hybrid because the geometry is bigger than a full block and probably wouldn't work if it was a block
Is it possible to make it an entity. And make it like a block? That is, it cannot be removed?
(But it can be removed with a tool or something, in case I need to take it out.)
yes there is a way but I still don't understand how it works
I think you can break a block entity hybrid like a normal block
also done but probably have to convert it to bedrock entity
accidentally made it into a bedrock block
Thank you so much!
Do lots of onTick blocks cause lag?
Depends on what they do. If they spawn 100 pigs every tick...then yes.
why does my custom block do this when I switch from "Alpha_test" to "opaque" can it be avoided without setting it back to alpha_test?
No.
Since your texture has transparent pixels it needs alpha_test.
Invisible blocks that spawn particles? Every 0.5s
That shouldn't cause lag, I've done something similar.
Heyo! @vestal marsh I am trying to allow my custom stairs to change to 'corners'.
I am following along with this
https://github.com/SmokeyStack/adk-lib/blob/main/stable/scripts/blocks/stairs.ts
But i am getting the error below. because i do not have the correct states on my custom stairs...
Is there anywhere i can see an example of vanilla stairs? so i can make sure i have the correct stair states / perms
[Scripting][error]-Error: Failed to set property 'ts_wcbb:south' on block 'ts_wcbb:stairs_birch_wood' at <anonymous> (bundle.min.js:1)
Sorry, that particular custom component is using a block file generated by the actual ADK project. I can try generating an example stairs maybe. But you can simply just add the proper block states.
True thank ya! But then i need the perms as well? And should i just customize those myself. so it is changing block model?
Just not sure what the vanilla entries are, for different block models.
ex:
"minecraft:geometry": "geometry.minecraft.stairs",
"minecraft:geometry": "geometry.minecraft.inner_stairs",
etc...
I know the stairs file is also looking for :shape states. Doe sthat matter. if i am just changing geo via perms
Nothing like that, all it's doing is updating the bone_visibility. Here's the stairs model I used.
https://github.com/SmokeyStack/adk/blob/main/adk/data/assets/stairs.geo.json
Though, doesn't seem like the public repo is up to date.
ahhh tyty. Could you lastly direct me to modifying bone visibility. Is this via perms? After it reads the namespace:south/north/west/east state? Im trying to doc stuff so i wont have to ask the simple questions again haha
Bone visibility last I checked accepts molang queries so no, it isn't via perms. I believe I don't use permutations.
#include "block/block_stairs.h"
#include "block/component/custom.h"
namespace adk {
nlohmann::json BlockStairs::Generate(std::string mod_id, std::string id) {
auto placement_position = std::make_unique<PlacementPosition>();
auto placement_direction = std::make_unique<PlacementDirection>();
placement_position->AddEnabledState(PlacementPosition::EnabledStates::VERTICAL_HALF);
placement_direction->AddEnabledState(PlacementDirection::EnabledStates::CARDINAL_DIRECTION);
AddProperty(std::move(placement_position));
AddProperty(std::move(placement_direction));
auto state_string = std::make_unique<StateString>(mod_id + ":shape");
state_string->AddValue({ "straight", "inner_left", "inner_right", "outer_left", "outer_right" });
AddProperty(std::move(state_string));
auto& custom_component = std::find_if(std::begin(components_), std::end(components_), [](const auto& component) { return component->GetType() == "minecraft:custom_components"; });
if (custom_component == std::end(components_)) {
auto component = std::make_unique<ComponentBlockCustom>();
component->Add("adk-lib:before_on_player_place_stairs");
components_.insert(std::move(component));
}
else {
ComponentBlockCustom* component = dynamic_cast<ComponentBlockCustom*>(custom_component->get());
component->Add("adk-lib:before_on_player_place_stairs");
}
return Block::Generate(mod_id, id);
}
} // namespace adk
Yeah, I just add a block states and handle it via the bone visibility in the geometry component.
Ah yes, I do change the geometry only based on its rotation to keep the UV lock since we don't have that yet.
How do I use the block tick component to run things like scripts or commands?
tick component is just used how many ticks it runs for the script of it.
imagine the system.runInterval delay option
you need to use onTick of block components in script to run things
onTick from what?
world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry }) => {
blockComponentRegistry.registerCustomComponent('custom:block', {
onTick({ block, dimension }) {
block.dimension.runCommand(`say ${block.typeId} at (${block.location.x} ${block.location.y} ${block.location.z})`);
}
});
});
?
Yah.
Beware it causes lag and might crash world
is "custom:block" the block I want to add the component to?
dumb question but yk
just gonna assume yes
yeah, you gonna put that in the custom components
How can I make a block generate particles?
custom components -> onTick
Do you know how to fix this ?
The blocks in creative looks weird in mobile phone. But in PC it's fine.
that's why the game crashed didn't see the message
I don't think there is a way to fix it
unless you change the item texture to be 2d like normal items and if you think it looks weird in hand you can give it custom 3d model to show in hand
idk how am I supposed to know I'm not an addon maker or a scripter or a texture pack creator I just draw stuff
Do custom geometry blocks cause Lag?
If like.. when you stack them like 100x100
Or 1000x1000
I saw some addons that when they place some blocks there like entities inside the block, till this day idk why they did that
If I have a custom block model, and it consists of two cubes, how do I make a material instance that only affects one of the two cubes?
CHAT HOW THE HECK DID THE BIOMES + REALISM MAKE REAL MODDED STAIRS WITH PROPER COLLISION
SOMEONE PLEASE HELP
It isnt really proper collision.
its good enough for me to wanna add them how do you add em
Cant help with that, sorry. You'll have to figure it out yourself. But I would not bother due to jankiness.
theyre better than stairs that are just slabs
I guess it's an entity with multiple collisions
"menu_category": {
"category": "none",
"is_hidden_in_commands": true
}
so i am just coming back to addon development after the 1.21 changes can i still use block geometry like this? "minecraft:geometry": { "bone_visibility": { "top": true, "blinds_open": true, "blinds_closed": false }, "identifier": "geometry.blind" },
Yes.
Oh hey you're here.
haha yes i was 🙂
Ohh I forgot about the is hidden in command... Thank you lol
How do you read the selected face from onPlayerInteract?
Answered you in the script API channel
This didn’t appear when I selected it lol
looping: false in minecraft:tick isnt working?
I added thisjs "minecraft:tick": { "interval_range": [1,1], "looping": false }
but onTick is activating constantly
Because that says tick every 1 tick.
And are you adding it in a permutation or?
Is your format version 1.21.10 or higher?
aah yees
Im changing the permutation
in the onTick?
yes
the block is "restarting" because of that, I understand the problem now
🤔
Yes. Modifying the permutation of the block even triggers onPlace that's why previousBlock exists
-# idk probably they're too lazy to fix that lmfao
xD
i found a unique bug i dont even know how id report this lol.
are you using multiple render methods on those blocks?
just the one thats disapearing yeah. it has 2 textures only way i was able to get the trasnparent part
you can only use 1 render method per block
you should be able to just use one texture with blend
but whats weird is its only near the sand that it does this
no it works fine outside of the beach area
the reason that is happening is because you're using multiple render methods on one block
it will not happen if you only use blend
ill try it and see if that helps
It worked. But it needed 2 faces per bone to render correctly for blend
It turns invisible if north and or south aren't a face
Is that using the built in cross geo?
I wonder if you can use this for leaves to avoid the weird render when using the full_block geo
Yeah it is
Err was
It's my sapling geo now
Any particular reason you're not using the built in?
i think the built-in cross geo is outdated anyway
if they updated it to be double sided (preventing face mirroring) this wouldn't be an issue
^
they've updated the cross blockshape, but not geo
Outdated how? It's been quite a while since I used it, is it just UV issues?
I've used my own since I started i didn't even know about the built in till I was on like my 9th flower lol
I've only really used full_block built in since unit_cube was removed, not sure how many built in geos we have for blocks.
As far as I've found yeah. Last time I used it for anything other than a normal texture it rendered really badly
We only have two publicly. In the exe build there are strings for other geos but not useable.
Define normal texture lol.
Alpha_test
minecraft:geometry.cross vs cross blockshape (1.21.60)
As as far as I've read apha_test should have rendered the translucent part i guess I misunderstood the wiki
AH, that's what you meant. Render method not texture.
Well only certain textures work with certain renders so yeah
According to my docs anyways.
double sided blend could also help
Meh(waits for update) again
what update are you waiting for?
Well hopefully updated geos for blocks so I can cut down on how many I'm using lmao
Stairs* but yeah
Not stairs.
i'd like better culling rules first
Custom culling rules
so we can create leaves, glass etc
The reason not stairs is because that requires editing bone visibility and we don't have that ability for built in geos.
Oh yeah good point
i feel like they would have to state-drive stair connection too
Custom collision
They do
they use 0-3 for weirdo direction which includes the corner and they have an upsidedown_bit for upside down placement
Java's block states better.
wonder why they haven't been updated to minecraft:cardinal_direction and minecraft:vertical_half like other vanilla blocks
also when i placed just 4 in a circle all 4 that are the corner just say weirdo direction theres nothing else in it so idk
they need to
Weirdo direction is that they call the top part of the stair.
yeah its just weird how they do the colision if they only call one part of the stairs for placment like that
I forget how atrocious stair select/hit collisions are.
I'm pretty sure only the blockshape does any connection
Last I tried anyways, if you tried aiming at the corner bit(at the back) it would fail to place the block. Maybe it's an editor mode issue.
unless they really do it as a seperate part and just use a perm to place it like we do
have a seperate geo for the corners use query for neighbors
In Java at least they only have two geos.
that makes sence. one for normal cardinal and one for the corners
the only reason they havent just implemented majority of javas code is cuz java isnt universal in all platforms, atleast not all of its funtionality
in order to do that they would have to rebuild bedrock with javas core to work with c++
idk why they havent just made their own engine to work like unity or eu5. you can totally make it to work seperatly for both platforms
youd really only need to update the engine for new mechanics everything else would just be an addition to whats already impemented. build ur engine around java and c++ and use either for the core for what ever platform its on. ios would be the only issue
Huh? Are you aware that Bedrock came after Java in order to support multiplatforms. The only reason they haven't deprecated Java is due to it still being popular and beloved?
You can do it by placing an invisible block with half collision on placement that uses the transformation component to push it into the target block, as a second hitbox
Do you got a template for this?
no
Well dang i have absolutely no way to go abt doing that tbh 😭
Im very very new to scripting
it's very janky and not worth it ngl
Its still better than wannabe stairs
How does the new block tags work that makes vanilla tools able to break our custom blocks? Can someone explain to me please?
Add "tag:minecraft:is_pickaxe_item_destructible": {} and pickaxes will mine your block faster
Replace "pickaxe" with whichever tool you want
I remember seeing something about iron, stone etc etc
they don't do anything afaik
Unfortunate. So adding that tag will only make our custom blocks destroy faster with any vanilla tools of said type, correct?
yes, i believe that's how vanilla blocks do it too
And those tags don't have any relation with the loot right?
the tier tags are applied based on whether the vanilla block drops loot
they won't stop loot dropping from a custom block
yes
let me check
correct, they are only used to categorise blocks rather than add functionality
whether a blocks drops would be determined by loot table checks
Categorise blocks how? Like a comment on the file, or do they change speed too?
so you can look at a block's tags and determine whether it would drop loot
not sure when you'd use it
Ah okay, so overall not any real usage for us
Is there a tag:minecraft:is_pickaxe_item_destructible for sword?
Hypothetically if you were to add the same tag in the digging component of an item, would that break all blocks that are mined with a pickaxe?
Lovely, thanks!
yes, the vanilla pickaxes' digger component (if they were data-driven) would look something like this:
"minecraft:digger": {
"destroy_speeds": [{
"block": {
"tags": "q.any_tag('minecraft:is_pickaxe_item_destructible')"
},
"speed": 1.5
}]
}
to override the Geometry component with blocks.json settings for a custom block. This isn't supported ???
patch ?
Fixed in 1.21.60. You can safely ignore it.
ok
Does anybody know how to make a block unable to float, so it requires itself to be attached onto another block?
Youll need to list all the blocks in placement filter.
Every single block?
I doubt it's possible to do though since conditions has a max length of 64
Yes since we cannot check for solidity. Alternarively you can use scripting.
I thought I recall you could add multiple conditions. Saw somewhere in #1072983602821861426
Scripting... So like through the use of an onTick custom component or a blockdestruct afterevent?
I remember having seen this too
was getting confused with block filter oops
Is there a method to destroy a block with Scripting, like not simply making it into air but having it be actually destroyed? I still want the block to emit break sounds, particles, and drop its loot
no
you'd have to use commands setblock ... destroy
No, gotta use runCommand.
Ok, thanks guys
we can't make custom block text data right/
like signs
what aobut a block inventory?
No.
This menu isn't appearing for me? I can't figure out why the Material Instances button isn't popping up
Convert the project to Bedrock Block.
tysm!!
hi
Does anybody know if custom blocks loaded by world generation can tick?
Yes.
Does it work with Structure Template features?
Should.
Alright, thanks
I tested it today and my custom block doesn't tick 😞 if set by a structure template feature. I was on the latest preview. Do you think this is a bug?
Is the breaking speed of blocks off? I have a custom block with the same stats as oak planks but when mining both with a gold axe the custom block is insta-mined but the planks aren't
does custom components allow me to dynamically link a block to script data?
this way i could essentially have block dynamic properties?
or is it set in stone stuff
my issue is this
Well, the data will be lost upon reload. But there are a few other ways to store data on blocks. The most common way is to store a block location and have that as a key.
yeah i use block locaiton as the key currently
in my database
but using structure blocks ruins that.... for plot systems
There's no other way then.
hmm ok i appreciate the response
having some new block dynamic properties would be amazing. hopfully something like that some day
Could you store data in a custom block state?
Elaborate.
It would really depend on the usage but a there would be a script or custom component that would update a custome state depending on some event happening
Yeah you can do that.
Is the breaking speed of the destructible by mining component off? I have a custom block with the same breaking speeds as oak planks, but when mining both with a gold axe, for example, the custom block is insta-mined but the planks aren't...
i think it is
Left: Using "minecraft:geometry.full_block" (gross)
Right: Using blocks.json without geometry component (I want this)
Warning said my custom block needs a geometry component. Custom blocks' first iteration didn't have geometry components and are full blocks. How do I replicate the one on the right without blocks.json?
hi there, are the custom grass blocks color change based on biome hardcoded?
Can anyone tell me how to create an addon for a new block crafting table? It means creating the same block as the crafting table, just different texture or shape, the function is the same
Sorry if the sentence is weird, I have a translation
Add this component to your block
https://wiki.bedrock.dev/blocks/block-components.html#crafting-table
hey guys, how do i make a block face the way the player places it?
i love you
dont stop existing
Using what to create the addons? Web or is there an app?
I first wanted to create an addon about it.
Are you on mobile or PC? I created add-ons on my phone 6 years ago using a text and file editor app but if you're on PC you can use apps/programs like bridge.
Mobile
So, I have to create the texture or asset block, continue editing using the file editor?
To create the block on the blockbench, right?
Use pixel studio if you want to make textures.
yes
Use the blockbench webapp for models
Use any file editor app to move around files
Use Pixel Studio to make textures
I don't use bridge and this is what I worked with. Someone else chip in because I don't develop add-ons in mobile and this is what I know.
It's pick which one? Bedrock entities?
Im making a hay feeder. All I want it to do its upon player place hay it takes the bale and changes the desplay. Then upon crouch click it releases the hay bale. Would this be refering to block states or loot tables?
Id think of it more like a cauldron, empty vs fill-led than a chest. ? Thanks
Any sort of suggestions towards tutorials would also be helpful. I will learn.
You could use scripts to detect the interaction with the block and use a custom block component to set the permutation to display more hay.
I learned how to do that from here https://wiki.bedrock.dev/blocks/precise-rotation.html
Does anybody know how to rotate the block model in the player's inventory? I made a custom skull block, but its facing away in the inventory and in the player's hand.
is it possible to make a block that vines cannot be placed on?
Is there a way to transform a block once it's done burning?
how do i make fortune possible on a block?
How do I make a custom block with multiple materials and different materials for cubes in the model?
I set them in blockbench and have them set in a component but its not using both that I have
how to make block not drop item when destroyed?
Set the loot to an empty loot table
It will still drop itself if you break it with sill touch though
If you want it fully unobtainable, you need to use a script or custom component to delete the item when the block is broken.
Is it possible to change block's states using PlayerInteractWithBlock instead of block events ?
Yes.
Do I still need this part of the code: world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry }) => { blockComponentRegistry.registerCustomComponent( "example:size", CustomBlockComponent ); });
?
Thats for custom components. It is recommended you use them instead of the general event listener.
I'm using that now, but I can't place a block above unless I press Shift
Known issue.
Using PlayerInteractWithBlock will prevent this from happening, right?
I need help, I’m making stuff from the create mod into my Minecraft bedrock add-on. And rn I’m making the mechanical harvester:
Is it possible for me to add the waterlog state or remove the waterlog state from a custom block, with the new flood component using script?
for example a block is waterlogged, and when I use an item it will no longer be waterlogged
Anyone know how to make item_specific_speeds work properly for mining blocks? For me, if I set it to 5 seconds it doesn't take 5 seconds to destroy, it takes longer.
Any help is appreciated! :)
Yes, just set the iswaterlogged to false in script.
Hello, I'm new and I have some questions about modeling in blockbench.
Thanks
I forgot how I can rotate the direction the block is facing in the inventory.
Can someone help me fresh up my memory?
Either set the default permutation to be the correct rotation or use item display transform(custom geometry).
I am using the facing_direction block trait. How come it is rotated by default?
What does your permutation look like?
so in blockbench the block is rotated correctly, as seen by the "N". But the north permutation (which I asume is the default one) is rotated
Yeah, that makes sense.
ah so the down state is the default one
Does minecraft:collision_box affect interaction with water? When the block is waterlogged? I left my block waterlogged but the water becomes invisible and completely bugged visually on the block
why does silk touch completely ignore the loot table component?
my block should only drop if mined using an iron, diamond, or netherite pickaxe, but mining it with any other tool with silk touch will also make the block drop
Is it possible to open a door only when you have the tag allow_open? If players dont have that tag they cant interact with the door
What's the friction value of soul sand?
iirc it's somewhat 0.8-0.9?
I tried all the values and it is 0.2-0.3 something.
0.9 throws the player far away lol
There's a Blockbench plugin
You can check there
yep, the soul sand is 0.9
What's the <not important> part?
the bp directory
I realized my mistake 😅
Is it possible to give specific sounds to certain custom blocks above a note block?
like what happened with the mob heads
{
"format_version": "1.20.80",
"minecraft:block": {
"description":{
"identifier":"jay4x:egg_block"
},
"components":{
"minecraft:destructible_by_explosion": false,
"minecraft:destructible_by_mining": false
},
"minecraft:geometry": "geometry.egg_block",
"minecraft:material_instances": {
"*": {
"render_method": "alpha_test",
"texture": "egg_block"
}
},
"minecraft:light_emission": 0,
"minecraft:loot": "loot_tables/empty.json"
}
}```
any reason for this?
its working now but the block is massive
You can ignore that error.
okay thank you and is there a way to make my hitbox of the block the same size? like the candles
Change th3 selection box component.
thank you i got that working but its still a 16x16 hitbox
like standing on it and stuff
You need to edit both collision and selection box.
ooo theres a collosion box component to?
Yeah.
amen thank you for that 🙏
Info or tutorials for creating custom containers, like a physical bucket that works like a cauldron?
anyway to my my block not connect to fences?
Nope.
how do I make a glow outline effect around a block? like with some of the lanterns in the Minecraft events.
So... blocks still can't hold items because tile entities aren't exposed to us?
Correct.
Any custom block turns the grass block into dirt correct?
or is there some kind of rule that doesn't make this happen?
Can you tell me?
See my original post here: https://discord.com/channels/523663022053392405/1336463863226564688.
hi there, on bone_visibility cant I use wildcards? like "frame_*"?
you can't
not turning into dirt
and what makes this happen?
what's your block JSON
This is it, can you tell me why in this block of mine the grass turns to dirt and doesn't stay as grass?
interesting, I didn't know that
If I want to see any updates on this being added, what do I do?
Is it possible to just change block textures on existing Minecraft blocks? Like I want to make a bunch of comparators, but with the little triangle in the middle a bunch of different colours and different functionality. The json im fine with but the rest im useless lol
how do i change block texture according to block state?
Permutations.
Learing how to trigger and code blockstates, the wiki has limited info. For context Im making fillable buckets with levels. I know I need the modles, textures, levels. I dont know much about where to put all the info? Any tutorials out there close to what Im doing? About permutations and conditions?
Ive also looked into bedrock samples to see how the cauldron was done and slabs but again, limited info’s ??
The wiki has all the info you need for permutatins, block states, triggering events, etc.
Not sure what else you need.
Hmmm. I guess I need to scope it out more. I was hoping for an example add-on or something like a video tutorial.
I don’t quite understand what folders to make and where they go RP or BH wise. I got the just, its just a little unclear.
the wiki has example packs for a few pages that should show you where everything goes
https://wiki.bedrock.dev/blocks/custom-crops#download-example-pack
Have 3 quick questions:
-
Is it possible to distinguish between naturally generated blocks and blocks placed by a player?
-
Is it possible to determine if a block was generated as part of a tree?
-
Is it possible to check if a block belongs to the same tree as another block?
you can check for naturally generated leaves based on their states but that's it
does custom glass not work anymore? To use a blend rendering you need a geometry, and if there's a geomtery you can't make it single sided
or even alpha single sided
Ooo Ive not looked at this yet. Tysm❤️
you can still use RP/blocks.json to apply textures and apply blend using material instances
there was a bug with it that was fixed in a hotfix
Is there a way to get around 1 for 1 item block placement, so the item isn’t consumed after placing 1 block. Would an option be to add a loot table to the item or? Is there no way to alter that function. Lets say I want an item to place 6 of the same block b4 it is consumed
You could use scripting to cancel the block placement and just setblock instead.
Anyone know if there is any way to make a custom block output a redstone signal?
like I'm able to read input signals, I have my property set based on conditions using the input signals, but I don't know how to output a signal when the property is true
You cannot.
I suppose that means there's no way to trigger a redstone signal at any given location either? I'm curious how wireless redstone addons do it
My guess would be through placing redstone blocks at the position of the other wireless redstone block, then turning it back to the wireless redstone block
Is there something like this but for blocks?
no
maybe we could get access to the material that eye blossom uses someday.
anyone knows how can I spawn particles on my custom blocks?
OnTick + Scripting.
can I run the particle command through scripting right?
or do I have to do something else?
ehh? There's a native version
Dimension.spawnParticle('<name>', { x: 0, y: 0, z: 0 })
thank you
Sorry for the ping but I wanted to know if it is possible to loop it
thats what you are doing with onTick.
it loops
anyone knows why this isn't working? I'm trying to spawn a particle when my block is in a specific state
More of a #1067535382285135923
So, particles work but they only appear once, does it have something to do with the tick interval?
I don't know how to make it work
properly
GUYS I JUST MADE A DISCOVERY
whenever you want to set a destroy time, take the time you want in seconds, and multiply it by 2/3, and set that as the destroy time for the block
i found out what was wrong with the component, it adds 50% of the destroy time you choose to the actual time it takes to break the block
i am claiming this discovery
mine, all mine
ignore that the minecraft wiki has said it forever
are custom lamp blocks possible
well, you can make blocks emit light, and have states.
so yes
How can I stop a custom block from trying to connect to a fence?
You cannot.
Awe ok ty❤️
no, bridge says everything is fine besides the alpha_test_one_sided, says that doesnt exist lol but thats in the docummemt
Bridge moment.
when I use the .geo provided, my texture is invisible
so I make a texture off the .geo in blockbench, it works. but then the scripts Open dont work
has no function, just a block
I've tried not renaming hardly a thing, still wont work. thinking of name conflicts or something
ive tried using a vanilla texture, still invisible
ill try to just do a basic door with the file to a tee and see if that works, i just can't seem to figure out where im messin up
have you updated to 1.21.60?
yea
do i need to change all the wiki identidiers to my idenitifer for it to work
because doing the base idetifier made it appear bu the scripts not working
Yeah.
even the wiki:open?
I mean it makes sense but dang I wish that was mentioned on the doc
it will work if you keep the wiki identifiers, but they should be changed to your own namespace
there is nothing special about wiki:
ok right, thats what I thought, but i click the door and nothing happens 😦
do you have a script module in your BP manifest.json
I have a scripts folder >> should it just be script OML facepalm
no
you need to set up your pack manifest for scripts
https://wiki.bedrock.dev/scripting/scripting-intro
Ohh ..
make sure you generate your own uuid
Ok makes sense! ty
Got it workin! Thank you for your help~ Im big dumb but I'm trying I swear 🙂
Frosti the snow man
how do I give a block a custom collision?
Collision box component.
How do I change the rendering method of a vanilla block?
You cannot.
🌚
-# wow that was fast
ok, ty
Say theoretically I wanted to make a custom geometry block with 3 textures rendered at once as parts of it are layered, is that possible?
-# This is for a custom geometry block and not a full block with block sides
you can layer textures in terrain_texture.json
{
"texture_data": {
"example:texture": {
"additive": true,
"textures": [
"path/to/texture",
"path/to/texture",
"path/to/texture"
]
}
}
}
How would this work in the geometry tho so its not conflicting
what does the model look like
Best example, its a santa player plushie, has hat, outfit, skin
do you mean using separate textures for different cubes?
Pretty much
if the "skin" and "outfit" textures need to be displayed layered on the same cube you'd have to do something like this
{
"texture_data": {
"example:farmer_skin": {
"additive": true,
"textures": [
"path/to/skin",
"path/to/outfits/farmer"
]
},
"example:santa_skin": {
"additive": true,
"textures": [
"path/to/skin",
"path/to/outfits/santa"
]
}
}
}
then apply them to specific cubes like this
https://wiki.bedrock.dev/blocks/block-models#changing-material-instances
Thank you so much
can i make a block be placeable on everything except air?
just so if there's nothing beneath it then it gets snapped
You'll need to use a lot of palcement filter or use Scripting.
Rip
sad that there's no air tag
they should just add an exclude blocks property in placement filter
What is the new thing that I have to make to order my items?
Something like catalog
Does anyone have any information about that?
How do I make blocks change states when right clicked
Wdym
{
"format_version": "1.21.60",
"minecraft:crafting_items_catalog": {
"categories": [
{
"category_name": "equipment",
"groups": [
{
"group_identifier": {
"icon": "<item identifier>",
"name": "<namespace>itemGroup.name.<name>"
},
"items": [
"<array of items>"
]
}
]
}
]
}
}```
You need a namespace.
yeah.
Thanks
Is there documentation for this?
Chekc the ms docs.
Alrighty
So Im trying to work on more custome collision boxes but im having issues finding the orgin, I use a 1x1 cube and place it in the most right corner, then pull the position and add it to the file. I go ingame and the position is like opposite across from where the cube was ingame? any easier way of finging orgin?
Um.. never mind apparently I was doning somthing wrong >> OML
I got it!
did you find it?
Ive been in lectures since then so i havent looked
guys, is the trait in blocks counts as permutation?
you mean a state?
it does
Block permutations represent all state value configurations that each block can possibly be in.
Block traits add states to a block, so they will affect the number of permutations your block has
Is there a way to detect when a block is powered by redstone?
Ticking -> getredstonepower
Is it possible to make a full block with textures for different faces without making a model?
https://wiki.bedrock.dev/blocks/blocks-intro#per-face-textures
Only use the code example that would work for your block
There any way to make a custom grass/dirt block able to have grass/ other plants that can only be placed on grass
Is it possible to use material instances to set the faces in permutations without using a geometry?
If I set the faces directly in blocks.json, then they are hardcoded to north/south/west etc.
If I set them in material instances, (but not blocks.json) there doesn't seem to be any texture at all.
If I set the textures in both, only blocks.json textures are chosen
I have a front/side/back texture and am trying to make a block that can be placed facing different directions.
You need the geometry component for texture definitions in material instances to take effect
Remove textures definitions in RP/blocks.json and add something like this to your BP block JSON components
"minecraft:geometry": "minecraft:geometry.full_block",
"minecraft:material_instances": {
"*": {
"texture": "my:top_bottom_texture"
},
"north": {
"texture": "my:front_texture"
},
"south": {
"texture": "my:back_texture"
},
"side": {
"texture": "my:side_texture"
},
"west": "side", // Use the "side" instance for the west and east faces
"east": "side"
}
this also assumes you are using the cardinal direction state with a Y offset of 180
Are you able to make fences and stuff not connect to a custom block?
No

When creating custom blocks, I want to reference existing blocks. Where can I find the JSON files that define their behavior?
No vanilla blocks are data-driven (so they don't have JSON files)
Which behaviour do you want to re-create?
I want to make chorus flowers grow infinitely. Basically, I think I just need to override chorus flowers to always set their age to 0 or remove the mechanism that increases age. I don't know how to do that. Could you help me create it?
you can't modify vanilla blocks so i'm not sure if that's possible
Is it possible to create as a new block and override the behavior of chorus flowers?
Alternatively, is there another good method?
You could replace all vanilla chorus flower blocks with your own, that's the best you could do
As you cannot modify vanillaa blocks
Hey, what are the values in blocks.json like brightness_gamma and ambient_occlusion_exponent? I can't find any documentation anywhere
And isotropic
Can I use any of these to make a vanilla block "glow"?
No.
Float.
Boolean.
Like in better ore outlines on modrinth
I know what values they accept
I don't know what they MEAN
brightness_gamma doesnt do anything anymore
No wonder it's not in the vanilla packs
ambient_occlusion_exponent changes the intensity of ambient occlusion (smooth lighting shadows)
Hm
isotropic makes textures randomly rotate
What did brightness gamma do before it was removed
what ambient_occlusion_exponent does now
Oh
is there a way to create a custom furnace?
No
I wish they would give us the ability to have unique shaped collision boxes for blocks 😭
Any working way to stop block from being moved by a piston?
just trigger an explosion with a 100 block radius if the block is pushed
that'll teach them
Did you find a way to make the item facing direction different than down?
Use item visual or display transform.
@vestal marsh Hello sir. I have a block that is 2 blocks high. I would like the entire block to be interactable / have a collider.
As of now, the selection/collision box is an entire cube. 16 x 16. But the block is 32 high, so i cannot interact with the top half of my block. Any ideas? I was thinking of an empty cube that i can spawn on top. and then pass interaction data?
I will also need to destroy the dummy block, when the original block is destroyed, and vice versa
Seems like a lot just because i don't know of a way to make a larger collider
You talking about the bug where you could make the collision over than 16x16x16?
yeah, the problem is the collision works yes but interacting is not, the size of interaction will always be full block.
Best way is to place another block, but in that case, just make the block full block and just create a separate block for 2 blocks high that 🤷
Yea figured, thank ya!
Hey does anyone know how to let a beacon beam pass through a custom block?
setting can_contain_liquid to false after it's waterlogged doesnt remove the water. "(
probably cant until they do the "isSolid" work
assuming youve already made the block see through with alpha
Use scriptapi to set the waterlog to false?
yeah i was just hoping it would do it for me lol
Smh dont be lazy /s
Hello, does anyone know how I can see the json of the blocks? 🤔
There is none.
thank you🥲
I hope they never manage to break box UVs for blocks
Because if they do I'm committing a crime
Would setting the interval_range in the tick component to [0, 0] run it every tick?
Yes! You can also just omit it.
Good to know, thanks 👍
Can flat blocks still have icons generated?
Wdym flat blocks?
Trying to make a block with a flipbook texture that's flat with the goal of making the icon look like an item
You can use item visuals to rotate the block.
I don't know how that would help me
Show me your block code? I was suggesting you either use item visuals or item display transform so its a 3d block but in the GUI its just rotated to be 2d.
it's just barebones empty json { "format_version": "1.21.60", "minecraft:block": { "description": { "identifier": "runecraft:flipbook_test", "menu_category": { "category": "construction" } }, "components": { "minecraft:geometry": "geometry.flat", "minecraft:material_instances": { "*": { "texture": "flipbook_test" } } } } }
This is what i had:
{
"format_version": "1.21.50",
"minecraft:block": {
"components": {
"minecraft:custom_components": [
"namespace:cancel"
],
"minecraft:geometry": {
"identifier": "geometry.temp"
},
"minecraft:material_instances": {
"*": {
"texture": "temp"
}
}
},
"description": {
"identifier": "namespace:temp"
}
}
}
doesn't exactly change anything though
oh, I've never used that stuff in geo
I don't think item_visual would work tbh
still isn't giving an item texture
Are you using a block item by any chance?
nope it's just a block with a flipbook texture
Then I haven't the foggiest clue since that worked for me. You tried my geo and block json? Maybe try just creating a 16x16x16 and see if it renders, then use the item dispaly
I only copied the geo file
our block jsons are pretty much identical barring location of the components and excluding the custom component
@vestal marsh my bad, I think it does work, when I was fidgeting with it the block became invalid at somepoint and deleted the one in my hand 🤦♂️
I'm not really sure how item_visual would ever be used to make it look like you're just holding an item without using item display transformations
Yeah, for a moment I thought you wanted to have a crop block but have a flat icon for it without using block item.
Rotating them should definitely work, I used that for my torches
now is there any reason why the block version of it is darkened
Ambient occlusion?
that only seems to affect the block when placed, has no effect on the item
It was "face_dimming"
had to set it to false
Hey, listen!
how do you make separated textures applied on specific group?
Left click on the bone and select edit material instances. Then, those material instances are the ones that you will use in the block behavior to allow your block use multiple textures
Is it simple to add custom paintings, not resource pack ones but custom one?
Do i just make a paintings folder? Lol or is it more complicated than that
Will they still replace org without scripts?
It is more complicated than that
Are you sure this was on bedrock, not java?
its from java and not possible on bedrock
heck even java might need mods I think
Correct.
Anyone of you guys have maybe spare lantern block .geo to share?
optifine-ish stuff, yea
Im really curious how it works in detail..
how do I make my block placement only on north side of geo
issue
block doesn't break if another block is attached to it¿
its easy just get a grass texture then resize it by 1/4x on each sides then just add more grass color on the top
Out of curiosity, does anyone know the limit of how many bones can be in a block model? It's been a while since I messed with this but I was thinking about a chisel able block. So like toggles for each of the bones through precise interaction
AFAIK it's the same as the perm limit. But I could be wrong
Oh that's cool if so
Thanks 👍
There's no limit to how many bones, only perms, as long as the block model fits in 30x30x30 you are good
Cool, do you know how many perms?
https://wiki.bedrock.dev/blocks/block-permutations
https://wiki.bedrock.dev/blocks/avoiding-state-limit
Just read here. @winter elk
Yep sorry just found it after I responded thanks though
Does anybody else have a channel?
Is there a way to add texture variants to custom blocks that also have their own 3D model? Does anyone know how to do this with a custom component? Is there a script to do this? and that works both for when it is placed by the player and also when the block is generated naturally through a feature, is that my block is a bush block
I just saw it, how crazy, when are you going to finish it? It looks super cool to give more details to my houses
That's pretty cool!!! I wanna see and yes I have a channel too 😉
Its already finished im "hopfully" goning to be on the marketplace soon
Its to the point whare i can just update and add more things to chisel
And honestly I really don't know what I'm going to do with my channel. I'd love to do develogs. But I'm not sure how I should do them if I should record when I'm actually coding or if I should just showcase after the fact so not sure.
Hello everyone, I have a question. Is it possible to link blocks and particles together (I want to render blocks using particles)
I have tried using block tick, but it caused severe lag
no
How can you make a block with animated texture?
Here you go
Thanks!
No problem 😁
I basically achieved it with script, but still gave up due to performance issues
You have to do each variant in a permutation and create a script that changes the block state randomly with math upon placement
You can check out my snow layer template, it uses a similar system you can use as reference
and it works not only when the player places it but also when it is generated naturally with a feature?
and where can I find your template?
How do i fix this? Im using placement_position. The display supposed to be the other way around
use item visual.
Two ways:
Change your default permutation rotation or use item visual.
That's fix it, thanks!
its possible to use tint color in a block? not in hotbar, in the block placed
I tried to use overlay_color and tint_color but only works with the block in the hotbar
1.21.70.
Is it possible to make double blocks so that they both have a break animation when breaking?
vanilla doors style, when I break both parts there is a break animation
oh
@vestal marsh how do I make my blocks spawn randomly in the world using scripting
they should work when the block is placed
it dont, you can try it
(I mean tint_color and overlay_color from terrain_textures)
You shouldnt use those though tbh. Use the additive.
yeah, I tried tint_color with additive: true
That worked for me though as well. Are you using a block item or something?
nop
it works but only with hotbar :/ its weird
overlay color only works when defined in the first textures item afaik
if you're doing additive
and it applies for all textures
if you want to tint a texture then why not use those parameters rather than creating separate files
additive has nothing to do with tinting
No idea, I could never get it to work without using additive.
@vestal marsh
what would the flammability values be for wood?
Omit it for default which wood uses.
thanks.