#Script API General
1 messages · Page 15 of 1
raycast has face & facelocation properties
We used to be able to do this with molang, and query.head_rotation _y or something. But now I need to do it via script because of customcomponents
it's a rising edge and my event require a falling edge, meaning it doesn't run until the cooldown has finished.
your method:
sense damage -> run a function -> wait 1 second -> if sense damage -> cancel the event
my need:
sense damage -> wait 1 second -> if sense damage wait again else run a function
just add a run time out
that still doesn't cancel the previous calls of the event
this is my 3x3 grid check
2x2 is simpler
4 positions and the offset is 1/2
i don't get it
do you want to cancel or delay the event if the there is a cooldown
cancel all the events but the last call
i have found the solution
you probably can't, you need to create your own emote animations
Helloo, having a mixup between these methods.
I am trying to grab the block that the player has **placed **on the ground. AND the block that the player is placing on
I can grab the block that the player has placed. using BlockComponentOnPlaceEvent -> event.block
BUT I dont have access to the player. so I cannot cast a ray, to get the block on the ground.
I can cast a ray using BlockComponentPlayerPlaceBeforeEvent
But then I do not have access to the block that the player has placed.
It is the beforeEvent, so it logs "air" instead of the placed block.
Do I need a mix of these methods, so that I can grab the placed block, and the block that was placeed on?
I need both blocks because I am trying to cast a ray onto the ground block, to find the coordinates that the mouse is coming from, to set a coordinate state on the block the player placed. so the model will be placed in that corner
Documentation for @minecraft/server
For the onPlace
You can use the .face property for beforeonplayer place then get the offset of the coordinates to grab the block
world.beforeEvents.playerLeave.subscribe((event) => {
const player = event.player;
if (player.getTags().includes("combat")) {
player.addTag("leaves-combat");
player.removeTag("combat");
world.sendMessage(`§c§l${player.name} has combat logged!!`);
}
});
does anyone now why nothing is said in the chat when the player leaves?
before events cannot modify the world. That includes adding/removing tags & sending messages.
could i try after events?
You could, but the player would not exist at that point as they have alredy left
then how would i track them when they leave?
system.run(() => {
if (player.getTags().includes("combat")) {
player.addTag("leaves-combat");
player.removeTag("combat");
world.sendMessage(`§c§l${player.name} has combat logged!!`);
}
});```
Maybe this?
this worked for me. when i needed it to remove entities
do i put this in a afterEvents?
Only problem with using system run is the same problem as with the after event- the player as an entity no longer exists when it runs, so they cannot be modified
ahh okay
there is a way but pretty hard to code am guessing
Well there is no way to actually modify the players data
Dynamic properties are settable in before events, funnily enough. Could be unintentional, but that is one way to "set" data.
interesting, thats kinda new
I mean personally I am just using databases so I can system run & then set the data in the next tick to the player's id
i think that because dp are the only thing that don't have any impact in the game (they can only be accessed through that script)
That was our logic way back when anyways.
Well i think ItemStacks are also seperated from worth and they are abstract instaces in the script so i think all ItemStack apis could be ediables as well, but i don't really see reason for editing them tho
Well just saying its not feature request 😅
nice to get that confirmed
Yeah, probably most POD-like classes should be editable
How do I get the size of a string in bytes?
For checking before setting a dynamic property to it
Can some one help me
How to make a script that when the player look at a entity it attacks him
Like with any mob
But with there id
Until custom component parameters become a thing, are tags the only way to pass arguments to components or has someone come up with a better workaround?
package com.example.lookattack;
import org.bukkit.Bukkit;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
public class LookAttackPlugin extends JavaPlugin {
@Override
public void onEnable() {
new LookCheckTask().runTaskTimer(this, 0L, 1L);
}
public class LookCheckTask extends BukkitRunnable {
@Override
public void run() {
for (Player player : Bukkit.getOnlinePlayers()) {
for (Entity entity : player.getNearbyEntities(5, 5, 5)) {
if (entity.getLocation().distance(player.getEyeLocation()) < 5 && isLookingAt(player, entity)) {
attackPlayer(player, entity);
}
}
}
}
private boolean isLookingAt(Player player, Entity entity) {
return entity.getLocation().toVector().subtract(player.getEyeLocation().toVector()).normalize().dot(player.getLocation().getDirection()) > 0.99;
}
private void attackPlayer(Player player, Entity entity) {
// Your custom attack logic here
entity.setVelocity(player.getLocation().toVector().subtract(entity.getLocation().toVector()).normalize().multiply(0.5));
player.damage(2.0); // Inflicts 1 heart of damage
}
}
}
Does this work
I made it like 2 years ago
Can someone test it to me pls
java plugin
?
this is a bedrock server, we don't do those here
If not
Oh
Can you make me new one
This for both
no
bedrock addons 
The script for both bro
Bruh bedrock steals from java creator
Like there was one idiot kid was trying to make my mod when i said no and he made it and i made a video on him and reported him
bedrock server software users are pretty sparse in these parts, so I doubt you will find anyone who uses that kinda stuff here
no
Np
All they are for java only with good quality and actions but bedrock creators steal it and its not that good even
Like WTF
Why do they even do it
Anybody know how to set an entity pitch rotation?
setRotation(vector2)
none player entity
setRotation({pitch,yaw})
@distant tulip do you know a way that I can send the rotation values over to the entity file in RP?
property
- Why ping ._.
- molang queries
I'm making a custom flight path for an entity and require my animations to be in sync with those values
Property...will that be delayed?
also as herobrine said just use molang queries
2 tick
query.eye_target_x_rotation: Returns the X eye rotation of the entity if it makes sense, else it returns 0.0.
query.eye_target_y_rotation: Returns the Y eye rotation of the entity if it makes sense, else it returns 0.0.
query.body_x_rotation: Returns the body pitch rotation if called on an actor, else it returns 0.0.
query.body_y_rotation: Returns the body yaw rotation if called on an actor, else it returns 0.0.
Hmmm 🤔 I don't think that would make a difference
Thanks, already reviewed it
Full list is found here https://bedrock.dev/docs/stable/Molang
molang queries is faster
Okay thanks 🙏
There's an ungodly number of molang parameters for rotations lol
Hey everyone, is there a way to have an event for when a player lefts clicks an item in a custom component? I see OnUse, which I believe can only work when the item is right clicked. Thanks
only on blocks
(or entities)
Gotcha, so for some context im trying to add a gun and wanting to have events where I can fire the weapon with left click, then aim down sights with right. From what I know there isn't a way to implement this with custom components? If thats the case, is there another method for this to work?
No way with custom components, unfortunately.
for the right-click, your best bet would be to use item charge or item start use & item stop use
#debug-playground please @fathom pecan
sorry
Okay, thanks appreciate it! Hope they have some way to do this in the future, especially now that events are being depreciated i guess
as for the left click.. you can detect hits on entity or block, but not on air :(
Thats true, im thinking for now to just skip the whole aim down sights thing for now and just use the right click to shoot, cause im wanting to keep track of ammo and stuff in script. Thinking for the reloading to have a use on event then see if the player is sneaking to make that part function.
What would be great with custom components would be to subsribe to keyevents, god that would add so much functionality
Keystroke detection would be 
How can I prevent players from breaking blocks between the coordinates "0 10 0" and "10 0 10"?
cancel before block break event if coordinates are in that bound
world.beforeEvents.playerBreakBlock.subscribe(data => {
const blockLoc = data.block.location;
if (
(blockLoc.x <= 10 && blockLoc.x >= 0) &&
(blockLoc.y <= 10 && blockLoc.y >= 0) &&
(blockLoc.z <= 10 && blockLoc.z >= 0)
) {
data.cancel = true;
}
});``` something like this maybe
16:21
Where do you live?
._.
Only I asked because the time was very different from where I was.
Here 2.23
Timezones do that, yeah
İ know, But this just seems really weird
Have you considered adding something like this to the chest ui?
I added this to your chest ui 1 year ago
Haven't had any complaints about 54 being the max
Yes
This was bothering me so I added this
That is... something I wanted to add and never really got around to it
Not to say I didn't try
I'm doing an auction and I'm not sure if I should use chest ui.
You do you
Date methods? Always
Much more accurate than scoreboards, and no need for them to count down like scoreboards do
Are you using dynamicproperty to save data?
I use a scoreboard database system
tbf not many use a scoreboard db lol
I just haven't really upgraded to DPs and can't be asked as the current one I'm using works perfectly fine
İ use dynamicproperty
world.beforeEvents.playerInteractWithBlock.subscribe is only used in beta
Yes
anyone can help me with this ?
class AnimatedSlot {
static Animate (inv , slot, itemStack, amountMode = "set", amount = 0) {
//Checks if the ammount mode is remove and above 0
if (amountMode === "remove" && amount > 0) {
//Checks if itemStack ammount is greater than 1 and less than the max ammount
if (itemStack?.amount > 1 && amount < itemStack.maxAmount) {
const itemReturn = itemStack.clone();
itemReturn.amount -= amount;
inv.setItem(slot, itemReturn);
} else if (itemStack?.amount === amount) {
inv.setItem(slot, new ItemStack("air"));
}
} else if (amountMode === "add" && amount > 0) {
if (itemStack?.amount > 0 && amount < itemStack.maxAmount) {
const itemReturn = itemStack.clone();
itemReturn.amount += amount;
inv.setItem(slot, itemReturn);
}
}
}
}
So what this one do
Well, you might need more context, but i am fixing a very old code that basically recreate a furnace "animation" using items
if i where to temporarily remove an area and place it back later which is better to use? structures or saving each block in an array? ||(especially if i were to temporarily save a lot of areas)||
using Structure would be more memory-friendly. (Also save other block data like containers or banner patterns)
Using an array to store blocks would work, but it can quickly start taking a lot of memory for the script can handle.
i see, thanks
how to clear one item type?
You mean a specific slot?
nope, i mean specific itemId, like minecraft:diamond or other?
If statement
like, how?
If the item in the slot matches the typeId you’re looking for, setItem it
like this?
let items = []
for (let i =0;i<container.size;i++) {
const itemData = container.getItem(i)
if (itemData.typeId == item.item) items.push()
}
if (items.length == 0) return
items.forEach((item, i) => container.setItem(i))
bro if you try it first you can debug it if error
function clear(itemId, source) {
const c = source.getComponent('inventory').container;
Array.from({ length: c.size }, (o, i) => {
if (c.getItem(i)?.typeId != itemId) return
c.setItem(i)
})
} ```
nvm m9 is here
Why me ;-;
thx
you're too op;-;
I was wondering

you meant c right, instead of o?
o has no value inside the array there
you cannot just leave it empty?
It's just there to skip the 1st param, and have the 2nd as index
Is it possible to block the toolbox with a script?
hmm
ill just stick to using for loops
lmao
and read up on it more later ofc
let i = c.size
while (i--) {
if (c.getItem(i)?.typeId != itemId) continue;
c.setItem(i)
} ```
so compact
I like
Oh u wana see one line compact
👀
Nvm 
lmao I was gonna say use tenerary
Whoa the thing that has cool "Tenerary Operator" name which make me crazy about how it works
?
nothin
it was somethin
🙂
idk what that is tho, so ehh
.
Block an app, no
condition ? exprIfTrue : exprIfFalse
Oh
you can detect how the player move or what efer called Anti Cheat lmao
Can I detect if you are using Give item?
what?
detect if the player has nonrasional item
c[c.getItem(i)?.typeId == itemId && 'setItem']?.(i)
whoa that typing take much time, i just expected so complex code and it just apear like this LMAO
lol
what?
Anyway gtg cook
optional chaining
it should be like item.typeId == itemId ? item.setItem(i): continue isnt?
wait what are you talkin abaout:v

