#help-development

1 messages · Page 416 of 1

small timber
#

intellij minecraft dev plugin

remote swallow
#

run maven package instead of just mvn

terse ore
#

Hey guys

#

I am trying to implement that but modImplementation nor include are working in my build.gradle

remote swallow
#

its a mod not a plugin lib

rough drift
remote swallow
#

ah

rough drift
#

modImplementation is a fabric thing iirc

remote swallow
#

do you have the required fabric plugin

terse ore
#

omfg I can't read

bitter steeple
#

Seams the simple way is to Bukkit.dispatchCommand(console, s.toString()); the summon command
Good alternative

small timber
#

wdym

remote swallow
#

that error is saying dont just run maven it needs a goal

small timber
#

so how do I change it

quaint mantle
#

How can I make an unbreakable block mineable/breakable?

small timber
#

how do I chang eit

remote swallow
#

edit the config, then you should see a bar under the name, has Run above it add package or whatever goal you want to execute in there

quaint mantle
#

How can I set block breaking animation level?

sullen marlin
#

sendBlockDamage

quaint mantle
#

aight thanks

small timber
#

what do i edit there

remote swallow
#

you said you used an intellij config, i thought you meant run configuration

tender shard
#

Just double click on „package“

#

In the maven tab under Lifecycle

smoky oak
#

what are you using? I always used mushroom blocks and update suppression but that doesnt support transparent

young knoll
#

Noteblocks are generally better, more states

#

Those are ItemDisplays tho

orchid gazelle
#

Hello. I am trying to serialize a player's inventory. I registered a custom TypeAdapter for it, but I do get the Error: `

#

my code:

                .registerTypeAdapter(Inventory.class, new PlayerInventorySerializer())
                .create();
        FileWriter fw;
        try {
        fw = new FileWriter(file);
        gson.toJson(inventory, fw);
        
        fw.close();
        
        } catch (IOException e) {
            e.printStackTrace();
        }
