#server-plugins-read-only

1 messages · Page 111 of 1

opaque cape
#

With just 8 Players we are seeing 70-105% ram usage

lucid spire
#

how much ram do you have?

opaque cape
#

24GB for the Server on Nodecraft

lucid spire
strange trout
#

Vector3d directionVector = headRotation.getDirection();

lucid spire
#

are you sure you are talking about ram and not storage?

opaque cape
#

I can even prove it to you

robust ember
zealous sonnet
opaque cape
#

I can even prove it lol

zealous sonnet
#

If youre maxing out ram usage your server would freeze. Im not saying youre nor right, but something isnt adding up here.

fossil warren
#

No, I do not think so.

I have already verified the reference location multiple times. The file exists in the correct path, it is included in the jar, and the logs confirm it is being updated during hot code replace. If it were a bad reference location, the file would not be detected or packaged at all

opaque cape
#

Then Nodecraft must be reporting its usage incorrectly

#

Because it says 107% usage like 30 Minutes ago for the RAM

zealous sonnet
#

REALLY wish we could send images.

opaque cape
#

I can send it to you in a DM xD

lucid spire
#

can you give a custom item metadata by default?

strong musk
final pulsar
#

Using closeAllWindows inside of an ECS handler (EntityEventSystem<EntityStore, CraftRecipeEvent.Pre>) causes the world to crash, anyone see this before or dealt with it?

strong musk
#

its probably your allocated ram tbh

rugged forum
#

2026-01-31 00:38:49.3695|INFO|HytaleClient.Utils.SentryHelper|Sentry event captured: 14b6e2c3ae3f4e9a97890421f9d1e502 2026-01-31 00:38:49.4150|INFO|HytaleClient.Application.AppGameLoading|Disconnecting with error during stage GameLoading: Failed to load CustomUI documents 2026-01-31 00:38:49.4150|INFO|HytaleClient.Application.AppGameLoading|System.Exception: Failed to find asset with hash b9e50e2ff8094a8313ba1b8c599e25c30d72b205c60fa613257f98f5a5d2157f System.Exception: Failed to find asset with hash b9e50e2ff8094a8313ba1b8c599e25c30d72b205c60fa613257f98f5a5d2157f at HytaleClient!<BaseAddress>+0x59660c at HytaleClient!<BaseAddress>+0x596690 at HytaleClient!<BaseAddress>+0x263e13 at HytaleClient!<BaseAddress>+0x695bb9 2026-01-31 00:38:49.4422|INFO|HytaleClient.Application.Program|Changing from Stage GameLoading to Disconnection 2026-01-31 00:38:49.4501|INFO|HytaleClient.Application.Program|Generating new self-signed certificate... 2026-01-31 00:38:49.5741|DEBUG|HytaleClient.Application.Program|Telemetry packet sent: event (seq: 5) 2026-01-31 00:38:49.6254|INFO|HytaleClient.Application.Program|Certificate generated successfully in 88.1703ms. Fingerprint: aH0jzTMQMfK8qEecjR-YYwSMxs3J3Mg9hm1H3TaN-Gw 2026-01-31 00:38:49.6780|DEBUG|HytaleClient.Application.Program|Telemetry packet sent: event (seq: 6) 2026-01-31 00:38:49.7330|INFO|HytaleClient.Utils.SentryHelper|Sentry event captured: dbb476eee6ac4dd09870bb2e446ca363 2026-01-31 00:38:49.7981|ERROR|HytaleClient.Application.Program|System.NullReferenceException: Object reference not set to an instance of an object. at HytaleClient!<BaseAddress>+0x68adff at HytaleClient!<BaseAddress>+0x59aab3 at HytaleClient!<BaseAddress>+0x63bd47 at HytaleClient!<BaseAddress>+0x653ba7 at HytaleClient!<BaseAddress>+0x65374c at HytaleClient!<BaseAddress>+0x120bc57⁩ Someone has this error seen?

gentle vector
#

any option to increase portal limit for a server?

#

as in dynamically per player?

night sable
opaque cape
#

Has the Server Jar changed much since like a week ago?
Wondering if I should go through the trouble of redecompiling the latest version

#

About to start on a new mod, This time for Economy stuff

rich gate
#

Just have the tool check ur previously compiled jar for updates

opaque cape
#

What tool?

#

I was just using CFR to Decompile it

tawny pelican
#

In my world, I placed an NPC a while ago and now I can't remove it. Do you know what I can do?

rugged forum
kind osprey
#

@opaque cape heeey im about to use your mod to transfer my inventory to another world, how does it work again?

lucid spire
#

is it possible to store and change a value (like an int) on an item, without having to remove the item

so far i only figured out how to do it with metadata (bson document) by getting all metadata (depricated) and changing the value i want, remove the item from the inventory, and add a new item

there has to be a better way, right?

ocean kite
#

If any devs are looking for a server to work for lmk

brittle carbon
#

@everyone

fervent lava
#

We're looking for modders, models, designers and map makers!

We have a robust amount of features that need TLC.

Features:
Two rival factions built around playable races
Two capital cities and 12 unique race starting settlements
Clan-based territory control with sieges and warfare
Combat classes with unique skills and abilities
Professions that drive the economy and town building
Challenging dungeons for high-tier gear and rare resources
PvP objectives that reward factions and clans with powerful bonuses

opaque cape
#

Will mods that share a package name conflict?
eg: If I have two mods that are com.shubshub.plugin

blazing cosmos
#

why would u have 2 mods named that

opaque cape
#

Because its my second time ever making a mod

lucid spire
#

any way to modify the metadata of an item without removing it from the inventory?

opaque cape
#

⁨```package com.shubshub.economy;

import com.hypixel.hytale.logger.HytaleLogger;
import com.hypixel.hytale.server.core.plugin.JavaPlugin;
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;

public class ShubshubEconomy extends JavaPlugin {
private static final HytaleLogger LOGGER = HytaleLogger.forEnclosingClass();

public ShubshubEconomy(JavaPluginInit init) {
    super(init);
    LOGGER.atInfo().log("Hello from %s version %s", this.getName(), this.getManifest().getVersion().toString());
}

@Override
protected void setup() {
    this.getCommandRegistry().registerCommand(new ShubshubEconomyCommand(this.getName(), this.getManifest().getVersion().toString()));
}

}```⁩ And the modding begins

#

Ok so I'm probably being really dense
But which argument is the actual command I'm executing in the chat? xD

#

is it the this.getName() ?

#

Ah yep it is

#

The example code I was looking at is just bad and doesnt really explain, But TroubleDevs one makes it more obvious

teal stone
#

ui

opaque cape
#

Money Balance, How should I store that?
Integer? Double? Long? Other?

native pike
#

can i reload plugins in game?

west elk
copper summit
#

Anyone willing to help me test something on my server rq?

unkempt musk
#

Any idea where in the decompiled jar does it handle keybinds set by config.json? Im trying to check how the packet route works when a player presses a keybind, and what route the input takes.

copper summit
opaque cape
copper summit
#

I know Type Script lol, the simpler js

opaque cape
#

Well we're talking about Java

JS doesnt have types

#

TypeScript also only pretends to have types, Because it just compiles to JS

copper summit
#

oh i didnt even know there was a difference lmao

opaque cape
#

Which is why I dislike TypeScript because its just pretending to be a real language

copper summit
#

Yeah its simpler to use tho

opaque cape
#

Everything in JS is just var
TypeScript just does compile time checking of the types

#

Though in modern versions of JS you also have const and let, Which are just fancier versions of var, No real type casting

copper summit
#

oh actually i was using js not typescript

#

thats why this is new to me, its java

#

its familiar, you just have to be more precise with stuff, and also final vars are a thing in here which was a weird concept for me to grasp

idle nebula
#

Anyone know if the spawn block prefab works or still in progress?

#

Spawn prefab block*

copper summit
#

theres a prefab to set a spawn?

opaque cape
#

Though thats not to say modern JS Engines dont compile the JS to machine code first

sour cargo
opaque cape
#

JS is a special little boy

#

Though it is my day job 😄

copper summit
#

i rewrote cofl basically lol

#

just a lot less complex

stark steeple
#

to be fair, if your confused about what data type to use for your currency, are you sure you know what your currency is? like say your using gold for currency, then integer is fine, if your using USD, then definitely something floating point based. so look at the what your currency is.

copper summit
#

still real complex tho, had a baz scanner and everything for automatic price adjustments and stuff

copper summit
quartz plover
#

I doubt you want floating point on real currencies like USD. You'd want an object with integer fields, one for the whole number and one for the decimal points, preferably not allowing it to go higher than 99.

idle nebula
#

Anyone looked at prefab spawning code to see if the prefab spawn block is implemented?

opaque cape
#

Its not that deep fam

stark steeple
#

im not attacking you if thats waht you think, i was just point out that if you design your currency, you know what it is.

opaque cape
#

Also I'm trying to get as far as I can without resorting to asking Claude any questions

quartz plover
quartz plover
opaque cape
#

How have I been toxic?

opaque cape
rich lagoon
#

