#help-development

1 messages · Page 935 of 1

young knoll
#

Registry.SOUNDS.get or match

mighty gazelle
#

How can I start Discord bots with a Minecraft Plugin?

modern plank
#

what the difference between the 2

mighty gazelle
#

ok

young knoll
#

get takes a namespaced key directly

#

match will try and find a match from a string

mighty gazelle
rapid vigil
mighty gazelle
#

Wait I will see you the err

rapid vigil
#

it wont work if you dont set it up correctly

remote swallow
#

you arent shading it

rapid vigil
remote swallow
#

setup the shadow plugin then

mighty gazelle
remote swallow
#

?paste your build.gradle

undone axleBOT
remote swallow
#

you didnt read it at all you just blindly copied

#

also why do you have 4 different spigot api versions

rapid vigil
#

☠️

#

ye bully me for using the crossbones one

shadow night
rapid vigil
remote swallow
#

you create modules

#

and need spigot not spigot-api

shadow night
#

then make modules

rapid vigil
#

oops

icy beacon
#

Looks like an off-by-one error maybe

#

Like you can't access array[27] if the array is of length 27 because arrays are 0 indexed

#

Analogous with lists etc

#

Or you're iterating with a broken condition

#

Didn't read the code so idk

cinder abyss
#

Hello, how can I check if a player can see an entity? (based on FOV)

#

I'll use the max one

#

but I only know the distance between the entity and the player 🤔

zealous osprey
#

isn't the area you ca see also affected by the size of the players monitor?

cinder abyss
#

I check, and yeah it's a little affect

#

but who in the world play like that?

zealous osprey
cinder abyss
#

So, I should check if the entity is in the fov area?

#

yeah please x)

rough ibex
#

You can just limit it to quake pro

cinder abyss
#

oh perfect thanks

#

...and check if it's higher than 55 deg

#

okay thanks

#

okay thanks

#

I learned sinus, cosinus and tangent this year so scalar products...

eternal oxide
#

what?

shadow night
#

what

ivory sleet
#

But obv it can be used in more complex stuff and some theorems make complicated usages of it

cinder abyss
#

hmm

#

what is this crossed 0?

shadow night
#

isn't that a theta

#

θ

ivory sleet
#

angle between the two vectors right?

#

In radians

cinder abyss
#

humm

#

okay, according to google it's for an angle

ivory sleet
cinder abyss
#

okay thanks

#

how can I do a scalar product in programmation? I don't even know how to do it on a paper...

#

is there an equivalent or something like that? x)

#

x)

ivory sleet
#

paul

#

if i have two vectors

cinder abyss
#

so Vector(x).multiply(y)?

ivory sleet
#

you take each component

#

And multiple it with each other

#

usually we name it the dot product or sth like that

cinder abyss
#

oh okay

#

x.getX() * y.getX() and x.getY() * y.getY() ?

ivory sleet
#

for instance x_1 * x_2 + y_1 * y_2 + z_1 * z_2

#

if A = (x_1, y_1, z_1) and B = (x_2, y_2, z_2)

cinder abyss
#

okay so

#
one.getX() * playerDir.getX() + one.getY() * playerDir.getY();```
ivory sleet
#

I think bukkit vectors support dot product

cinder abyss
#

(I named one entity.getLocation().toVector().subtract(player.getEyeLocation().toVector()).normalize(); and playerDir player.getEyeLocation().getDirection();)

#

hmm

echo basalt
#

dot product is goated

cinder abyss
ivory sleet
#

Ah yea, well ofc then yea

cinder abyss
#

If I setY of both vector to the same value, I get the 2D angle, right?

#

...

#

+0?

#

but I'll be good?

#
Vector one = entity.getLocation().toVector().subtract(player.getEyeLocation().toVector()).normalize();
one.setY(0);
Vector playerDir = player.getEyeLocation().getDirection();
playerDir.setY(0);

double result = one.dot(playerDir);```
umbral ridge
#

hey

cinder abyss
#

or I can just pickup the function system

ivory sleet
#

well you’re taking the dot product, u just wna ignore the z components

ivory sleet
#

So a.dot(b) might not be as useful

orchid trout
#

everything works but every time someone clicks its just an error

umbral ridge
#

when you do /plugins in the console or anywhere, why does it show "Bukkit Plugins:"? Could you have any other plugins? Not Bukkit?

rough ibex
#

Are you running paper

umbral ridge
#

I am paper

rough ibex
#

then yes

#

there are 'paper plugins'

umbral ridge
#

Then something isn't showing up properly

#

because I have paper plugins too

cinder abyss
#

okay thanks

umbral ridge
#

and all are listed under Bukkit

#

XD

remote swallow
#

for it to be a paper plugin it needs a paper-plugin.yml

umbral ridge
#

Ohh I see alright

cinder abyss
#

I should compare with 110/2?

#

the product of the modulo of each vector using what?

#

I have a problem: X and Y of what, where? 🥺

#

I was wrong, module for each vector but how?

#

scalar / (v1.x % v2.x) + (v1.z % v2.z) ?

#

here

#

I haven't learned using vector, how should I know that??

#

"the length of the vector" hmm

#

Vector.length okay

rough ibex
#

he means the modulus

#

the magnitude

cinder abyss
#

oh okay

rough ibex
#

yeah he's using the wrong words

cinder abyss
#

😭

#

Math.sqrt(this.x^2 + this.z^2);?

#

literally pythagore

rough ibex
#

keep in mind ^ is bitwise

#

You want **

cinder abyss
#

hmm

rough ibex
#

hes learning

#

dont skull react him

cinder abyss
#

what is the difference?

rough ibex
#

oh yes sorry

cinder abyss
#

but what is the difference between both?

#

yeah?

#

oh okay I see

rough ibex
#

well

cinder abyss
#

Which vector should I use?

#

oh forget

#

with both

rough ibex
#

there's no reason you can't apply bitwise on fp but there's no reason to and you shouldn't

cinder abyss
#

yeah

#

scalar / (Math.sqrt(Math.pow(one.getX(), 2) + Math.pow(one.getY(), 2)) + Math.sqrt(Math.pow(playerDir.getX(), 2) + Math.pow(playerDir.getY(), 2)));

#

yeah, really

lost matrix
#