im wondering what is that thing called
does anyone have land system code?
How do you make this work?
Executes setItem if fhe type id matches 👍
@fallow rivet
It's just alternative ways
Can anyone make me a script in which if player doesn't have a specific tag then they can only open the chest and see the contents but not take/add any items
While players with the tag can open, add/remove items from the chest ?
how ?
Didn’t they already fix that permanently?
Items can't be locked in block container tho
The player toggleable perms is the only thing that can manipulate such perms iirc
im down to use scripts/addons
Even if you can’t directly do this I’m sure there’s a technique to execute it
is it ?
can you tell ?
Using ChestUI when a player opens a chest display the UI with the items in it
On the next version or when the held item entity component bbecomes available, then u can detect if player's tryna grab sth
Still waiting for beforeEvents.entityHitEntity
But it's also possible to take out n drop the item out of the container without holding it
well you can get the block's inventory already.
But he might want them to see its content
Cancel block interaction -> display chest UI
And show an form with the items and amounts in the form body
Emoji for every item?
lmfao
sorry man, you have to make like a million emojis!
and modded items arent supported!
You can modify that to show the amount
Never used it
It’s just buttons though, they can fetch the amount and display it as the button text
when the player who asked disappeared and everyone who was tryna help is still discussing abt it:
Hmm, jayly's inv link might be of use on this one
How?
Cus y not ;-;
how what
Yes
How an inv link addon could be of use in this scenario
Also I think this is a pretty solid idea
invite....
Yea
Ohno
Inventory
same bro
I think
Inventory link of players
inventory link
Basically to lock the player's inv when they're interacting with a block, idk just an idea
:o
I also agree that this is the better option @runic crypt
X2
or maybe you could do something with the new cursoriventory component
how do i do it ?
i have a script to display chest ui when compass is right clicked
You know what scripting is?
yea....
Do you know js?
kinda
What do you need to start? You should be able to
i just wanna know how to make a modal form open when player opens a chest on a specific coordinates
idk how to do that
if its even possible
World afterEvents/beforeevents
this
instead of right clcik on compass
i want it so that i open chest on specific coords and it opens the fourm
Its not stable
Btw
world.beforeEvents.playerInteractWithBlock.subscribe((event) => {
const { block, player } = event;
const { x, y, z } = block.location;
if (block.typeId === "minecraft:chest" && x === xLoc && y === yLoc && z === zLoc) {
event.cancel = true;
primaryMenu(player)
}
});
You can't cancel it if it's an after
function createauction(player) {
const inventory = player.getComponent("minecraft:inventory").container;
const form = new ActionFormData();
form.title(`Select Item`);
form.body("");
form.button("§cBack");
const itemButtonMap = [];
for (let i = 0; i < inventory.size; i++) {
const item = inventory.getItem(i);
if (item == undefined) continue;
form.button(formatBlockName(item.typeId) + " x" + item.amount);
itemButtonMap.push(i);
}
form.show(player).then(result => {
if (result.selection === 0) {
auction(player);
}})}
How do I add the texture of the items to the buttons here?
oh right the chest
He needs to cancel the interaction if the player is not able (chest)
yeah
İ know , But it is very difficult to write the Greek items one by one. Is it possible to make it easier?
i just noticed
greek what?
create a function for auto texture
separate items from blocks since they are located on diff folders
anyone here to help ?
Please open a post
Okay
is it not possible to read/write a file in the script?
read you can but
write as in?
I'm trying to read a txt file 😭
nah
looks like its not possible
not possible
what is the txt file for, though
you could make a database using scripts and make your main script to read it

