#Bedrock IPC (Inter Pack Communication)

1 messages Ā· Page 1 of 1 (latest)

prime shale
#

It should work with the Omniac's IPC system

dapper ledge
prime shale
#

Also this one is documented

#

so it should be easier for new devs to learn how to use it

dapper ledge
#

Nice

#

Woah, I just checked it, This is so clean.... Increadible job!!!!

prime shale
#

Thanks ^^

umbral hedge
#

Also he uses TypeScript, which is much better for libraries in general

prime shale
#

But yea I can include a typescript version too

umbral hedge
#

I refer to my own library, which has almost everything (except NPM bundling) what it should have to be easy to use & maintain

prime shale
umbral hedge
#

By the way, don't take my words as an attack - I just try to give other people good advice šŸ™‚

prime shale
mighty pagoda
#

so this can communicate from pack to pack or smth?

slim thorn
prime shale
#

It’s not, I did generate some of the JSDocs which was just the copilot tab thing

#

I could have just delete it but since it’s an open source project it’s better for the others to understand what every function does 😊

agile orchid
#

So what it does exactly._.

#

Can u provide an example

prime shale
agile orchid
#

Do u mean communication between add-ons scripts ?

prime shale
#

For example imagine you make an auction house system and you store all of that data in a dynamic property or in memory, with this system, you can ask for that data from another addon

#

Yea

agile orchid
#

Noice ā¤ļø

#

But how did u make it

prime shale
#

This is made with scriptevents

agile orchid
#

I mean is it possible i didn't thought it was possible

prime shale
#

There is a way to send an scriptevent with its id and message, and there is an receive afterEvent scriptevent

#

For example I use this to detect in my addons if VEX essential (another addon made by me) is installed, because some features in my addons depends from that one

#

Or requires a specific version of that addon

#

Really useful for me

agile orchid
#

Nice

#

So, must i use it in one script

#

Or every add'on script to work

#

@prime shale that s very great work

prime shale
#

Thanks ^^ hope is useful for you guys, if you have more ideas or anything I could implement to it let me know, I would like to hear some feedback

prime shale
dapper ledge
supple olive
#

ooh it looks nice

#

but i think there may be an issue, since it doesn't look like you can pass any ids or anything to identify which client

prime shale
#

I’ll add typescript I’m working on it

supple olive
supple olive
supple olive
# prime shale Wdym?

see his ipc is used something like:

const channel = main.connect(...)
channel.on
channel.etc

but also

const main = ...;
main.on // global, any channel sends message here, it gets caught
main.send // global, all connected channels get this message
main.etc
#

and also it has an optional encrypted version using diffie-hellman exchange method (i think that's his name, tho i don't remember names that well šŸ˜…)

#

my main concern is that all ipc clients can access all channels

#

the other stuff can be implemented later on if you want to

prime shale
#

Ik what you mean, but how is that an issue?

supple olive
#

like
ipc.handle(...)

#

i don't get the id from whom i got the message, and i also don't get anything to make sure it's only them

#

any ipc client (any pack) can just do ipc.invoke

#

while yes i can make it send some kind of key

prime shale
supple olive
supple olive
prime shale
#

Yea I get it, thought of that at the beginning but idk maybe someone wants to offer like an api for his addon

supple olive
#

the main client is created with say stuff like id, and it can have global apis like main.handle

prime shale
#

So basically make that only one pack can connect to a channel right?

supple olive
#

but if you want to communicate to JUST one channel, you do const channel = main.connect(...) and maybe pass in the id of the channel u wanna connect to.

supple olive
#

may i add that the main.connect should only connect when the other pack also does main.connect?

#

it's basically supposed to be a 2 party channel. end to end. not a group chat

#

the current system is basically group chat

#

anyway other than that, this ipc is soooo well documented, super super nice to use and has many examples and such.

#

anyway enough of my yap, if you do take my feedback, good luck

prime shale
#

I get it, I’ll make an update

marsh elk
#

hmm

#

@prime shale you need to include the original MIT license from my repo in yours

marsh elk
marsh elk
marsh elk
prime shale
#

and leaved this MCBE_IPC_V3: 'mcbe-ipc:v3'