im having an issue trying to make custom traders (not changing existing trades but npcs with new shops. ill admit im currently trying to copy the npc role from the kwebec merchant then trying to tag it to my new shop but its not working any advice on how to do so iv even tried going through and changing every mention of kweebec in the file to the new one and still rootling shop shows up -_-

copper summit
opaque cape
#

I'm sure I'll ask it something eventually

#

But I'd like to atleast design the structure

copper summit
copper summit
opaque cape
#

Atleast as far as decimals go, I think I dont need to care about decimals

copper summit
opaque cape
#

Guys it doesnt matter

dusky sable
#

Does anyone know if there an on chunk load event?

tranquil drift
#

How do I add hytale client to intellij idea

quartz plover
tranquil drift
#

im too lazy to transfer files manually lol

quartz plover
quartz plover
tranquil drift
#

oh yeah I didn't think of that thank you

fossil warren
dusky sable
rich lagoon
#

im having an issue trying to make custom traders (not changing existing trades but npcs with new shops. ill admit im currently trying to copy the npc role from the kwebec merchant then trying to tag it to my new shop but its not working any advice on how to do so iv even tried going through and changing every mention of kweebec in the file to the new one and still rootling shop shows up -_-

dawn torrent
#

Can some people comment on my plan? I'm trying to make a way to create a "EnergyNetwork" of devices to balance power

I'm thinking when the block gets placed, and it has an EnergyComponent, it gets passed to a EnergyNetworkManager class.

The class then puts it in a network of a block that it's adjacent to.

If there's multiple networks, it gets given to the network with the most nodes.

Then once every entity tick, a provider gives it's "available to transfer" number to it's network, a consumer requests it's "available to receive" to it's network

Once every world tick:
The net of "available this tick - requested this tick" gets calculated

if the network is in a deficit, it checks "storage" nodes on the network and draws from it if it can. If it can't, it each consumer receives requestedEnergy - (deficit / consumer) energy

if the network is in a surplus, it tries to give power to "storage" nodes

once all of that is calculated, buffers are changed.

The EnergyNetworkManager only works off of buffers, individual devices interact with their buffers and not the network. Somehow I need to incorporate "cable speed" into this as well

opaque cape
#

Or is it the collection of things connected together via a wire system?

covert goblet
#

O

dawn torrent
#

The collection of things connected via a wire system

opaque cape
covert goblet
#

Algum br pra jogar amanha

#

Chama depois aí no discord

dawn torrent
#

Yeah I suppose. I was thinking of it more as a map of the actual EnergyComponents

opaque cape
#

The plan seems relatively sound to me, Though I've not built energy systems yet

dawn torrent
#

But that can get tricky if stuff gets unloaded I reckon

opaque cape
#

I'm currently tackling Economy Systems

native pike
#

my server crush when i do a command saying that the selected element in custom ui command was not found
its this line
cmd.set("Stat1Value.Text", String.valueOf(playerOnline));
but the element is in the ui code

                    Text: "0";
                    Anchor: (Height: 32);
                    Style: (FontSize: 26, TextColor: #4a9eff, RenderBold: true);
                }```
the ui is connected to the code, i checked it, i dont know where the problem is, maybe i need to include the group of the label?
west elk
opaque cape
#

How do you prefer to access methods from one file to another?
Do you make like a Manager Class? Or just make things public

west elk
#

i have a lot of public static methods for helpers

opaque cape
#

Would it be worth putting them in like an EconomyManager class?

#

Rather than just having them all public in my main class

west elk
#

when a plugin gets larger, it makes sense to take business logc out of the main class and let the main class only do scaffolding and lifecycling

opaque cape
#

oki

#

I'll try get into the habit of doing that I think

west elk
#

makes it easier to find stuff in the long run

opaque cape
#

What does computeIfAbsent mean?

public PlayerBalanceData getPlayerBalanceData(UUID playerUuid) { return playerDataCache.computeIfAbsent(playerUuid, uuid -> { loadPlayerData(uuid); return playerDataCache.get(uuid); }); }

VS Code just autocompleted this but unsure if its even a real thing

#

Does it do what I'm thinking? Run some code if the entry doesnt exist?

bold bear
#

Hey everyone, I have the Nitrado Hytale WebServer and Hytale Query Plugin running on my server. I can access the API, but it requires authentication.

I know you can make data public by adding the ⁨⁨ANONYMOUS⁩⁩ group in ⁨⁨permissions.json⁩⁩ like this:

⁨⁨```
{
"Groups": {
"ANONYMOUS": [
"nitrado.query.web.read.basic"
]
}
}


But I cannot find anywhere in the documentation that says where to put permissions.json.

Has anyone set this up and can point me in the right direction?
opaque cape
#

In my Command Class, How can I grab the executing player?

west elk
opaque cape
#

Hmmm, My command currently extends CommandBase

west elk
#

Do you want it to be executable by the console?

dawn torrent
opaque cape
west elk
opaque cape
west elk
#

yeah was probably for a more general use case

#

you can get the player from the sender, but you have to do extra checks

opaque cape
#

Thanks

#

Its probably better to show the balance as an Event Title right?

#

Chat could get cluttered by players potentially....

west elk
opaque cape
west elk
#

it shows a notification instead of a title

opaque cape
#

Hmmm alright

#

Whats the import for that

#

And an example code

west elk
#

I can't put images here, but if you wanna see it before you try it out, look up Hyphen45's "Notifications & Event Titles" youtube video

opaque cape
#

Oh I see

rich lagoon
#

im having an issue trying to make custom traders (not changing existing trades but npcs with new shops. ill admit im currently trying to copy the npc role from the kwebec merchant then trying to tag it to my new shop but its not working any advice on how to do so iv even tried going through and changing every mention of kweebec in the file to the new one and still rootling shop shows up -_-

copper summit
stone crag
#

hi, idk if this is the right chat for it but my buddy is getting the "{Setup(null (null, streamId=0)), VagueBreach, 9db6240c-a59c-4393-a464-f438eb227b40, SECURE} was closed." and disconnect when trying to join my dedicated server...any ideas?

upper wyvern
real canyon
#

@late breach Can anyone tell me why new plugins are added to an explicit disabled list by default, instead of maybe just not loading it unless it's checked-off/authorized/etc by the user? Having a hidden list that automatically disables plugins is pretty confusing.

stone crag
#

yeah he is typing it correctly, he can't even join a world via a code

latent spindle
#

guys how do u fix "Failed to obtain authorization grant from session service" I can't join this one server because of this but other servers I can join just fine...

copper summit
latent spindle
#

I see

opaque cape
#

So I'm getting this error

[2026/01/31 03:23:24 SEVERE] [AbstractCommand] Exception while running that command: java.lang.IllegalStateException: Recursive update at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1075) at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1018) at ThirdPartyPlugin//com.shubshub.economy.EconomyManager.loadPlayerData(EconomyManager.java:61) at ThirdPartyPlugin//com.shubshub.economy.EconomyManager.lambda$getPlayerBalanceData$0(EconomyManager.java:28)

Here is the code in question

⁨```return playerDataCache.computeIfAbsent(playerUuid, uuid -> {
loadPlayerData(uuid);
return playerDataCache.get(uuid);
});

private void loadPlayerData(UUID playerUuid) {
try {
...Irrelevant Code here
} catch (Exception e) {
LOGGER.atWarning().log("Failed to load player data for " + playerUuid + ": " + e.getMessage(), e);
// Fallback to default
playerDataCache.put(playerUuid, new PlayerBalanceData(playerUuid, BigInteger.ZERO)); //The code thats running
}
}```⁩

copper summit
#

Is it because its abstract command and needs a playerref?

opaque cape
#

This is after I've called the command

copper summit
#

because if so it needs to extend abstract player command

opaque cape
#

Its trying to Create the Balance file and then return it

#

⁨```public class ShubshubEconomyBalanceCommand extends AbstractPlayerCommand {

private EconomyManager economyManager = new EconomyManager();

public ShubshubEconomyBalanceCommand(@Nonnull String name, @Nonnull String description, boolean requiresConfirmation) {
    super(name, description, requiresConfirmation);
    this.setPermissionGroup(GameMode.Adventure); // Allows the command to be used by anyone, not just OP
}

@Override
protected void execute(
        @Nonnull CommandContext commandContext,
        @Nonnull Store<EntityStore> store,
        @Nonnull Ref<EntityStore> ref,
        @Nonnull PlayerRef playerRef,
        @Nonnull World world
) {

    PacketHandler packetHandler = playerRef.getPacketHandler();
    PlayerBalanceData playerBalanceData = economyManager.getPlayerBalanceData(playerRef.getUuid());

    Message primaryMessage = Message.raw("This is the primary message").color("#00FF00");
    Message secondaryMessage = Message.raw("This is the secondary message").color("#228B22");

    ItemWithAllMetadata iconItem = new ItemStack("Weapon_Sword_Mithril", 1).toPacket();

    NotificationUtil.sendNotification(
            packetHandler,
            primaryMessage,
            secondaryMessage,
            iconItem
    );
}

}```⁩

Yes we are doing that

#

Its dying in economyManager.getPlayerBalanceData

#

public PlayerBalanceData getPlayerBalanceData(UUID playerUuid) { return playerDataCache.computeIfAbsent(playerUuid, uuid -> { loadPlayerData(uuid); return playerDataCache.get(uuid); }); }

copper summit
#

Oh okay, thats out of my realm lmao

opaque cape
#

And then it does the LoadPlayerData and first time it goes to the catch so it initializes the PlayerBalanceData

#

oh wait maybe I'm just extra special today

copper summit
#

i can read my own code, but as soon as i try to read someone elses code i just loose all sense of whats going on lmao

opaque cape
#

Maybe it'll be resolved now because I properly defined playerDataPath and it wont default to the catch

robust fjord
#

it's an experience

opaque cape
#

You learn to write code thats readable longterm

#

But I usually write JavaScript 😄

#

I'm not familiar with Java, This is my first mod without actually using Claude at all so far

robust fjord
#

you do yeah, that's the difference between coding and engineering

#

I've been mucking around with kotlin coroutines

copper summit
robust fjord
#

my first discord bot years ago was an unmitigated disaster.

copper summit
#

lmao

merry harbor
#

helloo, is there something that works like this?
playerRef.setDisplayName(nameTag);

copper summit
#

i dont believe so

#

What are you trying to do

#

make a var out of the player ref?

#

or change the name of a person?

merry harbor
#

change the name

copper summit
#

I dont believe you can do that, ive never come across anything like that anyway

opaque cape
#

Oh my lord, I solved it

#

It was because of the computeIfAbsent It was being weird

opaque cape
#

Is it good to override the shutdown method? What happens if another mod does the same? How do I ensure mine still runs?

arctic mist
hallow ferry
#

Are blocks in a chunk saved by ID? For instance you have a chunk and a block at XYZ, is the block reference saved by ID or is it saved by its name?

For instance I have this in my log:
Block 88: Soil_Mud_Dry

I assume the chunk saves the block location ID as 88 isntead of the name. The reason I ask though is if the ID changes this could break some things in my plugin. If the use the block name and it changes, that could also break things in my plugin. So I was wondering if anyone has got some insight into it.

arctic mist
#

I use it for shutting down db connections or clearing cache

opaque cape
#

⁨```@Override
protected void shutdown() {

    LOGGER.atInfo().log("Saving player data for " + playerDataCache.size() + " players...");
    for (Map.Entry<UUID, PlayerBalanceData> entry : playerDataCache.entrySet()) {
        LOGGER.atFine().log("Saving player data for: " + entry.getKey() + " with data: " + entry.getValue());
        economyManager.savePlayerData(entry.getKey(), entry.getValue());
    }

    super.shutdown();
}```⁩

Like this?

#

But it seems to ignore other Shutdowns that are overriding it from other mods

frigid zinc
#

wait... why do you need to @Override it?

arctic mist
brisk kiln
#

Hey everyone. I`m trying to find a config on the asset editor that controlls the overall lighting of the world, be it caves or outside. Anyone know how to edit so i can make the darkness actually darker?

opaque cape
#

Because the server has its own shutdown command

opaque cape
frigid zinc
#

you don't have to override it if you put it in your main plugin file

opaque cape
#

Hmmm ok

#

⁨```protected void shutdown() {

    LOGGER.atInfo().log("Saving player data for " + playerDataCache.size() + " players...");
    for (Map.Entry<UUID, PlayerBalanceData> entry : playerDataCache.entrySet()) {
        LOGGER.atFine().log("Saving player data for: " + entry.getKey() + " with data: " + entry.getValue());
        economyManager.savePlayerData(entry.getKey(), entry.getValue());
    }
}```⁩

So this should be fine?

frigid zinc
#

oh wait nevermind-

#

WAIT SH- Sorry lmao BUT it shouldn't override any other plugin's shutdown()

dawn torrent
#

Anyone know how to make a system that executes once per world tick?

frigid zinc
#

⁨```JAVA
@Override
protected void shutdown() {
this.driver.shutdown();
}

I just checked I had mine override as well.
arctic mist
#

Ok seems to be a misunderstanding, the PluginBase.shutdown() triggers when the plugin is turning off after the signal from the PluginManager

You can override that as long as you implement the super since the flow needs to continue. That would mean adding a small section of code for your plugin will run at shutdown

opaque cape
#

Well what is the correct way to implement shutdown logic in my plugin xD Can you please give me some example code

arctic mist
#

The reason you need to declare it as @Override is because PluginBase class already has an implementation of it for natural shutdown of plugins. So if you want to add something to execute before the server shutdowns that should do. Unless you want to override the HytaleServer shutdown sequence, that would need a Mixin

opaque cape
#

⁨```@Override
protected void shutdown() {

    LOGGER.atInfo().log("Saving player data for " + playerDataCache.size() + " players...");
    for (Map.Entry<UUID, PlayerBalanceData> entry : playerDataCache.entrySet()) {
        LOGGER.atFine().log("Saving player data for: " + entry.getKey() + " with data: " + entry.getValue());
        economyManager.savePlayerData(entry.getKey(), entry.getValue());
    }

    super.shutdown();
}```⁩

So my original code is correct?

arctic mist
dawn torrent
#

You'd probably want to override then call super.shutdown() after lol

frigid zinc
#

yes your original code is correct

opaque cape
#

Ok thanks

frigid zinc
dawn torrent
hallow ferry
#
    public int getBlock(int x, int y, int z) {
        return y >= 0 && y < 320 ? this.getSectionAtBlockY(y).get(x, y, z) : 0;
    }

    public boolean setBlock(int x, int y, int z, int blockId, int rotation, int filler) {
        if (y >= 0 && y < 320) {
            int sectionIndex = ChunkUtil.indexSection(y);
            BlockSection section = this.chunkSections[sectionIndex];
            boolean changed = section.set(x, y, z, blockId, rotation, filler);
            if (changed) {
                this.invalidateChunkSection(sectionIndex);
                this.markNeedsSaving();
            }

            return changed;
        } else {
            throw new IllegalArgumentException(String.format("Failed to set block at %d, %d, %d to %d because it is outside the world bounds", x, y, z, blockId));
        }
    }``` Well this pretty much confirms it. It's done by ID's which is what I was expecting.
frigid zinc
#

well @dawn torrent the world utilizes TickingThread, I'll have to check on that.

arctic mist
arctic mist
frigid zinc
dawn torrent
#

Yeahhh, but I'm trying to make something that ticks once per "server tick" I suppose... or something like that.

Short n sweet is, I'm trying to make a power system with cabling. I don't want every entity with a EnergyComponent to "walk" the entire network of cables, every entity tick. I want that to be done every server tick. Maybe there's a better way y'all can think of to approach that

#

My idea was a EnergyNetworkManagerService that builds the network + distributes power on the world tick instead of entity

arctic mist
dawn torrent
#

Yeah I just misspoke, my bad, I meant world tick

frigid zinc
#

pretty much I'd say if you need something updated, have one entity that checks for it then get world.getTick()

dawn torrent
#

I'm just not sure what my alternatives should be

arctic mist
#

So you might be able to do something with the WorldEventSystem or EntityTickingSystem

#

Tho im not sure exactly how your implemntation of you mod is so just saying general systems for Ticking

opaque cape
#

Is there somewhere I can see a list and picture of all the ItemWithAllMetadata

#

Or otherwise How can I pass a custom icon to sendNotification

⁨```ItemWithAllMetadata iconItem = new ItemStack("Weapon_Sword_Mithril", 1).toPacket();

    NotificationUtil.sendNotification(
            packetHandler,
            primaryMessage,
            secondaryMessage,
            iconItem
    );```⁩
dawn torrent
#

Hmm, if I can figure out how to get world.getTick() here, that's definitely feasible. Just like, have an EnergyNetwork w/ fields for network UUID, nodes in the network, and lastWorldTickUpdate. Then I can skip updating that network after the first call that tick..? Thennnn I can just round robin each "power input" to things that consume power until it's out of power it can move each cycle

opaque cape
#

Also how can I reload a plugin without having to restart the server?

west elk
opaque cape
#

[2026/01/31 04:23:34 SEVERE] [PluginManager] Failed to load manifest mods\ShubshubEconomy-0.0.1.jar. java.util.zip.ZipException: ZipFile invalid LOC header (bad signature) at java.base/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:915) at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:926) at java.base/java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:449) at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:208)

Hmmm I get this error when reloading plugin

#

But the mod works fine if I reboot the server

#

This is my manifest

{ "Group": "Shubshub", "Name": "ShubshubEconomy", "Authors": [ { "Name": "Shubshub" } ], "Version": "0.0.1", "Main": "com.shubshub.economy.ShubshubEconomy", "IncludesAssetPack": true }

copper summit
#

My minigame plugin does KOTH now

opaque cape
#

Ok I guess its because it cant read the file since I replaced it with an updated version

copper summit
opaque cape
#

What is the recommended way to format a number with commas correctly?

frigid zinc
#

Alternatively, you can get the player’s world as well if you have a reference to the player.

#

Is there a way to capture key inputs?

copper summit
opaque cape
proud fulcrum
#

Hey, is there a way to log to the ingame diagnostic console?

copper summit
#

oh nice lol

west elk
opaque cape
#

I have access to all the models if I so wish, including Opus 4.5

#

Though Opus 4.5 is really expensive to use it uses 3x vs Sonnet which is 1x

frigid zinc
west elk
summer ibex
#

Is it possible to make custom capes for a server?

stone crag
summer ibex
# west elk yes

Ok cool. Do you know if anyone has made anything yet? or how I would go about making some for my server? Id like to make some for specific Ranks, IE for player time on server, they can equip if/when they want to

west elk
summer ibex
#

awesome, thank you!

proud fulcrum
#

currently using the ⁨⁨getLogger().atInfo().log⁩⁩ to log to the logs dir, is there a way to log directly to the diagnostic console for debugging?

copper summit
#

Anyone willing to come help me test KOTH rq? its already 90% tested i just need to make sure one thing works

pliant brook
#

how to change the spawning of entity? its quite hard to find any animals

opaque cape
#

Can I use arguments with AbstractPlayerCommand?

dawn torrent
#

I'm getting null at the line before the "b" log, any obvious reason why?

    private val logger = HytaleLogger.forEnclosingClass()

    override fun tick(
        dt: Float,
        index: Int,
        archetypeChunk: ArchetypeChunk<ChunkStore?>,
        store: Store<ChunkStore?>,
        commandBuffer: CommandBuffer<ChunkStore?>,
    ) {
        val energyComponent = archetypeChunk.getComponent(index, TrinexLib.get().energyComponentType) ?: return
        logger.atInfo().log("a")
        val wc = archetypeChunk.getComponent(index, WorldChunk.getComponentType()) ?: return
        logger.atInfo().log("b")```
dawn torrent
#
        val wc = commandBuffer.getComponent(stateInfo.chunkRef, WorldChunk.getComponentType()) ?: return```
Probs this
storm heron
opaque cape
#

What is the import for ArgTypes;

#

Also OptionalArg and RequiredArg

west elk
opaque cape
#

Thanks I ended up googlin it

west elk
#

can't you just let your IDE import it automatically?

opaque cape
#

Yes but sometimes it just makes them up and gets it wrong

signal agate
west elk
opaque cape
#

I guess its probably using AI to autocomplete the import

frigid zinc
#

Your IDE has AI Integration?

opaque cape
#

Visual Studio Code has Github Copilot yes

west elk
#

your IDE doesn't "make up" imports. It deterministically generates them from the dependencies. If you get problems with this you either

  • don't have your dependency set up correctly
  • not using the auto import feature correctly
opaque cape
#

I can assure you its made up imports before, And then red lines them because they dont exist

#

Especially ones that are part of the Hytale Server

frigid zinc
#

Or you may have wrong imports from the wrong packages

west elk
#

no, Copilot generated them, not your IDE. Delete the hallucinated imports and generate them properly

frigid zinc
opaque cape
#

My NotificationUtil.sendNotification all appear stacked, How can I make them appear under the old one?

sharp steeple
west elk
#

authenticate your server with the /auth command

opaque cape
# opaque cape My NotificationUtil.sendNotification all appear stacked, How can I make them app...

⁨```PacketHandler packetHandler = playerRef.getPacketHandler();
PlayerBalanceData playerBalanceData = economyManager.getPlayerBalanceData(playerRef.getUuid());

    Message primaryMessage = Message.raw("Balance for " + playerRef.getUsername()).color("#00FF00");
    Message secondaryMessage = Message.raw("$" + playerBalanceData.getFormattedBalance()).color("#228B22");

    ItemWithAllMetadata iconItem = new ItemStack("Recipe_Food_Pie_Apple", 1).toPacket();

    NotificationUtil.sendNotification(
            packetHandler,
            primaryMessage,
            secondaryMessage,
            iconItem
    );```⁩

This is my code here, Does anyone know how to resolve this?

I just end up with a big stacked number on the existing notification, Even if they were different commands and outputs

dawn torrent
#

Ight guys, I'm probably just tired, but energyComponent.blockPosition3d is in "world coordinates", what should I be using here to get a reference to a block in that world?

    fun getAdjacentEnergyComponents(
        energyComponent: EnergyComponent,
        wc: WorldChunk,
        commandBuffer: CommandBuffer<ChunkStore?>,
    ): Set<EnergyComponent> =
        buildSet {
            for (dir in Vector3i.BLOCK_SIDES) {
                val neighbor = energyComponent.blockPosition3d?.clone()?.add(dir) ?: continue
                val neighborRef = wc.getBlockComponentEntity(neighbor.x, neighbor.y, neighbor.z) ?: continue
                val neighborEnergyComponent = commandBuffer.getComponent(neighborRef, TrinexLib.get().energyComponentType) ?: continue
                add(neighborEnergyComponent)
            }
        }```
halcyon ether
#

How can I limit the number of fragments a rank can have? For example, I want the VIP rank to only have 10. I've already tried simpleclaims.party.claim_chunk_amount.25 in LuckyPerms, but it doesn't change anything. It's with the simpleclaims mod, does anyone have the solution?

west elk
dawn torrent
#

I'm the author 🙃

west elk
#

oh

still field
dawn torrent
#

My brain is just blanking on how to get the reference to the block at that world coordinate

still field
#
// Block ID
  int id = world.getBlock(x, y, z);  // via IChunkAccessorSync default method

  // Full block type (with config/material/state links)
  BlockType type = world.getBlockType(x, y, z);
west elk
#

I don't understand the question

dawn torrent
#

This method is being called from a ETS<ChunkStore> tick() method, so I have that unctionality

still field
#

this how you get a block at a coord, is that what you want

dawn torrent
#

o_o it's that easy

still field
#

I suppose

opaque cape
#

Update, It was the Item Icon on the Notification causing it to all stack together

dawn torrent
#

Yeah I need to describe my problem better.
I'm trying to get an algorithm together that goes to all adjacent blocks that have the EnergyComponent on them.
I store this energyComponent.blockPosition3d field on block place here:

    override fun onEntityAdded(
        p0: Ref<ChunkStore?>,
        p1: AddReason,
        p2: Store<ChunkStore?>,
        p3: CommandBuffer<ChunkStore?>,
    ) {
        val info = p3.getComponent(p0, BlockModule.BlockStateInfo.getComponentType()) ?: return
        val energyComponent = p3.getComponent(p0, TrinexLib.get().energyComponentType) ?: return
        val wc = p3.getComponent(info.chunkRef, WorldChunk.getComponentType()) ?: return

        val i = info.index
        val x = ChunkUtil.worldCoordFromLocalCoord(wc.x, ChunkUtil.xFromBlockInColumn(i))
        val y = ChunkUtil.yFromBlockInColumn(i)
        val z = ChunkUtil.worldCoordFromLocalCoord(wc.z, ChunkUtil.zFromBlockInColumn(i))

        val vector = Vector3i(x, y, z)
        energyComponent.blockPosition3d = vector```

Then, on ETS<ChunkStore>#tick I try to get all neighbors:
`val allNeighbors = EnergyUtils.getAllConnectedEnergyComponents(energyComponent, wc, commandBuffer)`

getAllConnectedEnergyComponents calls the method I sent before, but here it is again:
```kt
    fun getAdjacentEnergyComponents(
        energyComponent: EnergyComponent,
        wc: WorldChunk,
        commandBuffer: CommandBuffer<ChunkStore?>,
    ): Set<EnergyComponent> =
        buildSet {
            val world = wc.world ?: return@buildSet

            for (dir in Vector3i.BLOCK_SIDES) {
                val neighbor = energyComponent.blockPosition3d?.clone()?.add(dir) ?: continue
                val neighborRef = wc.getBlockComponentEntity(neighbor.x, neighbor.y, neighbor.z) ?: continue
                val neighborEnergyComponent = commandBuffer.getComponent(neighborRef, TrinexLib.get().energyComponentType) ?: continue
                add(neighborEnergyComponent)
            }
        }

    fun getAllConnectedEnergyComponents(
        energyComponent: EnergyComponent,
        wc: WorldChunk,
        commandBuffer: CommandBuffer<ChunkStore?>,
    ): Map<EnergyDeviceClassification, Set<EnergyComponent>> {
        val resultMap = mutableMapOf<EnergyDeviceClassification, MutableSet<EnergyComponent>>()
        val visited = mutableSetOf<EnergyComponent>()
        val queue = mutableSetOf(energyComponent)

        while (queue.isNotEmpty()) {
            val current = queue.first()
            queue.remove(current)
            visited.add(current)

            if (current != energyComponent) {
                resultMap.getOrPut(current.deviceClassification) { mutableSetOf() }.add(current)
            }

            val neighbors = getAdjacentEnergyComponents(current, wc, commandBuffer)
            for (neighbor in neighbors) {
                if (!visited.contains(neighbor)) {
                    queue.add(neighbor)
                }
            }
        }

        return resultMap
    }```

This works for all of the blocks with EnergyComponent within a chunk, which makes sense with me getting the neighbor ref via 
`val neighborRef = wc.getBlockComponentEntity(neighbor.x, neighbor.y, neighbor.z) ?: continue`

But I need to get this BlockComponentEntity via World coordinates, not chunk, and I think this is what I need to fix
opaque cape
#

Alright boys and girls, You've heard of EconomyManager, now get ready for ConfigManager

still field
# dawn torrent Yeah I need to describe my problem better. I'm trying to get an algorithm togeth...
Your BFS is fine; you just need to resolve each neighbor’s chunk from world coords before calling getBlockComponentEntity. WorldChunk#getBlockComponentEntity assumes the coords are inside that chunk, so cross‑chunk neighbors
  vanish.

  A small helper fixes it:

  private fun getBlockComponentEntityAtWorldPos(
      world: World,
      x: Int, y: Int, z: Int
  ): Ref<ChunkStore>? {
      // skip unloaded chunks if you don’t want to load them
      val chunk = world.getChunkIfInMemory(ChunkUtil.indexChunkFromBlock(x, z)) ?: return null
      return chunk.getBlockComponentEntity(x, y, z)
  }

  Then in getAdjacentEnergyComponents:

  val world = wc.world ?: return@buildSet
  for (dir in Vector3i.BLOCK_SIDES) {
      val pos = energyComponent.blockPosition3d?.clone()?.add(dir) ?: continue
      val neighborRef = getBlockComponentEntityAtWorldPos(world, pos.x, pos.y, pos.z) ?: continue
      val neighborEnergy = commandBuffer.getComponent(neighborRef, TrinexLib.get().energyComponentType) ?: continue
      add(neighborEnergy)
  }

  Notes:

  - Use getChunkIfInMemory to avoid loading/generating chunks; if you want to load them, call world.getChunk(...) instead.
  - Keep using world‑coords in blockPosition3d; chunk lookup uses ChunkUtil.indexChunkFromBlock(x, z).
  - If a block might not have a component yet, wrap with BlockModule.ensureBlockEntity(chunk, x, y, z) before reading its components.

dawn torrent
#

How did you get that?!

still field
dawn torrent
#

Is there a guide to set that up?

still field
#

to decompile the server jar or set up codex?

dawn torrent
#

Yes and yes, I mean I kinda have the decompiled jar via the maven release I suppose

still field
#

you have to pay

#

I think gemini CLI has a generous free tier

#

so unless you get chat gpt plus you might prefer to look into installing gemini CLI

dawn torrent
#

I do have chatgpt plus xD

still field
#

intellij has a built in terminal, you can run any CLI coding agent in there

dawn torrent
#

Worked flawlessly btw, aside from me importing the wrong Ref class lmao

still field
#

just google "codex cli"

#

I cant send links here

opaque cape
#

Things I've learnt so far in my new mod

  1. I dont need to have 99% of the code in the Main Class, Its ok to split it out to other files
  2. Manager classes are good
  3. I dont need to import Level for the LOGGER
copper anchor
#

You had 99% code in your main class??/

dusky sable
opaque cape
copper anchor
#

All these AI people are gonna be releasing stuff corrupting people's server

opaque cape
#

I come from like JS where alot more code can go in the main file

copper anchor
opaque cape
#

I watched a few tutorials, And then used AI Assist as well

But this new mod, Zero AI at all

copper anchor
#

If you use AI while learning, you aint really learning tbh

opaque cape
#

And thats why I'm not using AI on this mod at all

#

The AI merely got me familiar with Java in the previous mod

Now I am actually committing it to memory

copper anchor
#

AI is for people who know what they are doing... you have to understand code by just looking at it to be successful with AI

daring lodge
#

what if we made a slop plugin

opaque cape
#

And now I'm expanding my horizons with a No AI Mod

frigid zinc
opaque cape
#

So far I have a balance command and a pay command, And I've made the Config and all that

#

I'm making "Shubshub Economy" mod

copper anchor
#

I strongly suggest not to use AI to anyone who is learning personally
Watch tutorials, read documentation and start to become very good at it and then you can use AI to maybe generate 1 or 2 functions

frigid zinc
#

I'm still waiting for cf to approve my mod... -w-

opaque cape
opaque cape
frigid zinc
copper anchor
copper anchor
#

Like AI literally saw my code and said it would lag more

My code is nearly 10 times as efficient as what was done earlier(by another dev)

copper anchor
opaque cape
#

⁨```protected void execute(
@Nonnull CommandContext commandContext,
@Nonnull Store<EntityStore> store,
@Nonnull Ref<EntityStore> ref,
@Nonnull PlayerRef playerRef,
@Nonnull World world
) {

    PacketHandler packetHandler = playerRef.getPacketHandler();
    PlayerRef targetPlayer = playerArg.get(commandContext);
    BigInteger amount = new BigInteger(amountArg.get(commandContext));
    
    PlayerBalanceData myBalanceData = economyManager.getPlayerBalanceData(playerRef.getUuid());
    if (amount.compareTo(BigInteger.ZERO) <= 0) {
        Message errorMessage = Message.raw("The amount to pay must be greater than zero.").color("#FF0000");
        NotificationUtil.sendNotification(
                packetHandler,
                errorMessage,
                Message.empty()
        );
        return;
    }

    if (myBalanceData.getBalance().compareTo(amount) < 0) {
        Message errorMessage = Message.raw("Insufficient funds to complete the transaction.").color("#FF0000");
        NotificationUtil.sendNotification(
                packetHandler,
                errorMessage,
                Message.empty()
        );
        return;
    }
    
    PlayerBalanceData targetBalanceData = economyManager.getPlayerBalanceData(targetPlayer.getUuid());

myBalanceData.subtractBalance(playerRef.getUuid(), amount);
targetBalanceData.addBalance(targetPlayer.getUuid(), amount);

    Message primaryMessage = Message.raw("Transfer of currency from " + playerRef.getUsername() + " to " + targetPlayer.getUsername()).color("#00FF00");
    Message secondaryMessage = Message.raw("-$" + economyManager.formatAmount(amount)).color("#ff0000");

    NotificationUtil.sendNotification(
            packetHandler,
            primaryMessage,
            secondaryMessage
    );
    
}```⁩
frigid zinc
#

hehe funny, remembering the time the AI told me items can't be taken from the source block...

opaque cape
#

Have a payment command

#

Lol that was 6 characters short of the Discord Limit

copper anchor
#

Shub, I recommend making an economy service class or use the manager and have all the different methods in it for

subtract(int, player)
add()
balance()
and others

#

Service classes are better to make API hooks later

opaque cape
#

Except PlayerBalanceData is already specific to the player The UUID is just for logging

frigid zinc
#

... So your PlayerBalanceData is the service?

opaque cape
#

I guess I can add that to the Manager and have a transfer method

copper anchor
#

PlayerData -> playerUUID and other things
Economy Service -> handles economy

opaque cape
#

PlayerBalanceData just holds the balance for that player

#

But it also has its internal subtract and add methods

copper anchor
#

And you can directly serialise(not recommended) or put the whole thing in json or db from player data

opaque cape
#

I guess I should physically store the UUID on PBD instead of passing it

frigid zinc
#

I advise you to do separation

opaque cape
#

Currently its just identified by the filename

#

⁨```public class PlayerBalanceData {
private static final HytaleLogger LOGGER = HytaleLogger.forEnclosingClass();

private BigInteger balance;

public static final BuilderCodec<PlayerBalanceData> CODEC = BuilderCodec.builder(PlayerBalanceData.class, PlayerBalanceData::new)
    .append(new KeyedCodec<>("Balance", Codec.STRING),
        (data, value) -> { data.balance = new BigInteger(value); },
        data -> data.balance.toString())
    .add()
    .build();

public PlayerBalanceData() {}

public PlayerBalanceData(UUID playerUUID, BigInteger balance) {
    this.balance = (balance != null ? balance : BigInteger.ZERO);
    LOGGER.atInfo().log("Initialized balance data for player: " + playerUUID);
}

public String getFormattedBalance() {
    NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);
    return numberFormat.format(balance);
}

public BigInteger getBalance() {
    return balance;
}

public void setBalance(UUID playerUUID, BigInteger balance) {
    this.balance = balance;
    LOGGER.atInfo().log("Set balance for player " + playerUUID + " to " + balance);
}

public void addBalance(UUID playerUUID, BigInteger amount) {
    BigInteger currentBalance = getBalance();
    BigInteger newBalance = currentBalance.add(amount);
    setBalance(playerUUID,newBalance);
    LOGGER.atInfo().log("Added " + amount + " to player " + playerUUID + ". New balance: " + newBalance);
}

public void subtractBalance(UUID playerUUID, BigInteger amount) {
    BigInteger currentBalance = getBalance();
    BigInteger newBalance = currentBalance.subtract(amount);
    setBalance(playerUUID,newBalance);
    LOGGER.atInfo().log("Subtracted " + amount + " from player " + playerUUID + ". New balance: " + newBalance);
}

}```⁩

frigid zinc
#

logic code shouldn't live inside a model PlayerData as it's purely for getting / setting data and holding it

opaque cape
#

That makes sense

#

So move add/subtract Balance to Economy Manager and jsut direct use setBalance on the PBD?

copper anchor
# opaque cape But it also has its internal subtract and add methods

Not a great idea to mix like that
Player data should only have fields for data
Manager/Service depending on the route you want will have the transactions

Ideally, you also want Transaction events like ⁨PreTransaction(cancellable)⁩ and ⁨PostTransaction(Immutable.. its a fact not more)

#

Events are for API if you wish to publish the mod

opaque cape
#

I would need to see an example of using PreTransaction and PostTransaction to be able to use that

copper anchor
#

Event definition is simple
PreTransaction is called at the top of add/subtract and post transaction is called at the end

wary lion
# copper anchor Like AI literally saw my code and said it would lag more My code is nearly 10 t...

bro I was making my docs and I had written over 60k lines of api usage from the Hytale server and I asked ai to just compile what i written into easy to read wiki pages and it overwritten 30% of what I wrote added just strait up wrong stuff and labelled it "conceptual" and "fictional" mainly caused by my screw up of not specifying what to use to "fill in the blanks" it literally started using spigot api stuff after I blatantly specified that the project was NOT Minecraft was completely unrelated to Minecraft in every way and it was Hytale not Minecraft

copper anchor
#

If someone cancels pretransaction, it will not move forward is the idea

opaque cape
#

Thanks I will take these to the drawing board and implement them now (Maybe not the Pre and Post stuff yet though)

copper anchor
opaque cape
midnight condor
#

why does it keep saying connection timed out waiting for the response from the peer

opaque cape
#

Ok its done, I've moved subtract/add/transfer to economyManager
And PBD only has setBalance now

copper anchor
# opaque cape Thanks I will take these to the drawing board and implement them now (Maybe not ...

Thats API stage, probably the end of all stuff

I recommend a basic model for devving good mods for purpose like yours

⁨```

Mod Folder
|
|-> Core: Contains all services, all calculations, any other operations
|
|-> Data: Storing all data, models for storage, etc
|
|-> API: handlers for other devs like events, wrappers for your data etc
|
|-> Server: handles things with the actual server

This way, porting the mod around is also easier
midnight condor
#

whenever i try to join any server at all

copper anchor
opaque cape
#

⁨```public class PlayerBalanceData {
private static final HytaleLogger LOGGER = HytaleLogger.forEnclosingClass();

private BigInteger balance;
private UUID playerUUID;

public static final BuilderCodec<PlayerBalanceData> CODEC = BuilderCodec.builder(PlayerBalanceData.class, PlayerBalanceData::new)
    .append(new KeyedCodec<>("Balance", Codec.STRING),
        (data, value) -> { data.balance = new BigInteger(value); },
        data -> data.balance.toString())
    .add()
    .append(new KeyedCodec<>("PlayerUUID", Codec.STRING),
        (data, value) -> { data.playerUUID = UUID.fromString(value); },
        data -> data.playerUUID.toString())
    .add()
    .build();

public PlayerBalanceData() {}

public PlayerBalanceData(UUID playerUUID, BigInteger balance) {
    this.balance = (balance != null ? balance : BigInteger.ZERO);
    this.playerUUID = playerUUID;
    LOGGER.atInfo().log("Initialized balance data for player: " + playerUUID);
}

public String getFormattedBalance() {
    NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);
    return numberFormat.format(balance);
}

public BigInteger getBalance() {
    return balance;
}

public UUID getPlayerUUID() {
    return playerUUID;
}

public void setBalance(BigInteger balance) {
    this.balance = balance;
    LOGGER.atInfo().log("Set balance for player " + playerUUID + " to " + balance);
}

}```⁩

Updated PBD

wary lion
# copper anchor Trust me, I gave claude and chatgpt a try since I saw people were using it for c...

bro when i started rewriting stuff it started adding misleading statements about helper methods it knew nothing about like the ChunkUtil helper methods saying "The ChunkUtil class (com.hypixel.hytale.math.util.ChunkUtil) provides utility methods. Use these when readability matters more than raw performance, or when you're unsure about edge cases." and they are simple inline bit operations that have 0 performance difference

opaque cape
#

Should getFormattedBalance even be on the PBD?

#

I do have a formatter on EconomyManager actually

#

Its redundant I think

copper anchor
opaque cape
#

What if the player wants 18 quintillion dollars

copper anchor
#

You'll put memory usage through the roof my guy 😂

#

Also reading and writing those bits gonna be putting server under stress

opaque cape
#

But thats only 8 bytes per player

opaque cape
wary lion
#

thats even worse

opaque cape
#

Otherwise its cached

copper anchor
opaque cape
#

How big can a long be?

#

I just dont want there to be a limit on the money 0:

copper anchor
#

long stops at 8 bytes

cold holly
#

Hey everyone! Who’s up for trying a universal translator? I developed a mod that translates Hytale chat in real time, accurately and naturally. Players only need to type this once in chat: "/l en-US, pt-BR, es-MX, es-AR, ru-RU" (and so on, however they want). Since the translation is done by an AI trained on everyday conversation, my internal tests show it’s really good at adapting slang and local expressions.

Once you join, you just use the command to set your native language and chat normally—everything you read will come in your language, and everything you write will be translated into everyone else’s language. Each person only receives the text in their own language.

cold holly
#

Would you like to try this with me? I speak Brazilian Portuguese as my native language. It will be interesting to talk to people from other countries.

wary lion
#

i dont understand servers with super insanely high number economies unless its prison it just doesn't make sense for players to have quintillions no one can even fathom having that much money and how do you even balance at that point

copper anchor
opaque cape
#

They're currently JSON Files on a Disk, But a sqlite db might be alright

copper anchor
#

Use sqlite jdbc for a local file based db

cold holly
#

Anyone want to test it with me? You just need to join the server.

opaque cape
#

Alright, Lets move to a long then

wary lion
copper anchor
#

He is just making a public mod iirc

opaque cape
copper anchor
#

I was working on an economy mod.. but someone came along and paid me 300$ to use it privately 😂
Who am I to say no to money

vernal niche
copper anchor
wary lion
#

oh alr i was gonna say why not just use a database like mariadb or mongo

opaque cape
#

Whats the recommended way to subtract from a long, Should I just do a - b?

copper anchor
cold holly
#

I only needed 1 person

wary lion
copper anchor
wary lion
#

aye 🫡

cold holly
opaque cape
#

For ArgType how do I parse the long?

copper anchor
opaque cape
#

⁨```public ShubshubEconomyPayCommand(@Nonnull String name, @Nonnull String description, boolean requiresConfirmation) {
super(name, description, requiresConfirmation);
this.setPermissionGroup(GameMode.Adventure); // Allows the command to be used by anyone, not just OP

    this.playerArg = withRequiredArg("player", "The player to pay", ArgTypes.PLAYER_REF);
    this.amountArg = withRequiredArg("amount", "The amount to pay", ArgTypes.Long);

}```⁩

ArgTypes.Long or .LONG is not a real type

cold holly
copper anchor
opaque cape
#

oki

copper anchor
# opaque cape oki

I also suggest a utility function later to do
1k -> 1,000
1m -> 1,00,000
1b⁩, etc
They are very simple to do as well

opaque cape
#

Makes sense

cold holly
#

:/

#

Thank you for your help, community...

copper anchor
# cold holly :/

If someone wanted to help you.. we would have said so, come on

opaque cape
#

Unfortunately I am too busy to assist you with your mod

copper anchor
#

I am working on an update which I need to release today so... cant do

wary lion
cold holly
opaque cape
#

Also you will probably be hardpressed to find people willing to feed data to a Model you are running on your own Data Center for privacy reasons

copper anchor
cold holly
opaque cape
copper anchor
#

AI translations are weird sometimes... last I checked atleast

cold holly
#

Thank you. Beautiful community!

opaque cape
#

People will likely wonder what your Privacy Policies are in regards to training, It doesnt matter if its just chat in a game

cold holly
#

good night

opaque cape
#

Lol

#

So rude when pressed even slightly

copper anchor
cold holly
opaque cape
#

I'm a he by the way

cold holly
opaque cape
#

Yeah alright, I think we're done here

cold holly
#

I'm referring to the community.

copper anchor
#

You referred to them wrongly... big problem nowadays

opaque cape
#

I mean I'm not even trans, But its a bit weird to assume I'm female

#

But I dont really care about that was just pointing it out

cold holly
opaque cape
#

Refer to me as whatever you feel like, Its more about the way you've responded in general when even slightly inconvenienced

cold holly
#

I'm not a native English speaker. I apologize if I used the wrong gender. I don't speak English.

opaque cape
#

I dont care about the gender stuff

west elk
#

In English, the pronoun for "the community" would generally be "it", or "they" when referring to groups or individuals

cold holly
#

So, let's get back to the subject. I use gpt-oss in my own datacenter so I don't have to keep paying OpenAI. But this mod is completely compatible with OpenAI models. So server owners can easily put their API keys in the configuration JSON so that the translation is done by OpenAI. And the project is open source. I'll post it soon on my GitHub for anyone who wants to check it out.

opaque cape
#

Anyway, I'm gonna go back to my mod now, Before I escalate myself into trouble lmao

cold holly
#

Is it clearer now? I apologize for being rude before. It's just really annoying when I ask for help and everyone simply ignores me and then speaks "badly" about my project, which I've dedicated myself to since its launch.

#

I just wanted to test it in practice with users who speak other languages ​​because it doesn't make sense for me to test it alone without other people speaking more than one language.

copper anchor
#

On my laptop I have VSC, hytale, hytale server, discord and also have an outside server running lol

cold holly
#

Thank you for letting me know. And I apologize again for earlier.

#

It's PMS here.

opaque cape
#

To rephrase that better, Do you use the incoming conversational data for improving your model?

cold holly
#

I don't have any yet, but I intend to write properly.

opaque cape
#

Its an important point people will want to know if they use the default option of your data center

cold holly
#

Actually, I'm using the native settings. I didn't even need to train it. It's working very well with what comes from the factory.

#

That's why I'm making it available to the public. It's like a version of those voice chat mods.

opaque cape
#

Cool, Thats good to hear

Also just so you are aware, If people choose to use OpenAI, They will definitely be using the data for improving their models, And I would recommend making sure they know that if they use that setting

cold holly
#

I think it's a great alternative for large servers with people from various countries speaking various languages.

opaque cape
cold holly
#

An easy, fast, and inexpensive way to connect the world.

opaque cape
#

I was under the impression they would use it by default unless you paid for the privilege to not

cold holly
opaque cape
#

I will now officially leave you in peace, Good luck with your mod

#

I'm going back to my Economy Mod now 🙂

cold holly
#

They only use chatgpt conversations, but not conversations via API.

#

before 2023 they used

copper summit
#

Anyone know why im getting a "could not find document" error

public MinigameScoreboard(PlayerRef playerRef, String minigameName) {
            super(playerRef);
            this.minigameName = minigameName;
        }

        @Override
        protected void build(UICommandBuilder builder) {
            builder.append("#hud-root", "ui/custom/minigame_scoreboard.ui");
            builder.set("#mg-title", minigameName);
        }

        public void updateLines(String l1, String l2, String l3, String l4) {
            UICommandBuilder builder = new UICommandBuilder();
            builder.set("#mg-line1", l1);
            builder.set("#mg-line2", l2);
            builder.set("#mg-line3", l3);
            builder.set("#mg-line4", l4);
            update(false, builder);
        }
    }