Math.sqrt(Math.pow(playerDir.getX(), 2)
Hmm?

#

Ah wait didnt see the other brackets

#

Is this just the lenght of a vector? Why dont you use joml for this?

cinder abyss
#

It returns true even if I'm not seeing the entity...```java
public static boolean canPlayersSee(Collection<? extends Player> players, Entity entity){
for(Player player : players){
Vector one = entity.getLocation().toVector().subtract(player.getEyeLocation().toVector()).normalize();
Vector playerDir = player.getEyeLocation().getDirection();

      double scalar = (one.getX() * playerDir.getX()) + (one.getZ() * playerDir.getZ());

      double ee = scalar / (Math.sqrt(Math.pow(one.getX(), 2) + Math.pow(one.getY(), 2)) + Math.sqrt(Math.pow(playerDir.getX(), 2) + Math.pow(playerDir.getY(), 2)));

      if(ee < 55){
          return true;
      }
  }
  return false;

}```

cinder abyss
#

"the magnitude in a 2D plan"

lost matrix
#

joml has 2D vectors iirc

cinder abyss
#

💀

#

So I could just use that...

lost matrix
#

But why 2D? If the player looks up or down he will also not be able to see it

cinder abyss
#

but let's see that a bit later

#

I don't know what is radians, but I'll check for that

lost matrix
#

Just check if the angle between the players facing and spaning is > pi

cinder abyss
#

what is "is"? what is "pi"

lost matrix
#

brb ill restart and show an example

cinder abyss
#

oh okay

#

I thought of pi but I wasn't sure if it was that

rapid vigil
#

Marco why cant u write the full sentence first time -_-

cinder abyss
#

bro I said I learned sinus, cosinus and tangeant this year

#

I never used radians in my life

#

or is this an english-specific thing?

rough ibex
#

I don't think so

cinder abyss
#

I never used sin in java

#

Is that a sin? (yeah, it's a joke, you're not obliged to laugh)

rough ibex
#

Here are the docs

#

?

shadow night
#

I thought you don't sin

cinder abyss
#

hum okay I think I can do that

rough ibex
#

I'm not giving them java 8

cinder abyss
#

(sorry :3)

#

what the hell

#

(It was not intented, I promise)

rough ibex
#

|sin(x)|

#

he absolutely sins

cinder abyss
lost matrix
#
  public boolean anyOneLookingAt(Collection<Player> players, Entity entity) {
    return players.stream().anyMatch(player -> isLookingInDirection(player, entity));
  }
  
  public boolean allLookingAt(Collection<Player> players, Entity entity) {
    return players.stream().allMatch(player -> isLookingInDirection(player, entity));
  }

  public boolean isLookingInDirection(Player player, Entity entity) {
    Location playerEyes = player.getEyeLocation();
    Location entityLocation = entity.getLocation();
    Vector toEntity = entityLocation.toVector().subtract(playerEyes.toVector());
    Vector playerDirection = playerEyes.getDirection();
    double angle = playerDirection.angle(toEntity);
    return angle < Math.PI / 2; // 90 degrees because 2 * PI == 360 degrees
  }
shadow night
#

Why does that look like somebody cut sins balls

rough ibex
#

sin^2(x) + cos^2(x) = 1

cinder abyss
#

now I understand the code x)

echo basalt
#

Doesn't angle just multiply the dot product by something?

cinder abyss
cinder abyss
lilac dagger
lost matrix
lilac dagger
#

i see

lost matrix
#

But with 100° or 110° you might be pretty safe unless you are standing right next to it and bouncing it with your side

cinder abyss
#

hmm okay thanks it's perfect

#

I'll be able to impress my math teacher tomorrow x)

#

IT'S PERFECTLY WORKING THANKS

#

you're now...

quaint mantle
#

has anybody ever faced this error in intellij idea when trying to remove a jar dependency

remote swallow
#

remove it in maven

cinder abyss
quaint mantle
remote swallow
#

its in pom.xml

quaint mantle
lost matrix
#

Doesnt citizens have a maven resource??

quaint mantle
#

im trying to remove a jar of an api of mine

#

not citizens

#

getting rid of it works though

lost matrix
#

You simply shouldnt use jar dependencies with maven, ever

orchid trout
#

permissionattachmentinfo holds a single permission, value and a permissionattachment and permissionattachment holds a map of permissions and booleans

#

someone explain

slender elbow
#

no :^)

orchid trout
#

i want to clear all permissions

#

but

#

i dont undesrtnatnd

mortal hare
#

sudo!!!

#

i havent been so much happier for an elevation command

dawn flower
#

how possible is it to listen for packets without nms

#

using netty or smth

mortal hare
#

protocollib

dawn flower
#

is there a way to do it wihtout relying on another plugins or shading protocollib cuz that causes issues

chrome beacon
#

If you want to shade use PacketEvents

remote swallow
#

packet events

mortal hare
#

or TinyProtocol?

dawn flower
#

ok

young knoll
#

Although technically packet events recommends you don't shade :p

blazing ocean
young knoll
#

I agree with the awesome part

#

Much easier to use than plib

rapid vigil
#

what is PacketEvents

proud badge
#

is stuff the player types into the chat box sent to the server?

young knoll
#

No

#

It was for one whole version, kek

proud badge
#

I remember some plugins have typing sound effects when a player was typing

#

so I assumed it did

clever lantern
#

any resource to learn about vectors etc. ?

#

like a comprehensive one

blazing ocean
proud badge
#

whats the point of extends Object

#

doesnt every class extend object

young knoll
#

Yes

proud badge
#

then whats the point of it

blazing ocean
#

theres none

young knoll
#

It’s implicitly added if the class doesn’t extend anything else

blazing ocean
#

why would you do that

rapid vigil
proud badge
young knoll
#

Javadocs always show it

blazing ocean
rapid vigil
empty temple
#

some one help mee

blazing ocean
#

?paste

undone axleBOT
empty temple
#

i need to turn of 2 player's collding each other

empty temple
blazing ocean
empty temple
#

😒

#

broooooo .... i just need to know is there any other shorter version of this code to prevent player's coliding each other ????

young knoll
#

Get hitbox of player A and check if it overlaps hitbox of player B

proud badge
#

looping through every online player everytime any player moves might be performance consuming

young knoll
#

Or just add them to a scoreboard team and disable collision

empty temple
proud badge
#

dk

worthy yarrow
#
private void automatedBackupConfig() {
        Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
            LocalDateTime now = LocalDateTime.now();
            String backupFileName = "backup_" + DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss").format(now) + ".yml";
            File backupFile = new File(plugin.getDataFolder(), backupFileName);

            try {
                Files.copy(new File(plugin.getDataFolder(), "config.yml").toPath(), backupFile.toPath());
                plugin.getLogger().log(Level.INFO, "Automated backup created: " + backupFileName);
            } catch (IOException error) {
                plugin.getLogger().log(Level.SEVERE, "Failed to create automated backup: " + error.getMessage());
            }
        });
    }```

So uh is this a valid way of going about automated backups from plugin startup? I was thinking I'll probably run it every 5 mins or so also it might be wise to overwrite previous backup perhaps? Thoughts + notes please... it's commented out rn so don't judge the current implementation ❤️
young knoll
#

You should absolutely limit the number of backups kept at once

worthy yarrow
#

For sure

sullen marlin
#

Is 5 minutes really a backup

young knoll
#

No one wants 288 files after 24 hours :=

worthy yarrow
#

Yeah

sullen marlin
#

By the time you need it that was probably 1000 "backups" ago

worthy yarrow
#

So then I guess I could keep it and run it every day or perhaps just keep my other method (not automated), I was just trying to decide if it'd be better to have it automated or not

#
private void backupConfig(JavaPlugin plugin) {
        File configFile = new File(plugin.getDataFolder(), "config.yml");
        File backupFile = new File(plugin.getDataFolder(), "backup-config.yml");
        try {
            Files.copy(configFile.toPath(), backupFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
            plugin.getLogger().log(Level.INFO, "Configuration backup created successfully.");
        } catch (IOException e) {
            plugin.getLogger().log(Level.SEVERE, "Failed to create configuration backup: " + e.getMessage());
        }
    }```

I think I am going to just keep this, and run it every time the plugin disables? Sounds solid to me but if anyone has other thoughts, by all means please let me know.
young knoll
#

Seems fine

#

That’s what Mojang does

#

They have various stuff like player.dat-old

sand spire
worthy yarrow
#

Considering it's a dynamic kits system the automated backup was kinda dumb tbf

acoustic pendant
#

Is there a resource that shows how to notify users when a new version of the plugins has been posted? I don't find it 😦

worthy yarrow
acoustic pendant
#

thanks!

worthy yarrow
#

?paste

undone axleBOT
worthy yarrow
#

https://paste.md-5.net/yisonitalu.js

Ehhhh am I doing this right? The kit structure that outputs to the config.yml looks correct as far as I can tell, however I haven't yet implemented kit configuration capabilities yet so it just looks like:

kits:
  TestKit:
    effects: []
    cost: 0
    contents: []
    name: TestKit
    cooldown: 0
    permission: null
#

Disregard the effects, I removed all that logic

young knoll
#

Looks fine

#

I would consider a file per kit perhaps

worthy yarrow
#

yeah that'd probably be better

#

I'm not sure how to handle the cooldowns... I should probably handle them internally correct? Or is there perhaps an easier way

lost matrix
#

Cooldowns should always be done with timestamps

worthy yarrow
#

Does a flat file + modifications based on kit interactions work for that matter?

lost matrix
#

Idk what "modifications based on kit interactions" means in this context

worthy yarrow
#

As in when a player claims a kit

#

Player claims a kit, record the timestamp, when they try to use the kit again check against the timestamp to see if the cooldown is expired?

lost matrix
#

But then the kit doesnt only have one cooldown. It has one cooldown per player.

worthy yarrow
#

Hmm

#

Well the cooldown in terms of the kit should be the global cooldown for all players allowed to use it

lost matrix
#

So if one player claims a kit, then nobody else can claim it for a while?

worthy yarrow
#

Ah ok

#

Vise versa is what I'm trying to figure out

lost matrix
#

Now i am completely confused what that is supposed to mean. A kit claims a player?

proud badge
#

Whats the difference between Material.getHardness() and Material.getBlastResistance()

young knoll
#

Hardness is about how long it takes to break

proud badge
#

Ah

#

I see, thanks

#

i assume this is in seconds

worthy yarrow
#

So handle cooldowns per player, based on the configured cooldown of the kit... meaning: TestKit has a cooldown of 10 mins, when a player has claimed that kit, they cant use it for 10 minutes. Sorry I am quite cooked haha

young knoll
#

No it’s just a magic number

#

The actual breaking time is based on some maths

lost matrix
worthy yarrow
#

Ok cool then that's next on the list

proud badge
#

will addEnchantment on an item that already has the same enchantment override the old one?

worthy yarrow
lost matrix
#

Not in the mood to look at a kit plugin rn tbh PES2_Uhm

worthy yarrow
#

Haha no worries, this is the current structure... so i don't blame you

cinder abyss
#

Hello, I've got a big problem with my code, the more leaves there is, the more the server main thread stop working when doing iteration, is there a way to avoid that?
https://paste.md-5.net/ujisodoled.java

lost matrix
#

What are you trying to do?

#

Im already seeing a ton of performance killers here

cinder abyss
# lost matrix What are you trying to do?

For the first task, I want to get some leaves in a radius of 10*8*10 and have 1/4 chance to create a leaf below the leaves block.
For the second one, I check if I need to remove the leaf from the list and delete it, if not then I teleport it to the next location

cinder abyss
#

Do you have some ideas to optimize my code?

lost matrix
#

Yes, tons. But first i need to understand your goal.

#

Why do you use blocks for this and not a FallingBlock entity?

cinder abyss
echo basalt
#

What if you pre-compiled the entire path for each leaf

cinder abyss
#

(idk if it's possible with FallingBlock without resource pack)

echo basalt
#

And then before teleporting just make it check

cinder abyss
#

It could change

#

if someone break a block

echo basalt
#

How come

cinder abyss
#

and I never made something like that 🤔

#

I have an idea in my head but well, it'll use a for loop

#

is there a way to avoid for loop?

lost matrix
#

I still dont understand what you are trying to achieve...
Just want to simulate falling leafs in the wind?

young knoll
#

They are using text displays with a Unicode leaf character

lost matrix
#

But setting blocks will prevent players from moving, stop projectiles and be a hinderance all the time.

young knoll
#

It’s a text display

lost matrix
#

Ah

young knoll
#

They work pretty well for custom particles

cinder abyss
#

but so, first, is there a way to make a FallingBlock have the same look as the actual TextDisplay?

young knoll
#

No

lost matrix
#

Nope, nevermind then. TextDisplay is the way to go.

cinder abyss
#

oh okay

#

so, which optimizations should I do?

cinder abyss
lost matrix
#

Step one for me would be to create a FallingLeaf class which can be ticked.

public class FallingLeaf {

  private final TextDisplay textDisplay;

  public FallingLeaf(TextDisplay textDisplay) {
    this.textDisplay = textDisplay;
  }

  public void tick() {

  }

  public boolean isDone() {

  }

  public void remove() {
    this.textDisplay.remove();
  }

}

And then you can simply scrap all your PDC nonsense because that its way slower than just having a LinkedList<FallingLeaf> where you call

leafList.removeIf(leaf -> {
  leaf.tick();
  if(leaf.isDone()) {
    leaf.remove();
    return true;
  } else {
    return false;
  }
});

Then 100% dont use a SaveRandom. You dont need safe randomness.

cinder abyss
#

okay

#

And with that no longer slows when iterating?

lost matrix
#
if(ThreadLocalRandom.current().nextDouble() < 0.25) {
  // Do something with a 25% chance
}

This should be your go-to for chances

pallid oxide
#

u gonna need to keep leaf order?

cinder abyss
pallid oxide
#

oh the idea sounds cool

cinder abyss
#

they gonna be all ticked

cinder abyss
pallid oxide
#

wouldnt arraylist be better than linked

cinder abyss
#

but with spigot limitations, and my own limitations x)

cinder abyss
lost matrix
pallid oxide
#

most often arraylist is better but trying to understand the reasoning here, ur probably right just interested

lost matrix
#

LinkedList has the lowest CPU and memory footprint for removal while iterating.
LinkedList is an actual rubbish collection, but it outperforms anything else for removal during an iteration. (So basically removeIf())

young knoll
#

Takes notes

pallid oxide
#

oh okay good to know that:) another rare use case to remember from linkedlist:;D

#

can someone explain displays "void setInterpolationDelay(int ticks)"
"Sets the amount of ticks before client-side interpolation will commence." English isnt my main language and translation doesnt make sense

lost matrix
young knoll
worthy yarrow
#
public class CommandManager implements CommandExecutor, TabCompleter {
    private final Map<String, CommandInterface> commands = new HashMap<>();
    private final JavaPlugin plugin;
    public CommandManager(JavaPlugin plugin) {
        this.plugin = plugin;

        commands.put("kit", new PlayerKitCommand(plugin));
        commands.put("akit", new AdminKitCommand());
        commands.put("reloadkits", new ReloadKitsCommand(plugin));
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        CommandInterface executor = commands.get(label.toLowerCase());
        if (executor != null) {
            return executor.execute(sender, label, args);
        }
        return false;
    }

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
        if ("akit".equalsIgnoreCase(command.getName()) && args.length == 1) {
            return new ArrayList<>(commands.keySet());
        } else if ("kit".equalsIgnoreCase(command.getName()) && args.length == 1) {
            return new ArrayList<>(KitManager.getInstance(plugin).getAllKits().keySet());
        }
        return Collections.emptyList();
    }

    public void registerCommands(JavaPlugin plugin) {
        Objects.requireNonNull(plugin.getCommand("kit")).setExecutor(this);
        Objects.requireNonNull(plugin.getCommand("akit")).setExecutor(this);
        Objects.requireNonNull(plugin.getCommand("reloadkits")).setExecutor(this);
        Objects.requireNonNull(plugin.getCommand("kit")).setTabCompleter(this);
        Objects.requireNonNull(plugin.getCommand("akit")).setTabCompleter(this);
        Objects.requireNonNull(plugin.getCommand("reloadkits")).setTabCompleter(this);
    }
}```
So I'm wondering if this is good implementation or not lol... Just experimenting with an expandable command system...
lost matrix
worthy yarrow
#

Should I do a paste for that?

young knoll
#

Yes

cinder abyss
worthy yarrow
#

?paste

undone axleBOT
young knoll
#

Choosing the leaf

cinder abyss
# young knoll Choosing the leaf

yeah, a really tps-suspicious method...```java
public static @Nullable List<Block> getSomeLeaves(Location location, Vector radius) {
if(location.getWorld() == null) return null;
List<Block> blocks = new ArrayList<>();

int radiusx = (int) radius.getX();
int radiusy = (int) radius.getY();
int radiusz = (int) radius.getZ();

for(int x = location.getBlockX() - radiusx; x <= location.getBlockX() + radiusx; x++) {
    for(int y = location.getBlockY() - radiusy; y <= location.getBlockY() + radiusy; y++) {
        for(int z = location.getBlockZ() - radiusz; z <= location.getBlockZ() + radiusz; z++) {
            if(SafeRandom.randBtw(1, 8) != 1) continue;
            Block block = location.getWorld().getBlockAt(x, y, z);
            if(!FallingLeaves.leavesMaterials.contains(block.getType())) continue;
            if(!block.getRelative(BlockFace.DOWN).getType().isAir()) continue;
            blocks.add(block);
        }
    }
}
return blocks;

}```

grave lake
#

Is there a free plugin similar to the MySQL Player Data Bridge plugin I live in turkey and paypal is closed in turkey I can not get the plugin can you help me

lost matrix
worthy yarrow
cinder abyss
remote swallow
#

sql nerds, is there any better way i could desgin my db that this, do note data would not be a string on both and would vary per other table

#

lookup_name would be the table name that the id is from

cinder abyss
lost matrix
#

?paste

undone axleBOT
quaint mantle
#

how can i give a player n items ?

#

like 30 breads for example

lost matrix
pallid oxide
#

1 idea could be easy for basic trees, you could scan for tree trunk block and when u find it scan upwards till u hit the leaf level and then scan to sides.

lost matrix
pallid oxide
#

but anyways probably not anymore efficient

quaint mantle
pallid oxide
#

since u gotta find the trunk anywaysXD

quaint mantle
#

but i dont know where to specify the amount of that itemstack

cinder abyss
lost matrix
cinder abyss
pallid oxide
#

for sure could take advantage of the world seed but that gonna be complicated, save/cache tons of data

young knoll
#

Would swapping the random check and valid check be any faster

lost matrix
#

Hm good point.

pallid oxide
#

ye true

lost matrix
#

I might also change
for (int y = -dy; y <= dz; y++) {
to
for (int y = 0; y <= dy; y++) {
because the player wont be able to see leaves falling below him generally.

cinder abyss
#

yeah

young knoll
#

I would personally just pick N random locations near the player and check if they are valid

#

More random but also a lot faster

cinder abyss
#

humm

lost matrix
#

It def, is. Let me cook something

cinder abyss
#

I should cache already checked locations?

cinder abyss
#

also, I don't want leafs to spawn at the feet of the player, so I can add 1 to y?

lost matrix
#
  public List<Block> fetchViableLeafBlocks(Player player, double chance, int dx, int dy, int dz) {
    List<Block> leafBlocks = new ArrayList<>();
    Block baseBlock = player.getLocation().getBlock();

    int totalBlocks = (2 * dx + 1) * dy * (2 * dz + 1);
    int probeBlockCount = (int) (totalBlocks * chance);

    ThreadLocalRandom random = ThreadLocalRandom.current();
    for (int i = 0; i < probeBlockCount; i++) {
      int rx = random.nextInt(-dx, dx + 1);
      int ry = random.nextInt(0, dy + 1);
      int rz = random.nextInt(-dz, dz + 1);

      Block probedBlock = baseBlock.getRelative(rx, ry, rz);
      if (isViableLeafBlock(probedBlock)) {
        leafBlocks.add(probedBlock);
      }
    }

    return leafBlocks;
  }

  private boolean isViableLeafBlock(Block block) {
    if (!Tag.LEAVES.isTagged(block.getType())) {
      return false;
    }
    Block below = block.getRelative(BlockFace.DOWN);
    return below.getType().isAir();
  }
cinder abyss
#

wow

#

thanks

sand spire
#

is there a way to convert a HTML color code to a ChatColor that works for minecraft?

        ItemMeta meta = stack.getItemMeta();
        if (meta.hasDisplayName()) {
            return meta.getDisplayName();
        } else {
            String color = stack.getRarity().getColor().asHexString();
            return ??? + stack.getI18NDisplayName();
        }
    }```
pallid oxide
#

ChatColor.of(r,g,b)

cinder abyss
pallid oxide
#

ye

#

i wonder how many trees would be in 10kx10k world

sand spire
# cinder abyss ChatColor.of(color)

there is no .of method for org.bukkit.ChatColor, there is valueOf but that doesn't work
java.lang.IllegalArgumentException: No enum constant org.bukkit.ChatColor.#55ffff

pallid oxide
#

what version?

sand spire
#

1.20.4

young knoll
#

Gotta use bungee ChatColor

cinder abyss
#

(and are you using net.md5's ChatColor?)

cinder abyss
young knoll
#

Yes

cinder abyss
#

nah, md5 one

young knoll
#

yes

#

That’s from bungee

cinder abyss
cinder abyss
pallid oxide
#

import net.md_5.bungee.api.ChatColor;

young knoll
#

It does say bungee :p

sand spire
#

I got these but I always use org.bukkit

cinder abyss
remote swallow
pallid oxide
#

ye thats paper:D

young knoll
#

The bungee one is basically identical

#

I pretty much never use org.Bukkit.ChatColor anymore

sand spire
#

Alright thanks

cinder abyss
#

they don't like us

#

Making everything "deprecated"

pallid oxide
#

I still dont get it why people hate legacy colors so much, componentbuilders are just so horrible to eyes, i mean they have the good sides as well but for simple stuff colorcodes are fine

cinder abyss
#

I tried paper one time, never returned since

pallid oxide
#

😂

young knoll
#

I think the main thing is the legacy converter is just a little cursed

pallid oxide
#

oh man the converters what a pain

#

i wonder if there is anyone who hasnt done their own methods to use their converters:D

rapid vigil
#

to me Paper API only has 2 useful features PlayerJumpEvent and teleportAsync, ofc i only noticed these from my small uses but it could have more useful stuff

cinder abyss
#

okay, first try of the new code

#

(may explode)

#

it's lightweight, good thing

pallid oxide
cinder abyss
lost matrix
#

You should add a random offset 0 - 1 for x and z when spawning

rapid vigil
cinder abyss
#

It would be a bit repetitive without x)

lost matrix
#

If they dont move then you didnt tick them

sand spire
#

Also, does anyone know how to get the name of a Smithing Template from the ItemStack, Material or ItemMeta? Cause the name is Smithing Template but I want to get a string of the "Tide Armor Trim"

pallid oxide
rapid vigil
dusky wigeon
#

so this might be a weird question (especially how early i am in plugin development lol ), but, can I have a plugin that is dependent on another plugin.
like how some mods have libraries they are dependent on ?

pallid oxide
rapid vigil
dusky wigeon
#

based.

chrome beacon
#

The way the player movement is coded it's hard to detect jumps properly

cinder abyss
#

much better

lost matrix
pallid oxide
cinder abyss
young knoll
#

Even papers jump event is just some filtering over how you would normally detect it with spigot

cinder abyss
#

and for calling (london calling)

pallid oxide
#

also walking over slabs counts as jump

sand spire
lost matrix
# cinder abyss

Having random next x and z like that will lead to a messy jitter

cinder abyss
#

I add something to store it in the instance

young knoll
#

Generally I use the StatisticIncrementEvent for detecting jumps

#

But you gotta still filter

dusky wigeon
#

🫡

lost matrix
# cinder abyss yeah
  // Leaf is done when it hits a block.
  public boolean isDone() {
    Block block = this.textDisplay.getLocation().getBlock();
    return !block.getType().isAir();
  }
cinder abyss
pallid oxide
#

coded this 1+ year ago but its very unfinished
the statistics is good basecheck for the jump to detect that player might be jumping then u gotta just do bunch of checks after that:D

https://paste.md-5.net/avoyaqadin.java

lost matrix
rapid vigil
lost matrix
#

You should probably have a wind strength per world. Just a 2D vector for x and z.
This way all leafs fall in the same direction. The wind speed can fluctuate a bit.

One problem im seeing with your implementation: If a lot of players stand under the same tree, then they will turbo spawn a million leafs.

pallid oxide
rapid vigil
young knoll
#

Remember that asList is immutable

cinder abyss
#

I never thought of that, would be funny x)

#

but yeah I need to patch this

young knoll
#

I think List.of is too

pallid oxide
rapid vigil
lilac dagger
pallid oxide
#

aslist should be mutable

lilac dagger
#

it's not mutable

pallid oxide
#

rlly

lilac dagger
#

it doesn't use arraylist

#

it uses some local class instead

#

simpler impl

rapid vigil
pallid oxide
lilac dagger
#

it does?

#

let me double check

pallid oxide
#

ye

#

so ye size is immutable

lilac dagger
#

it is a local arraylist

pallid oxide
#

asList calls

    @SafeVarargs
    @SuppressWarnings("varargs")
    public static <T> List<T> asList(T... a) {
        return new ArrayList<>(a);
    }
lilac dagger
#

i thought for a second is the public one

#

it's not the same arraylist

#

it's this

cinder abyss
pallid oxide
#

Oh ye thats different one

#

never knew that sht exists

pallid oxide
pallid oxide
cinder abyss
pallid oxide
rapid vigil
cinder abyss
pallid oxide
#

would love to try to do my crazy scanning ideas XD

rapid vigil
#

You could make your own API/collection of useful util classes that include the jump check too

cinder abyss
#

here it is

#

enjoy x)

pallid oxide
pallid oxide
rapid vigil
pallid oxide
#

oh nms , do i gotta build all versions? I never really wanted to get into the nms sht:D

pallid oxide
cinder abyss
#

just one method to get the foliage color

rapid vigil
cinder abyss
#

you don't need to dive into it

#

core is the interesting thing

pallid oxide
#

Also i wonder how often they spawn and how heavy it is, would it be possible to utilise the old texdisplays to teleport it back to top when it reaches bottom?

#

so keep teleporting it back to original location until player is out of range

young knoll
#

If you really wanted to optimize it

pallid oxide
#

yes

young knoll
#

Go full packet based

cinder abyss
#

wow

cinder abyss
#

but ProtocolLib is really hard with displays

pallid oxide
#

better to get prototype first without packets

cinder abyss
#

yeah

young knoll
#

Then you could do all the movement async

#

Actually you could probably do all of it async

pallid oxide
#

Doesnt displayentitys have already thing for the movement?
setTeleportDelay(int) or something like that to move it to another location?

#

or some other method

#

so u dont need to teleport it 1000x, i might be wrong but i remember something like this

lost matrix
#

The absolute best performance would be to not tick the leafs at all. Just calculate their trajectory and then send
a TextDiplay entity with an interpolation and transformation. That would be smooth and extemely efficient.

pallid oxide
#

yes interpolation was the thing i was talking about

#

i think

cinder abyss
#

yeah, but first, why is there so many wind? x)

young knoll
#

True

cinder abyss
young knoll
#

If it’s a straight line you can do it fully with interpolation

cinder abyss
#

After otpimizeing the code this much, the next step will be packet based leaves, I promise

lost matrix
cinder abyss
pallid oxide
cinder abyss
#

it's actually a ThreadLocalRandom.current().nextDouble()

young knoll
#

Yes they are actually ticked for passenger stuff

#

I think it’s like 5 lines

pallid oxide
# cinder abyss okay

gonna dig into ur code tomorrow and see what i can comeup with! hopefully ill have energy :D

cinder abyss
#

x)

#

it's not a big code

#

I'm going to sleep, see you tomorrow 👋

pallid oxide
#

thats good:D

young knoll
#

To achieve ultimate performance all must be packet based

#

Don’t even have a server, kek

pallid oxide
#

c++

#

unrealengine

young knoll
#

I mean you could run the backend in whatever you want

#

As long as it can send stuff to the network

lost matrix
#

There is a minecraft platform written in Rust

remote swallow
#

@eternal night i think ur list stuff is a bit brokey, if i store a byte array list on a chunk and log out then when i relogin and load the chunk it errors out saying the tag instance cant store List

eternal night
#

do you have replication code

#

for me pepe_hand_heart_2

remote swallow
#

yep i just need to wait for spigot to build kek

eternal night
kindred sentinel
#

Is there a way to create more than 1 barrier in a world?

#

Like worldborder

young knoll
#

You can do it per player

#

But not globally

remote swallow
# eternal night <:OMEGALUL:634918149002756122>

i just realised i dont have exact replication code but i can give a good enough example https://paste.md-5.net/dagoyowixe.cs ```kt
val contents = blockPdc.get(PDC_CONTENT_KEY, PersistentDataType.LIST.byteArrays())!!
.map { PineappleLib.getNmsProvider().itemFromBytes(it) }
.toList()

block pdc is on a tile entity and the itemFromBytes method is <https://github.com/PineappleDevelopmentGroup/Pineapple/blob/dev/pineapple-nms/spigot-v1_20_R3/src/main/java/sh/miles/pineapple/nms/impl/v1_20_R3/PineappleNMSImpl.java#L176-L184>
eternal night
#

I'll try

remote swallow
#

well, technically its on a tile entity block

eternal night
#

aight

#

throw me the exception too pls

remote swallow
eternal night
#

Cannot replicate @remote swallow

#

Can you check the block data

#

/data get block x y z

#

(tbf I am on paper, but I don't know of any patches we have that diff that write logic)

remote swallow
#

current just has air, in ill check with a real item 1 sec

eternal night
#

LOL

#

okay yea

#

that is not going to work

#

I guess we gotta error

#

tho

#

Yea I think I know what is happening

#

Actually

remote swallow
#

it still errors when given stone

eternal night
#

no I do not know what is happening, it should properly set the type flag

#

what is the data then?

remote swallow
#

non null list of ItemStack(Material.STONE) atm

eternal night
#

No like, the block data

remote swallow
#

somehow still the same except it should contain stone, 1 sec

eternal night
remote swallow
#

somehow its not saving any data from that, im gonna sout the data its attempting to save

eternal night
#

I s2g if this is user error

remote swallow
#

i mean if it fails trying to save air that could be a you bug

eternal night
#

The only thing I can think of is that something else sets that list with an incorrect data type

#

or I missed the data type getting clapped to 0 on empty lists

#

but like, I can store an empty byte list and filled one just fine on paper ™️

remote swallow
#

hmmmmmmmmmmm

#

ill do more testing and get back to you

eternal night
#

You can always run spigot in debug

#

instead of whatever the fuck you are doing now kekwhyper

#

Throw some breakpoints in matchesListTag in the CraftPDTRegistry

#

on all return statements

remote swallow
#

true

#

i have a feeling its something kotliny bc even trying to check the contents pre serialize it doesnt exist in the list

young knoll
#

See

#

This is why java better

hot reef
#

Hello, papermc wasn't much help,please be better than them mocking us for not using the paper library, we have our reasons,my mate can't get maven to recognize the bukkit library or even run simple stuff from it, any idea why?
their message:

I'm using maven with community Intellij right now, and I have a dependency that just is not working for some reason, if i comment out the dependency in pom.xml then some of the functionality of my plugin won't work(NoSuchMethodError).

[WARNING] The POM for org.bukkit:craftbukkit:jar : 1.20.2-R0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.464 s
[INFO] Finished at: 2024-03-19T20:09:02-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project NAME : Could not resolve dependencies for project tools.NAME:jar : 1.20.4-0.1: The following artifacts could not be resolved: org.bukkit:craftbukkit:jar : 1.20.2-R0.1-SNAPSHOT (absent): org.bukkit:craftbukkit:jar : 1.20.2-R0.1-SNAPSHOT was not found in https://repo.papermc.io/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of papermc-repo has elapsed or updates are forced -> [Help 1]```
drowsy helm
#

depend on spigot, make sure you have ran buildtools

hot reef
drowsy helm
#

can you show the whole pom

inner mulch
#

what do you guys think of a placeholder system that can also take params? is it a waste of time or can this be useful?
example: %ticket_information.<UUID, tickedID>%
^ fields can then be replaced with the stuff that is needed.

drowsy helm
#

sorta negates the point of a placeholder though

inner mulch
#

hows that?

drowsy helm
#

im assuming UUID would be for a specific player?

hot reef
#

yea, lemme make a pastebin of it

drowsy helm
#

okay, how do you set that in a config then

#

on a per player basis

inner mulch
drowsy helm
#

whole point of a placeholder is it being static, and nothing have to change

#

say i want to display the tick information in a sidebar, using a plugin config

#

how do i set the uuid in the config

kind hatch
drowsy helm
#
        <dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>craftbukkit</artifactId>
            <version>1.20.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
#

paper api should include all the craftbukkit libs

inner mulch
hot reef
remote swallow
#

why is there paper 1.20.4 but 1.20.2 craftbukkit

kind hatch
#

That too ^

drowsy helm
#

like on paper it sounds like a good idea, but i feel there would be a lot of downfalls realistically

hot reef
drowsy helm
hot reef
#

it shouldn't effect functionality, and it doesn't

drowsy helm
#

what do you need from craftbukkit specifically

remote swallow
#

or on spigot if you use any paper added features

hot reef
# drowsy helm what do you need from craftbukkit specifically
import org.bukkit.Material;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.craftbukkit.v1_20_R2.inventory.CraftItemStack; //TODO adjust to 1.20.4
import org.bukkit.inventory.ItemStack;

import java.io.*;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.sql.*;
import java.util.*;
import java.util.stream.Collectors;
#

:3

#

heres our imports

#

you can tell immediately which ones

#

lol

drowsy helm
#

jsut use mappings

remote swallow
#

that wont work on anything higher than 1.20.2

hot reef
#

lol

kind hatch
#

Well uhh, 1.20.4 is R3 not R2

remote swallow
hot reef
#

more importantly

#

how would we grab stuff like this baby

import org.bukkit.plugin.java.JavaPlugin;
remote swallow
#

paper api should have that

hot reef
drowsy helm
#

thats included in paper dependency

remote swallow
#

in exactly that package

#

your project is java 8, paper requries java 17

drowsy helm
#

or just use the spigot depdenecy

kind hatch
#

^

hot reef
#

ugh i can't post screenshots

#

holup

remote swallow
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

hot reef
#

lmfao ik what to do

#

just complaining

#

xD

remote swallow
#

org.bukkit classes wont be under anything paper

drowsy helm
#

are you looking for JavaPlugin?

kind hatch
#

Are you manually writing out imports?

hot reef
drowsy helm
#

they won't be under paper

remote swallow
#

search org.bukkit, if you dont have it your project is the wrong version upgrade to java 17 and reload

drowsy helm
#

they are still under bukkit

#

your maven is probably messed up, because paper dependency should include all of that

kind hatch
#

It’s just org.bukkit.JavaPlugin right?

hot reef
#

this is all of it

remote swallow
#

thats the same screenshot

drowsy helm
#

theres more

hot reef
remote swallow
#

of you searching under a paper pacakge

hot reef
remote swallow
hot reef
#

no it literally isn't

#

lmfao

#

theres a mass of em now

remote swallow
#

oh it only showed 1 kek

hot reef
#

kek

#

I need all of those imports

#

and before you ask

drowsy helm
#

yeah only thing i can suggest is use spigot dependency

hot reef
#

yes the emc_core packages will be renamed

drowsy helm
#

looks like the paper one just isnt resolving what it should be, and thats past anything we can help with

hot reef
drowsy helm
#

yeah spigot buildtools

#

?bt

undone axleBOT
remote swallow
#

if you need that craftbukkit class yeah

eternal night
#

I mean, if you need craftbukkit classes you gotta look at ehhh

hot reef
#

lemme grab it

eternal night
#

?nms

drowsy helm
#

you're using 1.20, just use mappings

#

makes life a million times easier

kind hatch
#

All you got to do to use nms is to depend on spigot after you run BuildTools with the remapped flag. :p

hot reef
#

this

#

is our final issue

remote swallow
#

heh

hot reef
#

even with the bukkit stuff commented out

eternal night
#

das a paper method

remote swallow
#

im so confused what version your even on at this point sometimes is 1.20.2 then its 1.20.4

drowsy helm
#

setCourse

remote swallow
#

but what lynx said

drowsy helm
#

class name

#

😦

hot reef
#

please don't remind me of my poor habits thx

#

but seriously

#

why is that erroring out

remote swallow
#

its a paper method

eternal night
#

das a paper method

kind hatch
drowsy helm
#

method paper a it's

hot reef
#

??

#

braIn hurt

remote swallow
#

because they patch

eternal night
#

paper adds methods to existing types

drowsy helm
#

paper forks bukkit

hot reef
#

oh lmfao

drowsy helm
#

they can add methods into the bukkit package

hot reef
#

idiot me

#

alr

hot reef
#

stoopid brain of mine

#

anyways

#

I'll go dip to papermc

#

and let them mock me again

#

lmfao

drowsy helm
#

good luck

eternal night
remote swallow
#

say hi to lynx when you get there

eternal night
#

they have yet to say hi

haughty nova
#

Hey guys, I have Java experience. I was wondering if there is a go-to spot for learning Spigot development? Some book, video series, website, etc?

hot reef
#

i ask them once

#

WHO IS THE CORRECT PEOPLE TO GO TO

#

😭

kind hatch
slender elbow
drowsy helm
#

there are like 4 core concepts to spigot, once you understand that the rest is easy

haughty nova
drowsy helm
#

i just made that number up but pretty much

  • event handler system
  • how everything centres around ticks
  • BlockState / ItemStack / Meta systems
hot reef
remote swallow
drowsy helm
#

if i got my boss to ask questiosn for me on stack overflow i'd be fired

remote swallow
#

oops wrong person

hot reef
#

his response was simply "o"

#

literally just "o"

#

the dudes a good programmer but damn when he blunders he blunders hard, and then i have to go hunting to figure out why

haughty nova
drowsy helm
#

spigot itself, is really simple

haughty nova
#

awesome, thanks.

dawn flower
#

in what version did nms become version independent?

eternal night
young knoll
#

Never

eternal night
#

You mean the package name?

#

but yea ^ never lol

young knoll
#

The package name was changed in 1.17

dawn flower
#

pretty sure craftbukkit is the only dependent one rn

#

nms itself isn't

dawn flower
young knoll
#

I mean it is

#

Stuff still changes all the time

dawn flower
#

you just realized that?

young knoll
#

What

umbral ridge
#

Kinda rude ngl

young knoll
#

I mean the chance of NMS code from 1.17 still working on 1.20 is fairly low

umbral ridge
#

(class file version 65.65535). Try running with '--enable-preview'

young knoll
#

Sounds like you are running something compiled with java 21

#

Which may be using preview features

umbral ridge
#

how do I change it to a different version

young knoll
#

Depends what you are using

#

Maven? Gradle?

umbral ridge
#

It's telling me about class I haven't touched for like.. half a year

#

Maven

young knoll
#

I’ve never seen a class file version with a decimal before

#

That’s some wack

umbral ridge
#

XD

#

Recompile didn't help

sullen marlin
#

?whereami

umbral ridge
remote swallow
#

woah md did say sir this is spigot

young knoll
#

Maven compiler plugin and ```

<properties>
<maven.compiler.release>17</maven.compiler.release>
</properties>

umbral ridge
remote swallow
#

you are not running spigot

umbral ridge
#

I am spigot

#

I am earth

rough ibex
#

You are the sun

#

you are the rain

young knoll
#

I just noticed the decimal is also the max 16 bit value

rough ibex
#

unsigned, woo

umbral ridge
#

XD

eternal night
#

@remote swallow whats the verdict

remote swallow
#

y2k was being dumb and it was his non null list

eternal night
#

I see

#

wait

remote swallow
#

yes he left

eternal night
#

why are they not here

#

WTF

#

why

remote swallow
#

got sick of cmarco

eternal night
#

lmao

#

where do I ping them now

#

the fuck

remote swallow
#

he might be in paper still

#

if not dm him

young knoll
#

DM him pictures of frogs

#

With no context

eternal night
#

Sounds like a plan

#

done 👍

umbral ridge
#

I think my project is glitched or something lol

#

can put anything here and it'll compile

wet breach
umbral ridge
#

can delete the entire pom.xml and it'll compile

rough ibex
#

wrong working dir?

umbral ridge
#

no

remote swallow
#

sounds like your not compiling with maven

young knoll
#

They just throw the max 16 bit value on the end?

#

Seems strange but okay

wet breach
#

Yep

umbral ridge
#

So I restarted intellij and now it fixed itself but I changed this from 21 to 18 and reloaded changes and recompiled and it still gives me the same damn warning

wet breach
#

Also for those curious in how to compile with preview or experimental features with maven

<build>
   <plugins>
      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.11.0</version> 
         <configuration>
            <source>21</source>
            <target>21</target>
            <encoding>UTF-8</encoding>
            <compilerArgs>
                <compilerArg>--enable-preview</compilerArg>
            </compilerArgs>
         </configuration>
      </plugin>
   </plugins>
</build>
young knoll
#

What even is preview atm

#

Foreign memory api?

wet breach
#

Think so but not entirely sure. Java 21 has quite a few jeps at the moment

umbral ridge
#

java.lang.UnsupportedClassVersionError: Preview features are not enabled for dev/spexx/ranksigns/interfaces/config/DefaultConfigSyncer (class file version 65.65535). Try running with '--enable-preview'

remote swallow
#

how are you compiling

wet breach
#

Sounds like you are not building with maven

#

Otherwise that would have worked

umbral ridge
#

that's how I compile

#

XD

remote swallow
#

run clean package

#

and where do you get the jar from

umbral ridge
#

It's exported in

wet breach
#

Think at the moment its failing in building

umbral ridge
#

It says success

wet breach
#

Also note to run a java application with preview features you need to use the command line argument for the jvm as well

umbral ridge
#

worked like a peeled banana

floral drum
remote swallow
floral drum
#

my girl

remote swallow
#

dont you live together

floral drum
#

we are LDR so it's hard to see eachother

#

LDR = Long distance relationship

remote swallow
#

i thought you moved in together like last year

floral drum
#

na?

#

we hopefully plan to move in together this year tho

#

would be good

#

we're off on a holiday to a beach together this year

#

so W

remote swallow
#

sus

#

dont end up with a child

floral drum
#

wot

remote swallow
#

you know exactly what i mean

floral drum
#

nah we got contraception

#

an IUD

remote swallow
#

sus

dusky wigeon
#

i spent half an hour searching for where minecraft stores its fonts and couldn't find it.

does anyone know where i can find the arabic font Minecraft uses ?

rough ibex
#

it's GNU unifont

#

v15

#

the font ZIP is an object now, not included

#

it's like sounds

dusky wigeon
rough ibex
#

it's not in the default resource pack

dusky wigeon
rough ibex
#

it's on the PC

#

but you need to go digging in .minecraft/assets

dusky wigeon
#

i found this

#

i don't know what is going on

#

BUT

#

my guess is

#

since this is refrencing a image inside of minecraft that has a limited ammount of characters

#

and seeing how there are A LOT MORE characters in minecraft

#

my bet is that this file is telling the game to override some of the default system font with these ones in minecraft.

#

and i will wait here 5 minutes till someone comes and tell me how i am wrong and should never open a minecraft file in my life.

rough ibex
#

what's happening is

#

the default 'base' font is GNU unifont

#

minecraft then has its own textures that overwrite some of Unifont's

#

so when the game asks 'give glyph of "A"' it returns the minecraft one

#

but if I ask 'give glyph of "﷽" it cant find it in MC so it shows the unifont one

dusky wigeon
#

brother typed a really good sentence.

rough ibex
#
Minecraft Wiki

The font is the typeface that Minecraft uses. It was first added in Java Edition Classic 0.0.2a and has seen many revisions and additions since.
Its design has been present in all ports of the game.
In Java Edition, the font’s name is Minecraft Seven. It contains 2,426 characters. Multiple fonts can be defined and referenced with resource packs.

dusky wigeon
#

with that out of the way I will take a minute to thank the sponsor of this video

RAID SHADOW LEGEND

#

but yeah, thanks @rough ibex.

rough ibex
#

uh huh

dusky wigeon
#

thanks for the explenation baka

agile anvil
#

Usually it's straightforward. There is no need to overcomplicate things

#

But it really depends on your usage and what you want to store

worthy yarrow
wet breach
#

For small databases its straight forward. But you would need to profile the db and be having issues like slow queries to determine if the layout needs changing or if functions need to be created

wet breach
worthy yarrow
worthy yarrow
wet breach
#

Redis is not necessary if using something like mysql as it has memory only db capabilities

#

Functions are not scripts. They are commands or specific queries setup before hand or it might perform some operation on the db or multiple dbs

worthy yarrow
umbral ridge
#

am I blind or I can't find a tutorial on how to make a simple dynamic protocolLib sign??

#

I used to do this a lot but kind of lost projects and don't remember how to do it

wet breach
#

It can be but mysql has some built in sort that you can use with queries

#

Like if you want descending order or ascending order

#

You can sort based on a specific column as well

umbral ridge
#

different on every client based on the username

agile anvil