marsh elk
#
copies or substantial portions of the Software.```
#

you just need to add Copyright (c) 2025 OmniacDev under yours

umbral hedge
prime shale
marsh elk
#

I have an internal testing suite I use, other than that I've just been too busy to write docs lol

umbral hedge
marsh elk
#

generally not a fan of using AI but in this case it did it very well so an exception can be made lol

umbral hedge
prime shale
#

once you have that, you can tell the ai to write it for you, its super useful this way

supple olive
prime shale
void quartz
#

I HATE it when people do stuff like that.

prime shale
#

what does that even had to do, i just missed that part, and i said i was going to upload it later ._.

void quartz
prime shale
#

i was just in a rush because i had to travel, still im doing a complete different version internally

void quartz
prime shale
prime shale
void quartz
prime shale
#

of course its better in TS but i just didnt have time to upload that version

void quartz
#

I just realized there aren't even any .d.ts files in the JS version, which are basically required for projects you want other people to use.

prime shale
#

no, but its a long story hehe since some friends of mine dont know TS i had to sent them the JS version

#

and since i had it already in hand i just upload that one

prime shale
#

buy hey not everyone knows TS

void quartz
prime shale
supple olive
#

he was uploading in a rush, he should've uploaded the types and the lib def if he already had an ā€œinternalā€ TS version but aye we all miss stuff when we're doing stuff in a rush

supple olive
#

except it should be flushed-ish

#

it should have a timeout built-in instead of waiting indefinitely and have the .connect pass the duration optionally

#

and it should basically be implemented like:
if i use .connect, and a message from the other ipc tells me it wants to connect, I'll connect

#

even IF our message didn't reach their message.

#

and then we send a message that we connected

#

to basically help with race cases

supple olive
#

AI has been a massive helpful tool. it's extremely nice to help with mundane tasks

#

as long as you know what you're doing and what it's doing, and also double check the code, you should be fine

marsh elk
#

I strongly advise against using this ā€œBedrock-IPCā€ library. Although it is being advertised as a more maintainable, scalable, and higher‑performance alternative, the project is largely a thin wrapper around the internal implementation of MCBE-IPC, with most of its functional logic directly copied from my library.

Because the implementation was copied, all existing/unknown bugs and limitations present in MCBE-IPC at the time were also copied into this project. In addition, several performance optimizations from MCBE-IPC were removed, and extra wrapper layers were added, which introduce additional allocation overhead. As a result, the performance characteristics of Bedrock-IPC are objectively worse, not better.

Since I am not involved with this project, any future fixes, improvements, or updates made to MCBE-IPC will not be retroactively applied to Bedrock-IPC. I do not endorse this library, and I cannot guarantee its correctness, stability, or long‑term maintenance.

For accurate behaviour, ongoing support, and a reliable implementation, please use the official MCBE-IPC library:
https://github.com/OmniacDev/MCBE-IPC

For more information regarding MCBE-IPC, please refer to this: https://discord.com/channels/523663022053392405/1277940040688996512

marsh elk
#

^ same thing applies for DirectIPC

prime shale
#

How can you make such an advice like that without even waiting for me to upload my new version

marsh elk
prime shale
#

It’s funny because as we already discuss this and you didn’t make any test to check how bad it is, this is only an opinion, also this looks like a self promo or something? My code is very clean, and open source, so people can check it out and see if it suits their needs

prime shale
#

I’ll probably update it later

#

As I always like to share my work with others, instead of just keeping it for myself

marsh elk
prime shale
#

So if you found it useful use it, if you found more useful omniacs then use his system

marsh elk
#

you can't claim that as "your code"

prime shale
#

And why you get mad? You are taking this is a competition? Wow

#

I told you I was making a rework

#

This is why bedrock is still below Java because of his big ego developers

marsh elk
prime shale
#

Because I had to make what you didn’t in the original repo

#

But don’t worry I’m changing everything 🫣

marsh elk
#

sure you do that, for now, my statement stands

#

and fix the licensing

prime shale
#

Just don’t come here and say that is worse than yours without any tests or numbers, because not everything is about performance as I said, 2, 3 ms delay or 20kb of extra ram wouldn’t matter

#

If you can understand better the code or even expand its functions

marsh elk
#

tell me how your wrapper is more "expandable" than mine?

prime shale
#

It’s just a game, I do it for help others, and if this is useful for at least one person then go ahead

supple olive
#

guys chill

marsh elk
prime shale
#

Good for him

supple olive
#

i am gonna be honest here, you both are kinda wrong. gameza you need to put his original license if you used portions of the code

prime shale
#

Yea but I also have it for more reasons

supple olive
#

and you omniac shouldn't flame the guy, he said he is gonna update and rework the library

marsh elk
#

I'm not flaming him, I'm just stating the facts here

prime shale
marsh elk
#

if that is considered flaming then there's obviously an issue

supple olive
prime shale
#

I was going to do that but this guy was getting mad at me so I completely made my own from scratch

#

I mean no problem is not that hard to code one

prime shale
#

I just didn’t do it instantly I’m not going to make a push on something that I was changing

supple olive
prime shale
#

Well still doesn’t matter anymore this discussion I make a new one from scratch so I’m just working on the docs now

supple olive
# marsh elk wdym?

you kept stating the same facts even tho he hadn't updated anything (I'm talking about performance stuff), he hadn't updated the library with the full rework yet

#

you have every right to state the fact he didn't add your license on the other hand tho.

prime shale
#

It might be similar in the api and protocol but this is to make it compatible with his system, but a protocol it’s like a standard so yea doesn’t matter

supple olive
marsh elk
supple olive
prime shale
#

Yea but if he plans to make that one the standard then it’s not an issue

supple olive
prime shale
#

Because as he said in dms he is worried about compatibility

supple olive
#

interesting, well i didn't see any of these DMs

prime shale
#

It’s like if someone made the http protocol, you can’t claim copyright for that

#

For using it I mean

prime shale
#

For using?

marsh elk
#

protocols are still licensed

supple olive
#

if you use the protocol in another protocol that's a superset then yes you need to license the original

prime shale
#

But you can’t license an idea or formats

#

It’s like license a rule?

#

A rule for communication

supple olive
#

it's like someone invented the internet

#

then someone else made a wrapper on it and called it their better Internet without even giving credits to the original

#

ofc the first author will be extremely mad

#

but we're not talking about that here tho.

prime shale
#

But what if the code is completely different and he is only using the protocols to communicate with the rest of the world

marsh elk
#

if you really don't want to include my license, then you need to do this: https://en.wikipedia.org/wiki/Clean-room_design

but since you've already read my code, that's impossible atp

Clean-room design (also known as the Chinese wall technique) is the method of copying a design by reverse engineering and then recreating it without infringing any of the copyrights associated with the original design. Clean-room design is useful as a defense against copyright infringement because it relies on independent creation. However, beca...

prime shale
#

I mean I don’t have an issues with including your license I was going to

supple olive
supple olive
#

couldn't be that hard to just push a file to the repo

#

could it?????

prime shale
#

Will it matter? I’m uploading today a new version and deleting the old one

supple olive
prime shale
#

Hmm probably well yea

supple olive
#

it's not that hard bro

#

just put the license first and publish the update whenever you want to.

#

you can remove it later if you implement the code completely by yourself without any portions of his code being in yours

#

anyway great work you both, and good luck

#

also I'd like to clarify, you both need to put speed tests and benchmarks

#

seriously it's extremely important for libs like this

prime shale
#

Yea new one im working in has all of that

supple olive
#

nice, great work

prime shale
#

Also what’s wrong in the docs?

supple olive
#

i didn't say anything about the docs

prime shale
#

He said that the docs had issues

marsh elk
#

just wrong stuff

prime shale
#

Like what?

#

In imports?

marsh elk
#

no just the AI getting stuff wrong, like the "memory leak" stuff is wrong, that listener would never fire since you instantly remove it. in the Q&A's there's something about debugging, which also does nothing, that channel is never used in the source code. etc etc

supple olive
#
A: Yes, add logging in your handlers:

IPC.on('debug:channel', PROTO.String, (msg) => {
    console.log('[IPC Debug]', msg);
});```