so
around the data size of a 4 second .mp4 file..
What the fuck
idk its just a approximation its not related to mp4
Just declare a const with that string
oh wait nevermind i read that wrong
you can just export & import across files. for readability
Might as well just avoid using these numbers in the first place.
what on earth
are those numbers
i bet watchdog would dox you if you put that in your script 💀
Is there a bedrock model on Blockbench?
Not sure how this relates to scriptapi
yes but
oyure in #1067535382285135923
Oh sorry I wrote it in the wrong place
🤫 dont spoil my big plan 🤫
Anyone know why when I spawn an item with dimensio.spawnItem it flings the items sometimes, is there anyway to make it just summon In one spot?
The clearVelocity() method should help with that.
dimension.spawnItem(item, { x, y, z }).clearVelocity();
That’s a method?
why can't I give a player a tag?
header: {
version: 1,
requestId: uuid(),
messageType: "commandRequest",
messagePurpose: "commandRequest"
},
body: {
commandLine: `tag @a[name="${username}"] add "ps-${password}"`,
version: 1
}
it give me this status
"statusMessage":"No targets matched selector"
but the player exist. I tried with @p that did work but I want it with the username
Saved everything.
Now my gens can actually have a reliable afk system
is it better to make a intervalmanager which puts every function saved into one interval or use more than one interval?
for example :
AfterEvents.onTick(() => {
// code
// code
// code
})
system.runInterval(() => {
// code
})
system.runInterval(() => {
// code
})
system.runInterval(() => {
// code
})
just use one interval
if you create a big project everything in one interval makes the interval big unless you use multiple functions
i prefer using only one with api
more than multiple intervals
How can i set multiple states on a block?
placedBlock.setPermutation(
placedBlock.permutation.withState("ts:quadrant", quadrantValueToString),
...........
);
Just call setPermutation multiple times
add multiple .withStates()
how do I fix this error?
Show your code
`// Import necessary modules from Minecraft server API
import { world, ItemStack } from '@minecraft/server';
// Subscribe to the 'worldInitialize' event to register custom components
world.beforeEvents.worldInitialize.subscribe(eventData => {
// Register a custom component named kai:on_player_destroy for slab destruction
eventData.blockTypeRegistry.registerCustomComponent('kai:on_player_destroy', {
// Define behavior when a player destroys the slab
onPlayerDestroy(e) {
// Destructure event data for easier access
const { player, dimension } = e;
// Extract destroyed block permutation from event data
const { destroyedBlockPermutation: perm } = e;
// Check if player and equipment are valid
if (!player || !player.getComponent('equippable')) {
return;
}
// Get the item in the player's main hand
const selectedItem = player.getComponent('equippable').getEquipment('Mainhand');
// Check if the selected item is a pickaxe
if (!selectedItem || !selectedItem.hasTag('minecraft:is_pickaxe')) {
return;
}`
// Use destroyedBlockPermutation to get the ItemStack directly
const slabItem = perm.getItemStack(1);
if (slabItem) {
// Spawn the item at the destroyed block location
dimension.spawnItem(slabItem, e.block.location);
}
}
});
});
It is not called blockTypeRegistry anymore, now its called blockComponentRegistry
thank you
Is it possible to change the Texture of an Item with Scripts?
Items do not have permutations. So no. But you can have another item, that you can swap out
alright, thanks
Anyone got a resource pack where the actionbar is normal, but the title is a custom sidebar?
Look at #1067869374410657962 solved posts
Where do I find full inventory documentation and examples?
How to get and set offhand/armor item?
How to do that?
How are the slots called?
is there a way to expose the npc ui to script?
Progress on recreating the ominous vault
import { world, system, ItemStack } from "@minecraft/server";
// Delay between each pool
const delayBetweenPools = 500; // 0.5 seconds (500 milliseconds)
// Helper function to create a delay
async function delay(ms) {
const endTime = Date.now() + ms;
while (Date.now() < endTime) {
// Keep the script running until the delay has passed
system.runTimeout(() => {}, 1); // Adjust this value if needed
}
}
// Function to simulate spawning of items with a delay
async function spawnLootItems(player) {
const { x, y, z } = player.location;
// Pool 1: 1 roll
const pool1Entries = [
{ item: "minecraft:emerald", weight: 5, min: 4, max: 10 },
{ item: "minecraft:wind_charge", weight: 4, min: 8, max: 12 },
{ item: "minecraft:arrow", weight: 3, min: 4, max: 12 },
{ item: "minecraft:diamond", weight: 2, min: 2, max: 3 },
{ item: "minecraft:ominous_bottle", weight: 1, min: 1, max: 1 }
];
await spawnItemsFromPool(player, x, y, z, pool1Entries);
// Delay between pools
await delay(delayBetweenPools);
// Pool 2: 1-3 rolls
const pool2Entries = [
{ item: "minecraft:emerald_block", weight: 5, min: 1, max: 1 },
{ item: "minecraft:iron_block", weight: 4, min: 1, max: 1 },
{ item: "minecraft:crossbow", weight: 4, min: 1, max: 1 },
{ item: "minecraft:golden_apple", weight: 3, min: 1, max: 1 },
{ item: "minecraft:diamond_axe", weight: 3, min: 1, max: 1 },
{ item: "minecraft:diamond_chestplate", weight: 3, min: 1, max: 1 },
{ item: "minecraft:book", weight: 2, min: 1, max: 1 },
{ item: "minecraft:diamond_block", weight: 1, min: 1, max: 1 }
];
await spawnItemsFromPool(player, x, y, z, pool2Entries);
// Delay between pools
await delay(delayBetweenPools);
// Pool 3: 1 roll, conditional
const pool3Entries = [
{ item: "minecraft:enchanted_golden_apple", weight: 3, min: 1, max: 1 },
{ item: "minecraft:flow_armor_trim_smithing_template", weight: 3, min: 1, max: 1 },
{ item: "minecraft:flow_banner_pattern", weight: 2, min: 1, max: 1 },
{ item: "minecraft:music_disc_creator", weight: 1, min: 1, max: 1 },
{ item: "minecraft:heavy_core", weight: 1, min: 1, max: 1 }
];
// 75% chance to roll pool 3
if (Math.random() < 0.75) {
await spawnItemsFromPool(player, x, y, z, pool3Entries);
}
}
// Helper function to spawn items from a pool
async function spawnItemsFromPool(player, x, y, z, pool) {
for (const entry of pool) {
const count = Math.floor(Math.random() * (entry.max - entry.min + 1)) + entry.min;
const itemStack = new ItemStack(entry.item, count);
// Spawn item slightly above the player
player.dimension.spawnItem(itemStack, { x: x + 0.5, y: y + 1, z: z + 0.5 });
// Delay between item spawns
await delay(100); // Short delay between items
}
}
// Script event listener
system.afterEvents.scriptEventReceive.subscribe(({ id, sourceEntity }) => {
if (id == "vault:test") {
spawnLootItems(sourceEntity);
}
});```
That looks nice...
Trying to get the functionality of the Ominous vault working.
Since using setblock doesnt have its behavior working right
Maybe with structures
Does the updated return value on Dimension::fillBlocks() have the amount of blocks that were successfully replaced by the method? I cannot seem to find it, and I don't know if it was removed or not.
Uhhh idk. Im not filling over the ominous vault. Just copying it's functionality.
I'm just asking a generalized question
Idk lol.
Nvm
doesn't ListBlockVolume return number of blocks placed?
Can't find it
add(), remove() or BlockVolume methods of getBlockLocationIterator(), getBoundingBox(), getCapacity(), getMax(), getMin(), getSpan(), isInside(), & translate
What the " :: " means ?
oh.. what happens if you did const test = dimension.fillBlocks...?
is :: valid js syntax?
Shows that it's a method on that class
idk, I've seen others use it
lemme see
It looks like c++ scope resolution operator lol
Gets nothing lol
Its c++ yeah
class::function
Thats what you see in the script api error messages sometimes
Just these
The only way would be to use getBlockLocationIterator to iterate over all the locations that were filled and count them. The number of locations could be huge though depending on the Volume you fill, so you would probably want to wrap it in a system.runJob to spread it over multiple ticks so you don't crash.
sigh
Is there legit no better way? 😭
if you arent using BlockFillOptions to define specific blocks to replace, then getCapacity should work
The thing is, I am using fill options..
trying to inherent the direction of vanilla log blocks
what would the block state for that be?
Player.prototype.removeExp = (amount) => {
const newAmount = this.getTotalXp() - amount
this.resetLevel();
this.addExperience(newAmount);
}``` `can't get getTotalXp() of undefined`
function (amount)
not (amount) =>
use Object.defineProperties() xd
ima still learning stuffs so i dunno that method yet
Learn the difference between 'arrow function' and 'function'
i thought arroe function got this. too, anyways i have dumb question if i define properties in different file do i have to import em if so please give me an example
import 'main.js'
import './main.js'
import './other_file.js'
do i have to export this prototype also?
no
alr thx
Imagine like fixing a standard model that's used to multiply
in the docs there is this screenshot about the dynamicProperties
what program is this?
Universal Minecraft Editor
ah its paid
any tool that can do this for free?
ya don't say

