Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
1 messages ยท Page 89 of 1
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
go ahead, read it
it doesnt stack
i remade it from scratch
What does this even mean?
bruh aint reading 6000 lines of setdynamic properties and types
it aint that
no more
idk I wanted to make a random meme about script api
that was old shitty lazy code
now i did it somewhat more properly
defacto i use dynamic properties only for save/load (:
animationUpdate(): void {
for (const component of this.components.values()) {
if (!component.animated) {
continue;
}
const currentTickStage = system.currentTick % 1200 / 1200;
let rotation = Math.round(Math.abs(component.RPM) * currentTickStage * 90 / 15) * 15 % 90;
if (component.RPM < 0) {
rotation = (90 - rotation) % 90;
}
if (["south", "east", "down"].includes(component.block.permutation.getState("minecraft:facing_direction"))) {
rotation = (90 - rotation) % 90;
}
component.block.setPermutation(component.block.permutation.withState("createbedrock:rotation", rotation));
}
}
so you re saying that this isnt lag generator?
no?
it doesnt do much lag at all
if you put 40 wheels, setPermutation runs 800 times per second
That can be negated by increasing the tick interval.
have you tested with a debugger?
i tested it with my eyes
yes 40 blocks every 0.05 seconds
that's not a real testing
but what is your point
i dont mean fps lag, i mean tick per second lag
wdym what is his point, the point is it'll lag
server lag
I seriously think you should just use entities for the animation.
the point is that you re testing on your pc that might be a 5000$ rtx 3090 128gb ram
and on a mid pc or a realm with 10 players having 50 animated blocks each one and 40 farms in the world
He'll have to tinker a bit to make them cause less lag.
BRO STOP SPAMMING REACTIONS roterslime2286
ehh okay
vscode debugger doesnt connect
?
why
Because it's overflowing, again. But it's not noticeable that Smokey is doing anything.
Let him cook
@native patio what's your problem man
He can't write
he wants to speak
oh lmao
just create a new account
Please hold.
Guys we are making some changes, sorry for the inconvenience! We will be back soon ๐
Purging 523/755
217 member(s) have sent at least one message in the last month in #1067535608660107284.
Purging done! Removed 154 member(s).
Nice
Sowwie.
๐ฎโ๐จ
navi got purged, lol
3 months lol
@radiant drum spares no one
did it git a request timeout when it stopped ๐
anyway, gtg to sleep, was up sense 6AM
It did yeah, and then it crashed when it failed to edit a message
Maybe add more error handlers and make automatic blocking and unblocking of the channel so that you don't have to spend a lot of time watching this?
yeah, was saying in my mind that the editMessage part was not needed and will cause a timeout, better leave it for the console.
anyway, thanks for moderating the channel
I did add more error handlers, but it does unlock the thread once it's done. I might just rewrite the code since it's a few months old anyways
๐ญ I literally told you what you needed to do.
i need more detail
ik how to spawn
idk how to animate with dynamic script-controlled vars
damn, another purge
what the fleep happened
Inactive users were removed from here to make room for others that want to talk because Discord has a limit.
guys i cant get proper entity model to look like the block
Isn't the limit 800k?
No.
Huh
Ooohhh
WTF HAPPENED HERE
Someone said it all was inactive users
:sob;
Is this legit ?
I found it on yt via a friend
Tried running and it has a Scratch (the coding cat thingy) stuff
like code blocks and stuff ??
Does anyone kniw what it is/not to use it ?
why on earth did you post a mediafire link of an executable file
๐ญ
I don't know that how I got it ๐ญ
How else am i supposed to post it ??
it has the most generic name ๐ญ
idk??? maybe a screenshot couldve been better
Of the name ???
i (and other ppl) dont want to run that
Ohhh wait ill go on my laptop and send
also please remove that link, the existense of that thing in this chat scares me
other ppl might not like it too
Wait I will just a sec
Done
I mean it looks kinda legit
imagine how horrible the results would be ๐ญ
Imma try it ๐
but what i can tell for sure is that it isnt an offical tool
Cuz if it can actually make addons that would be like too good
ok ok
ITS REAL????
Wait how did u get the KCD thing beside ur name ?
ITS A WEBSITE ??
ITS REAL
Wait so ig app is for offline
makes sense
like Microsoft real ?
server tags
yeah
microsoft real
o.o
So someone just downloaded the whole thing to make it offline
Damn
Wait so it will actually work ?
maybe
well its web based
easy to port
Should I make a post in script resources ?
lets see what the moderators would say abt this
And it also has python idk what is python doing in JavaScript
U have any jdea if we can use python in Minecraft ?
for eductional
the other edition
WE CAN USE PYTHON ??
uh
damn
educational edition
close enough
oh wait
i dont see anything related with javascript in there
im checking it rn
i might be missing out thoufh
but it doesnt seem like it uses minecraft server api
It has on player join so im assuming it has more
u checking the offline or the online ?
idk the one i ran had it ?
what about that? does it use server api
I have no idea
i turned ma laptop off ๐
will check tmrw
wait ill tag u in the post
and we wait for some godly coder to figure it out
idk man ๐ญ
i see
how do I get that server tag btw ??
its in profile
huh
Not available to everyone apparently
oh
oh yeaa i also noticed that i didnt have it on first, but i suddenly had it, why so?
Discord can be weird in it's rollout
Anyone have a good idea for how to make some kind of code that runs once for every chunk that is loaded?
I'm trying to do script-based generation for a basic world type.
My current method is using /schedule to run a function that spawns an entity which runs the script event, which in turn adds the scheduled command to the neighboring chunks if they haven't already been generated. This method allows me to get the chunk location in the script-side of things. But there's a con where reloading the world doesn't save these scheduled commands. so I need to re-initialize the system.
You could store the position of the loaded chunk in some world property
I was considering that, but didn't want to run into memory issues
I'd rather somehow make use of Minecraft's normal chunk loading systems
into separate world properties?
But I don't like the idea of storing data that can expand theoretically infinitely
Well. Not really
If I store whether each chunk is generated, whether that's in a spatial split hashmap like a tree structure or not, if the player explores throughout the world the size of that stored data will increase as chunks generate
Not really much you can do other than that afaik
Could ask navi if we could get a dedicated api for accessing chunks
Yeah that'd be nice
are temporary properties (ex. player.__cooldown) unique to UUID?
No but each addon has it own environment that it run scripts on, so kinda
Just think of the player here as a global variable
Yep
Itโs so simple, get the player location, divide it per 16 and use math.floor
Now you got the chunk index, of the player location, do a for cycle to get the 5x5 chunks near the player, now you can use a Map to store the data while playing, when the world gets shut down use the before shut down event to save the maps in a dynamic properties
That's literally what I suggested in a sense. Not specifically that way but in a technical sense...
Is there an easy way to remove a player's armor?
Wdym?
Like clear the armor from the player's equipment slots
I believe there is an armor equipment component you can get. Hang on
You can set equipment to null and it'll clear it
Or you can just a run command
There we go
const equipmentSlots: Partial<keyof typeof EquipmentSlot>[] = [
'Head',
'Chest',
'Legs',
'Feet',
'Offhand',
] as const;
export function clearArmor(plr: Player) {
const equippable = plr.getComponent('minecraft:equippable');
if (!equippable) return;
for (const slot of equipmentSlots) equippable.setEquipment(EquipmentSlot[slot], undefined);
};
Thank you
ehh, overcomplicating types
const equipmentSlots: EquipmentSlot[] = [
EquipmentSlot.Head,
EquipmentSlot.Chest,
EquipmentSlot.Legs,
EquipmentSlot.Feet,
EquipmentSlot.Offhand,
] as const;
yes plwease :3
in mobile how would itemUse beforeEvent work?do they just have to hold it?
im wondering if there is a block and it would just prioritize breaking the block instead of using the item
they hold it, yeah
what if there's a block? what will it prioritize? using or breaking?
this is just my speculation, but it prolly will prioritize item use
but only if the item counts as usable
alright I guess afterEvents then
why in hell not simply the enum itself?
enums are iterable as well
just use
for(const slot of Object.values(EquipmentSlot));
Has anybody noticed this bug where two entities that share a property ID will become entangled if both are within render distance? By entangled, I mean both of them will display as having the same value of the property at all times, even though, according to the server, they are different. I was testing some of my maps and add-ons, and multiple of them suddenly broke like this in the exact same way when loaded in Bedrock 1.21.82.
I can tell that it's a client-side issue because, when the dominating entity goes out of render distance, the other entity suddenly adopts its proper appearance. So the server had the correct values of the property all along.
What's weirder is that not all properties become entangled like this. And properties can become entangled across different entity IDs as long as the property ID is the same between them.
yeah
nah, Object.values is pretty slow so I would use a constant array
do js ppl care about performance?
dumb question
seriously i never thought js programmers caring about it
no one seems to talk about it
you never thought a type of programmer would care about performance?
Performance is important to me personally. Especially when taking into consideration the environmental constraints and hardware limitations when talking about Mobile devices.
Every decision I make I try to take into account on how it would impact such cases. If this means writing unconventional code to reach the end goal then so be it. The objective to me isn't about being conventional. Its about producing code that works.
i do care about performance, i just mean people on js community usually dont talk about performance
its hard to see that happening
I didn't say you did not care about performance
yeah i know i didnt mean that
In this community specifically, you may see less focus on performance but I think the majority which don't just lack fundamental understanding and knowledge. Something that they eventually learn later as they grow in their development skills.
wouldnt that be not taking into account for those cases then?