don't see what's the problem
marsh elk
#

that's the problem lol

prime shale
#

You didn’t understand

#

Basically I’m just telling the obvious

supple olive
prime shale
#

That you can add a console log in your listeners

supple olive
#

incase you are wondering what packs are sending data/how many times etc.

marsh elk
#

question says monitoring the traffic, setting up your own logging isn't traffic monitoring

supple olive
#

AI JSDoc stuff is cuz the lib was written in rush so i don't mind, he said he is revamping the lib

supple olive
prime shale
#

Still I made sure everything worked in the docs

supple olive
#

don't see him saying through all channels

supple olive
prime shale
#

I can include that too but I think the response will be slower

supple olive
prime shale
#

Since it will have to pass through an actual channel

#

But you gave me an idea

supple olive
#

interesting..

#

and what could that idea be..?

prime shale
#

Just an extra param to log in the constructor

supple olive
#

uh

prime shale
#

So you don’t have to put that console log manually xD

supple olive
#

yeah i don't think that's a good idea

marsh elk
supple olive
#

that's gonna add a bit, while yes very micro slowness

#

should just let ppl add the console logs if they want to

prime shale
#

Well yea you are right it doesn’t take too much time

supple olive
#

he meant the channel possibly

#

but his IPC is clearly following... quite a different approach. which might justify this miswording

marsh elk
#

the current IPC or the rework?

supple olive
#

since the IPCs all have access to the same channels

supple olive
marsh elk
#

the current one is literally just my one

#

so it's the same approach

supple olive
marsh elk
#

lol

supple olive
#

well anyhow, you both did fantastic jobs, and i hope both your IPCs can coexist sometime soon and serve different purposes

#

maybe one of them will serve the purpose of transferring heavy data and encryption