smoky oak
# orchid gazelle Hello. I am trying to serialize a player's inventory. I registered a custom Type...

    /**
     * Black magic in
     * @param stack
     * @return
     */
    private static byte[] stackToByte(ItemStack[] stack){
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            BukkitObjectOutputStream oos = new BukkitObjectOutputStream(bos);

            oos.writeInt(stack.length);

            for (ItemStack itemStack : stack) {oos.writeObject(itemStack);}

            oos.close();
            return bos.toByteArray();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * Black magic out
     * @param data
     * @return
     */
    private static ItemStack[] byteToStack(byte[] data) {
        try {
            //TODO Test getBinaryStream insted of getBytes here.
            //might need to replace/rework into byteArrayInputStream somehow

            ByteArrayInputStream bis = new ByteArrayInputStream(data);
            BukkitObjectInputStream ois = new BukkitObjectInputStream(bis);

            int length = ois.readInt();
            ItemStack[] stack = new ItemStack[length];

            for (int i = 0; i < length; i++) {stack[i] = (ItemStack) ois.readObject();}

            ois.close();
            return stack;
        } catch (IOException | ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
patent socket
#

@remote swallow how can I do that?

worldly ingot
#

Don't know what your PlayerInventorySerializer looks like but it seems like GSON is trying to serialize an Optional and not really knowing how to do that lol

small timber
remote swallow
#

the goal

worldly ingot
#

I dunno. No clue what your serializer looks like

orchid gazelle
#
public class PlayerInventorySerializer implements JsonSerializer<Inventory>, JsonDeserializer<Inventory> {
    
    @Override
    public JsonElement serialize(Inventory inventory, Type typeOfSrc, JsonSerializationContext context) {
        JsonObject obj = new JsonObject();
        String uuid = ((Player)inventory.getHolder()).getUniqueId().toString();
        String invString = Base64.inventoryToBase64(inventory);
        
        obj.addProperty("id", uuid);
        obj.addProperty("inv", invString);
        
        return obj;
    }

    
    @Override
    public Inventory deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
        JsonObject obj = json.getAsJsonObject();
        String id = obj.get("id").getAsString();
        String invString = obj.get("inv").getAsString();
        
        if(Bukkit.getPlayer(UUID.fromString(id)) == null) throw new NullPointerException("Player must be online for this inventory to get serialized");
        Inventory inventory = null;
        
        try {
            inventory = Base64.playerInventoryFromBase64(invString, Bukkit.getPlayer(UUID.fromString(id)));
        } catch (IOException e) {
            e.printStackTrace();
            throw new IllegalArgumentException("Some Error occured while trying to deserialize a Player-Inventory", e);
        }
        
        if(inventory == null) throw new IllegalArgumentException("Some Error occured while trying to deserialize a Player-Inventory");
        
        return inventory;
    }

    
}
#

thats the Serializer

remote swallow
tender shard
orchid gazelle
#

lmao

young knoll
#

What happens if you press no

#

Does it start crying

orchid gazelle
#

yes

remote swallow
#

what a command

patent socket
remote swallow
#

you need an instance of your main class, use di, a static getter or MainClassName.getPlugin(MainClassName.class)

#

?di

undone axleBOT
tender shard
sterile token
orchid gazelle
sterile token
tender shard
young knoll
lost matrix
sterile token
orchid gazelle
#

yes still a problem. But maybe I found the actual problem. An InventoryHolder does not contain an uud

worldly ingot
orchid gazelle
#

uhm now I gotta somehow pass args to the Serializer lol

sterile token
worldly ingot
#

<#general message>

orchid gazelle
lost matrix
#

I didnt look at the serialisation method itself. You should ofc just serialize the content and not the InventoryHolder

sterile token
orchid gazelle
#

well but its specificly a PlayerInventory. So it needs to be associated with a Player

sterile token
lost matrix
orchid gazelle
#

well how do I pass the Player as an argument?

sterile token
#

Oh right, no you cant

orchid gazelle
#

Im encoding it to b64 and then writing it to a json with the needed extra-data

lost matrix
remote swallow
sterile token
#

Not a player Inventory

lost matrix
orchid gazelle
lost matrix
#

Do you want to serialize a PlayerInventory or a chest Inventory?

orchid gazelle
#

Player

lost matrix
#

Then -> You cant

orchid gazelle
#

(its a failsafe only dedicated to players)

lost matrix
#

Serialize the content

#

You cant create a player inventory

orchid gazelle
#

but I can just get the Inventory with the deserializer and then write the contents to the player-inv

hazy parrot
#

Why not just write content directly

lost matrix
#

Ok but why would you want to do that? You are just creating a dummy inventory which has no purpose and
gets discarded again

orchid gazelle
#

I could use just the Contents for sure, but that would complicate things for me lol

#

would need to split armorcontents, offhand and actual contents

lost matrix
#

Why?

orchid gazelle
#

anyways, im fine with the player-inventory as this code is just a failsafe getting executed on the absolute heaviest edge-case

orchid gazelle
#

so, can I pass a player to the TypeAdapter?

lost matrix
#

What are you trying to do?

tardy delta
#

uh oh gson

orchid gazelle
#

I just want to write the UUID of the player lol

lost matrix
orchid gazelle
#

Serialize a Player-Inventory with a bit of extra data to a JSON file

tardy delta
#

so serialize the itemstacks, and what extra data?

young knoll
#

Their UUID it seems

lost matrix
# orchid gazelle Serialize a Player-Inventory with a bit of extra data to a JSON file

Then create a class that looks like this:

public class PlayerData {

  public PlayerData(Player player) {
    this.inventoryContent = player.getInventory().getContents();
    this.playerId = player.getUniqueId();
  }

  protected PlayerData() {
    inventoryContent = null;
    playerId = null;
  }

  private final ItemStack[] inventoryContent;
  private final UUID playerId;
  private double someVariable;

}

And register a serializer for ItemStack.class
Gson will handle the rest for you

patent socket
remote swallow
#
Bukkit.getScheduler().runTaskTimer(Dialogue.getPluign(Dialouge.class) -> {
    code 
}, deley, interval);
lost matrix
#

Example

SomeTask task = new SomeTask();
Bukkit.getScheduler().runTaskTimer(Dialogue.getPlugin(Dialogue.class), task, 10L, 10L);
smoky oak
lost matrix
patent socket
lost matrix
#

Shouldnt be a problem

patent socket
lost matrix
remote swallow
#

?learnjava this is more of a learn java moment

undone axleBOT
tender shard
patent socket
remote swallow
tardy delta
#

just use dependency injection, way cleaner for this purpose

tender shard
quaint mantle
#

public void makeEntityLookAtPlayer(Player player, LivingEntity entity) {
Location entityLoc = entity.getLocation();
Location playerLoc = player.getLocation();
double deltaX = playerLoc.getX() - entityLoc.getX();
double deltaY = playerLoc.getY() - entityLoc.getY();
double deltaZ = playerLoc.getZ() - entityLoc.getZ();

    double yaw = Math.atan2(deltaZ, deltaX);
    double pitch = Math.atan2(Math.sqrt(deltaX * deltaX + deltaZ * deltaZ), deltaY) + Math.PI;

    int yawAngle = (int) Math.toDegrees(-yaw);
    int pitchAngle = (int) Math.toDegrees(-pitch);

    PacketPlayOutEntityHeadRotation headRotationPacket = new PacketPlayOutEntityHeadRotation(((CraftEntity) entity).getHandle(), (byte) yawAngle);
    ((CraftPlayer) player).getHandle().playerConnection.sendPacket(headRotationPacket);

    PacketPlayOutEntityLook lookPacket = new PacketPlayOutEntityLook(entity.getEntityId(), (byte) yawAngle, (byte) pitchAngle, true);
    ((CraftPlayer) player).getHandle().playerConnection.sendPacket(lookPacket);
}
#

What is wrong with this code?

remote swallow
#

it should return a Plugin instance right?

#

i thought thats what that did

lost matrix
#

byte packetAngle = (byte) ((int) (mcAngle * (256F / 360F)))

tender shard
# remote swallow ah

all I wanted to say is that it's a static method declared in JavaPlugin, so you'd do JavaPlugin.getPlugin(MyMainClass.class) instead of MyMainClass.getPlugin(MyMainClass.class) 😛

lost matrix
#
    Vector direction = fromLocation.toVector().subtract(toLocation.toVector());
quaint mantle
#

my math is working already, the issues is in: PacketPlayOutEntityHeadRotation headRotationPacket = new PacketPlayOutEntityHeadRotation(((CraftEntity) entity).getHandle(), (byte) yawAngle);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(headRotationPacket);

    PacketPlayOutEntityLook lookPacket = new PacketPlayOutEntityLook(entity.getEntityId(), (byte) yawAngle, (byte) pitchAngle, true);
    ((CraftPlayer) player).getHandle().playerConnection.sendPacket(lookPacket);
tender shard
#

and what is the issue?

quaint mantle
#

CraftPlayer cannot be resolved to a type

tender shard
#

?nms

quaint mantle
#

already using

tender shard
#

can't be

young knoll
#

We should start calling it NM

tender shard
#

otherwise you wouldn't call it PacketPlayOutEntityLook

quaint mantle
#

my other CraftPlayer references working

quiet ice
#

Did you import the class?

quaint mantle
#

ofc

young knoll
#

Maybe they are pre mojmap

lost matrix
tender shard
#

if you would be using remapped NMS, you would use "ClientboundMoveEntityPacket$Rot" instead of "PacketPlayOutEntity$PacketPlayOutEntityLook"

quaint mantle
#

bingo tho, I forgot to save my code in VSC, I'm coding in VSC then building in Intellij, using same workspace

young knoll
#

Umm

young knoll
#

Okay

quiet ice
#

what the hell

hazy parrot
#

most basic setup

lost matrix
#

Some people just love to spend time with build time problems. Like what?

tender shard
#

also claiming "already using" when getting sent a link about remapped in maven while using neither maven nor remapped... lol

young knoll
#

You see InteliJ is only a compiler

lost matrix
#

Write your code in Word and compile using javac. Will cause less problems probably,

quaint mantle
tender shard
#

mvn's lib?

quaint mantle
#

minevn

tender shard
#

whut

echo basalt
young knoll
#

No it is

quiet ice
#

You mean maven?

young knoll
#

Trust me

quiet ice
#

I sure hope you mean maven.

echo basalt
#

IntellIJ is a text editor

#

Maven is a build tool

quaint mantle
#

nah I don't

echo basalt
#

That delegates into JavaC

young knoll
#

Shhh

hazy parrot
echo basalt
#

don't spread misinformation

echo basalt
#

I just parachuted here

hazy parrot
#

noticed

young knoll
#

IntelliJ is actually a 3D modelling software

hazy parrot
#

fork of cad

desert frigate
#

have u found a solution?

tender shard
echo basalt
#

if we think about it deeply enough

#

every single program

#

is just an assembly wrapper

quiet ice
#

no. False.

echo basalt
#

!True

tender shard
#

not really, assembly is still a language that needs to be "compiled" into machine code

young knoll
#

Why is your true capitalized

#

Is this python

tender shard
#

in python wouldnt it be not True?

young knoll
#

Ah crap

#

We’re in some weird hybrid language now

hazy parrot
#

its wrapper object for binary 1 with overloaded not operator

tender shard
#

javascript

// This prints 10:
alert(++[[]][+[]]+[+[]]);

// And this "fail":
alert((![]+[])[+[]]+(![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]);
#

more javascript:

    parseInt('06'); // 6
    parseInt('08'); // 0
hazy parrot
tender shard
#

Cant find it rn

#

Bit i still got it open on the other computer

young knoll
#

It’s parsing it in base 8

tender shard
#

Yeah but then why is it 0

#

Oh because it fails

#

Why doesnt it throw an error

hazy parrot
young knoll
#

I just learned the hard way that JavaScript thinks the leading zero indicates an octal integer, and since there is no "8" or "9" in base-8, the function returns zero. Like it or not, this is by design.

hazy parrot
#

funny

tender shard
#

Javascript is shit, it should throw an error instead of using 0

#

Well everything thats not strictly typed is shit imho lol

quaint mantle
#
@EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        UUID uuid = player.getUniqueId();

        File heartsFile = new File(getDataFolder() + File.separator + HEARTS_FOLDER, uuid.toString() + ".json");
        if (!heartsFile.exists()) {
            JsonObject playerHearts = new JsonObject();
            playerHearts.addProperty("hearts", 12);
            try {
                heartsFile.createNewFile();
                FileWriter writer = new FileWriter(heartsFile);
                writer.write(playerHearts.toString());
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        try {
            JsonParser parser = new JsonParser();
            JsonObject playerHearts = parser.parse(new FileReader(heartsFile)).getAsJsonObject();
            int hearts = playerHearts.get("hearts").getAsInt();
            this.hearts.put(uuid, hearts);
            if (hearts == 1 || hearts == 0) {
                player.kickPlayer(ChatColor.translateAlternateColorCodes('&', "&7Ahmak herif! Gerçekten hayatta kalmayı başaramadın mı? Ne yaptığımızın, neden burada olduğumuzun hiçbir önemi yok. Burada çok bekleme bence, seni aptal! Burada sessizlikten ve hiçlikten başka bir şey yok. Yaptın mı beğendiğini? Aman neyse, en azından cesedin kurtlara yem olduğunda bir bok başarmış olacaksın. Ahmaksın, ahmak!"));
            } else 
                player.setMaxHealth(hearts * 2);
                player.setHealth(hearts * 2);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }```
#

Should I just use YAMLConfiguration?

#

or stick to JSON still

tender shard
#

first of all, you should use code tags

remote swallow
#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
tardy delta
#

hardcoding translations hehe

quaint mantle
#

omf

tender shard
#

first and last part are insults, the inbetween is something about corpses being eaten plus stuff I don't undertsand, and another insult

quaint mantle
#

Stupid bastard! Did you really not survive? It doesn't matter what you do. Don't wait too long here, you idiot! There is nothing here but silence and nothingness. Did you like it? Thank goodness, you'll have accomplished a piece of shit when you're baited by the worms of the deadliest. you're a fool

hazy parrot
#

tf

quaint mantle
#

-- translation

#

why

young knoll
#

Because it can be slow

#

I mean you’d have to block the thread for 60 seconds for server to go ded

#

But yeah

quaint mantle
#

not ded because its me and my other 2 friends playing 😄

young knoll
#

I don’t think I/O is quite that slow

quaint mantle
#
public void onPlayerJoin(PlayerJoinEvent event) {
    Player player = event.getPlayer();
    UUID uuid = player.getUniqueId();
    Bukkit.getScheduler().runTaskAsynchronously(this, () -> {
        File heartsFile = new File(getDataFolder() + File.separator + HEARTS_FOLDER, uuid.toString() + ".json");
        if (!heartsFile.exists()) {
            JsonObject playerHearts = new JsonObject();
            playerHearts.addProperty("hearts", 12);
            try {
                heartsFile.createNewFile();
                FileWriter writer = new FileWriter(heartsFile);
                writer.write(playerHearts.toString());
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        try {
            JsonParser parser = new JsonParser();
            JsonObject playerHearts = parser.parse(new FileReader(heartsFile)).getAsJsonObject();
            int hearts = playerHearts.get("hearts").getAsInt();
            Bukkit.getScheduler().runTask(this, () -> {
                this.hearts.put(uuid, hearts);
                if (hearts == 1 || hearts == 0) {
                    player.kickPlayer(ChatColor.translateAlternateColorCodes('&', "&7Ahmak herif! Gerçekten hayatta kalmayı başaramadın mı? Ne yaptığımızın, neden burada olduğumuzun hiçbir önemi yok. Burada çok bekleme bence, seni aptal! Burada sessizlikten ve hiçlikten başka bir şey yok. Yaptın mı beğendiğini? Aman neyse, en azından cesedin kurtlara yem olduğunda bir bok başarmış olacaksın. Ahmaksın, ahmak!"));
                } else {
                    player.setMaxHealth(hearts * 2);
                    player.setHealth(hearts * 2);
                }
            });
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    });
}```
#

what about this

echo basalt
#

grr I thought about this super nice code structure when I was at the gym and I'm too tired to remember it

#

it'd be able to hook into multiple code structures with a lil "transformer"

rose aspen
#

Hello friends, do you know any good "image map api"?

Currently i'm working on a coupon project, where players can interact with fancy looking Material.FILLED_MAP items.
I tried the built-in map api, but somehow after a server restart, the map gets empty and won't stack with the new "same maps".

torpid sapphire
#

are there any frameworks that make creating and working with inventory guis a bit easier? couldnt find anything and the ways i tried implementing them myself either end up in a lot of duplicate code or a lot of unneeded complexity

tawny remnant
#

Is there a way to create an NPC without using NMS?

young knoll
#

If you want to make something yourself

eternal oxide
#

generally offline players don;t have permissions

river oracle
#

I'd reccomend you use luck perms api cuz you'll beable to do that

eternal oxide
#

use Vault as it supports many permission plugins

river oracle
#

True

#

I forget Vault Permissions

analog thicket
#

yo @echo basalt I got the random Animation working. Thanks for the idea!

sterile token
#

Why needs a return statement?

#

🤔

#

Yeah me too, i always have issues with math - PD: sorry for pinging

inland siren
#

cause it’s running on a different thread

sterile token
#

Yes i know its handle on other thread

#

But why the issue of the return statement?

#

So far voids dont return any value, you can just "return" in the way of stopping code block for being executed

sterile token
#

But if i add the "return" its gives another issue

hazy parrot
sterile token
#

🤔

hazy parrot
#

why using supplyAsync then ?

sterile token
#

Voids dont return anything

hazy parrot
#

if you doesn't need result of computation

sterile token
#

what should i use?

#

complete async?

hazy parrot
#

what you want to achieve

#

run code after that ?

sterile token
#

Yes

#

And being executed async

#

just like you will done with normal completale future, but without handling any value let say

hazy parrot
#

thenRun ig

sterile token
#

hmn

#

Im returning a CompletableFuture<Void>

#

So i cant

hazy parrot
#

thenRun is returning CompletableFuture<Void>

sterile token
# hazy parrot thenRun is returning CompletableFuture<Void>

This is my code, i dont mean that

    @Override
    public CompletableFuture<Void> insert(String field, Object value) {
        return CompletableFuture.supplyAsync((Void) -> {
            try (Jedis jedis = redis.getClient().getResource()) {
                jedis.hset(name, field, redis.getInfo().getGson().toJson(value));
            }
        }, redis.getInfo().getExecutor());
    }
#

Thats on my RedisCache class, so when you run an insert

hazy parrot
#

oh, just change suppyAsync to runAsync lol

sterile token
#

ohh thanks

#

I was meaning that

#

I mean i didnt explain well what i was needing

#

🤦‍♂️

#

Im re writting my redis library from the scratch 💀

#

y2k bro, what happened with your lib?? I cant find it any more, not even the commands one. If you see this message dm me

river oracle
#

https://www.spigotmc.org/threads/tutorial-data-storage-with-ndatabase-a-database-framework-for-minecraft.595340/ any thoughts on this resource anyone. I'm honestly a big fan :P Mostly cuz this is kinda what i used on the server I worked for. I'd be curious

inland siren
#

i would advise hopping into completeablefutures javadoc before continuing

sterile token
#

Just a fast view over them

#

Cuz i dont have time to spend and i must finish this lib

inland siren
#

takes 5 minutes to make your life 20 times easier but you do you

inland siren
#

good shit

river oracle
inland siren
#

always love me a db util that uses inheritance

#

mc wrapping is qol but if it runs well looks nice af

remote swallow
sterile token
remote swallow
#

no reason

granite herald
#

I am working on a item exchange plugin. How can I order the strings in the autocomplete?

eternal oxide
#

you can't

#

they are alphabetical

sterile token
granite herald
#

Ok. Means the only way would be:

  1. _set amount
  2. 1
  3. 16
    and so on
sterile token
#

I think you can loop over the completations, sort them via index and collect back to list

#

But im not sure if that will work

#

@granite herald

eternal oxide
#

no

sterile token
#

🤔

eternal oxide
#

the tab complete list is auto sorted alphabetically, you have no control over order

sterile token
granite herald
#

will it do like that. Not so beautiful but better and not in order. Most important is the first string

eternal oxide
#

if you add a prefix that will be included IN your tab complete

trim lake
#

what is wrong?

@Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        NickUtils.createTeams();
        return true;        
    }

public static void createTeams() {        
        Team hracTeam = board.registerNewTeam("hrac");
        Team adminTeam = board.registerNewTeam("admin");        
        hracTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.FOR_OTHER_TEAMS);
        adminTeam.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.FOR_OWN_TEAM);
    }

If I use command /team list it says "there are no teams.

ivory sedge
#

Try /team create

#

Can you

trim lake
#

not looks like

ivory sedge
#

Hmm, re download it, maybe something was corrupted

trim lake
#

I dont think so. Im trying to create classis MC team.

ivory sedge
#

Hmm, I dunno

#

Get a DC helper

#

Jochyoua helped me earlier

rough ibex
#

you should be able to just do createTeams()

#

but that's not the issue-

#

can you show surrounding code

trim lake
#

?paste

undone axleBOT
trim lake
#

Oh I get it working. I changed boar variable from manager.getNewScoreboard(); to manager.getMainScoreboard();

young knoll
sterile token
sterile token
trim lake
#

So probably that changed something I guess?

oak locust
#

is it possible to use hex colors in the scoreboard?

sullen marlin
#

Text? Yes. Team colours? No

oak locust
#

really?? i tried displaying hex colored text but i couldn't get it to work

sullen marlin
#

What code and what didn't work

oak locust
#

the code is deleted now because i tried it a while ago. i wanted to ask here if it works before i try to get it to work again

#

but if you say that it works i am gonna try

young knoll
#

Hex works pretty much everywhere

#

Afaik

oak locust
#

How can I make this work?

objective.getScore("&#CCCCFFtext").setScore(1);```
sullen marlin
#

Suggest you look at how to use hex colours

#

ChatColor class

oak locust
#

alright i guess i'm gonna do that now

#

thanks

inland siren
rough ibex
#

yes, but the list you return is sent to the client

#

and then the client sorts it on their side

tepid furnace
#

Soo there is no public-facing API that can be used to release plugin updates automatically. Am I correct?

split gull
#

is this the channel for plugin dev help?

#

im assuming it is

#

is it already possible to use spigot 1.19.4 R1 as a dependency in plugins?

tepid furnace
graceful oak
#

Hey guys I have a question about learning new things for coding plugins. I went straight into spigot never really sat down and learned everything in Java but I know other languages like C and Python pretty well which is how I got started and now im in a weird point where I know how to do things and dont really know how to improve to get better. At this point im just coding what I want to make is there any recommendations on what to do to get better at something like this? Are any of the spigot programs you have to pay for online good to do to improve skills?

split gull
#

I dont have that much spigot experience but i can say for sure that one of your best bet is to develop difficult things, stuff you'd avoid due to the sheer difficulty

wet breach
wet breach
split gull
#

i completely agree

vast junco
#

Is it possible/feasible to dispatch console commands without logging the output to the console using nms?

remote swallow
#

you might be able to make your own impl of ConsoleCommandSender and get results from that, i remember someone doing that for getting results of another plugins commands

sullen marlin
#

?xy

undone axleBOT
sullen marlin
#

Why do you want to dispatch console commands is the real question

lost matrix
#

^

lost matrix
sacred wyvern
#

WIth running commands my command calls an external API and does some processing. Sometimes the API runs a little slow as it processes. I just got this message in the Spigot server log:
Can't keep up! Is the server overloaded? Running 5817ms or 116 ticks behind
Do I need to be concerned about thread blocking for multiple commands running at once? Should I write the command in async fashion ("If that's possible not a Java engineer")

lost matrix
lost matrix
#

Here are some things you should always do on a separate thread:

  • Reading/Writing Files
  • Accessing Databases
  • Web requests of any type (like http)
sacred wyvern
#

I think I remember creating threads about 10 years ago for a different Java project. I'll take a look. Thanks again for the advice.

sacred wyvern
lost matrix
chrome beacon
#

Highly recommend TaskChain by Aikar makes things clean

lost matrix
chrome beacon
#

It hasn't been updated in a while but I don't think it needs to be

lost matrix
sacred wyvern
tawny remnant
#

is it possible to install nms on a project that is not even in maven? (Intellij)

chrome beacon
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

chrome beacon
#

You can but I don't recommend it

tawny remnant
#

okay

lost matrix
chrome beacon
lost matrix
chrome beacon
#

ah

#

Thought it did

lost matrix
#

After looking through the BuildTools folder it looks like this contains nms:
BuildTools\Spigot\Spigot-Server\target\spigot-1.19.4-R0.1-SNAPSHOT.jar

tender shard
#

btw you'll have to run the specialsource .jar manually to reobfuscate if you don't use any build tool

lost matrix
# tawny remnant is it bad

Honestly at some point you will have to learn using Maven or Gradle.
I would suggest Maven. Watch a tutorial and then use this Intellij plugin to generate
a clean maven project for Minecraft:
https://plugins.jetbrains.com/plugin/8327-minecraft-development

remote swallow
#

WOOOO MC DEV

muted dirge
#

I'll be happy if someone help me.

remote swallow
#

whats Main.java 26

muted dirge
remote swallow
#

what about line 16

#

just to check are these commands in plugin.yml

muted dirge
muted dirge
wet breach
#

?paste

undone axleBOT
muted dirge
#

main.java or socialmediaCommand.java

remote swallow
#

if its error on the set executor its not in plugin.yml

wet breach
#

First main class since that is where the error is specified. Specifically in the onenable. Something is null

#

And instead of us guessing easier if we can see code to help you track down where it is at

remote swallow
#

paste plugin.yml too

wet breach
#

Your update checker is flawed

muted dirge
#

i just want to fix the issue

remote swallow
#

commands are all correct in plugin.yml, nothing looks wrong in main class this error doesnt match the code

wet breach
#

Lets see socialmedia class

#

Since you said that was the offending line

remote swallow
#

inb4 the jar wasnt updated

muted dirge
#

i think i loaded wrong version

wet breach
#

Alright. Well now i can explain the flaw in the update checker

#

Normally when you build spigot via buildtools the version will be correct. However if instead you build it manually it will say version git-unknown

muted dirge
#

yay

#

no errors

#

lets test

remote swallow
#

https://github.com/The-Epic/EpicSpigotLib/blob/master/src/main/java/me/epic/spigotlib/SimpleSemVersion.java
https://github.com/The-Epic/EpicSpigotLib/blob/master/src/main/java/me/epic/spigotlib/UpdateChecker.java#L17-L39

private void initializeUpdateChecker() {
        UpdateChecker checker = new UpdateChecker(this, PLUGIN_ID);
        SimpleSemVersion current = SimpleSemVersion.fromString(this.getDescription().getVersion());

        Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> checker.getVersion(version -> {
            if (SimpleSemVersion.fromString(version).isNewerThan(current)) {
                ConsoleCommandSender sender = Bukkit.getConsoleSender();
                sender.sendMessage(ChatColor.GOLD + "=".repeat(70));
                sender.sendMessage(
                        ChatColor.GOLD + "A new version of MineTweaks is available: " + ChatColor.DARK_AQUA + version);
                sender.sendMessage(
                        ChatColor.GOLD + "Download it at https://www.spigotmc.org/resources/minetweaks.96757/");
                sender.sendMessage(ChatColor.GOLD + "=".repeat(70));
            }
        }), 0, 20l * 60 * 60);
    }

That is probably the better-ish update checker, checks for major.minor.patch updates so should notify people on any update

#

dont question if minetweaks is mine

wet breach
#

Nvm ignore what i said read you update check wrong

#

Thought you were checking server version lol

remote swallow
muted dirge
#

💀

remote swallow
wet breach
#

Anyways problem solved it seems

muted dirge
#

@wet breach

#

you know how to make actionbar stay?

#

nvm

young knoll
smoky oak
#

lets assuming im trying to profile something that only takes a few milliseconds. How can i obtain the time it takes for System.getCurrentNanos() to... well, run?

lost matrix
smoky oak
#

see im asking cuz running a profiler on a remote spigot server is kinda difficult

lost matrix
#

If we are speaking about something like VisualVM then remote profiling is not that hard (if you have root access)

#

Also Spark deploys a whole profiler itself.
It really depend on what it is you are trying to profile.

sterile token
#

Why is the Main thread being blocked while doing:

ComoletableFuture<Repository<?>> getRepository() {
return CompletableFuture.supplyAsync((Repository<?>) -> return bla, executor);
}

Repository<UserModel> users = getStorage.getRepository("users").find().join();
eternal night
#

.join() kekw

lost matrix
#

.join() joins the current thread... so

sterile token
eternal night
#

no

sterile token
#

🤔

eternal night
#

you understood futures wrong

#

join() will wait for the future to complete

#

what executor you pass does not matter

#

that executor is responsible for executing the future

lost matrix
#

This is executed by the executor. But if you call join() then your executor joins the thread join() was called on

eternal night
#

join() waits for the executor to be done executing

sterile token
#

Right, but how i would get the result without using andThen(), etc

eternal night
#

not at all

#

it isn't available yet

#

that is the entire point of it

#

config.set("message", List.of("Hello", "World"))

sterile token
eternal night
#

what ?

#

no

#

you cannot get the value on the thread without blocking

#

like, just logically that does not make sense

lost matrix
eternal night
#

no matter what impl you write

smoky oak
eternal night
#

sure your future can mutate an Atomic

#

if that is what you mean

#

does not mean you have access to the value directly on the thread

smoky oak
#

ig

#

depends where the variable is initialized

eternal night
#

what ?

#

no like

#

the atomic will be null until the future completes

#

how is your code gonna know when that happens ?

#

because before that, you just have null in your atomic reference

smoky oak
#

ah i was referring to running threads my bad

#

i was like 'isnt that what we have monitor locks for'

#

or whatever you call that to not do read/write operations on the same value in parallel

echo basalt
#

verano wants to use futures and obtain the result in the main thread without blocking

#

sounds counter-intuitive, that's not how future works

young knoll
#

Well when we get time machines in java it might work

sterile token
echo basalt
#

it kinda isn't possible

sterile token
#

But what's an alternativa for it?

echo basalt
#

just using the thenAccept thenWhatever methods

#

You can use an executor to have the data on the main thread, later

sterile token
#

An example?

echo basalt
#

But basically you're in non-linear territory

#

.

sterile token
#

What thats?

echo basalt
#

read

sterile token
eternal night
#

what java version are you on eyes_zoom

echo basalt
#

Yes you can

eternal night
#

ripppp

#

well

true marlin
#

Arrays.asList I think

eternal night
#

I mean

true marlin
#

Uhh

eternal night
#

create a list somehow

true marlin
#

Yeah

eternal night
#

tho Arrays.asList should exist in java 8

sterile token
true marlin
#

I think you are running Java -8 xD

#

Btw, how can I run a code when the player walks on a Bed?

#

e.getTo().getBlock().getRelative(BlockFace.DOWN).getType() == Material.BED but it doesn't work

#

No problem!

tall dragon
#

ur prolly tryna get the block under the bed now

true marlin
#

Oh

tall dragon
#

getTo

true marlin
#

Oh yeah

tall dragon
#

not relative down

true marlin
#

Oh ok

#

Thanks

sterile token
echo basalt
#

because javascript doesn't really have a concept of a main thread

sterile token
#

Ohh ok

#

Yeah they use a event pool

#

If i'm not wrong

echo basalt
#

idfk I'm a java dev

sterile token
#

Yes they use something like a thread pool but it's not exactly that

sterile token
#

Sorry for disturbinh

echo basalt
#

is ok

wet breach
#

closest you are going to get is asynchronous tasks

regal scaffold
#

I see that

Bukkit.getOnlinePlayers();

returns

Collection<? extends Player>
#

Is this what I should be using to get all the players?

#

If I want to get all the players or players UUID connected to the server, specifically

wet breach
#

it just returns a collection

#

if you want it in a List for example

#

you would just use the addAll method from the List

tawny remnant
#

I dont think my NMS is working can anyone help?

regal scaffold
#

Ohhhh right right

wet breach
#

and reference the collection

regal scaffold
#

Is it better to do that or use the collection directly?

wet breach
#

You can use it directly, just depends what you are needing hence why it is a Collection and not some specific array of sorts

#

gives you freedom to have it anything you need it to be

regal scaffold
#

Gotcha!

#

Thanks forst

#
List<Player> uuids = new ArrayList<>(Bukkit.getOnlinePlayers());
civic topaz
#

I want to merge 2 plots. How do I get the blocks of the road between the two plots to make them grass? (my own plugin)

https://imgur.com/a/AggRm4X

wet breach
chrome beacon
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

regal scaffold
tawny remnant
rotund ravine
#

😘

#

?nms

wet breach
#

reason for using toArray is it will ensure the array its being copied to is exactly the same size as the number of elements it contains

#

also it is more performant as well and since it creates a copy the array instance has no referneces and safe to use anywhere

regal scaffold
#

Ahhhh gotcha gotcha

wet breach
#

all that from just one method

regal scaffold
#

But technically

#

Shouldn't really be an issue

#

But safer

tall dragon
#

0

wet breach
#

all arrays in Java start at 0

wet breach
#

you would need one more line of code

#

that is, to size the array before hand which is less performant then toArray() to not lose performance when copying another array

fluid river
#

lol

#

i just realised the word "Standart" is actually "Standard" on english

tall dragon
#

💀

fluid river
#

my life will never be the same

regal scaffold
#

What's a good way to implement a network wide restart? Synced, example, all servers under the proxy restart together

#

With a timed countdown, that is

wet breach
#

use a bash script or have them all as a service

smoky oak
#

why not just say 'restart at 3 am'

#

works for me

regal scaffold
#

Bash script won't announce ingame

#

That it's gonna be restarted

wet breach
#

yes it will

regal scaffold
#

Huh?

#

Really?

wet breach
#

you can send messages from bash to in game 😛

regal scaffold
#

tf

wet breach
#

let me show you

regal scaffold
#

That would be amazing, thanks

wet breach
#

that is one of the service scripts I have, but that link shows the line where it sends a message in game 🙂

#

this is a bash script and not a service one but its for a ramdisk setup

regal scaffold
#

Wait a second

#

Ok first of all

#

That's sick

fluid river
#

make a small bungee plugin which just runs console command restart on 3am

#

for all servers 😉

smoky oak
#

i mean a plugin can just create a server socket

#

and listen to a specific port

#

for messages to display

regal scaffold
#

I guess

fluid river
#

but idk if bungee has /restart

regal scaffold
#

I could make a bungee bukkit-brige

fluid river
#

/end ig

regal scaffold
#

I'm using pterodactyl

wet breach
#

wouldn't need to do that, all of this can be done from a bash script even if the servers are not on the same host

regal scaffold
#

That's the thing

#

They have cron tasks

#

But how can I edit that to send a countdown in game, even if it's basic

fluid river
#

and set the restart time to yml for example

wet breach
#

do some stuff like what?

regal scaffold
#

He's right tho, I can edit all server startup scripts

#

And that would do the trick I think

fluid river
wet breach
#

such as

fluid river
#

idk lol

#

i never maintained a network

wet breach
#

my service script I linked earlier, auto restarts servers if they die as well as lets you spin up as many servers as you want by using arbitrary names it doesn't know about before hand 😛

#

also, the service script locks the java processes as well

#

also known as jailing

regal scaffold
#

But

wet breach
#

so I don't see how a plugin would be more beneficial

regal scaffold
#

Do you know if it's possible to use something like that with Pterodacyl

wet breach
#

have no idea, never used pre-made panels like ptero

#

Have no use for them and they never provide what I want as well as taking up valuable resources for stuff I don't care about

regal scaffold
#

They only offer a startup command by default. I'm sure I can change stuff inside tho

#

Fair

wet breach
#

bash script, you can use ssh if need be and without passwords since you can have certs. Therefore, not hard to create a bash script for the purpose of restarting all servers

#

however, restarting servers shouldn't be a normal everyday thing

#

if you have decent plugins, typically most I have used were custom. You can have an MC network and servers running for months before restarting them

regal scaffold
#

Really?

#

hmmmm

#

Usage tends to go higher tho

wet breach
#

its not going to go beyond what you allocated it

#

if it does it dies anyways

#

and should be investigated at that point in why it tried to use more then you gave it

regal scaffold
#

But but

#

If you leave it on for longer

#

Doesn't it tend to eventually go up and up until it can't cause allocation?

fluid river
regal scaffold
#

Well, java has GC

#

But still doesn't stay at the same usage as it starts off

fluid river
#

depends on the plugins ig

wet breach
regal scaffold
#

Oh!

#

That's actually a good idea

#

So straight up give it min and max

#

Same value

wet breach
#

yes

regal scaffold
#

That's smart

wet breach
#

its better too

fluid river
#

or maybe spigot has endless recursions somewhere

#

idk

regal scaffold
#

Gotcha gotcha, thanks both

wet breach
#

?flags

undone axleBOT
wet breach
#

but yeah, if you are having to restart your mc servers everyday then there is something wrong and it should be looked at in why you are needing to do that

fluid river
#

freejavalessons

#

tho there is a skyrim mod

#

afair papyrus is a scripting language

#

and it can have recursions

regal scaffold
#

Man I'm looking at these voting plugins

#

That are available

#

They are all outdated

fluid river
#

i can help you write one

#

😉

regal scaffold
#

I can make my own but

#

Something so common i'm surprised there isn't a decent alternative already

fluid river
#

is that possible in like c++ or java

#

@wet breach

#

afair you can link to an .exe process with some cpp magic

fluid river
#

cuz there is no decent plugin which removes leaves too

pine lake
#

Hello, how can I use translatable text as item displayname? I have a texture pack with custom lang files and I wanted to know how I could do that

regal scaffold
#

Hey, I remember once I saw a website that had a practical example on using github

#

Like, it explained and then let you do examples

#

To really learn commits, branches and that stuff

wet breach
regal scaffold
#

Found it

wet breach
#

only reason mods exist for what you are talking about is because players/modders don't have access to the code to actually fix it

#

so yes, you can provide scripting functionality from java, but as I said you have to implement it

pine lake
fluid river
#

which are from other mods or base game

wet breach
#

either kill it or satisfy the requirement to make it stop

#

you can satisfy the requirement to make it stop if you know what its searching for or why it is looping

#

it be as little as a boolean change to make it stop

fluid river
#

well what about killing

wet breach
#

if its in another thread you would kill that thread

fluid river
#

isn't that some kind of cpp hacking

#

where you can just connect to the .exe process and like change the entire game

#

like with cheats

wet breach
#

no different then attaching a debugger

haughty storm
#

How can i change the skin of a player with nms?

eternal oxide
#

you don;t need nms to change a skin

#

PlayerProfile

eternal night
#

did I miss spigot adding a setter to the player for their player profile

eternal oxide
#

no you can reflect the field

eternal night
flint coyote
#

In that case you don't need nms for anything lol

eternal night
#

you still need to send the update packets ?

lost matrix
#

Wait... cant you just change the textures in spigot?

eternal night
#

the profile is not mutable is it eyes_zoom

#

well

#

not mutating the backing game profile

eternal night
#

a players PlayerProfile

#

spigots GameProfile abstraction

wet breach
#

you can use update()

eternal night
#

you can set it on skulls and the respective skull item iirc

#

but update just updates the instance

#

not the player

wet breach
#

it updates the profile based on what you set stuff

eternal night
#

well ye

#

but I don't think that is actually applied to the player

#

unless I am tripping

wet breach
#

only the UUID and ID

#

are immutable

#

everything else can be changed

eternal night
#

yes on the profile instance...

#

that is an abstraction

#

I am talking about those mutations actually mutating the backing/based NMS gameprofile

wet breach
#

I am pretty sure it does

eternal night
#

which would be required for changing a player skin

wet breach
#

otherwise its a rather pointless api

eternal night
#

no lol

wet breach
#

yes

eternal night
#

hence why there are setters on item meta

#

and skulls

wet breach
#

because they would be useless otherwise

eternal night
#

those would be rather pointless if the api interface directly mutates its origin/inner game profile

#

spigot also does not send any update packets

#

so that would be a somewhat trashy implementation

#

yea nah, it does not mutate the underlying GameProfile

#
// The Map of properties of the given GameProfile is not immutable. This captures a snapshot of the properties of
// the given GameProfile at the time this CraftPlayerProfile is created.
public CraftPlayerProfile(@Nonnull GameProfile gameProfile) {
    this(gameProfile.getId(), gameProfile.getName());
    properties.putAll(gameProfile.getProperties());
}
#

it creates a copy

eternal oxide
#

itdoesn't? bum, in that case minimal nms

wet breach
#

then pretty pointless to me that it exists. I don't need an abstraction to provide something to NMS

#

when I can provide it directly

eternal night
#

the based game profile is not tracked

#

the point is that you don't have to touch nms ?

#

it works for skulls and skull items just fine

wet breach
#

you have to touch it anyways to update the profile

#

so moot on that

eternal night
#

hence why there is no setter on player ?

#

just because the API isn't complete does not mean it is useless

wet breach
#

so why would I use the abstraction if I have to use nms anyways

#

what benefit is it providing that I couldn't already do

eternal night
#

if you don't deal with players ?

#

the API is not just for players lol

#

as stated like ~5 times now, it seems to primarily exist for skulls

#

as they have setters

wet breach
#

you didn't say it existed for skulls, you just said skulls have setters

eternal night
#

ah sorry if that wasn't clear

#

I thought the existence of setters implied that, I blame my english teacher

wet breach
#

maybe one day we will get an API for updating skins on players

#

kind of surprised there isn't one yet

eternal night
#

smirks over at paper

tender shard
lost matrix
eternal night
#

Max Musterman for sure

lost matrix
#

Wait you are a swede, right?

eternal night
#

bruh

#

I feel a bit hurt

lost matrix
#

Something scandinavian was in my head

tender shard
#

I thought he's dutch or sth

wet breach
#

maybe they are finnish

eternal night
#

😭

#

damn

#

my github seems to not be spicy enough

#

for people to look at it

wet breach
#

ah German, shame I don't even think we have anyone from Finland quite ironically

tender shard
#

Bjarne. Ok, he's indeed scandinavian

lost matrix
#

Why do he have so many germans here?

eternal night
#

rich coming from Gestankbratwurst

lost matrix
lost matrix
eternal night
#

its a danish name, flame my parents

tender shard
#

flammkuchen lynx' parents

eternal night
lost matrix
#

Yes thats a flammkuchen. It kuchs flammen.

tender shard
#

damn bf wants to play minecraft with me. he never played it. now he probably thinks I'm a pro in that game but I don't even know basic things about it

remote swallow
#

can i get a translation on Gestankbratwurst

eternal night
#

probably not xD

tender shard
remote swallow
#

translate harder

lost matrix
tender shard
#

what is skyfactory?

wet breach
#

bad sausage ?

tender shard
wet breach
#

is that what it means?

tender shard
#

or Pyjama Sam, in english

wet breach
#

such fun, trying to collect all the socks

tender shard
#

yeah I recently played all parts again

#

also spy fox

#

and all the other games by that company

lost matrix
tender shard
#

hm ok I'll take a look at it

rotund ravine
eternal night
wet breach
#

their name means bear

#

in case anyone was curious

frank kettle
#

?xy

undone axleBOT
wet breach
#

Bjarne is a variation on Bjorn which means Bear 🙂

eternal night
remote swallow
#

were just cool like that unlike paper

#

who are all swifties

icy beacon
#

facts

torn shuttle
#

I haven't ever really looked into it that much, can resource packs replace the models of entities beyond just changing the texture?

#

I believe so right?

remote swallow
#

iirc for some they can but theres limitations

#

cant change hitbox though

young knoll
#

No

#

You need optifine to change the models

#

They are hardcoded

torn shuttle
#

I thought it was possible to an extent

remote swallow
#

who doesnt have optifine or custom entity models for fabric

remote swallow
#

call them a nerd and ban them

torn shuttle
#

so the hacks something like modelengine does is the bare minimum huh

young knoll
#

If you want a custom model you have a few options

#
  • Armor stand magic
  • Invisible entity with custom modelled items on head/hands
  • Shader magic
lost matrix
#

There is new approach using display entities im working on right now.
You can basically split a Model from BlockBench into smaller parts, generate
item models with it and use them as the body of your entity. I just need to properly
figure out how the client interpolation works PES2_SadGeRain

torn shuttle
#

I already have a plugin that works in converting blockbench models into leather horse armor

#

it works though the project itself is just sort of halfway done, got busy with other stuff

young knoll
#

Yeah display entities are basically the new armorstand method

lost matrix
#

*With interpolation

#

Thats the neat part

torn shuttle
#

so how does that one work then

#

I mean

lost matrix
#

Oh and im still not 100% on board with 2 Quaternions being needed for the rotation...

torn shuttle
#

that's not the leather horse armor method right?

young knoll
#

Objmc is a cool tool

#

It can turn .OBJ files into a shader

lost matrix
#

Well you should still use leather horse armors. But instead of using ArmorStands you now use
display entities. Better performance for clients and (as stated before) interpolation for scale, translation and rotation

torn shuttle
#

what's a display entity?

young knoll
#

A new entity for 1.19.4

#

ItemDisplay renders items

torn shuttle
#

oh

remote swallow
#

non ticking entity that can display a block, text or an item

torn shuttle
#

very new

#

huh

young knoll
#

They are really cool

remote swallow
#

yes

young knoll
#

Shout out to Mojang

torn shuttle
#

damn

#

sure would've been cool to have that 11 years ago mojang

remote swallow
#

i can have 1000 right infront of me and only loose 30 fps

quaint mantle
young knoll
#

Pretty much

remote swallow
#

pretty much

lost matrix
# torn shuttle damn

Minecraft 1.19.4 Update Playlist ► https://www.youtube.com/playlist?list=PL7VmhWGNRxKixIX8tWEQn-BnYKE9AaAXk
This snapshot continues with the Minecraft 1.19.4 development, adding in some powerful new creative features!

All My Links In One Place
🔗 https://linktree.xisuma.co

🙏 Support Xisuma Directly 🙏
💜 Membership ► https://www.youtube.com/xisum...

▶ Play video
torn shuttle
#

mojang has just discovered empty game objects from any game engine

remote swallow
#

xisuma is great

young knoll
#

There’s also the interaction entity

#

Which can have a custom sized hitbox for detecting interactions

lost matrix
#

Finally right clicking air with nothing in your hand is possible

young knoll
#

Mhm

torn shuttle
#

what a time to be alive

young knoll
#

It also works as a vanilla worldguard

#

Somewhat

torn shuttle
#

so basically just switch out armorstands with empty entities

young knoll
#

Mhm

#

Armor stands are cancelled

lost matrix
#

And now you dont have scaling limitations anymore 😄

torn shuttle
#

I saw armorstands with a black helmet on them in 2013, I knew they would get cancelled at some point

young knoll
#

They have been returned to their normal usage

#

Standing with armor on them

quaint mantle
#

can someone

#

help me?

lost matrix
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

torn shuttle
#

damn those display entities are pretty dang cool

young knoll
#

Data driven blocks next Mojang

torn shuttle
#

I look forward to people begging me to port a model displayer to versions before 1.19.4

young knoll
#

Do it 🔫

lost matrix
#

For example this is me trying to figure out why the fk the rotation currently changes the scale (?!)

torn shuttle
#

I'm surprised that scale didn't tank fps

torn shuttle
lost matrix
young knoll
#

The people over at the minecraft commands discord seem to already have this stuff figured out

#

They wild

hybrid spoke
remote swallow
#

512x512 mob boss

hybrid spoke
#

just with massive fps and tps drops

torn shuttle
#

I haven't checked anything about 1.19.4, how are these things in the api?

lost matrix
hybrid spoke
#

but you cant stretch them or?

young knoll
#

They have methods for all the stuff

lost matrix
#

Pretty extensive so far

torn shuttle
#

dang

#

I have been meaning to release a free open source alternative to modelengine

#

this might be the time

young knoll
#

Hey model engine is free

#

For 5 models

#

:p

torn shuttle
#

yeah mine will be infinity times free-er

onyx fjord
#

oh i see

onyx fjord
#

ive heard u can display text

torn shuttle
#

yeah

young knoll
#

Mhm

lost matrix
#

Yes. Holograms just got a lot better

torn shuttle
#

holograms just actually became holograms

young knoll
#

I’ve even seen someone display text on screen by syncing a text display with the players location

lost matrix
#

And! You now have good utility for clickable text.

young knoll
#

Well they weren’t moving much so it was fine

torn shuttle
#

lol

#

yeah I can do that too

young knoll
#

I imagine if you run around a lot it’ll kinda suck

#

Unless you have 0 ping

torn shuttle
#

I'll just send you a png, make sure to open it and bam presto a brand new display

#

you'd be better off adding a resource pack and feeding the player some scoreboard magic

#

or action bar or boss bar, doesn't matter

#

or title I guess

hybrid spoke
#

everyone now trying to be the first with a new hologram plugin

torn shuttle
#

I mean existing hologram plugins just have to check the version and spawn one of these puppies instead

#

it's a pretty easy hotswap

young knoll
#

More options tho

torn shuttle
#

more efficient

young knoll
#

Text background color for example

lost matrix
#

Nah ive done it already. If you used decent abstraction then you just need to implement one interface
and you are done. The packets are also pretty self explanatory.

torn shuttle
#

I'll be the first to add a bitcoin price ticker hologram

hybrid spoke
#

i'll be the first to add a bitcoin miner

lost matrix
#

Has been done already

hybrid spoke
#

damn sucks

torn shuttle
#

yeah mojang where are the visual only bitcoin mining blocks

lost matrix
#

There was a plugin which mined some crypto on your cpu

hybrid spoke
young knoll
#

Lol it’s not mine

lost matrix
torn shuttle
#

relay the message then

young knoll
#

Yes

#

It’s a shame Mojang can’t just give us a packet for this

torn shuttle
#

it's a shame mojang doesn't do what cs:source was doing over a decade ago and allow us to feed modpacks to clients on login

young knoll
#

ClientboundRenderTextPacket(x,y,text)

#

Mojang should hire me for this stuff

#

@dinnerbone plz

torn shuttle
#

so I would have to figure out the interpolation huh

#

interpolation is client-side?

young knoll
#

You gotta figure out them quaternions too

lost matrix
#

Wouldnt be much of an interpolation if it wasnt, lul

hybrid spoke
ancient plank
#

Display dis

#

Damn I butchered that before pressing the autocorrect button

torn shuttle
#

quaternions is fine, I just added a shortest arc quaternion solution to my plugin like a week ago

lost matrix
ancient plank
young knoll
#

I would never

#

I know what the java mod community wants

#

Everything, but that’s beside the point

ancient plank
#

Brb gonna go convince my server to have us update to 1.19.4 instead of 1.18

torn shuttle
#

so you feed it a transformation and then set the interpolation, that's it?

lost matrix
#

I almost read "1.8" PES_Yikes

young knoll
#

Use the convincing stick

#

Aka the 2x4

quaint mantle
#

Hey, is there a way to make unbreakable blocks breakable?

ancient plank
hybrid spoke
lost matrix
quaint mantle
#

I meant like bedrock or barrier blocks

young knoll
#

I mean do you want a simple breaking system or a more complex one

delicate lynx
#

if player clicks then break

hybrid spoke
#

creative

quaint mantle
torn shuttle
#

lol why are they left rotation and right rotation

young knoll
#

If you just want them to break when clicked that’s easy

ancient plank
#

Creative mode upsets me

delicate lynx
#

give them creative mode for 0.1 seconds