\src\main\resources\Common\UI\Custom\minigame_scoreboard.ui

west elk
west elk
copper summit
#
@DarkBg = rgba(0, 0, 0, 0.7);
@White = #FFFFFF;
@LightGray = #CCCCCC;

Group #minigame-scoreboard {
  Anchor: (Width: 220, Height: 110, Top: 10, Right: 10);
  Background: @DarkBg;
  Padding: (All: 10);
  LayoutMode: Top;
  
  Label #mg-title {
    Anchor: (Width: 200, Height: 20);
    Style: (
      FontSize: 16,
      TextColor: @White,
      HorizontalAlignment: Center,
      VerticalAlignment: Center,
      RenderBold: true,
    );
    Text: "";
  }
  
  Label #mg-line1 {
    Anchor: (Width: 200, Height: 18, Top: 5);
    Style: (
      FontSize: 14,
      TextColor: @LightGray,
      HorizontalAlignment: Left,
      VerticalAlignment: Center,
    );
    Text: "";
  }
  
  Label #mg-line2 {
    Anchor: (Width: 200, Height: 18, Top: 2);
    Style: (
      FontSize: 14,
      TextColor: @LightGray,
      HorizontalAlignment: Left,
      VerticalAlignment: Center,
    );
    Text: "";
  }
  
  Label #mg-line3 {
    Anchor: (Width: 200, Height: 18, Top: 2);
    Style: (
      FontSize: 14,
      TextColor: @LightGray,
      HorizontalAlignment: Left,
      VerticalAlignment: Center,
    );
    Text: "";
  }
  
  Label #mg-line4 {
    Anchor: (Width: 200, Height: 18, Top: 2);
    Style: (
      FontSize: 14,
      TextColor: @LightGray,
      HorizontalAlignment: Left,
      VerticalAlignment: Center,
    );
    Text: "";
  }
}
#