marsh elk
#

not to be an ass but currently his is mostly copied from mine, not much of a job done there

marsh elk
#

yeah we will see what it ends up like

supple olive
#

yup

supple olive
#

but who am i to tell you both what to do with your IPCs

marsh elk
supple olive
#

anyway good afternoon to you both

dapper ledge
#

peak argumenting but I should say to Gameza just put the credits in license till you remake it

prime shale
#

The code was already changed lol

#

I will just delete the repo and make a new one šŸ¤·ā€ā™‚ļø not a big issue, good luck trying to take down my new IPC system

#

Doesn’t matter what you pull out, if someone finds my solution better they will use it

humble brook
#

If someone already made it and it works well why are u trying to copy it, have ur own ideas and post them, if he took it down because of copyright and GitHub agreed is because of a clear REASON..

prime shale
#

My mission here is to spread knowledge, and tools, and this guy is fighting for recognition

#

Instead of trying to help others

#

And that’s pretty sad

humble brook
# prime shale And that’s pretty sad

Everyone already knows his IPC system, it is up to date and it’s very well structured and programmed. I don’t see why we need more versions. Also I don’t see him really fighting for recognition, I see that he is protecting his rights. Yeah, you can spread knowledge but not based on other’s ideas.

You can do whatever u want, like re doing his idea but don’t get mad when he takes it down.
You looked really childish and immature with your ā€œI will just delete the repo and make a new one, good luck trying to take down my IPC systemā€.

ā€œDon’t reinvent the wheelā€

prime shale
#

You can’t just stay with one option, it will always be 100% better to have more than one option

#

It’s not about reinventing the wheel is about having more tools, and let the developers choose the one that fits their needs and style

humble brook
prime shale
#

I made because his argument was that I was going to cause confuse by having more than one, but the 2 of them work just fine

#

And also the same day he claim I changed my code

#

And still he insisted

humble brook
prime shale
humble brook
prime shale
#

And idk maybe in the future someone could take this code and improve it or make something completely different out of this, by just taking the good stuff

prime shale
#

But he started to flame me

#

So I just rewrite everything

humble brook
prime shale
#

Still that is a completely different situation since that’s a closed source addon

#

You could compare it like with my chunk loader

#

I won’t even get mad if someone improves it

#

Like I will even use the one that is better

humble brook
prime shale
#

But this guy just made the problem bigger

#

I mean I’m really impressed that he filled all the report for a free open source code, he must have a lot of free time. Can you see my point? I don’t even have time to appeal I just delete it

#

And submit it here, and that one is made by me from scratch

#

Yea the same idea but different code, and some of the code might have the same logic idk but this is intended for compatibility between both ipc

#

Since my main goal with this is to help others, so if they wish to change their code to use this IPC system won’t cause many trouble

prime shale
# humble brook If you didn’t do it at first even tho you knew it was a re-made of his system th...

Oh and btw yea his IPC system is older and never gave an official documentation, basically the project was abandoned, no updates and a mess like all into a single file, how is that a good practice, and it matter because it’s not an addon, it’s a tool a library that other developers will use, how is that not documented. After I upload my version he started to make all of those changes, you see?

#

If you can get something good out of this is that basically I made him do the documentation, otherwise he probably wouldn’t make it…

#

Proving my first point, having more tools is better for us

marsh elk
# prime shale <@694113834570481695> This is wild, had you read the code?

yeah I obviously read the code lmao, how do you think I listed those 13 examples copyright infringement?

and I filed this after your "rewrite". I already directly told you here, in DMs, and in an issue on your repository that you were in violation of my license, and I gave you more than enough time to fix it. I even warned you again after your "rewrite" that it was still in violation, and you didn't fix it. That's on you.

All I'm doing here is protecting my copyright, there is no "high ego" or me "fighting for recognition", the only thing I'm fighting is to not have >1.5 years of work just illegally stolen from me.

so don't try to slander me as if I've done something wrong here. You were violating my license by having substantially copied my code for your "implementation", I gave you multiple chances to fix that violation and you essentially refused.

marsh elk
# prime shale Oh and btw yea his IPC system is older and never gave an official documentation,...

project was not abandoned, the reason for it having "no updates" is because the project had stabilized, so the only actual updates needed are small bug fixes or performance improvements, which are very rare at this point.

I also purposefully only use a single src file so that users can easily copy it into their projects as a drop-in library, and the library is compact enough that it works fine.

marsh elk
prime shale
#

Don’t have time for that

#

I will just share it here

#

šŸ¤·ā€ā™‚ļø is up to you if you want to continue wasting your time

marsh elk
#

you don't have time to write your own code?

prime shale
#

Check last commit

#

It was like days ago