#help-development
1 messages · Page 2218 of 1
Yep, hence why I didn't use it
what does this error mean java.lang.NullPointerException: Cannot invoke "net.minecraft.world.item.Item.u()" because the return value of "org.bukkit.craftbukkit.v1_18_R2.util.CraftMagicNumbers.getItem(org.bukkit.Material)" is null from for (Material mat : Material.values()) { if (mat != null) { if (mat.getCreativeCategory() == CreativeCategory.BUILDING_BLOCKS) { blocksList.add(mat); } } } specifically if (mat.getCreativeCategory() == CreativeCategory.BUILDING_BLOCKS) {
Test it in 1.19 First though
Because 1.18 is EOL
yellow heheh eh e eh eh eh```
EOL?
.-----.
This looks like it is using legacy Materials. Do you have an api version in your plugin.yml?
api-version: 1.18
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>``` yes
that is probably what is happening
The alternative is that it is crashing due to Material.AIR etc
i dont think thatd happen though
Can you post the full stacktrace
yeah
I.e. things that are Not supposed to be itemstacks
?paste
Remember that Material also contains types that do Not really exist
At least Not for itemstacks
Hence BukkitMagic returns a null itemstack there and Bukkit cannot Grab the Creative category
?stash
what about it
I'd Insert a Material#isItem condition there
alright ill try
Elgar did that command for himself
oh
can you see if this also happens on Spigot? You are running paper
yeah gimmi a sec restarting server cuz i was gonna change to 1.19 to test it
line 421 does not exist in spigot CraftMagicNumbers
Anyone any idea how to send raw bytes to a player connection? I used ProtocolLib but that seems buggy with 1.19.. and I don't need all the abstractions
raw bytes must be one of the worst ideas I have heard in a while
no offense, but you will put more work into getting that to work than anything else in your entire plugin
Just use the raw nio channels at that point
I got it working with ProtocolLib already
raw bytes is a whole different world than protocol lib
.isItem() seemed to fix it thanks
No like, sending the raw bytes with protocollib
That defeats the purpose of that lib
Feels like there should be an relatively easy way to just tell the server to send the bytes to the player
lol
Also done 3 times, using https://github.com/PrismarineJS/minecraft-data/blob/a2a10bb79473a6a64a01e54d5712f923c362bd4d/data/pc/1.9.4/protocol.json and that seems pretty backward compatible so far
not really. The servers interacts with the netty channel, which expects packets
Also, compression
encryption
Guess I'll have to dig through the ProtocolLib source then
Can be discarded for offline mode
also there is literally no "backwards compatible" network protocol out there
Has anyone here used bisecthosting? Does it have good performance? The premium option
just in 1.19, I think 2 whole packets were dropped ?
one was added, a bunch were changed
don't think protocol lib sends bytes directly either does it ?
should just wrap the mojang packet types
I know I know, no worries, just saying the .json maps in a way that didn't break any packets I used for the last two updates
ProtocolLibrary.getProtocolManager().sendWirePacket
anyone here know why I can't connect to redis hosted off a separate machine from my machine even though I have it set to listening to all interfaces in the config as well as protected mode off
pretty sure wire packet is a hack to some degree
it is still a "mojang packet"
that just only holds its bytes
is there any way i can get the vector perpendicular to player.getEyeLocation().getDirection()?
tho again, protocol lib does a LOT
even sendWirePacket will still go through compression and encryption, because it has to
and no
legacy text is legacy text
use a proper text library (adventure is pretty cool)
So what am I doing wrong here?
public static float getYawToLookAt(Vector a, Vector b) {
double x = b.getX() - a.getX();
double z = b.getZ() - a.getZ();
return (float)Math.toDegrees(Math.atan2(Math.toRadians(z), Math.toRadians(x)));
}```
The result is consistently -90 degrees, regardless of the two vectors
The z and x you are passing to Math.toRadians aren't angles, what are you trying to do? :o
Getting the yaw to look from vector a to vector b
Looks alright, but yea, z and x are not angles
Just Math.atan(z / x) ?
You get the angle "from the origin", but it will be the correct angle still
How, the position is not necessairly between the origin and the point
Yeah go figure, that doesn't work
How would you get the closest player to another player?
If you scroll up in chat someone actually sent out a class which does exactly that
i guess it just takes the length of the longest item in the row and adds some spaces
i have a length util somewhere
it's a bit complicated though
but i've got to sleep now
np bro
How quickly is an entity reference replaced after that entity dies? Like if I’ve saved a reference to an entity in a runnable and check that entity for some property a minute after it dies, what would happen?
Math.atan2(x, z) is a "safer" way to write Math.atan(x / z)
Alternatively, anyone know how to give a projectile some custom movement stuff without using a bukkitrunnable?
Like moving in different directions over time?
Yeah, like make a projectile home in on the nearest entity, or orbit an entity, be thrown in an arc, home in on the direction an entity is looking, stuff like that.
I can do all of it with bukkitrunnables, but just wondering…
Sadly the "over time" part requires BukkitRunnable, I think
runnables
Darn
Well, my original question about references still stands — these projectiles /do/ things when they hit stuff, and I can either use the runnable or the listener for the collision to do that.
There is a ProjectileHitEvent
Listener class: https://paste.md-5.net/awanomicul.cs
Problem: Trying to access the whoToTarget player method from outside the {}
I do see how it would be neat to have it close to eachother, code wise
Could you tell me around what time the class was posted?
add my discord
Hello
@eternal oxide I know, but then I have to save all the information related to the projectile collision onto the projectile itself.
Otherwise the listener can’t get it, no?
I am working on an animation to display blocks in a wave in front of the user. I have the animation working, but on the off chance some of the blocks in my animation get placed as real blocks whereas the other blocks are hollow. https://paste.md-5.net/wevagivaco.cs
How can I solve this?
I was thinking this can maybe occur b/c the velocity of the block was set to be facing down
just a flag on the projectile to indicate its type.
either use ItemMeta or PDC
ElgarL could you help me?
set a Field
whats the best option to set some text under player nickname?
But then it returns null
if you set a field it can't return null
I think it doesn't get removed, there is no simple way to "clear an object"
I'm trying it now, and I can still access it's properties (For a cow I'm testing .isDead()
Player target = null with a setter and getter
in your onCommand target = targetPlayer
(Even .getLocation() shows the last location it lived still)
to remove an Entity you use .remove()
it flags it for cleanup
But how will it be cleaned up if my code still has a reference?
is it possible to color lore
yes
It can't change to null when I already have it as an object
ChatColor.translateAlternateColorCodes('&' on lore doesnt work so how would i?
ChatColor.RED
How long would this take? I'm waiting now to see what will happen 🤩
ah
if you are waiting for a stale reference to be cleaned up you will wait forever.
its not a command its a listener
same thing applies. if you need somethign out of teh Listener you store it
So am I correct in saying that if an animal dies you will still have access to its last properties until you discard the reference yourself (by not having it in scope anymore)
You holding the reference is whats preventing its removal. Check with Spigot if your Entity still exists by asking for a new reference
Correct, but only its immediate data. any query to Spigot will fail as Spigot has forgotten about it
Do you have an example of a query to spigot I could make through the entity reference?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#getEntities() and see if its in there
depends on what you are doing in each
at all times you will have Thousands of tasks running on your CPU
My PC right now has 2174 seperate Threads running
in 98 processes
you can add thousands more, it all depends on what you are doing in them
what are you running in each?
for starters they are on a timer, so not running all the time
Nothing there sounds like heavy tasks, so no problems.
querying a database
lots of square roots
BIG math
depends how many you do and how often
again, without knowing quantity and how I can;t say for sure
I added Player target = null; and getter and setter but still is null
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.Player.setHealth(double)" because "this.target" is null
at com.yanesagrybnow.targetgui.targetListener.onMenuClick(targetListener.java:44) ~[?:?]
have you set it from inside your Listener?
or if you are accessing it INSIDE your listener you have to set it elsewhere
You should not have a Listener running which is expecting a value from outside that is not there
we seemed to get crossed messages there at teh end 🙂
Do I have to answer that? 😄
is it alright if i ask for people here to upvote an issue i posted?
If you could try to help me further it would be appreiciated
https://paste.md-5.net/napusayine.java
and class with getter/setter
I don;t see any refernce to the object target.setHealth(0);
right since thats where I dont know what to do
ok you are creating a menu of player heads
I obviously want the Player whoToTarget = player.getServer().getPlayerExact....... to be accessed not just a Player target
when you click on a player head you shoudl be setting target to that owning Player
you can just do Bukkit.getPlayerExact
so teh code where you click the head you shoudl be setting the Player target field
ah ok
This line targetMenuUtils.openTargetMenu(player, whoToTarget);
So I've tried looking up info about pinging a minecraft server in js, but I can't rlly find any
how would I go about it?
Use PrismarineJS
And I mean like, getting this info
what about that line
nah not tryna use libraries
Amen
what headers would I use
in teh openTargetMenu store the target this.target = target;
nvm found this
so line 37 where you need a target you call targetMenuUtils.getTarget()
needs to be static as you have no reference to the instance
Lastly you should not close nor open an Inventory from within the InventoryClickEvent You need to delay it 1 tick
You do know that's super old
well there's not much to go off of here either
Are you just trying to get the info from a server ping?
yes
First of you should know that you're not going to do a http request
I used this as a starting point to understand what I needed to do when doing that: https://github.com/lucaazalim/minecraft-server-ping/blob/master/src/main/java/br/com/azalim/mcserverping/MCPing.java#L72
A Java Minecraft server "pinger" (MOTD ping) API. Original author: http://d.jamiete.ch - minecraft-server-ping/MCPing.java at master · lucaazalim/minecraft-server-ping
You're going to have to use TCP
My end solution was quite different, but that's good to sorta understand what you've actually gotta be doing
There are already js libs for this. Why not use them?
because I was saying js cuz alot of ppl use it and I figured someone would answer, but I won't actually be using js
...
@eternal oxide
Now I get this https://paste.md-5.net/uposayejil.css
have you set it static
getTarget has to be static
no idea what your error is though, its not in teh paste
That appears to be an infinite loop
oh ok I see
public Player setTarget() {
return this.target;
}```Do you see an issue here?
yes
public static Player target = null;
public static Player getTarget() {
return target;
}
public static Player setTarget() {
return target;
}
and inside the openMenu its target= getTarget(){
looks like static abuse 🤔
idk lol havent read the whole thing
public void setTarget(Player player) {
this.target = player;
}```
has anyone got a plugin for 1.19 and java1.17 that is using gradle..ie looking for gradle config... don't normally touch it but have a plugin i'm updating to the latest.
Yep he has to use static because he won;t pass instances as I showed yesterday 😦
¯_(ツ)_/¯
it wont let me use this.target; with a static
fix your setTarget method
I did now
now fix in your openTargetMenu you need to do setTarget(target);
I have no idea why we are doing it this way. We could have done it in the Listener 😛
I didn;t notice you are using a double Listener
here you go https://paste.md-5.net/zaperaduni.java
scrub all the changes to targetMenuUtils
no need to store a target in there at all
"best"
There is no best way.
There are several valid approaches and each one needs to be thought out.
I would suggest using an advanced command framework.
Im using ACF. But it has a very steep learning curve and is pretty hard to master.
There are several others you can take a look at.
same
I use Bukkit command framework
Known for its simplicity
Tho it is a bit limiting
Like if you wanna just do it yourself
Map some command executors
Map<String,CommandExecutor>
Minimalistic
I think the most time consuming work is context resolving.
I would much rather create a command like this:
public void onCommand(CommandSender sender, Player target, int amount) {
}
And then register a context resolver (CommandSender, CommandContext) -> Player (once)
So i can reuse it in every command by just specifying the type instead of having to parse and validate String over and over again.
But all of that needs reflections.
Well, in that case
Cloud
Or just reflect into the brigadier dispatcher
and use brigadier purely
(Might not even need reflection)
Isnt that the one that uses a builder pattern and therefore has gigantic tree definitions?
You have annots as well
But yes it follows a similar style to brigadier
Which sure can be a bit verbose
But it allows you to easily compose commands with literals and arguments on the fly
With quite easy reusability
Im just looking at it. Doesnt look too bad.
Yeah, the nesting can become pretty awful, so I usually create a ton of variables… but well it works fine Ig
(Which is why using annotations isn’t actually that bad, but helps with reducing boilerplate a lot)
But im way too committed to ACF. Poured too much time into it so i wont change.
Lmaoo
I mean acf is extremely solid so don’t think you over committed the wrong library
No?
Justify
Still awaiting your explanation :3
Yeah its very solid. Its just a hustle working with others because explaining how the internals work is a bit...
🥲
Can anyone help me test the plugin. Need someone to use on
Run the server in offline mode and connect with two clients
oh thats a thing
Just wanted to know if anyone would help but ty
Hi! It's okay how I did this menu? https://paste.md-5.net/yapaqowuvu.java
the idea is that I created an instance for the menu in the main class and then I called it when needed
Why does your ItemsMenu implement Listener?
Dont expose your maps like that. You should never have any getters or setters for data structures like maps, sets, lists etc...
wdym?
You can take that quite literally
why not
Just let the guy have his maps
It takes a very heavy hit on the robustness of your code
lmfap
a class that converts the menu to config and vice versa
This breaks strong encapsulation and will inevitably lead to a mess. Especially in bigger projects.
Yes
but then how i can get the map or the list from another classes?
2 ways:
- You dont. All you do is delegate properties to your class.
- Through mutators and accessors
but, the thing i did with the instance of the menu in the main class, is okay?
hmmm... okay
Ill give an example. One moment.
The idea is that you expose not the map itself, but craft methods to interact with the map through your class
But if you need to add and remove items, just use a map
Once you have it working, you might want to spend the time to abstract it, but is it worth it now?
Abstraction as in, not exposing the map (or any object that itself contains state) directly but instead having dedicated methods to interact with the map (or any object) for "encapsulation"
Maybe, but is it worth the hassle while you are working on a feature
I find that all the strong encapsulation and code rules keep me from playing around and getting cool things to work
Can someone help me resolve a java.lang.IllegalArgumentException: Unsupported class file major version 62 error I keep getting with Gradle?
?paste
thanksss, checking now
How do I get the file from the FileConfiguration?
iirc not
It has no file
Its pretty much just a glorified Map<String, Object>
oh damn
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
... 6 more
any help me
Forge?
yes
Btw building on what ive sent you: This is how more advanced menu libraries implement the IMenu interface.
https://paste.md-5.net/xavefogabe.java
heeheeheehaw
hey yall im tryna add arrows into the players inventory but i've been failing...
what am i doing wrong?
any help me ?!
🌷
I’m sorry but this isn’t the forge support discord
rose for your troubles
There are probably other, more suitable places where you can get help with addressing said error
How can I "create" block data using the string returned by a #BlockData.getAsString()?
Bukkit.createBlockData(String)
Oh that's a thing lol, thanks
thoughts?
failing?
The bow might overwrite the arrows. Try setting the bow first and add the arrows afterwards
like the arrows just aren’t being added to the player’s inventory
got it 🫡
They are. But probably on slot 0. And then the Bow overwrites them.
makes sense
my brain is dead at this time of the day
How disable create end portal
declaration: package: org.bukkit.event.world, class: PortalCreateEvent
don't work 😅
yea
After a whole lot of trying, I can now send bytes without wrapping them in specific packets or anything 🤩
if I have a class Car that extends Vehicle, can I get in the constructor of Vehicle the class object of the super constructor caller? (in my case, Car)
can i see code?
@EventHandler
public void onPortalCreate(PortalCreateEvent e) {
e.setCancelled(true);
}```
uhh and is that doin anything?
I can check nether portal 😅
nice xd
unnecessary as fuck but nice xD
yea for nether portal work
'this'
i need to get the car instance from inside vehicle
this.getClass() would return vehicle.class
basically
Well... I'm writing it to use a javascript plugin engine so don't get me started about unnecessary as fuck ;)
Oh god
Yeah... I'm that kinda guy :P
what are you trying to do?
Hahaha, let me have my javascript
check if this extends Car and cast it
i want to get the class object of the class that called a super constructor from inside the super constructor
i don't need to check for instances, any class could extend Vehicle and I can't make checks for each one of them
Wow amazing
ok so i know this is such a noob question, but how can I make a class that only runs when I call it? like a function or something
You can make a static method and call that.
constructor
But give more details would be used for utilities?
He said like a function or something, so I assume it's like python's function, so, yes, a utility class/method.
Yea i think u got it
So yeah, i prefer doing utilities method static
ok this worked but now im facing an issue where the arrows aren't being decreaed when i shoot the bow
For example for plugins, i have some statics methods in a class. One of them just translate the colors (&f, &3, etc) into vanilla colors
Tbh if you don't know what static methods are, you should seriously consider learning basic java before coding plugins for Minecraft, or else 99% of your time is gonna be spent looking up stackoverflow.
+1 to your answer (Agree with you)
On minecraft plugins: not knowing basic java == be 1h asking, searchingon internet, etc something easy to do
hey yall im facing an issue where for some reason, the amount of arrows given to a player doesn't decrease
like 32 arrows are originally given, but even if they shoot the bow 10 times the amount doesn't go down from 32
any ideas why?
Maybe because has infinity arrow?
holy shit
HOW DID I FORGET I ADDED THAT
LMFAO thank you
Your welcome :D
Haha, sometimes happen that i update a file.yml on a plugin, them restart and the same errors. After 10m i realise i was using the fucked old yaml files
LOL
yeah i def should, but i've been picking it up really fast and i've actually gotten the hang of things. I mean I'm still a total beginner but i've learned a lot
this is why taking breaks while coding indirectly hurts you
We dont see that...
Because static is part of basic java
Yeah, or when you are working too much a small break help you
facts
I would recommend the book On Java 8, it's how I learned and it's really simple to understand.
I heard from some people think java is really good
and free online 🤷♂️
sweet i'll check it out. the main reason i haven't stopped to learn is cuz i didn't really know how to teach myself lol. thanks!
I'm sending an entity destroy packet to the player (I'm on 1.17.1) and teleporting him far from the entity.
When I use /tp on the entity location I can see the entity.
How can I make the entity not appear for the player even if he walks back to the location?
Resend the packet
The packet is sent when the chunk loads for the player
Or maybe even after
public static String trueOrFalseColor(boolean b) {
if (b) return "§a";
else return "§c";
}```
This looks so wrong xd
Usually I'm not a fan of leaving out brackets
oh my
._.
personally id do something like
respectiveColoor(boolean value)
return b ? "§a" : "§c";
Or a static final string
obviously psuedocode, and spelling isnt great
No that's totally fine, I usually also go that way
yeah a static final string would be decent
ever since I learned about the ternary operator I fell in love with it
How would I make a projectile invisible?
Maybe you can send an entitydestroypacket to players that see the projectile.
Got an example of any packet code I could explore? I haven't worked with packets before.
Any basics plugins which use it, I mean.
Hah, I also haven't really worked with packets or NMS before but I found this thread on the spigot forums :
https://www.spigotmc.org/threads/making-projectiles-arrows-invisible-to-all-players.459673/
It might help you.
Anyone can recommend a way to obfuscate a maven project?
Lmk how as well
great, i'll take a crack at this, thanks a bunch @last sleet
is there an event for when it happens?
Maybe chunkloadevent?
why isn't this code working?? this should be all right syntax and stuff....
@EventHandler
public void join(PlayerJoinEvent event) {
Player p = event.getPlayer();
event.setJoinMessage("PLAYER JOINED!");
Bukkit.broadcastMessage("Testing Stuff");
}```
it doesn't set the join message or broadcast, no errors
Was the event registered?
package things.things;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.HashMap;
import java.util.UUID;
public final class Things extends JavaPlugin implements Listener {
@Override
public void onEnable() {
Bukkit.broadcastMessage("" + Bukkit.getServer().getOnlinePlayers());
}
@EventHandler
public void join(PlayerJoinEvent event) {
Player p = event.getPlayer();
event.setJoinMessage("PLAYER JOINED!");
Bukkit.broadcastMessage("Testing Stuff");
}
public static void clicker(PlayerInteractEvent event) {
event.getPlayer().sendMessage("Testing");
Player p = event.getPlayer();
Block b = event.getClickedBlock();
UUID u = p.getPlayer().getUniqueId();
Integer bal = Balance.get(u);
if(event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if(b.equals(Material.COBBLESTONE)) {
Balance.put(u, bal+10);
p.sendMessage("Balance: " + Balance.get(u));
}
}
}
public static HashMap<UUID, Integer> Balance = new HashMap();
}
that's the full code
nothing in it works for some reason with 0 errors
how to do that?
Yeah that's not registered. You need to register your listeners
im very new just started yesterday,
@Override
public void onEnable() {
Bukkit.getPluginManager().registerEvents(this, this);
}```
The first this referring to the instance of the Listener, the second this referring to the Plugin
just put that in and it'll work?!
Yes
lemme test!
Your PlayerInteractEvent won't work though. You would have to remove the static and annotate it with @EventHandler as well
how do you annotate
Additionally, Block will never equal a Material. Your if (b.equals(Material.COBBLESTONE)) should be if (b.getType() == Material.COBBLESTONE)
Just adding @EventHandler above the method
It's a bit of a deep dive. Until you have a better understanding of objects and instances (which I don't imagine you quite have a grasp of just yet), it's best to avoid static for the time being. If you want to learn a bit more about it, see this guide: https://docs.oracle.com/javase/tutorial/java/javaOO/classvars.html
the stuff you said works, thanks so much but 1 more thing
it's not sending the balance thing
@EventHandler
public void clicker(PlayerInteractEvent event) {
Player p = event.getPlayer();
Block b = event.getClickedBlock();
UUID u = p.getPlayer().getUniqueId();
Integer bal = Balance.get(u);
if(event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (b.getType() == Material.COBBLESTONE) {
Balance.put(u, bal+10);
p.sendMessage("Balance: " + Balance.get(u));
return;
}
}
}```
Likely have a NullPointerException in your console. Balance.get(u) will throw an error because it's going to try and auto unbox an unmapped value. You can use Balance.getOrDefault(u, 0); instead and it should work
link this? java Balance.getOrDefault(u, 0); Balance.put(u, bal+10);
@EventHandler
public void clicker(PlayerInteractEvent event) {
Player p = event.getPlayer();
Block b = event.getClickedBlock();
UUID u = p.getPlayer().getUniqueId();
Integer bal = Balance.getOrDefault(u, 0); // This line here should use getOrDefault()
if(event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (b.getType() == Material.COBBLESTONE) {
Balance.put(u, bal+10);
p.sendMessage("Balance: " + Balance.get(u));
return;
}
}
}```
OHHH thanks ima try it!
YES works, thank you so much, but it's doubling how do i fix that like when i click once it's registering two clicks
How do I lsiten for when a Player enters a minecart?
probs vehicle related i'd imagine ^
Ugh, people are going to hate me for asking this, but how do I create instances of a class I'm using for data storage which are accessible from any of my other classes?
Like...
Suppose I have this:
public class ParamClass {
private final int height;
private final int width;
private final int depth;
public ParamClass(int height, int width, int depth) {
this.height = height;
this.width = width;
this.depth = depth;
}
public int getHeight() {
return height;
}
public int getWidth() {
return width;
}
}
And I want to have two ParamClass things which I can access from my other classes, one with height, width, and depth of 2, 4, and 6, and the other with 5, 6, and 10.
How do I actually create those and then access them from anywhere?
and you asking how to instantiate in java
yes D;
and its funny
to create a new Object
you would do
new Object
so new MyObject(param1, param2)
Ugh, the issue is then I have to create it WHENEVER I'm using it... I really am just hoping to use it to store the data once.
And then call the class to read that data
there's absolutely nothing wrong with that
Yeah, but I'm instantiating the same object in multiple different classes
Like to use the prior example, I might need that 2-4-6 cube in multiple different classes, I'd really prefer to only need to make it once.
yeah, but how would I create that and then use it? Would I just run it in OnEnable?
class A {
Some ref;
A(Some ref) {
this.ref = ref;
}
}
class B {
Some ref;
B(Some ref) {
this.ref = ref;
}
}
// some class
Some some = new Some();
A a = new A(some);
B b = new B(some);
assert a.ref == b.ref;
@restive mango are you a rust user
nay
mkay cause this seems like a very rust user migrating to java type of question
I will be honest, I don't understand your code snippet
Does anyone know how to convert a string to a material?
here is code:
String b = getConfig().getString("clicker" + i);
Block b2 = // need help here```
you can't get a Block from a Material
so like inn my config i have like
clicker1: "white concrete"
would I have to name it like WHITE_CONCRETE
and then how would i convert from there?
it would be easier if you did
how do i convert from there?
Material.matchMaterial(string)
No. I already said you can;t get a Block from a Material
Material mat = Material.matchMaterial(string)
I'm using ProtocolLib to intercept the PacketPlayOutSpawnEntityLiving to cancel the packet.
It is working fine for entities like creeper but it is not being fired for armor stands.
I also tried PacketPlayOutSpawnEntity but it is not being fired too.
What could I do?
how do i get the nearest type of block to an entity
For example, the nearest water block to a horse
Sorry, I'm playing games with friends. PlayerInteractEvent is called once for each hand. You can ignore one of them if you'd like
public void onInteract(PlayerInteractEvent event) {
if (event.getHand() == EquipmentSlot.OFF_HAND) {
return;
}
// Continue with the rest of your code
}```
ahhhh thx man you've like helped a lot probs would've just restarted for the third time if i couldnt fix the bug haha
Yeah I'm not sure what scheduling has to do with anything here. Though I don't think there's a solution to this at all
There's no guarantee of the order in which the client receives the message packets
Not as far as I'm aware
thai language can't send in my serverchat
Presumably that says "Unicode chat is not allowed." Sounds like a plugin you have installed that doesn't want to allow for unicode characters
#help-server is probably better for that, unless you wrote the plugin
Ummmm LPC yes?
LuckPermsChat? That might do that.
EDIT: I see no mention of "Unicode" in the LPC GitHub. Probably not
What does "An internal error occurred while attempting to perform this command" usually means
Means you made a mistake
any specifications?
This is my lasted plugins
feel like this is more of a #help-server discussion
bump 🛣️
(ping me if you respond pls)
ok honestly im so lost
how do i make a horse pathfind to the nearest water source without actually stepping in
I'm using NMS and this is my first time messing with pathfinding
I'm also using mojang mapped
i have no idea what I'm doing, this is what I've got
BlockPos blockPos = new BlockPos(getX() + 10, getY(), getZ());
getNavigation().createPath(blockPos, 1);
doesn't do anything
Can you get the cause of the teleport from Entity Teleport Event, like whether or not it is natural or /tp
would this work??
No, though I feel like maybe this should be an API feature. However you can get the teleport reason from a PlayerTeleportEvent
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerTeleportEvent.TeleportCause.html
@worldly ingot any idea?
What even is this
i want it to set that integer to somthing if x is x basically
Stuff that haopens if the stuff in the if is true goes after the if
Not before
If (x) {
Stuff
}
ik but it's not working it's not registering that give is set when i do that
it's being weird
yea 1s
private Integer getint(Material o) {
Integer give = 1;
if(o == Material.WHITE_CONCRETE) {
Integer give = 3;
}
if(o == Material.ORANGE_CONCRETE) {
Integer give = 5;
}
return give;
}```
you are redeclaring give outside of the scope
give = 5
instead of Integer give = 5
and why non primitve integer?
wym
🤷♂️
but yeah
private int giveInt(Material o){
int give = 1;
if(lbah blah blah){
give = 3;
}
if(2bhahaljads){
give = 5;
}
return give;
}```
idk how that isnt giving oyu errors
That can't give errors
thanks for helping im new to java lol just started last night
not what he sent what i sent
yes it can
you're declaring a new variable with the same name
Ohh i watched what u sent
My bad
He already defined give and tried to redeclare it
should also use else-if's here so you aren't redundantly checking material types.
or switch
yep
or even better immutable map
bump
would this work?
private Integer getint(Material o) {
int i = 1;
int give = 0;
while(i < 16) {
if(o == Material.matchMaterial(getConfig().getString("clicker" + i))) {
give = getConfig().getInt("amt" + i);
}
i++;
}
return give;
}```
what are you trying to do?
ok so in my config i have this,
Unique: 0
clicker1: "white_concrete"
clicker2: "orange_concrete"
clicker3: "magenta_concrete"
clicker4: "light_blue_concrete"
clicker5: "yellow_concrete"
clicker6: "lime_concrete"
clicker7: "pink_concrete"
clicker8: "gray_concrete"
clicker9: "light_gray_concrete"
clicker10: "cyan_concrete"
clicker11: "purple_concrete"
clicker12: "blue_concrete"
clicker13: "brown_concrete"
clicker14: "green_concrete"
clicker15: "red_concrete"
clicker16: "black_concrete""
amt1: 1
amt2: 3
amt3: 5
amt4: 10
amt5: 20
amt6: 40
amt7: 100
amt8: 150
amt9: 220
amt10: 250
amt11: 300
amt12: 500
amt13: 1000
amt14: 2500
amt15: 5000
amt16: 10000```
Im trying to detect the block type then detect which number it would be from the config, then return the amt with that number if that makes since
yeah that should work but its probs not the best way to do it
is there a better way without doing like 100 lines lol
with yml you can have children varibles
so
clicker1: "white_concrete"
- amt: 1
for example
or even better
white_concrete: 1
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/AttributeModifier.Operation.html#ADD_SCALAR
What does ADD_SCALAR mean
declaration: package: org.bukkit.attribute, class: AttributeModifier, enum: Operation
what even is a scalar
then you can just get the Material name
private Integer getint(Material o) {
String name = //Whatever to get material name
return getConfig().getInt(name);
}
multiplies the value i believe
alright
i might be wrong though
for the mostpart a scalar is a float that multiplies a value
also is AttributeModifier a good use case for this scenario:
A player who changes the movement speed of a horse by right clicking a stick to cycle between 4 different speeds (Walk, Trot, Canter, Gallop)
hey guys I'm currently working on a plugin, I had the first class working but when I made a new class and started working on it my initial code just stopped working. Any idea why's that? I'm using these for my listeners in each class: ```cpp
getServer().getPluginManager().registerEvents(new Knockback(this), this);
getServer().getPluginManager().registerEvents(new DoubleJump(this), this);
main ^
yeah i think that would be a good usecase
alright ty
can you show the listener classes
sure
public class Knockback implements Listener {
private MCBrawl plugin;
private Map<UUID,Double> heatMap = new HashMap<>();
public Knockback(MCBrawl plugin) {
this.plugin = plugin;
}
@EventHandler
public void onPlayerHitPlayer(EntityDamageByEntityEvent event) {
if (event.getDamager() instanceof Player && event.getEntity() instanceof Player) {
double heatValue = heatMap.get(event.getEntity().getUniqueId());
heatValue++;
heatMap.put(event.getEntity().getUniqueId(), heatValue);
LivingEntity damaged = (LivingEntity) event.getEntity();
LivingEntity damager = (LivingEntity) event.getDamager();
Vector damagedV = damaged.getLocation().toVector();
Vector damagerV = damager.getLocation().toVector();
Vector velocity = damagedV.subtract(damagerV).normalize().multiply(heatValue);
damaged.setVelocity(velocity);
if (heatValue >= 7) {
Bukkit.getScheduler().runTaskLater(plugin, () -> {
damaged.setVelocity(velocity.clone());
}, 6);
if (heatValue >= 10) {
Bukkit.getScheduler().runTaskLater(plugin, () -> {
damaged.setVelocity(velocity.clone());
}, 2);
if (heatValue >= 15) {
Bukkit.getScheduler().runTaskLater(plugin, () -> {
damaged.setVelocity(velocity.clone());
}, 3);
}
}
}
}
}
@EventHandler
public void onJoin(PlayerJoinEvent event2) {
heatMap.put(event2.getPlayer().getUniqueId(), 0.0);
}
@EventHandler
public void onDeath(PlayerDeathEvent event3) {
heatMap.put(event3.getEntity().getUniqueId(), 0.0);
}
}```
and its just not calling the events?
that's the initial one that stopped working and can't get it back to work
I literally even erased all the code I wrote after it and it still won't work
I gotta start using github for shit like that
GitHub ≠ git
how are you verifying that its not being called?
I'm not sure on how I can check that, but the plugin is no longer working
just do a printline on one of the events
if its being printed, the event is being called
if not it means it's not being registered correctly
sure lemme try that and get back to ya
then that would mean the problem is in my implementation
with a print statement too?
so smth like that? cpp System.out.println("MCBrawl loaded successfully!"); getServer().getPluginManager().registerEvents(new Knockback(this), this); System.out.println("Register events working 1"); getServer().getPluginManager().registerEvents(new DoubleJump(this), this); System.out.println("Register events working 2");
yeah
that's my main ```cpp
package me.r3dx.mcbrawl;
import org.bukkit.plugin.java.JavaPlugin;
public final class MCBrawl extends JavaPlugin {
@Override
public void onEnable() {
System.out.println("MCBrawl loaded successfully!");
getServer().getPluginManager().registerEvents(new Knockback(this), this);
System.out.println("Register events working 1");
getServer().getPluginManager().registerEvents(new DoubleJump(this), this);
System.out.println("Register events working 2");
}
@Override
public void onDisable() {
System.out.println("MCBrawl terminated successfully!");
}
}
don't see why that wouldnt work
are you getting any errors when loading
its showing up on /plugins right?
lemme check
where can I find resources on getting started making a plugin for the latest version of minecraft
I think it has to do with 1.19, it stopped working right after it released
theres a few resources on youtube. They are probably not up to date but most of the api applies to current versions
get familiar with Java, watch tutorials, and make the documentation your bread and butter
do you know of any specific ones that are good?
if thats the case you should be getting an error in console when starting the server up
NAh not really sorry
yep I'm familiar with java already and I played around with plugin development a few years back but I want to get back into it
I'm not using it tho, I'm still on 1.18.2
most important thing is that you work on your own project, that's how I learned. if you can't think of anything try to do the ones that famous youtuber's do, they are simple and fun to play
like random block drops
dream typpa beat
launching mc
yeah I have an idea of what I want to make even though it's a bit complex
plan something unachievable
the more complex the more fun and the more you'll learn
if you dont know what you have to do, you will learn the most
I want to make use of something called multipaper so I can have hundreds of players in one map
so I need to develop something specifically to work with multipaper
oh multiverses plugin typpa beat?
@EventHandler
public void clicker(PlayerInteractEvent event) {
Player p = event.getPlayer();
Block b = event.getClickedBlock();
UUID u = p.getPlayer().getUniqueId();
Integer bal = Balance.getOrDefault(u, 0);
Integer clicks = Clicks.getOrDefault(u, 0);
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
Material o = b.getType();
b.setType(Material.OBSIDIAN);
Clicks.put(u, +1);
Integer give = getint(o);
Integer bal2 = bal+give;
String msg = color("&f&l+ &a$") + bal2 + " &f&l+ &e" + Clicks.get(u);
p.sendMessage(msg);
p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(msg));
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
public void run() {
b.setType(o);
}
}, (3*20));
return;
}
}```
**why isn't it registering the click event?**
?paste
multiverses is multiple worlds on one server right?
I want to work on smth like that too soon
where are you registering it
yup
on enable
can you show me that code
multipaper is the opposite, it's multiple servers sharing the load of one world
@Override
public void onEnable() {
Bukkit.getPluginManager().registerEvents(this, this);
getConfig().options();
saveDefaultConfig();
}```
similar to mammoth, i made something similar my self good fun
@drowsy helm nope not showing /pl
and its in the same class right
yeah I checked out mammoth unfortunately it's discontinued
mammoth recommended me to multipaper so that's what I'm going to try to use
yes
check your console logs again you should be getting an error
oh really? I thought it was still going
I think it only discontinued recently
how are you sure its not working?
im clickin the block and nuthin is happening
put a print line in the first line of the event and see if it prints
see if its firing at all
and is your class implementing Listener?
yep
do you know what hypixel and similar servers use to create a bunch of different lobbies and minigames in one server? is that the multiverses plugin or something similar?
package lunarcore.core;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.HashMap;
import java.util.UUID;
public final class clickers extends JavaPlugin implements Listener {
@Override
public void onEnable() {
Bukkit.getPluginManager().registerEvents(this, this);
getConfig().options();
saveDefaultConfig();
}
public String color(String text) {
return ChatColor.translateAlternateColorCodes('&', text);
}
@EventHandler
public void clicker(PlayerInteractEvent event) {
Player p = event.getPlayer();
p.sendMessage("testing");
Block b = event.getClickedBlock();
UUID u = p.getPlayer().getUniqueId();
Integer bal = Balance.getOrDefault(u, 0);
Integer clicks = Clicks.getOrDefault(u, 0);
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
Material o = b.getType();
b.setType(Material.OBSIDIAN);
Clicks.put(u, +1);
Integer give = getint(o);
Integer bal2 = bal+give;
String msg = color("&f&l+ &a$") + bal2 + " &f&l+ &e" + Clicks.get(u);
p.sendMessage(msg);
p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(msg));
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
public void run() {
b.setType(o);
}
}, (3*20));
return;
}
}
private Integer getint(Material o) {
int i = 1;
int give = 0;
while(i < 16) {
if(o == Material.matchMaterial(getConfig().getString("clicker" + i).toUpperCase())) {
give = getConfig().getInt("amt" + i);
}
i++;
}
return give;
}
public static HashMap<UUID, Integer> Balance = new HashMap();
public static HashMap<UUID, Integer> Clicks = new HashMap();
}```
bungeecord
no errors I could see
hypixel actually manually deploys their server instances
servers like minehut use kubernetes
and a heavily modified bungeecord
what does it mean to manually deploy your server instances?
im not too sure at this point
like what does it mean to "deploy" them
yea, idk what's wrong it SHOULD work
it's like I don't even have the plugin in the folder
maybe decompile it and see if theres anything in the jar
how does bungeecord do it?
bungeecord is whats called a proxy
all it does is take one ip and spread packets to different servers
I will check my maven repos first
proxies connect multiple servers together and can connect a player between each server
i thinkk
yeah correct
are there disadvantages to using proxies over the way hypixel does it
wait so how is it different?
proxies and server instancing are two different things
basically say you buy 3 servers, you can configure them in a single bungeecord server (a proxy / hub server,) and then you can do /server (server name) once it's configured to connect.
proxies are what manages traffic between servers, instancing is deciding what servers are in that network
so adding/removing servers from being managed by the proxy?
yeah exactly
all the proxy does is make it so i can connect to all those servers through 1 ip
so just what servers are currently active and inactive
yeah exactly
woah that's weird, I found that in my maven repo <java.version>1.8</java.version>
buoobuoo any idea?
should this be 18 as in Java 18 or 1.18.2 as in mc 1.18.2
have you tried doing println on the event
and seeing if its firing at all
nah 1.8 is fine
you should probably upgrade but its still fine to run with
it's the java release, not the mc version
what's that then?
^ java version
what if you wanted to travel between two different worlds that each take advantage of multipaper
isn't Java 18 out now?
what would that hierarchy look like
yea
i'd personally use 18 for 1.19 or 17 for 1.18
it went in console
like a proxy that controls multiple other proxies?
I will change it to 17 and see if anything changes
I'm not too sure how multipaper works exactly but all it does is crates fake players on my server that im on to replicate other players
they are not technically there
yeah like npc characters that replicate the movements of players in other servers
yeah
yep i've seen that in a few different games
its just good because you are splitting actual game calculations to different servers
is this the right version to use for 1.18.2 ? cpp <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.18.2-R0.1-SNAPSHOT</version>
all the server has to do is handle packets
it should be fine, if it weren't you would be getting an error in console
so its firing then, meaning your event logic isn't correct somewhere
would plugins like mammoth and multipaper have issues with projectiles and other physics calculations
or is it fine
if they are coded well they shouldn't have issues
that's what I was thinking
but there is always a latency issue that will occur naturally
I have heard about issues with projectiles and such on servers that use similar architecture
thats why mammoth never implemented pvp im pretty sure
oh it didn't?
I might be wrong but in the early stages they didnt
hey buoo mind if I send you console ss to see if you can see anything that I'm not seeing?
sure
I definitely cannot go without pvp in what I am trying to use multipaper for so I hope it doesn't have the same problem
on my rpg server i split each world into a different server
As my server runs, it slowly uses more and more RAM, does that mean I have a memory leak, or...?
and each town i did something called server meshing
https://prnt.sc/Z4lasnbYtiL7 @drowsy helm
yep
how does that work?
once they enter an area, put them on another server
https://prnt.sc/5H5yPMWasLJ5 @drowsy helm
oh yeah that's easy
Damn aiight
did you do server meshing all over the server?
just use a profiler
was it all location based?
https://prnt.sc/08avURVWpt4C @drowsy helm
yeah im on it
"unsupported API version: 1.18.2"
so for each major town i made it's own server instance and major pvp zones i made it's own
and each town had a different amount of instances depending on the player capacity
yeah just update both to latest 1.18.2
should be fine
it's already 1.18.2
latest 1.18.2 though?
and the version your server is running
that sort of location based approach probably wouldn't work for me because my server won't have designated zones in the way yours does, it's more of a vanilla minecraft approach so players will be all over the place and should be able to pvp with someone as long as they can each see each other
do you have any suggestions for how I should structure that
tahts sorta how mine was structured
will it be very pvp centric?
if so probably your best option is to instance per world
so 1 instance for nether, 1 for overworld, and 1 for end
thats probs the best you can do
yes, pvp will be the main focus
idk if that would work for me if I want a larger worl
world
also that's a good point to make I didn't even consider the other dimensions
yeah it atleast spreads the load by 3
but as for regular survival you don't really have much options
if you're a REALLY good coder you could implement server meshing for each few hundred chunks
but then again you can run into issues
idk if server meshing based on location is a good approach for me
yeah probably not
whats your projected player count?
probably the biggest issue with pvp survival is that you can't vertically scale, you're limited to one server
hopefully an ever increasing amount if my server doesn't crash and burn lol
I want to be able to scale as much as I need to
@drowsy helm https://prnt.sc/_tR6apUGcnvM
lesgo
I just deleted the api-version line from my plugin.yml file and it works fine now
than you very much for the help, I really appreciate it <3
your best option might just be have multiple survival servers
but that splits your community
yeah that's not what I want
nws 🙂
otherwise I wouldn't use multipaper at all and would just make multiple survival servers
what appeals to me about multipaper is that i want to have hundreds of players all fighting and competing in one big world
yeah i dont really think you can. Like i've seen survival servers with 300+ players
but they have some serious fucking server power
yeah but multipaper's whole purpose is to spread the load
mammoth could host 1000 players in one area in the example I saw
yeah
if it was non pvp, you could easily do that
im not entire sure on the latency though
what complicates it when pvp is involved
if its two servers on the same network, i dont think it would honestly be that bad
what do you mean
like say you had 2 nodes on multipaper if they are on the same network the latency would not be bad for pvp
oh I was just using 2 as an example
I would probably have many more as the server expands
yeah either way if all of them are on the same lan the latency would be minimal
I am having the world's most specific issue, I was trying to put a schematic file in the resources of my plugin but compiling the plugin makes the gson compression break on the schematic, rendering it unusable. Has anyone else had this issue?
oh sup magma havent seen you in a while
how might I break up the load if not by set locations
aside from multipaper, nothing really
multipaper ise more designed for mmo rpgs though
not survival
does multipaper only let you break up servers by set locations?
I'm trying to figure out what way I should break up the load
yeah im trying to say for survival there is none
thats why you dont see huge survival servers
logistically there isnt a way without big latency issues or other inconveniences
i would think this would be a solved problem considering how many massive mmos use similar technology though
actual mmos
actual modern mmos do layering these days
most mmos use location based server meshing
all of the minecraft mmos i've seen have been confined to a set area
what if your mmo isn't confined to a small area
I just don't think location based server meshing is the only way to go about things
could you do like region based server meshing or something?
wdym region based?
like all players in a certain region are managed by the same server
or multiple servers dedicated to that region
what if you made a system that puts players onto the same server the moment they start to engage in combat
so you should only set what server a player is on when they first join?
how did you avoid loading screens when moving to different spots on your map
or did you?
i didnt, i just minimised them as much as possible
there was still loading but only like 2-3 seconds
but that took a lot of server jar modification
well I don't know what to do if there is no reasonable way to dynamically adjust what server a player is on without annoying loading screens
yeah for survival there just isnt
I'm determined to find a way to make it work
aside from dimension instances, thats it
hey @drowsy helm quick question, in configs how do you get the children thingys you were talkin abt?
like with the "- " 's
what would the path be ^^
a:
- b: test
would be
a.b
ignore my spacing in the yml its probably off
yeah it would be a.b
node1:
- node2:
- node3:
node1.node2.node3 to get the last node
so when a player is sent to another server you have the same loading times you would as if you were actually joining another completely seperate minecraft server
yeah
no way to avoid it
in mmo games when you travel between different areas do you typically have an accompanying loading screen
I wouldn't think so right
so minecraft's server code needs to change in order for this to be in any way possible
yeah pretty much
I ran a memory analysis on my plugin, and there's nothing really concerning... the program says the PlayerChunkMap and ChunkProviderServer are "leading suspects," but obviously I don't think that's the issue. And in terms of objects of my classes, there's only an amount of each that there should be... so why would I keep gaining memory usage in my server over time?
do you see any spikes during particular events?
No, it just slowly increases until it maxes out at the 8gigs I assigned...
e.g player joining, leaving, breaking blocks, typing command etc
do you know what specifically has to change in minecraft's server code to accomplish zero loading screens between interconnected servers
if its over time i would check out your runnables
make sure you arent holding hard references to Player
no not really. It's not open source so we can't tell.
and i really doubt microsoft want's to remake the notchian server any time soon
if the two servers are physically very close to one another will there be a lot of latency between them?
this is my only repeating task
if they are on the same network the latency should be really low
pvp would probably work if all of your servers are on the same network then right
without the need for either of the players' server to change or anything
try and increase how fast it is and see if your memory goes up faster
kk
yeah it should not sure how well multipaper handles it though
oh so this can be a lot simpler than I thought I just need to ensure that servers have very minimal latency
isn't latency an issue in many individual servers with pvp anyways?
yeah exactly, as long as the servers are on the same lan, a modern datacenter should not have much latency
like latency between players
yeah, but it just adds on top
yeah definitely
but that's the challenge that comes with this kind of scaling
I think this idea is pretty feasible
tell me how it goes
actually I still don't understand how to fix the issue
I obviously still need to update the players' server as they move around still
but I cannot have any loading screens or anything of that nature
that would be terrible in a competitive pvp environment
multipaper does all of that for you
yeah but with significant drawbacks to the actual gameplay
or were you planning on making your own implementation
I'm not sure
like constant loading screens as you move around
wait
that wouldn't be a problem nevermind
I fried my brain talking about this so much lol it should be fine
as long as the player isn't changing their server it should be fine
I think region based server meshing would work fine
and makes the most sense for what I want to do
i mean logically it would be best aswell
players on at the same time are most likely in the same timezone
yeah exactly
but your proxy would still bottleneck it
you can only have 1 proxy, if the proxy is in the US and say your node is in Australia, the people on the Australian nodes still have to go through the US proxy
the proxy is what the player connects to in order to join the server right?
so every action would have to go through the proxy?
yeah
That didn't do anything... I have no clue anymore lol
No it's just a bingo game I made for practice
send through the repo
@drowsy helmmay i send you an image in your direct messages?