oh, its case sensitive?

west elk
#

paths usually are. haven't tested it in this case though

frigid zinc
#

Appending lines and files are case sensitive. Iirc.

#

Also, turn on in game diagnostics for ui related debugging as it lets you see which problem you have in your ui formatting / arguments

copper summit
frigid zinc
#

Top right? It should appear in your top left. Usually it tells me which line or object has the error. Did you check your in game settings to turn on the dev diagnostics? I forgot what it’s called

copper summit
#

Yeah and it shows an error symbol in the top right and like 500 warnings

#

But nothing extra pops up when i join my server

#

"Could not find document HUD/MultipleHUD.ui for Custom UI Append command. Selector:"

edgy furnace
#

is anyone facing laggy movement on servers ? there is no ping or lag in the server but movement of players are seems laggy a bit

#

i think this happaned after game update

copper summit
edgy furnace
#

can i join and check ?

copper summit
#

pm

copper summit
edgy furnace
#

trying to accept request but discord went crazy

copper summit
#

ah

edgy furnace
#

i sent

copper summit
#

i see what you mean

#

It says ive both sent and accepted a friend request and neither worked lmao

edgy furnace
#

hahah 😄 ingore requests and i will sent 😄

copper summit
#

SkyTale Online

#

put a .

edgy furnace
#