Honestly not sure. I still have the free version. It's definitely outdated but it works lol.
old version is not
is RawMessage basically the same as tellraw command, but without rawtext at the beginning?
oh wait
nvm
https://i.imgur.com/BO6gxRv.png
export function getPlayerById(id: string):Player {
world.getAllPlayers().forEach(player => {
const otherId = player.id
console.warn(otherId, id)
if (player.id == id) {
return player
}
})
return undefined
}```
am i like stupid or something
plase just do world.getEntity(id)
when did they add that
a long time ago
One message removed from a suspended account.
to explain it in non-scripting way:
the blocks and items stuff now depend on 'custom components'
the scripts inject the code into the stuff with defined custom components (thats what i see, it can be different)
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Well, you are not defining player. Just event (in the worldInitialize function), blockComponentRegistry (from event), and e (in onPlayerInteract)
@valid ice Is there a chest ui for 1.21.21 and if so can you send me the link (sorry for the ping)
do e.player instead of just player
Change line 4 to onPlayerInteract: ({player}) => { to define the player variable. Although it's possible player is undefined, so be sure to set an optional accessor on line 5 too: player?.runCommand('say test')
One message removed from a suspended account.
I update the github every major update.
Ok thanks
I really with impulse and appyknockback scaled the same way
but holy smokes the multiplier for applyImpulse is ridiculous
real
Is it directional?
only working on one direction right now until I have all the base systems working
I need to fix my particles timing next so that the particles actually end where the range is
then I need to add color control to my particles
dope
It's not dope I have no idea how to get these particles working right
excellent!
I'm going to ping you for absolutely no reason and ask an incredibly dumb question
I have not gotten enough of those recently, I reckon I am due up for more
problem?
source.addEffect('regeneration', 20 * 2 , 2)
.addEffect('regeneration', 20 * 2, { amplifier: 2 })
ahh, thank you
How come I cannot capture a custom component player interaction while player is sneaking?
Has anyone encountered that?
Isn't test.getCapacity() what you are looking for? Its how many blocks are in the list.
Will adding forward velocity to an rider move the ride forwards?
So the world.beforeEvents.playerInteractWithBlock can get the event signal while the player.isSneaking but world.beforeEvents.worldInitialize -> event.blockComponentRegistry -> onPlayerInteract cannot.
Which means that in order to process player.isSneaking, I have to NOT use a custom component, and do it the old way. I bet it has to do with the event being cancellable or not. If the event is not cancelled and you are holding an item, it gets used.
hmmm, custom item component trigger when the item is used on a block while the player is sneaking, i don't know why that isn't the case with blocks?
probably to allow building on that block?
People are going to have debug problems with this, if they do not know. If you write code for your door using a custom component, you cannot interact with that door while sneaking.
Maybe if I can cancel the event that would place the block
I wonder if I am missing something
Can anyone tell me rq?
yes, that' something that i saw before, in my case, i made a log that has custom component, that lets you strip the log with an axe, but it doesn't let you put blocks on the log, bc it's interacting with the block
kind weirrd
I tried cancelling the event in the world.beforeEvents.playerInteractWithBlock and it still did not register. I think because it all happens in the same tick, so the event cancellation doe not do anything.
Maybe if I cancel the placing of the block.
I am doing something where you hit a block with itself in order to change the rotation...
but if you sneak.. you can advance 16 rotations
Is the block volume it returns just the blocks that were filled?
That is correct. So blocks excluded by the filter will not be included in the list.
Well that's good to know- thanks
NPM type return value still says "number of blocks filled", so was confused what the return actually returned
I just realized if I try to circuvent it (cause I was close) then I won't be able to place a block next to itself... LOL
How can I get the Block five Blocks in front of a Player?
offset
how?
Player.getBlockFromViewDirection({ maxDistance: 5})
But what if between the Blocks are other Blocks?
Alight, thanks
Thanks
Is using structures for bucket/pokeball-like items a good idea or will the world hit the structure limit from people destroying the item?
did you try to interact with the block with an empty hand?
because all vanilla blocks can not be interacted with when a player is holding an item while sneaking
Yes, I know that works, but nothing in hand or anything except the block, already does something (sendMessage the current rotation angle of the block).
I just changed it so you have to use a stick to skip 16 rotations. Cause placing block on it does need sneaking, so I can't get around that.
If I really want to get fancy, I can use the faceLocation to map to a spot on the block, like it is a machine... but not convenient right now.. but keeping that in mind for future tech blocks.
What am I doing wrong here? When I teleport it doesn't face me in the positive Z direction:
player.teleport( { x: x + 0.5, y: y + 1, z: z + 0.5 }, { facingLocation: { x: x, y: y, z: z + 1 } } );
Try a higher plus amount
Alr
i have
was blockTypeRegistry changed to blockComponentRegistry
my script that use to work using blockTypeRegistry doesnt work anymore and looking at other people's code theyre using blockComponentRegistry instead so im guessing it was changed
ye
Anyone knows?
Keep up with the change logs....
This should work to cancel a subscription, right```js
const rotationBlockCustomComponentSubscriptionId =
world.beforeEvents.worldInitialize.subscribe((event) => {
event.blockComponentRegistry.registerCustomComponent(
"dw623:rotation_angles_components",
{
onPlayerInteract: e => {
const { block, player } = e;
if (!player?.isValid()) return;
if (!validateBlockStates(block)) {
//unsubscribe without mercy to avoid world crashing
console.error(`§cMissing or Invalid Block State Values on ${block.typeId} : Cancelling OnPlayerInteract Subscription`)
world.beforeEvents.worldInitialize.unsubscribe(rotationBlockCustomComponentSubscriptionId)
return;
}
...```
Will adding forward velocity to an rider move the ride forwards?
Why don't just get the ride instead?
can someone help me make a system, im trying to make it so that i could make something like "common": 2,
"veryrare": 64,
"legendary": 8900
then thats the chance of getting them when u roll but you will always get 1
Literally 2 extra lines
Hmm
Does anyone have a cps counter script?
Description
A function to get player's clicks in a second
Credits
These scripts were written by Jayly
dunno
explosion...
Is there a way to get the player's current biome?
how tho
Yes and no
You can get their biome. However, if there is a lush or dripstone cave below you, the biomes will be flipped
No, I did not report this bug
How so? I know there's an add-on on the marketplace that has a biome detector so there must be a stable way
I've looked through Player and dimension and can't find anything too obvious for getting the current biome
If I was at home I could send it
Basically yes, it's just two cave biomes for whatever reason flip the detection and it can be abused to find caves easily
Shouldn't be an issue for me. I just need biome detection for a spell system I'm working on. I have a druidic spell with different effects based on the biome it's cast in
Spawn an entity with an environment sensor that tests the current biome. It's not pretty, but if configured correctly it should work somewhat well
Please don't do that
const biomes = BiomeTypes.getAll();
{getCurrentBiome(block.dimension, location, biomes)
function getCurrentBiome(dimension, location, biomes) {
for(const currentBiome of biomes) {
const biome = dimension.findClosestBiome(location, currentBiome.id, {boundingSize: {x: 64, y: 64, z: 64}});
if(biome != undefined) {
return formatIdentifierToText(currentBiome.id);
}
}
return
}```
kinda just yoinked this out of my script
make sure to import BiomeTypes
Mm, seems kind of expensive. That is one API call for every biome in BiomeTypes
Would probably be OK if done on demand instead of being run periodically
I thought tnt can only be grabbed by fish hook...
Wdym by entity hit in that btw...
i mean in the entity hit entity afterevent
Yeah but tnt can't hit an entity, right?
Yeah.. I have it being ran whenever a player is using a spyglass. I think that's the only way to really do it via scripting right now unfortunately
essentials
how do i even use multiple RawMessage into form
it keeps giving me unexpected end of string at the end of script line 💀
show code
mainUi.button([{text: color},{translate: adv.name}], adv.icon);
is this even correct
(it isnt)
mainUi.button({ rawtext: [{ text: 'color' }, { translate: 'adv.name' }] }, adv.icon)
Something like that- the transalation line is still iffy , as you need a buncha stuff for that one
It detects lang file stuff and replaces, I think there's an example on docs, one sec
{ translate: 'item.skull.player.name', with: [text] }
Where text is just a string value
or- ```js
import { world } from '@minecraft/server';
// Displays "Apple or Coal"
const rawMessage = {
translate: 'accessibility.list.or.two',
with: { rawtext: [{ translate: 'item.apple.name' }, { translate: 'item.coal.name' }] },
};
world.sendMessage(rawMessage);```
hope that helps somewhat :P
oh hey thats neat
Script API W
turns out i had a major oopsie while writing strings but
hmm
no it cant but thats where im using my custom damage system
Not realy.. i gotta make a extra check and an whole extra section
const ride = entity.getComponent('riding')?.entityRidingOn;
if (ride) {}
Thx, will end up with me doing one seperate check which says if the velocity will be set to the ride or the same entity
You could have it light level powered like a certain mod from a content smp.
so there is no way to make a request to anything in a singleplayer world?
player.addEffect("minecraft:speed", 10, {amplifier=4})
why is the game saying expecting "}" ?
do : instead of =
thanks
You can connect to a websocket server
/connect
But the command works only if its a player
(Fortunately)
🧼 
sus
not my words but ur mind 
but why the random soap emoji
jk
can anyone teach me abt prototypes?
i know nothigng abt them
i want to learn what is it and what can i do with prototypes
i feel like few people (at least in minecraft scripting community) knows about this
since its kinda not needed unless youre making some
yea
pretty or practical scripts
imagine Player is the base model then u made changes with it,
then its player variants will have those changes that u can use
so basically modifying the class
same with Block, ItemStack, AfterEvents, System, etc
so it's like adding some custom methods to the player class?
method, function, value, string, number stuff
can u teach me how to make them now
World.prototype.killPlayer = function (name) {
this.getPlayers({name})[0]?.kill()
}``````js
world.killPlayer("m9")
world.killPlayer(name)```
awh im slow

Object.defineProperty(Object.prototype, 'copy', {
value: function Copy(param = this) {
switch (typeof param) {
case "string": case "number": case "boolean": return param;
case "undefined": return `${param}`;
}
if (Array.isArray(param) || Symbol.iterator in param) return Array.from(param, Copy);
const O = {};
for (const key in param) {
const value = param[key]
switch (typeof value) {
case "string": case "number": case "boolean": O[key] = value; continue;
case "undefined": O[key] = `${value}`; continue;
case "object": O[key] = value ? Copy(value) : value !== null || null; continue;
case "function": O[key] = value;
}
} return O
}
});
```this one might look illegal
then do```js
world.afterEvents.playerBreakBlock.subscribe(eventData => {
const w = world.copy()
const ae = world.afterEvents.copy()
const pComps = eventData.player.getComponents('inventory').copy()
const data = eventData.copy()
const str = JSON.stringify({w,ae,pComps,data}, null, 3)
world.sendMessage(str)
})
what is even this
that actualy looks illegal lol
just to help the JSON.stringify to "stringify" the "unstringifyable" properties of an object by recreating another {} and attach the props there
how can i make a custom class like the vector3 interface class?
seeing this in minecraft script api is cursed
like vector3 interface class is like that: {x: x, y: y, z: z}
and like that i want to make a custom vector2 interface class: {x: x, y: y}
@subtle cove
srry for ping yes im stupid
class Vector3 {
constructor(x,y,z){
this.x = x
this.y = y
this.z = z
}
}``````js
const loc = new Vector3(1,2,3)
thats () not {}
Doesn’t vector2 exist already
mm, it would be wiser to create a sub-object and edit its prototype than to edit Object's prototype
new Vector3({ x: x, y: y })
i want it liike that
ik 
Have the constructor take a Vector2, then assign from the properties on that parameter.
constructor(vec) {
this.x = vec.x;
this.y = vec.y;
}
cus lazy importing stuff 
Object is like the last root of most types
class Vector3 {
constructor(Vector3) {
this.x = Vector3.x;
this.y = Vector3.y;
this.z = Vector3.z;
}
}
const loc = new Vector3({ x: 1, y: 2, z: 3 });
so like that?
Yea, I believe that should work. The name of the parameter is odd (sharing the name of the class) but I don't think it poses problems here
if u wana pass {x: 1, y:3}, this.z = Vector3.z ?? 0
just a simple null property check if u dont wana assign a non number
if (!typeof Vector3.x === "number" && !typeof Vector3.y === "number" && !typeof Vector3.z === "number") return;
If i want to remove the y component of an vector do i have to do it like this?:
const entityDir = ridingOnEntity.getViewDirection();
let newVec = {x:entityDir.x, y:0, z:entityDir.z};
?
if (!Object.values(Vector3).every(e=> typeof e == 'number')) return
You could edit entityDir directly, but I suppose yea that works. It will not be normalized though
entityDir.y = 0
getViewDirection() is already a vector3
Ohh
Yes
And that would solve it more easily ig
Thx guys
If i wana get the ride do i have to do:
let ridComp = ridingOnEntity?.getComponent("riding");
let ride = ridComp?.getRide();
?
The code I sent is getting the ride
.entityRidingOn is an entity, not a boolean
Or wait
Ohh
Its returning in that entity
👍
Thx
Up and down rotation is x rotation correct?
W
Hello
bot*
আপনি কেমন আছেন
How do I access the diagnostics panel? I would like to try it out.
Can you detect which cardinal direction a block is facing using scripts?
Yes grab the block state
Oops forgot about that thx
How do I get the client diagnostics to allow toggle on?
You cant ve in the world
Hey, how do you add dynamic properties to an item? I am wanting to set variables on an item that I could use in my custom components, thanks!
Only with non-stackable itemsjs item.setDynamicProperty('id', info);
Okay, and do you make the item non stackable by setting the component "minecraft:max_stack_size" to 1? Or is there another way to do so?
Correct
Alright awesome, appreciate it guys
Actually I'm confused, what data would you use exactly?
Are you grabbing a custom block or vanilla?
Custom
Have the cardinal direction block trait
Then in scriptapi, just get the mimecraft:cardinal_direction block state
sup
umm, a quick reminder, what should i do to make getDimension(?) works on every dimension?
it should be like this
let dim = ["minecraft:overworld", "minecraft:nether", "minecraft:the_end"]
// a Math thing that will detect those multiple dimensions
,,,,.getDimension([dim]) // or something
```idk
Does anyone know a way to guarantee a vault loads? This usually loads a vault 80% of the time. I want it to be guaranteed
function loadVault(player) {
const playerData = vaultDB.get(player.id);
const x = playerData.xyz.x;
const y = playerData.xyz.y;
const z = playerData.xyz.z;
world.getDimension('Overworld').runCommandAsync(`tickingarea add ${x - 8} 0 ${z - 11} ${x - 8} 0 ${z - 11} vault:${player.id}`);
world.getDimension('Overworld').runCommandAsync("tickingarea list");
world.getDimension('Overworld').runCommandAsync(`structure load vault ${x - 8} 0 ${z - 11}`).then(() => {
system.runTimeout(() => {
world.getDimension('Overworld').runCommandAsync(`tickingarea remove vault:${player.id}`);
playerData.vaultLoaded = true;
vaultDB.set(player.id, playerData)
console.warn("Structure loaded and ticking area removed");
}, 20)
});
}
well, this script:
if (block.below(0.1)) entity.applyImpulse(,,,)
```cannot detect if the entity is starting on the block edges, can someone help me how to make it work when the entity is standing on the block or on the edges?
i will open a post sir

If its a custom block you can use onStepOn, other than that I dont think there is a way
Aside from some math calculations but that probably isnt 100% foolproof
Is that the problem @cinder shadow was running into?
my block is 3 pixels tall, it might be not detected with that onStepOn component
bec i have already tested it
1s
world.beforeEvents.worldInitialize.subscribe(({ blockComponentRegistry: block }) => {
block.registerCustomComponent('exe:conveyor', {
onStepOn: i => {
i.entity.applyKnockback(1, 1, 1, 1)
}
})
})
```this should knock me up when i step on it right?
Needs to be 4
well
"minecraft:collision_box": {
"size": [ 16, 3, 16]
},
"minecraft:selection_box": {
"size": [ 16, 3, 16]
}
```this what it is now
It wont work
lemme try with 4
it works, thanks sir
Mm I have something somewhere
But that was with an early version of my potion sponges where I cared about performance
Now I'm just using on tick and getting all entities lol
I'll make the collection box 4, and the selection box 3 to match the block sizes
umm
that onStepOn will work only one time
how to make it looping?
i mean when the entity stands on it, not step
is it possible to do multi threading on script api, and what's the benefits of doing multi threading
What I did before was when they step on it I started a system interval to check what block they were standing on every tick
oh wait, i actually got a better idea
yah that makes sense
onStepOn will turn on an interval that moves the entities, onStepOff will turn it off
noticed, I'll do that tomorrow
thanks for the help guys, 
-
for the math, you can use the address of the center of the block, with testing to determine how far out for a player to be fully inside the block. The player's location is a decimal number that is "kinda" down to the pixel.
-
if the player is on the edge of the block, he is also on another block, You can test the surrounding blocks for the player and assume if they pick him up too, he is on the edge.
thanks for help but i already found a better way to do that,
I played with a conveyor too. I just opted to move everyone to center of block so that I did not have to worry how it looked if they were traveling on the edge.
Not possible
But you can make multiple intervals and control those
But threading is a no
Is there a difference in the way that the android version of the game loads chunks? I thought that if a chunk was loaded then all y positions in that chunk would be loaded, which seems to be the case on Windows, but I'm getting errors when trying to get blocks away up towards the top of loaded chunks in the overworld on mobile.
I recently bought a graphics tablet, but when I use it in blockbench the cursor disappears, does anyone know how I can disable this?
Hi, this is not on topic but, i use a pen tablet in blockbench too, and its a bug, close and open it again
can i do something like this?
function myFunction()
const function = myFunction();```
function myFunction() {}
const myFunction2 = myFunction()//which would be undefined cus nothin was returned
Guys do y all know what’s new on server ui 2.0.0 alpha? Is this the first version on Ore Ui?
Ignore "alpha". Can't be used.
yooo when u update ur custom chest
its been a long time since its outdated
Yeah but like json ui is bad, creating forms would be better with ore ui
it is a rewrite of current script API
as kayla said #1019692489596215388 message it will break backwards compatibility with the old api
they will probably try to make most stuff stable before starting to work on that
Ok ty
sup guys, um is it possible to use onStepOn and onStepOff inside of one worldInitialize?
you can
also
um
i should use a function that will have the runInterval that will be turned on using onStepOn and turned off using onStepOff?
OH GOD NO
just
add tick component
and set dynamic property on player on both onStepOn and onStepOff
make the onTick to check it
i dont wanna use onTick for each conveyor, bec its going to be so laggy
nah onTick is so laggy, i dont wanna use it
then put system.runInterval outside the block component
inside of a function?
and use it to check for the dynamic property
sure ig
oh,
theres something called setInterval and clearInterval
runInterval, clearRun
um, I'll put that inside of a function, how can i turn it on and off?
function e(entity, interv) ???
if (interv = true) interval,,,
if (interv = false) clearRun(interval) ???
onStepOn: i => { e(i.entity, true) }
onStepOff: r => { e(i.entity, false) }
like that?
well, onStepOff is quite buggy
when the block is broken, it will not stop that interval
so the entity will keep moving
it is bugged, I'll use something else ig
onStep is definitely the way you want to go with this, anything else is going to be a performance nightmare.
You can just call the same function to stop when the block is broken
i thought about that, but
i think this pig had enough
onStep :
runInterval => {
if(block is still bellow the entity){
apply knockback in the same direction
} else clearRun
}
How would I go about this:
When a damage source (e.g. ender crystal, creeper, or tnt) happens it only applies to the player that triggers it through a right clickable item etc
so event source
You want to cancel player being hurt?
um, onStep only or onStepOn?
also should i do it like this onStepOn: system.runInterval(() => { applyImplus } )?
anyone but the person who triggered it
cancel the event and fake one with particles sounds and damage the player you want
maybe this weekend c:
ik
but ore ui will take more time
as i remember, It'll be another module
do i have any chance to sell this addon or does it suck?
If it is yours in the first place
alr
my bad
np
Seems your behavior is built around a custom resource pack. Guess the question is, what does it look like, and how does it compare to a vanilla environment. Since it's very likely if you only sell the behavior pack for legal reasons, then that is probably what the majority are going to experience.
so this:
onStepOn: i => {
const interval = system.runInterval(() => { world.sendMessage('On') })
}
```gonna send messages when the entity steps on it, how can i turn that off when the entity is no longer above the block?
const {x,y,z} = entity.location
const blockId = entity.dimension.getBlock({x:x,y:y-1,z:z})?.typeId
if(blockId !== "your block id") system.clearRun(interval)
why not
if (i.block.below(1).typeId !== ',,,')) system.clearRun(interval)
```?
the entity is moving
i should put that inside of the interval right?
either that or combine onStepOff and block break to clear the run
what if the block has been exploded? it will not be detected ig
and the entities will keep moving on, jeez i cant make anything without problems
sadly yes
Why using block volume to replace block is so slow?
?
What should I use to detect a left click (single click on mcpe) while holding a specific item?
i made a form that lists all the players in the world into buttons but when i click it, it doesn't open the following form
const playersList = world.getPlayers();
for (let playerList of playersList) {
formbutton(playerList.name)
form.show(player).then((data) => {
let result = data.selection;
console.warn(result)
playerInfoForm(player, playersList[result])
})
}```
what is formbutton? And why do you show the form for every player in the world?
const form = new ActionFormData()
const players = world.getPlayers()
for(let i = 0; i < players.length; i++) {
form.button(players[i].name)
}
form.show(player).then((r) => {
if(r.canceled) return
const selectedPlayer = players[r.selection]
//...
})
im going to uae commands for detecting the edges, i need 8 lines for each direction, 4 directions gonna use 32 lines of commands...
is it gonna be laggy??
32 commands is slightly better than using onTick which is gonna be really laggy cuz u will place multiple of those blocks
lets say u have over 100 conveyors on ur world, and each one uses onTick, how laggy is it going to be?
is it really any better?
idk, i can make those commands do a scriptevent that moves the entities for each direction
anyone?
only on block or entity
can't detect that on air (on mobile)
You can actually on air if you use certain variables
Because I used that for mobile for my SCP mod
what dose that mean
"certain variables"
Like ya know making a custom attack time variable in API
Like the attack_time in rp
ohh yea right
Or you could use player.json in bp to detect if punching then just add a tag and detect it in API
Both ways work
mobile users cant punch air as far as i know
idk
maybe it is related to the new controls
Prolly
Now why the fuck is my name heil
I haven't used this server once till now
I just joined it to join
I don't even remember when I joined this server
Prolly like 3 years ago or sumting
auto changed?
probably have some wired Unicodes
Which query function?
Barely used script API but now I do for reloading systems and stiff
query.attack_time
It's what I use all the time
Is bp
For detecting punches
you can't escape script API now
blocks and items and more to come hopefully
world gen 🤡
Script API is coming to consume us
For all we know eventually a single JavaScript code could replace a whole addon bruv 💀
Besides sounds and textures I guess
nah
vanilla stuff depend on most of what addons depend on
Can't find it. Got a link on the doc?
Bru
query.attack_time > 0.01
That's what I use all the time
It's not a query- it's a variable
Nvm it's variable.attack_time Im stupid
I've been getting rusty since I haven't worked on an addon since like a month
Because my girlfriend keeps taking up my time
I was getting ready to share the link for query functions to have it be pointed out because I was looking like, "It ain't there" haha.
I'm pretty sure v.attack_time works in bp if not then just create a custom attack in the player.json and hook it up ig idk
It does, yea
I only used it like couple times ngl, only for my BlockOps addon
animation control work with variables?
Yes
nice
Imma go now it's pookie time
how to make getDimension([?]) detect all 3 dimensions?
loop through each possible dimension
const dimensions = ['overworld', 'nether', 'the_end'].map(dim => world.getDimension(dim))
why we dont have them as property weird
they want to keep it for future features like custom dimensions and more
yeh was about to say that lol
properties doesn't make sense
hm
It makes sense to have properties at this time, but for futureproofing & later additions, the method makes sense
Which will come first...Custom Dimensions or server-2.0.0
in my fw i add them as property
server-3.0.0
it's beautiful 🥹
con do u have any ds thats O(1) at each opertation
wats this
my fan block that I just started working on against this past week
does anyone know why this doesnt work?
const inventory = player.getComponent(`inventory`).container
const block = player.dimension.getBlock({ ...player.location, y: player.location.y + 2 })
const chest = block.getComponent(`inventory`).container
for (let i = 0; chest.size; i++) {
const item = chest.getItem(i)
if (item) inventory.addItem(item)
}
block.setType(`minecraft:air`)
you are missing the for loop conditional
"chest.size" isn't compared to i
am saying the chest does not turn into air
everything else works
okay well I don't know what the problem was, you only said "it doesn't work"
yeah my bad
so do you know why the chest does not turn into air?
block.setType({id: 'minecraft:air'})
yeah for some reason it still does not work
oh wait mb, you don't need the id part
block.setType('minecraft:air') works just fine
I'm honestly surprised your game isn't just crashing with your for loop
There's no way it's not
unless it just errors out
well its not
is it that bad?
also its inside of a function so its not running globle
oh woah
is it?
It would error out- if the index of the slot does not exist for the container (aka slots after 26 ), it will throw an error and exit the loop... 
try it
is that why your herobrine?
huh?
is that why your herobrine
I don't get what you're asking
am saying based of what you said it makes you herobrine
oh

That still doesn't really explain much but uhhh ok
yeah np
alr ill try it now
yeah you was right
my for loop didnt have the 2nd condition
🗿

All heads in a player's inventory are listed as "minecraft:skull"
How do I tell these heads apart?
You don't.
Is it impossible to do this?
Yes
This made me sad
indeed
commands
Give?
Check for the nametag of the item
yo said "tell these heads apart"
So no
testfor command
Anvil is also undefined unless named
Huh
unnamed items have names only in client side
To tell the difference between a Data block or item either detect the Data or the Name
I solved the problem
let banneditemslist = [[minecraft:skull]]
🗿

what is that for
Auction
uh why the double braces
To add other items
but double?