comin

opaque cape
opaque cape
#

^

west elk
copper anchor
opaque cape
#

Are you able to provide an example of its usage?

copper anchor
#

Yeah what dani said

opaque cape
#

Do I even need to use the scheduler if I switch to using an sqlite db?

copper anchor
#

You should always flush your cache every now and then

#

If your server runs 20 hours and crashes, you will lose all progress

vocal kelp
#

i am extending the damageblock event and I want to cancel it for players that are not in the OP group. anyone know how?

vocal kelp
copper anchor
west elk
opaque cape
#

Ok, Time to move the Player Balance Data load and save over to sqlite

#

Unless there is a more recommended DB Library?

vocal kelp
#

I will try it out, thx

west elk
#

correct!

#

your system will only execute for entities that match the query

random briar
#

whats the event for quit event the remove player from world event?

random briar
#

and i mean the message popping up

copper anchor
#

Thats client side

west elk
#

oh the quit world message is currently hard coded

#

you can get rid of it with an earlyplugin

random briar
#

why can we remove add player to world message but not quit message?

west elk
#

early access

copper anchor
#

Ask devs

west elk
#

Check @remote garnet's Nozemi/hytale-server-patcher on GitHub for how to do it with an earlyplugin

humble bronze
#

has anyone had any luck loading instances outside of the assets folder?

#

Im trying to avoid repacking and ftp transfering everytime i make a new instance

west elk
#

what makes you do that?

#

what are you packing and transferring?

humble bronze
#

the assets.zip

west elk
#

are you modifying the vanilla assets.zip instead of making your own (.zip or .jar)?

humble bronze
#

modifying the vanill zip

#

is there a way to implement my own? and still have the assets.zip the server needs?

west elk
#

yeah you can avoid that 😅

#

leave the vanilla assets alone and make your own asset pack that only includes the additional content you need

severe rampart
humble bronze
#

you're a legend, thank you

west elk
#

you can even have it not zipped up

#

that allows you to edit it via the in-game asset editor

storm heron
#

anyone got some ideas on how to prevent entity drops (mob drops) in a certain world?

tulip briar
#

is there an official documentation of the api?

mellow tendon
#

nope

opaque cape
#

if I put AuctionHouse.java in a directory called AuctionHouse

does that have to be reflected in the package name? So itd be package com.shubshub.economy.AuctionHouse; ?

mellow tendon
#

packages are basically your directory structure

#

so yes.

#

also, package names shouldn't really have uppercase letters by convention

upper kettle
tulip briar
#

thanks ill check it out

pine holly
#

uppercase packages

storm heron
pine holly
#

dead entities can't make calls jokes

storm heron
#

oh seems like I can probably cancel the NPCDamageSystems.DropDeathItems system chain

opaque cape
#

Also for anyone here from earlier, I've decided to go back to BigInteger for the memes of having 100 trillion dollars

paper hamlet
#

Any available developers? 👀

barren maple
#

anyone know any mods that would cause players to always respawn at spawn instead of their bed?

cloud berry
#

Guys how can i create a server to play with mh friend?

pine holly
#

there's also a server manual for dedicated servers

paper hamlet
#

Oh, GitHub links are blocked.

#

Indifferent broccoli has a cool docker image. Look it up. Hypixel_BigShy

pine holly
#

sigh

paper hamlet
#

👀

pine holly
#

that works too

empty wyvern
#

Hmm is it possible to set opacity for background that is not color but texture?

Background: (PatchStyle(TexturePath: "Path/To/Texture.png"));

storm heron
inland palm
#

Any Coders that want to join a project? we are working on making a highly runescape inspired server and are looking for more people who want to join the cause 😄 if you want to join or just want more info hit me up!

ocean lake
#

is there smt else i should use when making custom states instead BlockState ? bc blockstate is marked for removal ?

opaque cape
#

What would be a good way to Serialize a Map to a String for a CODEC

.append(new KeyedCodec<>("BidHistory", Codec.STRING), (contract, value) -> { // Deserialization logic for bid_history map // Placeholder: implement actual deserialization contract.bid_history = new ConcurrentHashMap<>(); }, contract -> { // Serialization logic for bid_history map // Placeholder: implement actual serialization return null; }) .add()

mellow tendon
untold solstice
#

can I add new animation to Player?

vernal niche
opaque cape
#

I just dont want to nessecerilly resort to asking the AI to look that up xD

mellow tendon
#

no ai needed, there are several options, you just need to pick one

vernal niche
#

Generally I'd say you don't want to serialize a map to a string, you want to serialize it into an object

opaque cape
#

public static final BuilderCodec<AuctionContract> CODEC = BuilderCodec.builder(AuctionContract.class, AuctionContract::new) .append(new KeyedCodec<>("ItemName", Codec.STRING), (contract, value) -> { contract.item_name = value; }, contract -> contract.item_name) .add() .append(new KeyedCodec<>("SellerUUID", Codec.STRING), (contract, value) -> { contract.seller_uuid = value; }, contract -> contract.seller_uuid) .add() .append(new KeyedCodec<>("BuyerUUID", Codec.STRING), (contract, value) -> { contract.buyer_uuid = value; }, contract -> contract.buyer_uuid) .add() .append(new KeyedCodec<>("StartingBid", Codec.STRING), (contract, value) -> { contract.starting_bid = new BigInteger(value); }, contract -> contract.starting_bid.toString()) .add() .append(new KeyedCodec<>("BidHistory", Codec.STRING), (contract, value) -> { // Deserialization logic for bid_history map // Placeholder: implement actual deserialization contract.bid_history = new ConcurrentHashMap<>(); }, contract -> { // Serialization logic for bid_history map // Placeholder: implement actual serialization return null; }) .add() .append(new KeyedCodec<>("BuyoutPrice", Codec.STRING), (contract, value) -> { contract.buyout_price = new BigInteger(value); }, contract -> contract.buyout_price.toString()) .add() .append(new KeyedCodec<>("AuctionEndTime", Codec.LONG), (contract, value) -> { contract.auction_end_time = value; }, contract -> contract.auction_end_time) .add() .build();

#

This is for the BidHistory for the record

opaque cape
mellow tendon
#

iirc apache commons has SerializationUtils which can serialize any object, you can use jackson if you want to go json route, or come up with your own byte format if you have specific scope of whatt you want to store

opaque cape
#

BidHistory is just a Map of

private String bidderName; private String bidderUUID; private String bidAmount; private long bidTime;

vernal niche
opaque cape
#

Oki 1s

vernal niche
mellow tendon
delicate patio
#

What’s the proper (and simpliest) way to teleport a player to a specific World at a Vector3d position and with a Vector3f head rotation?

pine holly
#

people have been doin wild things and i've just been at work q.q

opaque cape
#

Apparently this is the correct implement

.append(new KeyedCodec<>("BidHistory", new ObjectMapCodec<>( AuctionBid.CODEC, ConcurrentHashMap::new, UUID::toString, UUID::fromString, false )), (contract, value) -> { // Deserialization logic for bid_history map // Placeholder: implement actual deserialization contract.bid_history = value; }, contract -> { // Serialization logic for bid_history map // Placeholder: implement actual serialization return contract.bid_history; }) .add()

hollow bane
#

Is it possible to spawn static npcs (With no movement) at fixed position
Like for a interaction on my server

opaque cape
#

I didnt know I could define my own CODECs

#

This is extremely helpful

vernal niche
#

The built-in system is mega powerful

lucid spire
#

can i make an item that has metadata applied by default?

edgy furnace
#

Is there any detailed and reliable API documentation for Hytale? Most of what I’ve found is either inaccurate or not detailed enough.

tulip briar
#

Does someone knows how to use MDevTools I wasnt able to make it working for me specificly the hot reload feature

tulip briar
#

there is a wiki with some documantion though called HytaleDocs havent used it but it was recommended to me

edgy furnace
#

because i am facing problems about custom UI s a lot

storm heron
pastel fox
pastel fox
west elk
#

Was mainly so they can get to your GitHub quickly via your profile, since I can't link it directly here Hypixel_Wink

#

Oh wait no I confused you with someone else, sorry

#

Fire capes though!👌

latent spindle
#

guys how do I fix this? I cant join this 1 server because of this This account is already authenticated with a different IP address. Please disconnect and reconnect. but other servers I can join just fine x.x

latent spindle
#

no

vale garden
#

for how long do you have this bug ?

latent spindle
#

when I join their server... like few days i guess

vale garden
#

oh yeah thats weird to have this bug for multiple days, maybe the host server needs to restart, i think you should try to contact him

pine holly
#

i would say yeah

#

the host server is holding onto old cache

white elk
#

Hi I have a dedicated server right now and it's been eating so much ram. Is there any fix for this?

unkempt musk
#

Hi! Anyone found out where the "F7" debug menu originates from?

white elk
#

I never had this issue before but today we keep getting disconnected for some reason.

pine holly
#

hytale do be eatin some ram, it's not like mc and still very early access. high ram usage is rather normal at this stage but anything to optimize your server like plugins to clear entities maybe, enabling zgc in startup might help in overall performance. only so much you can do realistically at this stage

#

you may have some... thing? on the server causing this? is there been any strange activities maybe? if this behavior is rather abnormal that is

vernal niche
pine holly
#

yeah, that would be the first step if you haven't thought of that to just reduce ram usage

pine holly
white elk
vernal niche
#

We run this on a few thousand servers so I guess it's at least decent 😅

white elk
#

Do I just have to install the plugin and no further actions needed?

pine holly
#

just a handful

vernal niche
white elk
#

Thank you hopefully this would solve our issue

#

Can this be partnered with the hyfixes mod?

opaque cape
#

Shubshub Economy is coming along great, And I have a collaborator now 😄

round nest
#

bro why myPC lags while rendering chunks like all creature in game lag

#

shubhshubh cn u tell

vernal niche
#

No serious problems I'd be aware of

lucid spire
#

how do i execute code every tick?

dim osprey
#

world

naive trench
#

hey, is there any documentation or guides for server development?

upper wyvern
#

Am I wrong to assume Hytale provides an API for scaling an entity? 👀 like the Kweebec, they have the Orange and Pink variants for the small types, no genders/colors for the larger variants, so was trying to scale the entities

storm heron
storm heron
#

or maybe the EntityScaleComponent

upper wyvern
# storm heron `Model.createScaledModel`

👀 seeing a couple
⁨```
public static com.hypixel.hytale.server.core.asset.type.model.config.Model createRandomScaleModel(com.hypixel.hytale.server.core.asset.type.model.config.ModelAsset);
public static com.hypixel.hytale.server.core.asset.type.model.config.Model createStaticScaledModel(com.hypixel.hytale.server.core.asset.type.model.config.ModelAsset, float);
public static com.hypixel.hytale.server.core.asset.type.model.config.Model createUnitScaleModel(com.hypixel.hytale.server.core.asset.type.model.config.ModelAsset);
public static com.hypixel.hytale.server.core.asset.type.model.config.Model createUnitScaleModel(com.hypixel.hytale.server.core.asset.type.model.config.ModelAsset, com.hypixel.hytale.math.shape.Box);
public static com.hypixel.hytale.server.core.asset.type.model.config.Model createScaledModel(com.hypixel.hytale.server.core.asset.type.model.config.ModelAsset, float);
public static com.hypixel.hytale.server.core.asset.type.model.config.Model createScaledModel(com.hypixel.hytale.server.core.asset.type.model.config.ModelAsset, float, java.util.Map<java.lang.String, java.lang.String>);
public static com.hypixel.hytale.server.core.asset.type.model.config.Model createScaledModel(com.hypixel.hytale.server.core.asset.type.model.config.ModelAsset, float, java.util.Map<java.lang.String, java.lang.String>, com.hypixel.hytale.math.shape.Box);
public static com.hypixel.hytale.server.core.asset.type.model.config.Model createScaledModel(com.hypixel.hytale.server.core.asset.type.model.config.ModelAsset, float, java.util.Map<java.lang.String, java.lang.String>, com.hypixel.hytale.math.shape.Box, boolean);


So gonna tinker around 🔥
pine holly
#

someones tryna make babies

upper wyvern
pine holly
#

twins

upper wyvern
#

I am trying to make adult variants of the orange and pink kweebec though, they look nicer than the plain warrior type variant

pine holly
#

or maybe if it's the other one then that's for other reasons

upper wyvern
#

mine is 1/17

pine holly
#

TWINS

zenith moat
#

Excellent and the last 4 digits of your super secret auth code

upper wyvern
#

and with who else birthday.. I forget.. Abe Lincoln or something 🤣

pine holly
#

uh, betty white

upper wyvern
#

I just remembered that one too, she passed like 1 day before her bday

pine holly
#

yeahhh

upper wyvern
#

100TH TOO smh

past flame
#

who creates servers/plugins for payment?

upper wyvern
#

Obama and Jim Carrey too ooo, also you mean an Essentials plugin?

pine holly
#

yooo, i think i forgot obama

upper wyvern
#

Well Michelle Obama lmao

pine holly
#

OHH lmao

upper wyvern
#

still Obama technically tho XD

pine holly
#

that lady ruined my lunches, screw her lol jk

upper wyvern
#

trueee, healthy lunch initiative or smtn

pine holly
#

yeah, it was a big thing when i was in school

zenith moat
#

Did they stop giving out chocolate milk?

pine holly
#

LOL, i don't think so

upper wyvern
#

I wanna say before Obama's pres

pine holly
#

idk we still had choccy milk im p sure

upper wyvern
#

depends on your school then 👀 of course tho

thorny dew
#

Has anyone experimented with how plugins are loaded? Are they scanned only from a folder, or does the server jar also scan the classpath?

zenith moat
crystal lodge
#

any1 here a good animator?

hollow bane
#

Does anyknow know how i can cancel a drop when break a block

past flame
latent spindle
#

guys is it okay to use Exitlag or something similar on servers?

latent spindle
upper wyvern
jolly ravine
#

QQ all. Do you know, how to make block animating from code?

west veldt
pine holly
#

one of the best things you can do in tech to learn is look for other examples

urban gate
#

Hello, does anyone know why
⁨```
interactionContext.getClientState().blockRotation;

is null in SimpleBlockInteraction?
somber juniper
#

The server doesnt recognize the values even though they are integrated into the code:
⁨⁨Caused by: com.hypixel.hytale.codec.exception.CodecException: Failed to find enum value for SCHEDULED⁩⁩
EnumCodec uses CAMEL_CASE as its style and has a formatCamelCase method. But it still fails:
⁨⁨Caused by: com.hypixel.hytale.codec.exception.CodecException: Failed to find enum value for scheduled⁩⁩
After further review, it appears that PascalCase is used. Therefore, the values are: ⁨⁨Disabled, WhenEmpty, or Scheduled⁩⁩

thorn python
#

Hey, I'm trying to add dinamically a background to items on a UI depending on the quality but it shows a placeholder image, how can I fix it? i'm using this: ⁨⁨commands.set(slotSelector + " #SlotContainer.Background", "../ItemQualities/Slots/SlotDefault.png"))⁩⁩
(Trying to use own hytale assets)

fervent bronze
#

is there a command block in the game?

#

like that node editor from the trailer

mortal anchor
#

anyone knows how i could change something about the merchant buying system?

mortal anchor
fervent bronze
#

oh

mortal anchor
#

i want to change stuff for the system not the json

fervent bronze
#

idk sorry :(

storm heron
storm heron
#

you could probably find some tutorial on youtube about it

signal vale
#

Is the referToServer stuff broken in the latest update? I have this code which definitely worked a couple of days ago, which no longer is:
public static void onConnect(PlayerSetupConnectEvent event) {
event.referToServer("blastmc.tech", 5520);
}

It is registered, and I do get the redirect info on my client, but then I see this screen:
well I can't send an image, but 'An unexpected error occurred.' in the disconnect message

lucid spire
#

how can i ensure replaceItemStackInSlot is thread safe?

#

like i modify the bson document (metadata) of the item and replace it

storm heron
#

whats the context?

#

you should have access to a world so you can use world.execute(() -> { /* thread safe code */})

lucid spire
# storm heron whats the context?

Every tick, I get the armor, and decrement a value in its metadata [EntityTickingSystem<EntityStore>]
some other functions could also add or remove a certain amount of the value (its an int)
I want to prevent race conditions

lucid spire
storm heron
lucid spire
#

and that will prevent race conditions?

storm heron
fervent bronze
#

ok

storm heron
lucid spire
#

alright thanks

ionic rapids
#

Hey guys, do you know why somethimes intellij maven task jsut don't work anymore in the Kaupenjoe template ? Like decompile server doesn't do anything, it decompile MY project not the server anymore.

steady hawk
#

⁨```public class HudSlotChangeSystem extends EntityTickingSystem<EntityStore> {

// getQuery here...

@Override
public void tick(
        float dt,
        int index,
        @NonNullDecl ArchetypeChunk<EntityStore> chunk,
        @NonNullDecl Store<EntityStore> store,
        @NonNullDecl CommandBuffer<EntityStore> commandBuffer) {

    var ref = chunk.getReferenceTo(index);
    var player = store.getComponent(ref, Player.getComponentType());

    Item playerActiveHotbarItem = player.getInventory().getActiveHotbarItem().getItem();

    PlayerSlotChangeComponent slotChangeComponent = chunk.getComponent(index, PlayerSlotChangeComponent.getComponentType());

    if (slotChangeComponent.getLastItemId() == playerActiveHotbarItem.getId())
        return;

    slotChangeComponent.setLastItemId(playerActiveHotbarItem.getId());
    player.sendMessage(Message.raw("Zmiana przedmiotu!" + playerActiveHotbarItem.getId()));

    Archetype<EntityStore> archetype = store.getArchetype(ref);
    boolean hasLight = archetype.contains(DynamicLight.getComponentType());

    if (!playerActiveHotbarItem.getId().toLowerCase().contains("rock"))
    {
        if (hasLight){
            player.sendMessage(Message.raw("Removing light!"));
            commandBuffer.removeComponent(ref, DynamicLight.getComponentType());
        }
    }
    else
    {
        if (!hasLight){
            player.sendMessage(Message.raw("Adding light!"));
            ColorLight light = new ColorLight(
                (byte) 1,
                (byte) 11,
                (byte) 10,
                (byte) 10
            );
            commandBuffer.addComponent(ref, DynamicLight.getComponentType(), new DynamicLight(light));
        }

    }
}

}```⁩
Anybody knows why my system stops working when I try to add or remove component? It works fine without adding/removing

storm heron
#

whats your query

steady hawk
#

@NullableDecl @Override public Query<EntityStore> getQuery() { return Query.and( Player.getComponentType(), PlayerSlotChangeComponent.getComponentType() ); }

fervent bronze
normal ice
#

yo i am playing in a world alone and i already have some stuff, can i add mods then and i wouldnt lose things?

normal ice
steady hawk
#

As I said, without addComponent or removeComponent, everything was working just fine

storm heron
steady hawk
fervent bronze
#

anyone knows how ModelComponent works?

storm heron
#

yea im not sure -- what you're saying doesn't really make sense @steady hawk

fervent bronze
tropic axle
#

I am having the same issue. Any solution to this?

tulip briar
#

Does someone know how I can change the player's camera like position distance?

tropic axle
#

⁨```
TransformComponent transform = store.getComponent(playerRef, TransformComponent.getComponentType());
transform.getPosition();
transform.getRotation();

storm heron
pulsar oak
#

whats the packet for block breaking

tulip briar
storm heron
#

get the PlayerRef component and call PlayerRef.getPacketHandler().writeNoCache()

pulsar oak
mortal anchor
#

anyone knows where the shop system for stuff like kweebec merchants is in HytaleServer jar?

storm heron
pulsar oak
mortal anchor
willow zodiac
#

Hey, anyone give me an idea what to use to obfuscate my hytale jars?

fervent bronze
#

why.?

crimson jasper
#

is there any way to disable the default ost of the game via code? i want to disable it because i'm using ⁨SoundUtil⁩ to play a 2d sfx that i made in the asset editor (custom music, wanted to use it instead of the base game ost)

storm heron
#

i think environment's control music, so you could just make your own maybe? (ive not looked into it im just assuming)

#

nvm i lied i have no idea what controls music

crimson jasper
#

i tried disabling it via code but i was unsuccessful, so i found out that creating a custom ⁨SoundEvent⁩ asset and pointing it to my custom ⁨.ogg⁩ lets me actually play my music in game. the only issue now is that it plays on top of the default game music

ocean summit
#

I keep getting “You were killed by a command” on spawn and die in an infinite loop.
There’s no /kill or similar command in the server logs.
Has anyone experienced this?

tulip briar
#

How can I get the PlayerRef From CommandContext?

fervent bronze
mortal anchor
#

if so then you dont do it with commandcontext

tulip briar
#

executeSync

storm heron
mortal anchor
#

yeah use that

storm heron
#

if its not intended to be used from console

tulip briar
#

ok thanks

mortal anchor
#

any way to run my code after a method runs currently?

#

i'd guess no but worth asking

storm heron
#

depends on what method you're trying to run after

mortal anchor
storm heron
#

give me an example of what you want to do

mortal anchor
#

im just trying to modify how trading works with merchants

storm heron
#

no idea, not enough context 🤷

mortal anchor
#

i can try to say more

storm heron
#

the method you're wanting to run after

#

but more than likely not if its not an event/system without using mixins

mortal anchor
#

just a method in a class

mellow flume
#

hey, can someone check if you have any alternative of "onPlayerInteract"

#

this event is not triggering messages

devout harness
#

is there an event for consuming an item in your hand?

sinful shoal
#

help plis [HOSStatus|P] [HOSStatus] HOS Error: 400 - Server not registered

#

how to register it

mortal anchor
#

im guessing there is a item consuming one already in the game

upper wyvern
#

I don't see a Consume event;
⁨```JAVA
BootEvent.class
com/hypixel/hytale/server/core/event/events/ecs/
BreakBlockEvent.class
ChangeGameModeEvent.class
CraftRecipeEvent$Post.class
CraftRecipeEvent$Pre.class
CraftRecipeEvent.class
DamageBlockEvent.class
DiscoverZoneEvent$Display.class
DiscoverZoneEvent.class
DropItemEvent$Drop.class
DropItemEvent$PlayerRequest.class
DropItemEvent.class
InteractivelyPickupItemEvent.class
PlaceBlockEvent.class
SwitchActiveSlotEvent.class
UseBlockEvent$Post.class
UseBlockEvent$Pre.class
UseBlockEvent.class

com/hypixel/hytale/server/core/event/events/entity/
EntityEvent.class
EntityRemoveEvent.class
LivingEntityInventoryChangeEvent.class
LivingEntityUseBlockEvent.class

com/hypixel/hytale/server/core/event/events/permissions/
GroupPermissionChangeEvent$Added.class
GroupPermissionChangeEvent$Removed.class
GroupPermissionChangeEvent.class
PlayerGroupEvent$Added.class
PlayerGroupEvent$Removed.class
PlayerGroupEvent.class
PlayerPermissionChangeEvent$GroupAdded.class
PlayerPermissionChangeEvent$GroupRemoved.class
PlayerPermissionChangeEvent$PermissionsAdded.class
PlayerPermissionChangeEvent$PermissionsRemoved.class
PlayerPermissionChangeEvent.class

com/hypixel/hytale/server/core/event/events/player/
AddPlayerToWorldEvent.class
DrainPlayerFromWorldEvent.class
PlayerChatEvent$Formatter.class
PlayerChatEvent.class
PlayerConnectEvent.class
PlayerCraftEvent.class
PlayerDisconnectEvent.class
PlayerEvent.class
PlayerInteractEvent.class
PlayerMouseButtonEvent.class
PlayerMouseMotionEvent.class
PlayerReadyEvent.class
PlayerRefEvent.class
PlayerSetupConnectEvent.class
PlayerSetupDisconnectEvent.class
PrepareUniverseEvent.class
ShutdownEvent.class

#

LivingEntityInventoryChangeEvent may have some nested functions, or PlayerInteractEvent that you might be able to tell from

twin ember
#

Anyone got a nice, building server? I have no idea how the end game if there even is one in Hytale. I just like building a community.

twin ember
#

I have no idea what that means. lol

upper wyvern
mortal anchor
#

interaction

upper wyvern
arctic mist
modern stirrup
#

is there an event to capture when a player hits "F" to interact on a block like a bench?

devout harness
#

it seems food uses an interaction that triggers ApplyEffect, so maybe could extend it to call an event?

arctic mist
twin ember
#

Is... there a place to ask about servers?

devout harness
#

there is ActionApplyEntityEffect?

#

I could also instead try to overwrite all food items, I suppose

#

I'm trying to make a kind of mana that replenishes from sleeping and eating

mortal anchor
#

is it possible to detect clicking buttons in existing ui's?

#

to be more exact the shop ui for merchants

arctic mist
devout harness
#

hmm, that sounds very resource intensive, is it not? I suppose I'd only be listening to players, but still

fleet dagger
#

Hey offering anyone a $50 bounty if you're able to help us fix this crash.

[2026/01/31 13:58:54 SEVERE] [Hytale] Exception in thread Thread[#130,WorldThread - skyblock,5,InnocuousForkJoinWorkerThreadGroup]:
java.lang.NullPointerException: Cannot invoke "com.hypixel.hytale.assetstore.AssetExtraInfo$Data.getContainerKey(java.lang.Class)" because "this.data" is null
at com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType.getDefaultStateKey(BlockType.java:1358)
at com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType.getBlockKeyForState(BlockType.java:1349)
at com.hypixel.hytale.builtin.adventure.farming.states.TilledSoilBlock.computeBlockType(TilledSoilBlock.java:161)
at com.hypixel.hytale.builtin.adventure.farming.FarmingSystems$Ticking.tickSoil(FarmingSystems.java:294)
at com.hypixel.hytale.builtin.adventure.farming.FarmingSystems$Ticking.lambda$tick$0(FarmingSystems.java:226)
at com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection.forEachTicking(BlockSection.java:583)
at com.hypixel.hytale.builtin.adventure.farming.FarmingSystems$Ticking.tick(FarmingSystems.java:214)
at com.hypixel.hytale.component.system.tick.EntityTickingSystem.doTick(EntityTickingSystem.java:92)
at com.hypixel.hytale.component.system.tick.EntityTickingSystem.tick(EntityTickingSystem.java:36)
at com.hypixel.hytale.component.Store.tick(Store.java:1974)
at com.hypixel.hytale.component.system.tick.ArchetypeTickingSystem.tick(ArchetypeTickingSystem.java:36)
at com.hypixel.hytale.component.Store.tickInternal(Store.java:1930)

upper wyvern
#

or ⁨this⁩ is referring to the wrong scope

arctic mist
#

As long as you dont freeze the thread you should be fine

quartz plover
fleet dagger
#

@arctic mist @upper wyvern I sent you guys friend requests, I'll share my list of mods currently on the server. If you have any ideas on how to resolve please lmk

#

@quartz plover I'll dm you my list of mods, but possibly Hyfixes or something native to Hytale

#

Not a custom coded mod

quartz plover
fleet dagger
#

Problem is the servers have 50+ players online and it doesn't happen, except randomly 1-2 times a day

quartz plover
#

Oh, you don't know the trigger

#

It's hard to solve without reproduction steps tbf

woeful grove
#

hi do we have minumum server requirements details for every player count

quartz plover
#

You're looking for a needle in a haystack

oblique copper
#

Can anyone help? Where used EntitySpawnItemsPanel.ui? And how I can make page like EntitySpawnPage, but some different? At least I want to copy Item drag&drop functionality.

fleet dagger
#

@quartz plover Yeah I've spend 3 days searching with no luck

quartz plover
fleet dagger
#

I'll send you the details, but happens on both the Skyblock and Survival server

mortal anchor
#

is there an easy way to check what components an entity has?

quartz plover
#

Aight, I could take a look. No promises though

arctic mist
# fleet dagger <@302136132047732737> <@836620307099680818> I sent you guys friend requests, I'...

Do you have Tilled Soils in your Skyblock maps?
⁨```txt
at com.hypixel.hytale.builtin.adventure.farming.states.TilledSoilBlock.computeBlockType(TilledSoilBlock.java:161)
at com.hypixel.hytale.builtin.adventure.farming.FarmingSystems$Ticking.tickSoil(FarmingSystems.java:294)

This is trying to tick those blocks and after that get the blockData (BlockType) but it doesnt find the asset or the data get loast between load and manipulation (NullPointerException)

Are all assets loaded? Check at the server startup logs or world initialisation log for missing assets or error loading assets
tawdry crescent
#

I struggle with adding component to a bloc i just set to the world

The bloc spawn but without the component cause of a potential crash when I try to get the reference of the new block

Do you have some doc / tuto for doing something like this ?

elfin mango
#

does somebody know why i ref here is null?
So when my breakblock event is called, i try to get the reference to this block with the BlockModule

   @Override
public void handle(int index,
                   @Nonnull ArchetypeChunk<EntityStore> archetypeChunk,
                   @Nonnull Store<EntityStore> store,
                   @Nonnull CommandBuffer<EntityStore> commandBuffer,
                   @Nonnull BreakBlockEvent breakBlockEvent) {

    Ref<EntityStore> playerRef = archetypeChunk.getReferenceTo(index);
    Player player = store.getComponent(playerRef, Player.getComponentType());
    Vector3i targetBlock = breakBlockEvent.getTargetBlock();
    Ref<ChunkStore> ref = BlockModule.getBlockEntity(player.getWorld(), targetBlock.x, targetBlock.y, targetBlock.z);
elfin mango
fleet dagger
#

@arctic mist yes 40+ players on the skyblock all of whom have tilled soil, fertilized soil, but sometimes it takes 12+ hours to occur other times it takes 1 hour

tawdry crescent
arctic mist
#

There can be a lot of stuff causing this, a bad asset load at world creation time or server initialization time or directly a bug in Hytales code. You might be able to patch it, if check on TilledSoil blocks if asset are not loaded, switch it to dirt block

fleet dagger
#

@arctic mist I'll send over the other crash report too, something similar is happening on the survival server but not soil related

#

Entity related for that one

arctic mist
#

Sure, i will be gone for some hours but once im back I can take a look into it

fleet dagger
#

Okay ty! I've sent a friend request because normal DM's don't work without it

wide haven
#

Hello I’m looking for a plugin developer, paid position. Dm if interested and must have experience

sinful storm
#

Is there a way to work around Hytale's awful DRM protections?

Not for any sake but the sake of testing the server setup and progression as a newbie player. I hate having to be resetting my data constantly to play pretend newbie just so I can "play as a new server join" and work on balancing.

On other games I just do an alt account/char join, but Hytale says no --'

tawdry crescent
stable solar
sinful storm
wicked swallow
#

How could a conveyor belt be made so that the items on it move in the direction the conveyor belt is pointing?

shut widget
#

@fleet dagger if u didnt find feel free to send me a msg

ocean lake
#

i have UI like this but when i try to open it whole client crash
⁨```
$C = "../Common.ui";
Group {
LayoutMode: MiddleCenter;
Background: #2a2a2a;
Anchor: (Width: 400, Height: 240);
Group {
LayoutMode: Full;
Background: #333333;
Group {
LayoutMode: MiddleCenter;
Background: (Color: #212121);
Anchor: (Height: 40);
Label #Label0af906d3 {
Padding: (Full: 0);
Text: "Runic Smelter";
Style: (TextColor: #ffffff, FontSize: 20, Alignment: Center);
}
}
Group {
LayoutMode: CenterMiddle;
Background: #333333;
Anchor: (Height: 200);
Group {
LayoutMode: Top;
Background: #333333;
Anchor: (Width: 30, Height: 190);
ProgressBar #Energy {
TooltipText: "0";
Anchor: (Width: 30, Height: 190);
Value: 0.5;
Direction: Start;
Alignment: Vertical;
}
}
Group {
LayoutMode: CenterMiddle;
Background: #333333;
Anchor: (Width: 360, Height: 190);
ItemSlotButton #Input {
Anchor: (Width: 80, Height: 80, Right: 10);
ItemSlot #InputSlot {
Padding: (Full: 0);
}
}
ProgressBar #Progress {
TooltipText: "0";
Anchor: (Width: 120, Height: 30, Right: 10);
Padding: (Full: 0);
Value: 0.5;
}
ItemSlotButton #Output {
Anchor: (Width: 80, Height: 80);
Padding: (Full: 0);
ItemSlot #OutputSlot {
Padding: (Full: 0);
}
}
}
}
}
}


all i see in log is 
⁨```
2026-01-31 17:36:53.5211|ERROR|HytaleClient.Application.Program|System.NullReferenceException: Object reference not set to an instance of an object.
   at HytaleClient!<BaseAddress>+0x257d34
   at HytaleClient!<BaseAddress>+0x2463c6
   at HytaleClient!<BaseAddress>+0x246889
```⁩
no other errors 
please help
heavy plank
#

Does anyone found out how to get CommandBuffer with Store? Trying to spawn explosion from ui with ExplosionUtils.performExplosion

past flame
#

I am still looking for a good coder. Hmu

tawdry crescent
#

@elfin mangoit seems the block don't have Entity if he don't have any component, I resolve it with adding entity in the block on the asset editor

wicked swallow
#

How do I get all the entities in World?

oblique copper
tulip hamlet
#

I need some help lads, I downloaded
AdminUI
CoreProtect
LuckPerms
Essentials

Everytime I try to do any command it says I don’t have permission even though I granted myself OP

crisp delta
#

guys is hytale down it wont let me into my own world keeps said faid to connect

sonic peak
#

Anyone have any pointers on programmatically firing the Use interaction on a block. I have a handler that finds the target block, get the interactions, finds 'Use', but after many attempts and trying to follow what the client is firing, I'm still missing something. I have a UseBlockEvent.Pre currently that I've tried invoking on the commandBuffer, but tracing that through fails as there's no registered event. That leads me to think that the InteractionContext I have is wrong or I could be on the wrong path completely. Any thoughts out there?

oblique copper
# wicked swallow <:Hypixel_Sad:1437483222001782784>

Something like that:

List<Entity> getAllEntities(World world) {
    Store<EntityStore> store = world.getEntityStore().getStore();
    List<Entity> entities = new ArrayList<>();

    store.forEachChunk((chunk, cmd) -> {
        if (!EntityUtils.hasEntity(chunk.getArchetype())) return;
        for (int i = 0; i < chunk.size(); i++) {
            Entity entity = EntityUtils.getEntity(i, chunk);
            if (entity != null) {
                entities.add(entity);
            }
        }
    });

    return entities;
}

And if you call it not in world thread, you need to wrap it like that:

return CompletableFuture.supplyAsync(() -> getAllEntities(world), world).join();

For realization you can view for World.getPlayers()

wicked swallow
clever raft
fathom bear
#

Hey, is there a way to actually had descriptions for items you've duplicated from Hytale over to a servers pack to make them custom named? I've gone inside the source and added something in the description but it's not appearing ingame

hollow bane
#

Does anyknow know how i can cancel a drop when break a block

tulip hamlet
normal reef
#

Anyone know how to make curseforge automatically delete an older version of the mod jar when updating?!

#

Can’t find info anywhere

opal parrot
modern stirrup
#

How do you change in the interaction text on a block? Like the "Press F to Use"

karmic perch
#

MEGA GLOBAL LANGUAGE PACK FOR HYTALE CLIENT ht\tps://1d\rv.\ms/u/c/6a2f1e38edfd33b7/IQDW2yJhaXFnQ62PTzezVDf9AYLqCx9Y2ILxzcV-QL-i0d0?e=BXej1D

copper summit
#

Now ima avoid that one, nah im jk but this aint it boss

#

Anyone willing to help me troubleshoot my scoreboard in dms?

karmic perch
mellow tendon
#

don't worry about it

clever raft
copper summit
#

WHY ARE WE YELLING

karmic perch
mellow tendon
#

yeah, I would absolutely trust your translations are quality with english like that

cerulean walrus
golden beacon
hollow bane
#

Is it possible to adjust how much ore is spawning in my default world gen

karmic perch
#

My languge pack 77% working

#

AF, BO, BR, CH, CN, CZ, DA, DE, ES, FI, FR, GR, HAWAII, HR, HU, IL, IR, IT, JP, CECHUA, CORZICA, LETT, LIT, MA, MI, MO, NO, OR, PL,BRA, RO, RU, SC, SE, SK,
TATAR, TR, VIETNAM

karmic perch
copper summit
#

Is that an error? whats going on

karmic perch
flint glen
karmic perch
#

Good By Thank you playing game.

#

I restarted the game and it compiles the elements. I will start integrating them.

#

Full character s Supporting PLS

karmic cradle
#

hello, in my server I have teleporters that bring the players to a creative world. How can I reorganize( wipe) their inventory when they change worlds and vice versa when they return outside the creative world (give back the inventory they had)? Thank for the help

remote garnet
karmic perch
#

The link will not change. I will give a sign of life after integration.

south jungle
#

Anyone know how to remove the nitrado performance saver plugin?

We can't seem to figure out what to remove to fully uninstall the plugin without reinstalling our VPS completely.

south jungle
#

but it seems like there's more somewhere else that seems to cause issues. my friend manages the VPS and he was spending a few hours in single player trying to remove the plugin from his SP save and it seems there's some hidden files somewhere outside it

west elk
south jungle
inland palm
#

Any Coders/Modders that want to join a project? we are working on making a highly runescape inspired server and are looking for more people who want to join the cause 😄 if you want to join or just want more info hit me up!

fervent bronze
#

how to register an IEvent?

inland palm
#

Whats what

fervent bronze
#

runescape

west elk
inland palm
# fervent bronze runescape

if you know you know but since you like undertale and probbly from the runescape era you should know so not sure if you kidding or not 😉

fervent bronze
inland palm
fervent bronze
#

ik

#

i am interested

#

in doing that

inland palm
#

ill dm you

fervent bronze
#

k

mortal anchor
#

how can i check an entity's components? just list which ones they have

normal abyss
#

hey guys i'm having crazy world crash unloading... can someone help me?
java.lang.NullPointerException: Cannot invoke "com.hypixel.hytale.component.Holder.getArchetype()" because "holder" is null

fervent bronze
# west elk

btw my event registry nor my command registry are working :/
⁨⁨⁨```java
getEventRegistry().register(Morph.class, new MorphHandler());
getCommandRegistry().registerCommand(new MorphCommand());

vernal niche
patent vapor
#

Is there an admin shop plugin where you can set it to show when clicking an entity or a block? I'd make one myself but it uses so much ram and i have barely enough.

normal reef
hollow bane
#

Is it possible to adjust the drops when breaking a block

inland palm
south jungle
vernal niche
hidden thistle
#

Hello guys, who is able to help me out my problem , because i can not download update , dowanload speed is slowing down to 100kb/s after 2% /....

fleet ridge
#

What is the best essentials plugin?

south jungle
#

Anyone know why the "Better Quarry" plugin keeps getting stuck on basic blocks like shale in the snow?
It's like the shale blocks are 'blinking' in and out of existence so it stops every time it hits a shale block.

ivory ember
#

Hello! can i ask about serverspecific things here aswell? Playing on a modded server and the instances such as forgotten temple and other dungeons start crashing out after entering 1-2 times, entire world laggs and freezes but i can still see chat live, is there a way somneone else has the same issue and can point me in a direction on what to do?

dim sinew
#

I posted this in #discussion but i realize this is probably a better place for the question
Im trying to make a custom cooking bench interface by overriding the vanilla interface. I have a custom class CookingBenchWindow⁩ that extends ⁨ProcessingBenchWindow but to instantiate the ⁨ProcessingBenchWindow⁩ I need a ProcessingBenchState which extends ⁨BenchState which extends BlockState⁩. ⁨BlockState⁩ however is a deprecated class so in my custom interaction that im making to interrupt the default ⁨interactWithBlock interaction i can not use ⁨⁨⁨BlockState state = world.getState(pos.x, pos.y, pos.z, true); if (!(state instanceof ProcessingBenchState benchState)) {⁩⁩⁩ Does anyone know how to work around the fact that its deprecated or a different way to get the ⁨ProcessingBenchState⁩?

fervent bronze
#

what's the difference between Player and PlayerRef?

fervent bronze
twilit mantle
#

playerref identifies the player, and player is the state of the player

think of playerref as the address of the players data and player to be the state of the data, what is actually in it, which can change

that's how i undestand it

#

Here's examples to help explain it

i use playerref to schedule teleports on the world thread:

⁨⁨```java
databaseManager.getWarpByName(warpName)
.thenAccept(result -> {
if (playerRef == null || !playerRef.isValid()) {
return;
}
GameThread.run(playerRef, () -> handleTeleport(store, ref, playerRef, warpName, result));
});


i use player when using a custom ui for a player that interacts with a custom object

```⁩⁩java
Player player = commandBuffer.getComponent(playerEntityRef, Player.getComponentType());
if (player == null) {
  return;
}
PageManager pageManager = player.getPageManager();
if (pageManager.getCustomPage() != null) {
  return;
}
```
fervent bronze
#

wdym by "state"

twilit mantle
#

state of the componant, thing that is player

fervent bronze
#

oh ok

twilit mantle
#

its something that can change every game tick, like change of hp, dropping an item etc

pulsar oak
#

hey, is there an event that is called when i pick up a flower?

ancient night
#

Is it possible execute a method after a certain time without using threads?

fervent bronze
#

and player ref is basically the physical thing?

twilit mantle
#

playerref doesnt change as its simply the address of the thing in the storage

fervent bronze
#

oh ok

twilit mantle
#

yes exactly

frosty scroll
#

anyone using HyFactions mod and can no longer see players on the game map?

ancient night
south jungle
fervent bronze
#

for some reason custom ui documents couldn't load

olive glacier
#

Is there any way to spawn a mob and force it to walk somewhere using built-in pathfinding?

#

I was able to spawn the enemy but I can't find any way to make it "run" towards the player location while in combat state

twilit mantle
opaque cape
#

Can you addValidators to withRequiredArg ?

twilit mantle
#

otherwise it will throw that error

tiny oyster
#

is there a known way to make placed blocks movable? think elevators

ancient night
#

Or is it possible to give the world a delay when world.execute(...)?

twilit mantle
#

kinda like

(pseudo code)
⁨```java
doThing(() => {
result = waitForThenAddItem(60, Banana)
runOnWorldThread(() => { apply(result) }
}

#

you dont delay the worldthread, you do that async then apply whatever it is you wanted to do in the worldthread

clever horizon
#

Anything involving a delay needs to happen in a background thread. You can use world.execute() from your background task to get back onto the world thread.

CompletableFuture has a nice mechanism for this, since you can chain them together.

ancient night
clever horizon
#

This is an example from a Runnable class I have. It schedules a task on a ScheduledExecutorService, then gets back into the world thread immediately. 'this' could be a Runnable lambda too

    private void ScheduleSync() {
        MyPluginClass.Get().Schedule(() -> {
            world.execute(this);
        }, SCHEDULE_DELAY_SYNC);
    }```
empty wyvern
#

how can I get text input from TextField in UI??

bronze granite
#

Is there any command to transfer the player to another server in the game?

pulsar oak
#

MoreEvents just doesnt seem to be working at ALL for me and im going insane

bronze granite
#

for me?