#server-plugin

1 messages · Page 3 of 1

lunar schooner
#

just made it a .jar file and it still didnt work haha... man i just wanna edit other peoples mods to match the theme of my server XD gave it a cute gui hud for the tooltip and rarity and cant even use it

trail sage
#

Overwriting many things is possible with OW2 ASM but it is painful

tardy vortex
#

How do you make it so the grass isnt black in void worlds?

maiden galleon
#

YOU HAVE TO SET THE ENVIRONMENT

#
        final var config = new WorldConfig();
        config.setSpawnProvider(new GlobalSpawnProvider(new Transform(0.5, 80, 0.5, 0, (float) Math.toRadians(180), 0)));
        config.setWorldGenProvider(new VoidWorldGenProvider(PrefabEditSessionManager.DEFAULT_TINT, PrefabEditSessionManager.DEFAULT_CHUNK_ENVIRONMENT));
        config.setSpawningNPC(false);
        return config;
}```
burnt eagle
#

how can i activate/deactivate the whitelist from plugin code ?

hexed glade
#

Hi, what is the class name for scheduler/executor again?

near onyx
near onyx
lone parrot
#

Not sure if this is the right place to ask this. I have an asset pack, that no longer works. I added the correct pointer to the game version. But yet I still can't get it to load up without removing the asset pack check. Any thoughts?

void wagon
#

If you unzip the pack, and try to connect, it'll tell you the error in your log files.

lone parrot
#

It isn't zipped. It's on my personal world

near onyx
void wagon
hexed glade
#

oh i didnt see, thanks!

near onyx
#

You’re welcome

hexed glade
near onyx
#

you get it from HytaleServer.SCHEDULED_EXECUTOR But its a java class

flat nest
#

hello i need help with my issues with portals breaking the game. everytime someone enters/exits a portal to any where (Forgotten Temple, Dread Wade, Major Dungeons) the whole server crashes but according the logs it only says initiating shutdown 130

sterile forum
#

that resulted in peopel just getting black screens when going to areas etc. Might be related.

#

But could also be a generic low memory issue.

flat nest
sullen marlin
sterile forum
#

or am i just that bad at the game. 😄

sullen marlin
#

oh i really don't know what mods are out there atm (; i'm mostly coding my own atm ^^

sterile forum
#

same

#

well i am coding a debug tools mod for myself for when i make the mod.

vagrant blade
#

@CheckBoxWithLabel has no ValueChanged event?

sullen marlin
#

checkboxwithlabel ? .. is that a modded extension, i can't recall seeing this in vanilla customui?

vagrant blade
#

$C.@CheckBoxWithLabel. it's built'in. you can see it in /ui-gallery

sullen marlin
#

oh you right, i'm sorry .. thought there was only the "@CheckBox" one for some reason

sterile forum
vagrant blade
#

The UI system is currently very complicated. These might also be two different things, because CheckBoxWithLabel doesn’t have a ValueChanged event. And if I use LabeledCheckBox, the client crashes.

sterile forum
#

did you activate diagnostic in the hytale client so it shows ui errors intstead of crashing on them?

twilit talon
#

good morning

sterile forum
#

Morning.

vagrant blade
sterile forum
sterile forum
# vagrant blade I didn’t know that was a thing. that’s awesome. thanks

I think my original idea might be right, for the event you need to specify the element the event relates to with its named parameter , the
#myElementname for the labaled checkbox it might be that you need to add
#checkbox to specify its the checkbox in the labeledCheckbox you want the value changed event for.

Looking at some of their code they do a lot of

CustomUIEventBindingType.ValueChanged, "#FillModeCheckbox #CheckBox", EventData.of("@FillSolid", "#FillModeCheckbox #CheckBox.Value"), false

Where i would guess the FillModeCheckBox is the name of the CheckBoxWithLabel and CheckBox is a child object in the CheckBoxWithLabel thats the actual CheckBox type.

#

I would give it a try and just add CheckBox to the binding as well.

vagrant blade
#

dude it actually worked like that

#
                CustomUIEventBindingType.ValueChanged,
                "#OpenCheckBox #CheckBox",
                EventData.of("@ToggleOpen", "#OpenCheckBox #CheckBox.Value"),
                false
        );```
sterile forum
#

Suspected as much when it sounded like a compound element.

#

hope that gets you going with what ever you are working on.

vagrant blade
#

Yes, this definitely helped me a lot. Thank you very much.

dark heart
#

Do u guys know a mod that refresh unclaimed chunks

sterile forum
sly onyx
#

Is there a way to visualice entities hitbox/collision?

arctic crown
sly onyx
#

Oh ok, thank you

sterile forum
# sly onyx Is there a way to visualice entities hitbox/collision?

if you know how render a block bench model with your own component type and make it follow the entity it's attached to, you could make a block bench component scaled to 1x1x1, build a plugin system that triggers for all collision boxes and populate the owning entity with your component, then just use the model settings per instance of your component to rescale your blockbench model to the scale of the hitbox. Perhaps.

remote chasm
#

I'm getting "One or more plugins are targeting an older server version." error in chat on world startup, where do I get rid of this/set the target release?

I have my server version set to wildcard

"ServerVersion": "*",
#

I learned that you have to set that field as full maven artifact version of the server version

sterile forum
#

also known as the game version you are linking your mod against.

remote chasm
#

yeah I've set up maven property for it now

<properties>
        <maven.compiler.source>25</maven.compiler.source>
        <maven.compiler.target>25</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <hytale.version>2026.02.19-1a311a592</hytale.version>
</properties>
<dependency>
            <groupId>com.hypixel.hytale</groupId>
            <artifactId>Server</artifactId>
            <version>${hytale.version}</version>
            <scope>provided</scope>
</dependency>

and I'm interpolating it in manifest.json

"ServerVersion": "${hytale.version}",
#

it's a shame you need to recompile each version tho

neat pelican
#

they're going to have a better system for this in the future but yeah this is how it is for now

tardy vortex
#

Anyone know how to make it so the grass isnt black in void worlds?

heady locust
#

Is there any way to add Assets like icon images dynamically through a plugin?

near onyx
tardy vortex
near onyx
#

hahah it happens

tardy vortex
ocean swallow
#

i'm trying to add a new component to the ecs system, but the builder codec is throwing a fit

#

intellij is flagging .builder(DodgeStart.class, DodgeStart::new)

#

saying DodgeStart.class is an instance of Class<DodgeStart> instead of Class<T>

#

and that DodgeStart::new is a <method reference> instead of a Supplier

#

what's going on?

#

to me this seems like incredibly arbitrary semantics

neat pelican
#

Seems like type inference isn't working correctly. Do you have a typo or copy/paste error somewhere with an incorrect type?

cursive yoke
cursive yoke
#

Thats cool 😄

remote chasm
#

like a week in I believe

lucid vapor
#

does anyone know how to add custom unicode mappings to Hytale?

remote chasm
#

why? that sounds like xy problem

lucid vapor
#

So I can use unicodes like: ✓✕

ocean swallow
lucid vapor
#

Hytale natively supports unicodes like •» but not ✓✕↩→—

cursive yoke
remote chasm
#

I am not sure if you can just do that outside of custom ui

lucid vapor
#

I'm trying to in custom ui but doesn't parse in the UI

cursive yoke
#

Are there sources for the server on the maven as well?

remote chasm
remote chasm
#

there's a FontName property there

lucid vapor
#

LabelStyle.. I'll look into that.

neat pelican
ocean swallow
cursive yoke
#

Is there a way to block water / lava placement and hammering?

lucid vapor
cursive yoke
ocean swallow
#

it's cos i didn't include a default constructor

cursive yoke
void wagon
#

I did it... I did the thing. My chickens now spawn in front of the coop, instead of around the coop. It still uses the radius mechanic, I've just shifted where it circle center is. The space you need is determined by the offset, but in front of the coop instead. You'll need offset * 2 + 1 blocks of space in front of the coop. I got close initially with ASM, but needed to create additional variables which added complexity so I shifted to using Hyxin - much simpler.

I found that with an offset of 1, it will fit perfectly (no empty spaces) a circle of 8 chickens. I'm not sure how this scales, but given how a coop can only have a max of 6 residents by default, you don't need the vanilla offset of 3. It's very satisfying, if I say so myself.

stone flare
#

Is there a way to perform a Velocity.addInstruction but relative to the player's position instead of relative to the world coordinates?

near onyx
#

like... they sleep on it, and decided they dont like me in the morning, utterly heartbreaking

brave mural
#

Is SQL Light thread safe?

For example i current want to track how many players are inside a world just as an example when a player joins a world i increase the player count by 1 but if 2 join at the same time what happens?

#

Is there a way to check if a player left a world? Like an even like AddPlayerToWorld?

velvet meadow
#

DrainPlayerFromWorldEvent

neat pelican
#

In the next update there will also be RemovedPlayerFromWorldEvent

wraith sleet
#

hey guys, for a spectator mode i enable fly at intagible, invulnerble and hiddenfromadventureplayers components but im still able to hit player and interact with F key. anyone already has knowlegde about spectating (passive)

void wagon
# near onyx i noticed a bug with coops. If you tame them... tamed goes in, untamed comes out...

Yeah I noticed this too, but it's a bit deeper than that. Tamed mobs do not work with coops at all, but why your tamed mobs went into the coop is because they had a "memory" of said coop prior to taming. This memory bypasses AcceptedNpcGroups and MaxResidents. Why this results in them losing their tamed status, not sure - it just resets their NPC role for whatever reason.

Coops work by scooping up nearby mobs within a 10 block radius. This is defined as WildCaptureRadius, there is also CaptureWildNPCsInRange, but not too sure why you'd ever disable the latter. So if a tamed mob has no memory of the coop, it will never be scooped up.

You can fix this, at least until it's patched by adding the tamed variants to the NPC groups for Chicken_Desert, Chicken and Skill. You can find these inside of Server/NPC/Groups/Creature/Livestock. This doesn't enable tamed mobs to generate loot, so you'll need to do something similar inside of Server/Farming/Coops/Coop_Chicken.json, and add to the ProduceDrops.

near onyx
#

ooo good to know, thank you

wraith sleet
#

is there any way to let the ServerCameraSetting let the client respect walls instead of noclipping?

brave mural
#

Isnt there an actually working good online ui builder? Im so confused my whole ui files are basically just praying to god they work

#

any recommendations or docs?

winged kestrel
#

You could use HyUI

#

its not an online tool but atleast they have a system that lets you use a version of html and css

robust yoke
#

Am I the only one who's having the issue when enabling the dependency
"Hytale:EntityModule":"*"
to have the asset pack of the plugin missing on the asset editor, when still the plugin and all the relative items are loaded? Is it a bug of the asset editor or am I missing something?

hearty sinew
robust yoke
#

I also added all the /plugin list on the dependency but still i don't have my asset pack, except for when I don't use dependency at all

robust yoke
hearty sinew
robust yoke
#

Well so I have to skip studing that section for now

#

Thanks for the info

hearty sinew
#

You're welcome.

heady locust
#

Can you create custom Entity Components?

hearty sinew
flat nest
#

hey how do i change the RespawnController? From ExitInstance to just respawning back to the portal itself

ionic ermine
#

How would I go about creating a custom interaction type?

hearty sinew
ionic ermine
#

Any good tutorials for approaching hytale code? Just beginning with Java tutorials atm, but understanding what you just said would be nice too

hearty sinew
ionic ermine
#

That's definitely what I need, thanks a ton

void wagon
near onyx
#

that does sound bizarre

hearty sinew
near onyx
#

i dont even know why they gave them a whole new role.
Should have just been a TamedComponent

hearty sinew
#

I mean, they might rework it once the NPC rework is done.

near onyx
#

i hope so

void wagon
hearty sinew
void wagon
#

I'll do some toying. First, figure out how to make them forget consistently, and then see what could be the possible cause. I'm sure the devs will fix it, but if they dont' fix it tomorrow, would be nice to find a temp fix.

tardy vortex
#

anyone know if theres anyway to set the biome tint on existing chunks? to remove the black grass

void wagon
#

No idea how to trigger the de-taming. Seems to happen when you aren't wanting it to. I'll wait for tomorrows update, and if it isn't solved, I'll throw in some logs to see where and when it fails. I'm also curious as to why the coop doesn't like to capture or release the residents depending on when the chunk is loaded. It resolves itself, just kind of weird. 😅

sterile forum
#

or if its two objects, calculate the vector between the world position it's relative to. So calculate the the vector to the player from the start position, add that as well.

sterile forum
#

Ha. Realized something that feels scary but maybe shouldn't be.
Some of the components are instances, so multiple entities share the same object between them.
I have only seen it for a data less component, and that makes even more sense that you don't need unique copies of it.
But I am very curious how that would behave with data, specially if serialized (codec json stored) and on load. since the system seem to build on data being saved in each entity not with a reference to a shared component. Then again you could build a system where it just creates the instance and the first created handles actual loading of data from a specific source.

acoustic shuttle
sterile forum
#

Well essentially until it stops being early access.

brave mural
#

Quick question about player names: is it possible for players to change their names? Currently,

I’m saving a player’s level using their player name, but if Hytale allows them to change it, they would effectively start back at level 1. I’ve also considered using the player UUID instead, which would be safe, but then other players wouldn’t be able to look up information about someone while they’re offline — they would need the name.

So, I feel like I don’t want to store the player name permanently, but at the same time, I still need it. Do you have any recommendations?

neat pelican
sterile forum
neat pelican
#

It's the UUID of your game profile

sterile forum
#

Damn. Ok. Interesting.

neat pelican
#

To make sure you're getting the correct one, you can check it against the one you see in your server log when connecting:
[Hytale] Starting authenticated flow for DaniDipp (d2ca6980-613a-4fd7-8433-a4013baa6255) from QuicConnectionAddress{connId=f45960afdd395126f8ce5fd6fb11000fa4ff3270} (/xx.xx.xx.xx:54444, streamId=0)

#

and it's also how hytale stores user data un the universe/players directory (in my case d2ca6980-613a-4fd7-8433-a4013baa6255.json)

sterile forum
#

yeah i knew it wrote to a json based on your uuid.
I just for some reason expected there might be some per server hash and reUuid, giving you a deterministic but unique one.

hexed glade
#

hi! whats the key on manifest.json to make plugins load only when a ccertain plugin is loaded already, is it softDependencies or what

#

not hard dependencies

#

I tried OptionalDependencies but it still loads first than the optional dependencies, isnt there like a loadAfter option

sterile forum
hexed glade
#

i want the plugin to load after a certain plugin has been loaded, thats odd if its named LoadBefore xd

#

ill jsut add to the other plugin the LoadBefore

sterile forum
#

One could as easily interpert it as mods in a list called LoadAfter, would be mods you specify would be loaded after the current one. Just point of view. ^^

brave mural
#

I always used playerRef.getuuid()

sterile forum
# brave mural I always used playerRef.getuuid()

I don't think you have the playerRef when the player is offline. Since it's a reference to the Entity, and the entity won't be loaded.
Othewise i think it was more of a validation that it's the correct one.

brave mural
#

lol, so how do i get the correct one then?

#

Is there like Player.Getuuid or what?

sterile forum
#

There are a couple of conversations previously about how you get the uuid for a offline player.
Using ref is fine in an all other cases, but as hytale self state, as soon as you have a ref, you should always check that its valid before doing logic with it.

brave mural
#

So the offline one is the correct one then ?

sterile forum
#

really depends on what you are doing.

brave mural
#

Im super confused right now. shouldnt the playerRef uuid be the same as the offline player uuid?

sterile forum
#

or i could mix it up and you still have a player ref when they are offline, but you lack some other stuff.

brave mural
#

but the offline one is accessible while the player is not online

#

but should be the same?

sterile forum
#

yes the uuid is the same.

#

thats the point this was more that dani specified a place where your uuid is printed when logged in so one could verify that it is the right one.
Since there are plenty of uuids in general in the game, and even more player files with uuids on a server depending on number of players.

fringe shoal
#

Anyone know how to set a spawn protection for a Lobby?

formal ridge
#

Hum, i have a strange bug, where the grass block appear black, when i add a mod, did someone have this problem ?

sterile forum
fringe shoal
sterile forum
sterile forum
#

But i lied.
You also have to look in the gameplayconfigs folder and the forgotten temple settings there since to config reference that file.

{
  "Parent": "Default",
  "World": {
    "AllowBlockBreaking": false,
    "AllowBlockGathering": false,
    "AllowBlockPlacement": false
  },
  "Death": {
    "ItemsLossMode": "None",
    "RespawnController": {
      "Type": "WorldSpawnPoint"
    }
  },
  "Combat": {
    "DisableNPCIncomingDamage": true,
    "DisablePlayerIncomingDamage": true
  },
  "Plugin": {
    "ForgottenTemple": {
      "MinYRespawn": 110,
      "RespawnSound": "SFX_Divine_Respawn"
    }
  }
}

wide moss
#

anyone know how to teleport other players to different worlds without giving them /teleport permissions? i can only see commands to teleport myself. i working on a mod which creates a new world and teleports the player to it but i can only get teleporting to work with /teleport world added to the groups permission

brave mural
#

Is there a shutdown override in the main plugin entry?

Like this?

@Override
  protected void setup() {
    super.setup();
   
  }

  @Override
  protected void start() {
    
    return;
  }

  @Override
  protected void shutdown() {
    
  }
#

Ok seems like it has that

sterile forum
#

in intellij that is

wraith sleet
#

in my DamageEventSystem i prevent fatal damage and instead heal the target and teleport it back to another location. however sometimes even though i prevent any lethal damage the "real" death happens from time to time and i cant figure out why. anyone had similar problems and may have some intel on that?

sterile forum
#

Sorry unrealted, but "The real death" makes it sound like that even if the player character makes it, the actual player themselves die in front of their computer. ^^

nova bronze
#

one time I died in hytale in minecraft

sterile forum
#

One time i dyed a t-shirt.

queen iris
#

Is there a mod already made that isn’t command based but key bind based for the playlist/tablist.

near onyx
#

isnt that already built into the game?

umbral flame
#
NPCEntity npcEntity = commandBuffer.getComponent(target, NPCEntity.getComponentType());

if (npcEntity != null) {
    Role role = npcEntity.getRole();
    if (role != null) {
        WorldSupport worldSupport = role.getWorldSupport();
        worldSupport.overrideAttitude(ref /* player type reference */, Attitude.FRIENDLY, subSpell.duration());
    }
}

I thought erroneously that overriding npc attitude would change their behavior, testing FRIENDLY on HOSTILE mobs does not change them aggro-ing the player, is there another way to override NPC Attitude/Behavior?

sterile forum
#

you check that npcEntity and its roll are non null, the ref is actually a player and that there is a duration left on the spell?

umbral flame
#

yes to all, those are done in a previous function and the attitude does seem to be overriden when logging its value, but npc keep their aggression

#

I also used constants to test the duration, I didn't know whether it was in seconds or milliseconds so I tested both, enemies seem to reset their attitude periodically despite the override
I must not be understanding something, I guess I'll check when and where the defaults get reapplied

sterile forum
#

What you could do for debugging as well.
Add your own no data component when you hit, that way you can have a ticking system that query for that component and a NPCEntity.getComponentType() where you pull out data realtime and print out somewhere, then you could see or add more parameters or values that you want to dump out?

umbral flame
#

oh yeah better idea than trudging through the server code, thanks I'll do that when I can 👍

sterile forum
#

Find ways to debug and get the data you need when you need it becomes so important after a while.

umbral flame
#

Yeah it's been a while since I've had to actively set up debug tools so I gotta get that reflex in again

sterile forum
#

I've been sitting screaming at code because it won't hit my damn breakpoint, realized i had the built service running and not the debug... (not hytale)

hearty sinew
umbral flame
sterile forum
umbral flame
sterile forum
#

The problem you will run into is the client disconnecting due to timeout.

#

but its good if you need to check very specific states server side at a given point

umbral flame
sterile forum
#

yeah on reaching a breakpoint
also the issue i had originaly is also gone. where it took my server 7 minutes to start in debug, now it starts as quickly as release essentially.

umbral flame
near onyx
#

for the record, i tried the override thing too. (setting to friendly)
I even had it spit out what its attitude was after applying the override.
(it stated he was friendly)
The skeleton still kept shooting at me after trying to make him friendly.
I guess he REALLY doesnt like me

umbral flame
near onyx
#

yeah, let me know if you figure anything out

burnt eagle
#

Is there an event that gets triggered directly before the actual shutdown, before the world is shut down? Possibly one that even triggers in the event of a server crash?

sterile forum
#

It could be that they are still in a combat state. Could be that besides making them friendly you might have to override their state to being idle.
Maybe it's as easy as.

        var currentRole = npcComponent.getRole();
        var roleIndex = currentRole.getRoleIndex();
        RoleChangeSystem.requestRoleChange(npcRef, currentRole, roleIndex, false, "Idle", null, store);
near onyx
#

oh good idea, ill try that out shortly

#

ok, it seems to work for a split sec, he makes a noise (his garble de goop) then he gets back to shooting at me.
Ill keep playing around

near onyx
#

ok did more testing.
I send the attitude before/after the change.
I get hostitle/friendly.

But if i run the code I again get hostile/friendly.
So its appear its somehow getting wiped, ill have to dig deeper

sterile forum
#

Maybe if they are part of a flock, one would need to visualize the state and role and other stuff properly

umbral flame
#

dumb question, is duration usually expressed in seconds or milliseconds? I know the scheduler makes it explicit, I'm not sure in other contexts

near onyx
#

i assumed Tick (because it has a tick method that subtracts the time)
But i used Double.MAX_VALUE just to test

umbral flame
#

I get a npcComponent null error, is there a specific component the referenced entity should possess beyond NPCEntity?

sterile forum
#

if the npcComponent is null then you are not referencing a npcEntity I would assume, but something else, maybe the player.

umbral flame
polar pecan
#

Any way to get the item display name on the server? I know we can use Message.translation(item.getTranslationKey()), but I need it as a string that I can use elsewhere in the code

neat pelican
sterile forum
polar pecan
sterile forum
sterile forum
# polar pecan 👀 how do I access that?

not sure if it is the nameplate, i think there is a displayname component as well.
you get both the same way you get a component from any other entity store, by asking for it by componentType.

near onyx
polar pecan
near onyx
#

You’re welcome

lofty crystal
#

Hey! I'm working on a mod which creates it's own UI, but I'm trying to have the UI render an image which is dynamically updated from a web src. Is that something that's possible?

#

I've tried fighting back and forth with it but I always just get the standard placeholder image, it never seems to resolve to the image downloaded.

neat pelican
lofty crystal
inner fossil
#

This AMD Black UI Issues is going to drive me nuts, everytime you need to go see which mod is a issue with Nvidia the stuff just works, it really is limiting you on adding mods, hopefully Hytale fixes this ASAP

remote chasm
#

haven't ran into any issue with black ui

#

are you sure you're up to date with your drivers?

inner fossil
#

it's a issue with lower end Graphics Cards

#

Apple/Intel/AMD say Laptops etc

sterile forum
#

Have anyone figured out how it resolves the asset paths for the different entity types. Want to add my own entity type etc but that requires me to figure out how it resolves the paths.

lucid meadow
#

Hey, Im trying to make an Entity effect like a trail, problem is both the effect and particle are woking on its own but not with the spawner trying to spawn the particles. Does anyone know what the issue could be?

queen iris
neat pelican
#

Update 4 (Part 2)
...
Added item HUD UI support, allowing for Custom UIs to be created for all items.
Yo, huge!

half heart
#

are plugin assets visible in the asset editor in update 4 yet?

tired ibex
#

Hello, im trying to make my own first mod but for some reason my own Models are just not getting read. I got the right folder structures but just like they are not existing hytale server is not reading it. For other mods for example i can read:
[2026/02/26 22:22:24 INFO] [Hytale] Loading common assets from: /home/container/mods/Violets-Wardrobe-2.2

But for mine its just not loading at all. It just says Enabled plugin RPGServer:RPGServer_Weapon_Racks but thats it.

I got these folders in my mod jar tho.
weaponrack-mod-1.0.0.jar\Common\Items\Weapon_Rack_Wall\weapon_rack_wall.png
weaponrack-mod-1.0.0.jar\Common\Items\Weapon_Rack_Wall\weapon_rack_wall.blockymodel
weaponrack-mod-1.0.0.jar\Server\Item\Items\Weapon_Rack_Wall.json

Is there anything i need to do to tell hytale to load that assets? :( im stuck since 4 hours on that problem

near onyx
#

i could be mistaken, but i think theres something you need to add into the manifest for it to load them

#

"IncludesAssetPack": true <--

tired ibex
#
{
  "Group": "RPGServer",
  "Name": "RPGServer_Weapon_Racks",
  "Version": "1.0.0",
  "Description": "Weapon racks for RPGServer",
  "Authors": [
    { "Name": "AZB", "Email": "", "Url": "" }
  ],
  "Website": "",
  "Dependencies": {},
  "OptionalDependencies": {},
  "LoadBefore": {},
  "DisabledByDefault": false,
  "IncludesAssetPack": true,
  "ServerVersion":"2026.02.17-255364b8e",
  "Main": "com.example.weaponrack.WeaponRackPlugin",
  "SubPlugins": []
}
near onyx
#

well then, thats as much as i know 😬

tired ibex
near onyx
#

i havent added any assets in a jar, so i havent a clue how that works unfortunately.

#

ok, taking another guess, i found this on one of the many modding sites:

@Override
protected void setup() {
    getAssetRegistry().register(
        HytaleAssetStore.builder(MyAsset.class, new IndexedLookupTableAssetMap<>(MyAsset[]::new))
            .setPath("MyAssets")
            .setCodec((AssetCodec) MyAsset.CODEC)
            .setKeyFunction(MyAsset::getId)
            .loadsAfter(OtherAsset.class)  // Load dependencies
            .build()
    );
}

are you doing something like this?

#

wait, thats for a custom assetstore thingy ma bob.
Im clearly just going down the wrong path

near onyx
tired ibex
#

ican try that tho

near onyx
#

🤞

sterile forum
near onyx
#

glad i could help 🙂

sterile forum
#

with that i will be able to start creating custom entities on my own for real.

#

yes perfect. This will help.

    .setPath("Item/Items"))
                        .setCodec(Item.CODEC))
                     .setKeyFunction(Item::getId))
                  .setPacketGenerator(new ItemPacketGenerator())
                  .loadsAfter(
                     ItemCategory.class,
                     ItemPlayerAnimations.class,
                     UnarmedInteractions.class,
                     ResourceType.class,
                     BlockType.class,
                     EntityEffect.class,
                     ItemQuality.class,
                     ItemReticleConfig.class,
                     SoundEvent.class,
                     PortalType.class,
                     ItemSoundSet.class
                  ))
tulip parcel
#

Is there a guide on making Status Debuffs/Buffs? Looking to make a Debuff similar to Jolt and another similar to the Necrotic Grips Poison spread; both being from Destiny 2.

nova bronze
#

nerds

tulip parcel
void wagon
#

Where exactly is the furnace bench UI defined? Taking a guess that it's hardcoded into the client at this time?

vapid sleet
#

Hey team, don't know if this is the correct channel to ask so let me know if not. I've created carpets for Hytale. Everything is implemented and up on CurseForge but I found out last night that when the carpets are destroyed (to pick them up and move them) they turn into grass instead of staying as the item I made. This is my first creation so I'm sure I've missed something but what setting keeps the item as itself?

neat pelican
#

I believe you can just remove the DropList

vapid sleet
neat pelican
#

If it says "read only", you can just unzip it

#

then it's editable

vapid sleet
neat pelican
#

yeah. the other mods I looked at do not have a custom DropList defined

#

so I would just

    "Gathering": {
      "Soft": {
        
      }
    },
#

yoink

vapid sleet
#

Sweet!
Thank you so much, you're amazing

neat pelican
#

plays uno reverse

vivid bone
#

Hi there, anyone know how to overload an item name ?
I'm using a mod, this mod defines new items with their specific json in \Server\Item\Items\Consumables
I want to translate em using my own server.lang. I tried with items.<item>.name or <item>.name, it doesn't work.
It does work with the custom items of my own mod, probably cause i reference the items via their json.
I've seen complete language translation mods are client sided, since they do not redefine all of the items.json, so am i forced to redefine all jsons ? Like you can do via override assets in asset editor

neat pelican
#

it should tell you which key to use for the Name property in your translation file

sterile forum
#

and you can't override the translation without it (as a translation).

hoary copper
#

perhaps I'm ignorant, but instead having us go through the hassle of decompiling the server jar to see the code, why not just release the server source under a non permissive license, making the whole process significantly easier

sterile forum
#

With json asset overrides do you need the full asset to override it or can you override specific elements by just adding those to a new json file with the same name/location?

#

Problem is that i realize all the qestions when i can't hammer at the code and resources.

neat pelican
neat pelican
# hoary copper perhaps I'm ignorant, but instead having us go through the hassle of decompiling...

Shared Source Server
We know that the lack of documentation for assets and systems is causing serious friction. We feel the same pain internally.
We commit to releasing the server source code as soon as we are legally able to. Expect this within 1-2 months after release.

  • In the meantime the server is not obfuscated, so you can decompile it easily.
    This will let you:
  • Inspect how systems work under the hood while documentation is catching up.
  • Unblock yourself by reading the actual implementation, not guessing from trial and error.
  • Contribute improvements and bug fixes back to us if something bothers you enough that you don't want to wait.
    https://hytale.com/news/2025/11/hytale-modding-strategy-and-status
neat pelican
vapid sleet
#

Hello again! I'm having a bit of a play around with making curtains and I've encountered something that's probably a me error. The curtains won't sit against the wall and it seems like the hitbox doesn't cover the whole item. I've copied the values from the 1x1 painting asset so I assume that's the issue with the hitbox but I don't know how to create a new hitbox. Also even with the painting values copied the curtain won't sit against the wall. Any ideas?

vivid bone
vivid bone
neat pelican
vivid bone
#

did :
XpToken_Unarmed_Token.name = Test
XpToken_Unarmed_Token.description = Test
i've put it into Varyon.Custom_Assets\Server\Languages\en-US, didn't work

neat pelican
#

and the file is called items.lang?

vivid bone
#

sure !

sterile forum
#

or what it was called

neat pelican
#

what?

sterile forum
#

execution order

#

or did i just think they wanted to override a mods translations? sorry.

neat pelican
#

i think you are missing a word in the first question ^^
I don't understand it

sterile forum
#

i replied to the wrong person.

#

it was supposed to be for naeliz translations.

sterile forum
#

if the mod loads after the override the mod will override the override was what i meant.

vivid bone
#

oh ! i get it :), but since i don't use override assets, defining a json file. How can i translate without recompiling the mod (that has updates that would break my custom version)

brave mural
sterile forum
#

manifset is set to inclues assets? You have added the models to right depth and path in the asset folder, as in the blockbench model is in the client folder and not the server folder, no typos?

brave mural
#

In My Custom plugin I have:

main\resources\Server\Item\Items\hearthstone.json
main\resources\Common\Icons\ItemsGenerated\hearthstone.png
main\resources\Common\Items\hearthstone\hearthstone.blockymodel

And this is my hearthstone.json:

{
  "TranslationProperties": {
    "Name": "Hearthstone",
    "Description": "Teleports You Back To Your Home"
  },
  "Id": "Hearthstone",
  "Icon": "Icons/ItemsGenerated/hearthstone.png",
  "Model": "Items/hearthstone/model.blockymodel",
  "Texture": "Items/hearthstone/model_texture.png",
  "Quality": "Common",
  "MaxStack": 1,
  "Categories": []
}
#

My manifest:

"IncludesAssetPack": true,
sterile forum
#

thats how it knows if it should load terrain blocks, models, npcs or prefabs.

#

since your file is under items, it's probably not loaded, and if it is, not as a model asset.

brave mural
#

Oh so i have to put it in the Directoy

#

main\resources\Common\Items\Model\hearthstone\hearthstone.blockymodel

#

? Or where do i put the Models directory

sterile forum
#

never mind that is not what the asset file seem to claim...

brave mural
#

or do you mean i have to add that myself im abit confused

sterile forum
#

I do not like not knowing how it identifies the proper folders.

#

well the server wouldn't need to know how to load the asset since it's client side, it would only need the item information

olive smelt
#

Guys I wanted to use Fixed defense. It works, but any mod that increase's mob's damage does not work. Like RPG Levelling, Hardcore, RPG Mobs

#

Does anyone know any solution?

olive smelt
#

When I unnequip the armor I get insta killed

sterile forum
#

or maybe you do have two different models then you can disregard.

brave mural
#

Wait youre right im an idiot lol. Ok now it works thanks ❤️

#

Do you have anyidea if i have to add something so i can see the item on the hand while selected?

#

Ok i think the issue is that my model is just to small lol 😄

sterile forum
#

try to rescale it, i even think you might have a scale value on the model.

white moth
#

My server console does not pickup player chats, why would this be?

I am using EliteEssentials and Luckperms mods, I have not configured any chat settings.

sterile forum
#

if you are sure you have changed nothing, and players are talking, then on of the mods filter it out, read up on the details for the mod you use on their site.

sterile forum
#

As more complex mods and interactions are added, one of the big issues that always appear are containers, and containers containing object that contains items, specially if gets extended so items might explode or break containers they are in. Call ing it now. ^^

Specially if it goes so far that containers can be used by players to hide, thus containing palyers having items in their inventory that might have reactions or world effects, but but world for the player is the container they are in etc etc. Allways fun when things nest.

nova bronze
#

i use luck perms and have had no similar issues with it but i suppose it's possible that a perm is blocking it, you can test by seeing what permission is being used when chatting using the verbose logger in luck perms but idk anything about elite

sterile forum
#

just a quick google gave information about how elite handles chat, i would say it's 99% that.

nova bronze
#

LOL, maybe

heady locust
#

What is the in game command to see what world you are in?

austere cloak
#

java.lang.IllegalStateException: Store is currently processing! Ensure you aren't calling a store method from a system.

It happens here. The store is from the tick (EntityTickingSystem<EntityStore>). How can I fix this?

NPCPlugin npcPlugin = NPCPlugin.get();
npcPlugin.spawnNPC(store, type, null, spawnPos, Vector3f.ZERO);

neat pelican
nova bronze
#

has anyone had an issue, and i'm almost certain this is related to some plugin, where the server seems to stutter every second or so but only while in adventure mode. creative runs as smooth as ever. i'm going through likely candidates and taking things out bit by bit but having trouble nailing it down ngl

neat pelican
#

Sounds like GC

simple charm
#

Anyone else have an issue where having a custom player model with the arm bandages attachment, the arm bandage attachment will NOT render despite every other clothing attachment rendering?
It is visible fully in the preview in asset editor, but using the model in-game will not show the bandages

nova bronze
minor elbow
#

Hi!
Are there any plugin modders here? I'm looking for a way to modify the item placement preview, because unfortunately, the VariantRotation function doesn't offer what I need. So I'm looking for a way to manage this directly in the code 🤔

austere cloak
void wagon
#

I tried being a big boy and investigate why the Salvager no longer salvages broken tools (the progress bar goes on forever). As I saw nothing within the JSON files, I tried using Hyxin to log some info within the a tick method, it was a mistake.

All processing benches no longer function, and without any earlyplugins and mods. I've never dealt with anything so brittle. Fortunately it was just on a test creative world so no real harm done, but so bizarre.

void wagon
#

Scrap that... I figured it out.

near onyx
#

who was it yesterday who was trying to figure out the Attitude overrides?
I figured it out, it DOES work, BUT it does not work if the npc is already going after you.
So for example, if you spawn one and instantly add the override, it works.
If you piss them off, it no longer works.
SOOOOO..... my guess is you have to cancel their interaction chain.
Im going to attempt that, but does anyone (who maybe has done this) have any suggestions on that?

nova bronze
#

yeahhh, performance wise it looks hella steady

fossil adder
#

The --transport TCP flag is currently server-side only.

Even with this flag enabled, the client still defaults to QUIC (UDP) for the handshake.
We need a way to force the client to use TCP as well. The server-only flag doesn't solve the connection issue if the client doesn't switch protocols

tardy kelp
#

How i can change my Hytale server port?

ruby arrow
#

Hi, I have a problem. I made a custom ESC in which I added two animations in the state block, and when the player enters this block area for the first time, the animation is performed, and when I leave this area, another animation is performed once, but further actions, e.g., further animations, will not be performed until any block around the block is destroyed . Does anyone know what might be causing this and how to fix it?

near onyx
umbral flame
nova bronze
near onyx
umbral flame
#

oh, it doesn't periodically get reassigned?

near onyx
#

took me this long to figure it out 🤣

umbral flame
#

I saw it and figured that wouldn't work as such, thanks for telling me that I wouldn't have tried again

near onyx
#

from all my testing, it appears to work.
I stood there and hit a skelly, and he just had some question marks above his head and moved on with his day

umbral flame
#

Thank you at least, makes it possible for me to finish what I wanted to make

near onyx
#

i originally tried clearing interactions, that did squat...
So i was printing out all their damn components, no luck.
I dug thru probably 25+ classes in Hytale just to finally find this damn thing

nova bronze
#

i found the plugin, honestly shoulda been more obvious now that i think about it

#

this is what i get for testing new mods on my server during downtime

heady locust
#

Is there a way to get the max stack size of a Item?

neat pelican
sterile forum
minor elbow
#

Hi!
I'm looking for a way to modify the item placement preview, because unfortunately, the VariantRotation function doesn't offer what I need. So I'm looking for a way to manage this directly in the code 🤔

burnt eagle
#

Hiho with the InteractivelyPickupItemEvent i can block F key picking up but how can i cancel pickup everything ?

brave mural
#

How would i play an animtion of a custom item while holding in hand?

minor elbow
minor elbow
burnt eagle
minor elbow
#

And so, "PickBlockInteraction," as I told you, might be what you need ?

ruby arrow
#

Hi, I have a problem. I made a custom ESC in which I added two animations in the state block, and when the player enters this block area for the first time, the animation is performed, and when I leave this area, another animation is performed once, but further actions, e.g., further animations, will not be performed until any block around the block is destroyed . Does anyone know what might be causing this and how to fix it?

minor elbow
#

It's going to be difficult to answer you without you showing any of your code ^^'

burnt eagle
minor elbow
#

Me too, but you can look at the source code to see if it matches, if the functions and variables seem capable of doing what you want.

scenic stag
#

Hey guys, is it a known issue that when the game window is not focused (alt tab for ex) and the camera is not the main player camera (freecam for ex) it starts shaking up and down exponentially over time ?

nova bronze
scenic stag
# nova bronze i don't think so

from what ive heard of some users, they all have this issue no matter which freecam mod they use, and it seems to be because when alt tabbed the game window doesnt update in the same way than when playing .. but its just a guess idk

nova bronze
#

freecam mod?

#

it's in the game vanilla

scenic stag
#

we in server plugin so yeah im talking about mods not vanilla; for survival servers that want to allow freecams without op etc?

nova bronze
#

and I'm saying.... you shouldn't need a freecam mod and they are likely broken

#

the vanilla freecam works fine

scenic stag
#

there is survival freecam in the base game ?

nova bronze
#

you have fun with that

scenic stag
nova bronze
#

you don't seem to be helping yourself at all, can only do so much sorry

scenic stag
#

i suspect an issue with dt client side with interpolation of camera and you just saying "dont use a freecam mod" duh

nova bronze
#

yes, because it's not the client

#

sometimes the answer to things is don't use mods that break things

#

maybe see if view bob causes it lmaooo, that'd be funny

scenic stag
#

so you suggest using a creative only feature for multiplayer permission based survival worlds ? .-.

nova bronze
#

I said, don't use mods that break things

#

and don't blame the game for your mods

scenic stag
#

i dont blame the game for a mod, i suspect dt interpolation to be wrong, nothing to do with mod but sure

nova bronze
#

.....

#

you have fun with that

scenic stag
#

and even if the mod was broken, isnt this a channel discussing mod dev ? shouldn't we share knowledge ? bruh

#

saying "just dont" is so minecraft forge forum

nova bronze
#

yes and it's very difficult to explain anything to you so have fun with whatever you are struggling against

#

you are making your own problem, that's the real issue. idk what else to say

scenic stag
#

explaining to not use mods when in a channel about mod dev lmao

nova bronze
#

yes, we tell people to remove broken mods from their servers very often

#

there's hundreds on mine and none cause this issue

scenic stag
#

im not asking for help with a server, im not even playing this game lmao
And ofc if you dont use freecam mods then you wont have issues with freecam mod ? omg anyway

nova bronze
#

have fun

scenic stag
#

thanks habibi

brave mural
#

Does anyone have experience with interactions and cooldowns?

public class HearthstoneInteraction extends SimpleInstantInteraction {

  public static String InteractionId = "hearthstone_interaction";
  public static String CooldownId = "hearthstone_cooldown";

  @Override
  protected void firstRun(
    @Nonnull InteractionType interactionType, 
    @Nonnull InteractionContext interactionContext, 
    @Nonnull CooldownHandler cooldownHandler
  ) 
  {
    float maxTime = 5;
    float[] recharges = new float[1];

    cooldownHandler.isOnCooldown(??)

How would i add a cooldown? It seems like there already is a system in place

sterile forum
#

Did you shift click yourself into the CooldownHandler class and see what parameters it takes and how it looks, and how other systems use them?

brave mural
#

Yea, but im not able to see where the method is beeing used

#

The isOnCooldown method requires a rootInteractino

#

which im not even sure where to get

sterile forum
#

the root would be the first in a similar chain of things.
So most likely your interaction have either functions to get the root based on what it inherited from, or if it is the first, it is the root.

#

[Bad Assumptions]

nova bronze
#

whatever that was I was trying to read it

#

and now I look crazy too

sterile forum
#

yeah nevermind, i did a asumption i have told my self not to.

#

A root interaction is a interaction that would hold cooldown and other information when interacting.

#

So either if your interaction in some step extends from root interaction.
Otherwise it needs have a reference to a root interaction.

#

its a mess i am a mess

#

The root interaction have a id, in several interaction ids from things that share the same root interaction, and therefor share the same cooldown timers.

sterile forum
#

I complelty lost my own track of thought, I was figuring out what it takes to get it to load a custom asset correctly.

viscid lily
#
[2026/02/28 13:40:39   WARN]          [PluginManager] Plugin 'com.example:Alias' does not specify a target server version. You may encounter issues, please check for plugin updates. This will be a hard error in the future
> [2026/02/28 13:40:39 SEVERE]          [PluginManager] One or more plugins are targeting a different server version. It is recommended to update these plugins to ensure compatibility.

where should i specify server version?

near onyx
#

in your manifest
"ServerVersion"

minor elbow
#

Is there a Discord server or forum dedicated to plugin development with tutorials, documentation, and people who answer questions?

near onyx
#

theres the "hytale modding" discord

sterile forum
#

Otherwise i bet most people who do plugin development are here, or not that invested into trying to explain but busy learning.

near onyx
#

oh space i meant to reply to your message from earlier regarding documenting my findings.
I dont even know where I'd post anything like that.
I also suck at writing tutorial type stuff 😂
(i have wikis for my plugins/mods and they tend to get mumble jumbled)

sterile forum
#

Thats ok. Might ask if i get issues later.

near onyx
#

ive just done a lot of guessing, digging in code and trial/error.
(half the time i have no clue what im doing 😂 )

sterile forum
#

But the main idea came back to actually make sure that their state is probably cleared when changing if they see you as friendly or not.

#

So there is not gunk left that still tell them to attack the player.

nova bronze
sterile forum
#

root interaction is a specific assset not just any interaction, and the relation to the root interaction is connected trough ids, and share cooldowns. And different interactions in a chain can have different root interactions. It was a lot more compelex than i expected but probably a lot more flexible.

#

[a game] I looked at had similar mechanics in their chain it just becomes complex because a lot of people could mess with the same items, and the item itself had cooldown on production and steps in the process. So it quickly do become more complex than one thinks.

slender crater
#

Why do some blocks like doors, lamps, and torches in my instance now spawn with a stone block in them?

fossil adder
#

The --transport TCP flag is currently server-side only.

Even with this flag enabled, the client still defaults to QUIC (UDP) for the handshake.
We need a way to force the client to use TCP as well. The server-only flag doesn't solve the connection issue if the client doesn't switch protocols

sterile forum
#

I hope compromising client and user security is quite a long way down on the list, and that it especially should not be something that a mod or server could enforce for the client besides informing them of the choice with warnings.

steep forum
#

Hello, good morning. I wanted to ask how I can put clothes on my custom skin in Blockbench without them being visible when I put on armor. Since the clothes go through the armor.

sterile forum
sterile forum
#

The armor already have settings for what parts should be shown or not so you should be able to get that somehow at least.
The helmets often hide the hair as an example.

brave mural
#

Are there any example i could take look at for interactions like holding right click for custom item?

Any recommendations would be nice. I only found example for like simpleInstant interaction

nova bronze
sterile forum
#

Yeah maybe it was someone else as well. ^^

minor elbow
#

How to modify block placement preview ?

minor elbow
#

Ugh, it's so frustrating wanting to create a mod when there's no proper documentation, only tutorials that skim the surface without providing any in-depth information.

So, developing a mod correctly—that is, using ECS ​​and in an optimized way (without cramming everything into ticks)—without documentation or examples is complicated '-'.

It's a shame Hytale isn't on Unreal Engine 5; I could have made a plugin like the Minecraft Create mod so easily on UE5 T_T

sterile forum
#

Nah. Damn happy its not ue5.

#

And if it would have been that easy in UE 5 you should be able to quickly replicate the rest you need from the game engine easily, and make as much money as the hytale team with your own game in ue5.

minor elbow
#

Just because it's easy to make a mod doesn't mean it will necessarily be easy to develop a game from scratch, and I'm not saying it's easy in general, I'm saying it would have been easy for me to do it on UE because I'm a UE dev, and just because it would be easy doesn't mean it would be fast, and besides I'm a system dev, not a 3D artist, animator, sound designer etc, a game isn't made by a single person, at least not this kind of game :p.

sterile forum
#

So not picking the engine that puts the highest demand on correct resources and graphical fidelity, is probably good then.

#

There is nothing wrong with putting things that need a steady update into a system that ticks.
And if it just needs a update or change there are events. And if there are things that just need to do a small part for a duration in a update and not when it doesnt it could simply remove its own component when its done with what it needs to do and be in a tick system. with a internal timer in the tick function you could also control extacly how often your thing would tick.

So what is it that you can't do between those options?

minor elbow
#

So you can do 2D and stylized graphics in Unreal Engine; it's not Unreal that demands a lot of resources, it's what the developers do with it. However, for a game based on a cube system, I admit I'm not convinced Unreal would have been a good solution. I'm just saying it's my area of ​​expertise and it would have been beneficial for doing what I wanted to do :p

minor elbow
sterile forum
#

And for that you have all the game systems you can browse and see how they do it.
Or you can put in some metric and performance measuring to solve it.

minor elbow
#

In short, what I'm trying to do is have a specific rotation for the preview of my block, the semi-transparent version, and this is handled by the VariantRotation parameter in the block's JSON, but the available options don't match what I need.

So I'm wondering if there's a way to add a VariantRotation type, or if there's a specific event or system that handles this so I can do it manually if necessary.

minor elbow
sterile forum
#

You said that people did it wrong, and there where no example to do it right, so i thought you might have missed those.

#

Either or, therading your question.
A variant rotation would, since you probably want to store the data, be a component.

#

Depending on where and how you add the variant rotation in question that determins creation and update of the component in question, and what it interacts with when.

#

I need to fix dinner. BBL

minor elbow
#

No, I don't want to save in a component. VariantRotation is only used for the preview, and it's only the preview I need to change. Once you click to place, PlaceBlockInteraction takes over, and that's fine; I've managed that, and the block is placed as I want. But what the player sees—the preview of the block placement before clicking—doesn't match.

south sparrow
#

Anyone know if its possible to change a model of a tool (say a pickaxe) depending on its durability?

sterile forum
#

Client side stuff you need to change the package going over to the client, and there things do get harder since we have no direct client access besides the defined packages that exist.

#

I have not looked at the flow for the preview specifically to know if that part differs from the actual placement logic or not, as in if its just a flag that renders the default model differently or if its handled as its own thing.

minor elbow
#

@south sparrow Well, if you find where the durability change is triggered, you could apply a different state to your item which would change its model.

#

For example, you can check the durability of the tool each time the player uses it, and if the durability falls below a defined threshold, it changes its state, and then you define the different states corresponding to the different levels of degradation of the tool in JSON file of item.

#

States can obviously be managed from the editor

minor elbow
south sparrow
#

I was trying to find a workaround or a way to check for tool durability but to no avail unfortunately

sterile forum
#

Looking at the code there is one setting handling previews client side, and that's "ShowBlockPreview", so if thats set the probably default to rendering the block in question with some shader and material overrides client side and nothing you can change.

So that would then mean if you want more control to deactivate block preview fully, and create a custom entity so you can render it at your desired transform.

sterile forum
south sparrow
sterile forum
#

for your part i am sure there is something checking the state of the tool since it will break after uses, so its just about locating where and see what kind of overrides one can do.

south sparrow
#

No in-betweens

minor elbow
#

I think checking when the player uses a tool would be ideal, right? There must be some kind of interaction for when the player uses a tool, right?

#

Because ultimately, it's when he hits something with his tool that its durability decreases, so if you go through the interaction in question and check the tool's durability at that precise moment, it should be fine.

#

And as for my problem, in the end, I'm just a big idiot.

#

Initially, I wanted the placement to be the opposite of the pipes, so horizontal when aiming at the ground or below, and vertical in other cases. However, in the end, I changed the placement to match the pipes.

So, in fact, I just need to modify the 3D model of the block to make it vertical by default and set the VarianteRotation to Pipe, and I won't even have to make the change with the "PlaceBlockInteraction" Hypixel_Smile.

olive smelt
#

Guys I wanted to use Fixed defense. It works, but any mod that increase's mob's damage does not work. Like RPG Levelling, Hardcore, RPG Mobs

Does anyone know any solution?

For example a goblin deals 5 damage, I have 4 defense he does 1 dmg. But even when I increase his damage thru the mods he still deals 1 dmg
When I unnequip the armor I get insta killed

minor elbow
#

We'd need to see the code of the mod responsible for the calculation; in my opinion, the calculation is simply incorrect.

brave mural
#

does anybody know how to spawn effects? For example when a player teleports i want to spawn a cool effect orsomething. Any recommendations where to look ?

olive smelt
minor elbow
#

Well, it would probably be up to the developers of the mods in question to ask for help, or else the problem might be coming from another mod you have that's causing interference.

unborn nebula
#

Man. Trying to do plugins and forgetting you're in creative mode is so bad. So many interactions and actions just don't work in Creative mode. you can't tame, you can't interact with kweebeks, the sickle doesn't harvest grass... I kept thinking the thing I was doing was broken because it wasn't cutting grass until I tried without the mod and it didn't in creative either. Such a nuisance.

lyric locust
#

Does anyone know how I can put a shield in a player's Y slot? Can this be done via getArmor or getHotbar?

lilac river
#

How do I mod my server? I put a few mods into the mods folder in the root directory of the server and restarted it but nothing changed

maiden relic
#

That's the basic workflow. Hypixel_Think

ruby arrow
# nova bronze aren't block updates kinda screwy rn?

The point is that the block's animation does not change accordingly when the player enters or leaves the block's range, but when another block next to the one with the animation is destroyed, the animation updates, but again, when the player enters the range of that block, the animation does not change accordingly.

nova bronze
ruby arrow
nova bronze
#

it happens in vanilla prefabs so I'm really not sure is what I'm saying basically

ruby arrow
nova bronze
#

I'm saying if that's what you did, it's possible you might run into block update issues? I'm not sure. I just said block updates seemed screwy. not a dev

vocal gulch
#

make sure to use a launcher like curseforge for ease of use or the one located under userdata

#

appdata> roaming> hytale> userdata> mods

neat pelican
#

they're modding a server, not singleplayer

vocal gulch
#

oh i can help with that too

#

create a mods folder all lowercase and drop files in that folder

#

dm if more help needed

neat pelican
#

I put a few mods into the mods folder in the root directory of the server
That's what they did already, lol

vocal gulch
#

not all mods are good tho

#

and it's easier to show pic and stuff

#

some people install stuff wrong like zip entire thing and then it looks like mods folder with mods.zip

#

again if person needs proper help dm otherwise no worries

viscid lily
#

Does the official Hytale server jar contain something called “Subscribe”?
I’ve heard it mentioned, but I can’t find any subscribe file/feature in the .jar. Is it part of the vanilla server or something else (mod/plugin)? Where can I find it?

brave mural
#
$C = "../Common.ui";
Group {
  LayoutMode: Top;
  Background: (Color: #2a2a2a);
  Anchor: (Width: 200, Height: 50);

  $C.@CancelTextButton #CancelTextButton9233e730 {
    LayoutMode: Full;
    Padding: (Full: 0);
    Text: "Leave Hideout";
  }
}

Any idea why this fails?

sterile forum
#

Activate ui debuging and it should tell you.

#

ui diagnostic in the client settings.

brave mural
#

Oh

neat pelican
viscid lily
# neat pelican In what context are you looking for it? We have the `AssetEditorSubscribeModifi...

I am looking for the annotation or method used to listen to server-side events, specifically PlayerChatEvent.

In many Java-based server APIs, this is done using an annotation like @Subscribe, @EventHandler, or @EventListener inside a listener class, which is then registered to the server's Event Bus or Event Manager.

How do we properly register a chat event listener to intercept and cancel player chat messages in the current Hytale server SDK? Is there a specific EventBus or EventManager we should use?

neat pelican
neat pelican
#

be especially careful with ai gibberish

#

Ping me if your next question is "How do I get the player ref from the BreakBlockEvent?" or similar Hypixel_Wink

sterile forum
#

Have anyone figure out an easy way to get all the component of a active entity with out explicitly stating the component types you want to get?
I could try to use the handler to get the names, but the problem with that is that components might be added removed dynamically that is not part of the Holder declaration.
The final idea i got right now is actually adding a listener for the component add/remove the same way I added my entity listerner, and just catch all components created and destroyed, a ref to the entities uuid and add that to my own register type.

But it feels stupid since it should be in the store, just not easily accessible without the explicit type.

vivid bone
#

Hi there, does someone know how to make my assetpack load after a mod i installed ? I made my own translations of a mod, but my asset pack is probably loaded before the mod, so the mod overrides my override xD

sterile forum
#

to the things you want loaded before the mod with the current manifest

brave mural
#

How would i hide my custom hud ui ?

CustHudButtonpage = new CustHudButton(playerRef);
player.getHudManager().hideHudComponents(playerRef, HudComponent.???);
vivid bone
brave mural
#

BTW is it possible to have interactive customUIHud? Or does it have to be something like that ? InteractiveCustomUIPage

near onyx
#

silly question, does anyone know a way in code to get a list of all the MapMarker icons.
I know they're in the asset zip, but i'd like a way to get a list in code

nova bronze
#

i took down every part of my infra stack and tweaked it a bit, made some actual latency and stability improvements. moved the gateway to debian kinda just cuz. was a productive day

nova bronze
void wagon
#

Do I know if a server is shutting down? I'm modifying the world config on player disconnect, and it seems fine, but it would be unnecessary to update the world config if server is shutting down

neat pelican
void wagon
#

duh so simple. i was trying to go through the plugin itself, or even via universe. lol

brave mural
#

Is it possible to hover over the hotbar while playing without opening the inventory? Lets say i want to add a button next to the hotbar. How would players click that? I dont want the button to block like anything

brave mural
#

Also, is it possible to prevent items from beeing thrown away? I know that it is possible to say dont loose on death but can i also prevent it from beeing thrown away?

lilac river
# neat pelican any error message?

[2026/03/01 11:40:30 INFO] [AssetModule|P] Loaded pack: Hytale:Hytale from Assets.zip
[2026/03/01 11:40:30 INFO] [AssetModule|P] Loading packs from directory: mods
[2026/03/01 11:40:30 WARN] [AssetModule|P] Skipping pack at Hytale_Shop: missing or invalid manifest.json

That skipping Hytale_Shop is the only one I found. I looked at a few tutorials and as far as I understand it is supposed to load the mods after that but on my server it acts as if nothing was in there.
Are you supposed to use chmod or smth to make the files readable? On mc servers it was always just dropping the mods into the folder that did the job so idk

neat pelican
lilac river
#

tfk, my message is getting blocked for advertising even though there is nothing in it that could even remotely be considered that??

#

ill try to formulate in in another way

lilac river
#

I also tried specifing it manually but that just resulted in the warning showing again. Of the Hytale_Shop plugin

neat pelican
#

@lilac river in your server's config.json, do you have "DefaultModsEnabled": true?

#

oh that might be related to the base hytale mods, not the default behavior of new mods, oops

lilac river
nova bronze
#

yeah i don't think that's default and yeah this is the default shop plugin so something is pretty wrong here

storm dome
#

Offering Hytale dev services, DM

lilac river
#

I found out what the problem is. I created the server on the release day of Hytale and the server structure was changed which is why I have an old mods folder in the root directory but everything now lives under /Server inside the root server directory. Sometimes just looking around in the right folders can help 😂 🫠

open chasm
#

Guys, can anyone help me?
Everything used to work fine, but after last major update i cant start server and getting errors like that

[AssetStore|Interaction] Failed to validate asset: CustomSpawnDeployableInteraction, D:\Hytale local server\mods\ExtractionRPG.General\Server\Item\Interactions\CustomSpawnDeployableInteraction.json, Failed to validate asset!
Id: CustomSpawnDeployableInteraction
Path: D:\Hytale local server\mods\ExtractionRPG.General\Server\Item\Interactions\CustomSpawnDeployableInteraction.json
Key: Config
Results:
FAIL: Can't be null!

brave mural
#

Does anybody know if the particles are also visible to other players or only to the local player?


{
  "ApplicationEffects": {
    "Particles": [
      {
        "SystemId": "Hearthstone_Recall_Charging",
        "TargetEntityPart": "Entity",
        "Scale": 1
      }
    ]
  },
  "Duration": 1,
  "OverlapBehavior": "Overwrite"
}

shut snow
#

In most games particles are client-side. Most common exception I know off is FPS games where hit sparks, tracers (sometimes), and smokes may be server-handled if the game has deterministic positioning or whatever they call it

void wagon
#

How does one add a string array to a configuration file? new KeyedCodec<String>("EnabledWorlds", Codec.STRING_ARRAY) it ain't no fan of that.

near onyx
#

i wonder if its cause youre using <String>

Ive done a string array

.add().append(new KeyedCodec<>("Authors", Codec.STRING_ARRAY),
            ((manifest, strings) -> manifest.authors = strings),
            (manifest -> manifest.authors))
void wagon
#

Ah, that will do it. Had me confused as IntelliJ wanted ArrayCodec<String> instead of Codec<String> but removing the typing entirely fixes it. Cheers.

neat pelican
nova bronze
open chasm
void wagon
#

When is DrainPlayerFromWorldEvent fired and why? I was looking for a different event and came across this - not sure what it means lol

near onyx
#

i BELIEVE its when players are kicked from a world when its unloaded, and they're pushed back to a fallback (probably default) world.
edit:
Ok i dug thru the code and yeah, only time the event is triggered is when players are kicked from a world when the world is stopped.

void wagon
#

Ooo, alright. I don't need that. If I want to send a message to the player, am I forced to use either concatenation with Message.raw or use a lang file with Message.translation?

near onyx
#

i personally use TinyMessage
If you've ever used PaperMC its like MiniMessage

void wagon
#

I was trying to get into MiniMessage, but my brain was like "Why replace 1 line with 10?" so I always had this back and forth fighting with text. 😄

near onyx
#

anything related to TextComponents is always a pain in the butt.
Thats why i like tiny message, it just parses one string for ya

#

if you wanna use it, i cant send the link but...
github -> Zoltus/TinyMessage

crisp cosmos
#

Since the Patch 3 it's impossible to create new instances without compile the jar of the mods with the instances in it

void wagon
#

Oh wait, I was thinking of TextComponents and not MiniMessage. Woops. I was doing the whole... ChatColor.translateAlternateColorCodes("&", "&0Hello World!") even though it was deprecated. I was stuck in my ways.

Yeah have seen TinyMessage, saw it on hytalemodding.

near onyx
#

oh yeah, TextComponents are the bane of my existence.
Why i need 100 lines of code to send 3 words? 😂
MiniMessage was a lot easier.

void wagon
#

Is there a way to run something when plugin is enabled? I see there is start() but that seems to run just before enabled.

nova bronze
#

i wish i had a picture to explain what on earth is happening on my server rn. i can't imagine it's normal

near onyx
void wagon
#

Yeah, setup() comes before start() which comes before the enabled message... I'm pretty sure.

near onyx
#

oh sorry i missread.
I think start() is the last step, and the enabled message is sent saying that your plugin has finished starting/enabling.
Im not sure if theres anything after that.

in my plugin, i have a few things that need to happen later so i just use the BootEvent

void wagon
#

Yeah I just have a thing where for specific worlds, it will pause the time while nobody is online. Happens on server boot, and then happens accordingly on player leave and join worlds. This is primarily because I keep forgetting to turn off the server and end up with a billion eggs - yeah it's free eggs, but just feels like that shouldn't happen.

near onyx
#

i wrote the same thing in one of my plugins haha.
I did it because i didnt want the time to progress whilst i wasnt logged in

#

apparently i use the start world event

    public PauseListener(EventRegistry eventRegistry) {
        String defaultWorld = HytaleServer.get().getConfig().getDefaults().getWorld();
        eventRegistry.register(StartWorldEvent.class, defaultWorld, this::onStartWorld);
        eventRegistry.register(PlayerConnectEvent.class, this::onPlayerConnect);
        eventRegistry.register(PlayerDisconnectEvent.class, this::onPlayerDisconnect);
    }
maiden socket
#

Did you find a fix for that? I am also confused why the .blockanim files that is exported with "linear" on each keyframe will still use smooth transitions in-game

void wagon
maiden socket
sterile forum
#

wooo. after a lot of talking and mainly debugging and reading code, I just added a custom component.
I know 0 day stuff. But nice to confirm that it worked, also dataless so, yeah, did essentially nothing. 😄

#

but its there,

maiden socket
#

is there a way to spawn a particle system with dynamic data? For example I want to change a particle's facing direction dynamically, i.e. to move it between two custom points in space

sterile forum
#

Oh that makes me so happy. I wasn't sure if it would require additional work to ensure it gets saved as well.
but editing the player.json stored on the server its right there.

sterile forum
maiden socket
#

it's ok to send a fixed version of a particle system over, but the game spawns particles via ParticleUtil.spawnParticleEffect, but that only takes an asset id/string.
How can you set the attractor on the server? Hypixel_Think

sterile forum
#

hmmm fair point.

#

if you only send a asset id or name its possible that you can't change it just tell it to spawn.

#

Depends on how the data is sent and a lot of other bits and bobs.

maiden socket
#

@strange otter, did you find a way to accomplish the particle spawn with the specified positions?

sterile forum
#

ok so the particle system will get initpacket updatepacket and removepacket from the server.
just gonna try to find out what the update packet contains.

#

Might just be general updates to the asset itself as in, all particle systems of the same type might get changed.

maiden socket
#

need to research how client-server communication works. The init/update/remove pattern seems to give you a reference to a network package?

sterile forum
#

right right, a particle system, and that particle system got ParticleSpawnerGroups, and a particle spawngroup is the specific settings for one of what I usually would call the particle emitter.

#

A ParticleSpawngroup among all its other settings have a ParticleAttractor embedded.
And the attractor in turn have a position and all the different forces it apply.

#

What is the effect you are after exactly, might be that you could handle it another way as well.
Custom entity that is spawned at target A flies towards target B and the particle system just spawns particles along the way.
Or that it spawns the particles once and move with the entity and thus appear like movement.
I am not sure if particles do follow the transform they are connected to since I haven't tried it.
And I am not sure of the effect you are after so I can't really make a suggestion beyond that.

#

fyes!

    "CustomComponent": {
      "Name": "Bob"
    },

Once again I know it's essentially nothing.

ruby arrow
#

Hi, is it possible to add a menu that opens when you click a button on the mouse?

sterile forum
# ruby arrow Hi, is it possible to add a menu that opens when you click a button on the mouse...

Not any button i think, it would have to be one of the actions that the game already sends that you react to.
It also depends on the context you are "clicking on".
most mouse clicks will trigger an interaction with the world of some sort.
And it wouldn't be a menu it would be a UIPage that opens, that could inturn contain a menu i guess. But I guess you want something like...
"right click on a npc and get different intereaction options menu"
"right click on a gear block and get the a menu where you can specify how many degress to rotate"

near onyx
sterile forum
#

well now bob will convert into "Leif" if its Bob, also each time its loadad it will increase a internal counter.

near onyx
#

"you have 10 bobs"

sterile forum
#

Also Leif will convert back to Bob if it's Leif. 😛

maiden socket
ruby arrow
kind osprey
#

Sooooo i took a break from hytale modding. Anyone found a solution to the asset pack disappearing from the asset editor?

unborn nebula
sterile forum
#

It won't let you add any actions, or add more binds.

unborn nebula
#

Basically there's no custom keybinds. You can attach to existing actions but you can't say "hey add a mouse click feature".

#

You got left click and right click which are primary interaction and secondary interaction on weapons.

sterile forum
#

Its probably a lot better to go with some kind if interaction on empty hands. Not sure what details you get over there.

#

Or create a unique interaction item, that you use for specific interactions.

unborn nebula
#

I got the F key going and it took some effort to make sure it didn't break normal F interactions, heh.

ruby arrow
sterile forum
#

if its o that would be the request to trigger creative mode, I could see how you would catch that on the server and do something else, since on many servers players should not be able to trigger creative anyway.

ruby arrow
# unborn nebula Which button

The button on the keyboard in the original version responsible for changing the game mode from survival to creative.

unborn nebula
sterile forum
#

but those are easy to find
i think i even listed all of them for myself at one point.

ruby arrow
#

Okay, thanks for your help.

native saffron
#

Is it possible to change the biome at a certain location?

sterile forum
#

Damn i need to read up on world gen as well.

#
    "CustomComponent": {
      "Name": "Leif",
      "LoadedCount": 1
    },

woo ok the counter increases and save properly the name toggled.
One more rejoin and they would be "Bob" again and have a LoadedCount of 2 after that.

#

wooo.

    "CustomComponent": {
      "Name": "Bob",
      "LoadedCount": 2
    },
#

Main issue is that the component is added to every single entity that exist in the game regardless of type.
So thats a future thing I need to fix.

#

But now I could properly force my own debug stuff on all entites if I would so desire.

#

Time to sleep. Work tomorrow.

little sparrow
#

Where is player anchored compared to a chair-block while sitting ?

rotund monolith
sterile forum
#

nah its kinda obvious when i added the component regardless on the OnEntityAdded event.

sterile forum
#

I was going to sleep, i just get stuck in trying to implement my entity, but got stuck om some CODEC stuff.

ripe ice
#

I made a custom modpack on a dedicated server with the asset editor and made two swords with basic changes from the normal in game stuff and it worked fine, then we added a custom block with a texture my friend had made and the pack was failing to load, but after we deleted all the files associated with this block the pack was still failing to load and the server wouldnt start until we disabled the pack. Any ideas whats going on there?

neat pelican
ripe ice
#

Mar 1 23:23:45: [2026/03/01 23:23:45 INFO] [HytaleServer] Shutting down... 6 'Mod Konur:Yerthpack failed to load. Check for mod updates or contact the mod author.'

#

Thats all I can see related to the pack failing

lucid vapor
#

How do you despawn particles? I spawned in a particle using /particle spawn command.

shut snow
lucid vapor
warm forge
#

Is there an event for checking item in player inventory?

warm forge
#

And I haven't touched my plugin in a few weeks I'm not sure how to update it >.<

near onyx
warm forge
#

if player holds xyz in inventory, and does xyz input (buttons, etc) then give speed etc...

near onyx
#

theres an inventory change event

carmine sorrel
#

Here is probably better place to ask, again sorry if its a dumb question, is there any way to remove a block from a java plugin? I want some of the blocks added by a plugin, to be dependent on a config file if possible

dry pagoda
#

why is weStore.addEntity(holder, AddReason.SPAWN); returning null?

sterile forum
dry pagoda
#

well yes but it refers to the world entityStore

#

"Store<EntityStore> weStore = world.getEntityStore().getStore();"

sterile forum
#

well then you are sending in a broken holder.

#

Check the holder you are sending it that all components it refers to exist, that all the assets it try to read are correct.

carmine sorrel
#

Ok, is it possible to remove a block from the creative inventory using a java plugin? sorry for the hassle

dry pagoda
#

might just be a hytale bug

sterile forum
#

if its a custom entity its probably that some of the data for some of the players or some of the blocks in the world or something saved is not saving correct or i tries to re add it when it already exists. Since its not default code I would probably not hold hytale responsible for it.

#

Have you check the holder what its criteria are for returning null, if there is an exception of some sort? Added logging to figure out why it returns null?

#

the addEntity will return null if the ref position in the store is invalid, or there should be an exception thrown before that.

dry pagoda
#

the entity that returned null also shows up in game perfectly fine when i join if that changes anything. the issue is mainly BEFORE a player loads into the world

sterile forum
#

So you are probably trying to load the entity before some of it dependencies have loaded initially, and the next time the world have loaded and those dependencies exist.

dry pagoda
#

main issue i'm having though is that i have no idea how to remove that entity once it's been created, due to absolutely no way to reference it anymore

sterile forum
#

if its your code, just add a component to it so you can locate it again, Or trace its uuid in a system by the entityAdded event.

#

since you can get any entity again by its uuid if it exists.

dry pagoda
#

trying to get the entityref from uuid also returns null, its really weird

sterile forum
#

in that case it does not exist i would say.

vagrant blade
#

Does anyone know what markup tags are supported in item tooltip descriptions? I know <color is="#FF0000"> works, but I can't find docs for other tags. Specifically looking for text alignment (center) support.

sterile forum
open chasm
#

Is there any good guide or documentation on how to make a lobby system for minigame servers?

sterile forum
#

The multiserver solution mean you have to start and maintain multiple servers as well right?
It's not that it can spawn a server instances to handle just a minigame for a duration?

open chasm
sterile forum
#

The downside with multiple worlds on a server is that all minigames will add to the load for that server, and any crashes etc might take down all minigames.
But you get context sharing in a multiworld.
Also the fact that you can run different mods on different servers easier.

neat pelican
neat pelican
tribal patrol
#

^ because of the separate threads?

neat pelican
#

yes, because each word runs on it's own main thread

#

that way you get some people saying their server is running, but they can't connect because the default world crashed ^^

tribal patrol
#

hmm now that I think of it couldn't it remain running if the only world crashes? or would a seperate world have to exist beforehand

neat pelican
#

the server can remain running if the only world crashes. you can even use the /world command to start a new world

#

though there might be some watchdog that closes the server in that case, idk

tribal patrol
#

ok so there is a separate thread that remains active and isn't bound, yeah it would be interesting how it acts, and if say you could recover it

neat pelican
#

yes, the universe/network stuff/etc is on a separate thread from the worlds

sterile forum
olive smelt
#

Why editting Iron's armor stats automatically unmodify the other armors' changes?

#

Is it because all armors have iron as parent?

sterile forum
olive smelt
#

so I had to duplicate iron as a new asset without overridding

void wagon
viscid lily
#

Hi again, can someone tell me where to locate ui files for customui? And how to call it in code? Thanks in advance

sterile forum
#

If you are getting into it now it might be better to wait for the ui updates and the xaml format.

#

And the current uis files are not accessible, you can see some of the and some ui component code with /ui-gallery in game.
Otherwise its reading the documentation on hytalemodding dev as well as reading the java source side in the java plugin.

On the code side inherit from InteractiveCustomUIPage or CustomUIPage
once you have implemented the CustomUIPage you can display it trough the player reference
player.getPageManager().openCustomPage(entityStoreRef, entityStore, new MyUIPage(playerRef, CustomPageLifetime.CanDismiss));

neat pelican
sterile forum
neat pelican
# viscid lily Hi again, can someone tell me where to locate ui files for customui? And how to ...

For the ui markup, check out the official docs at https://hytalemodding.dev/en/docs/official-documentation/custom-ui.
Reference files for the vanilla ui are in Common/UI/Custom in the Assets.zip.
On the Java side, it's the two parent classes Space mentioned, the UICommandBuilder is responsible for referencing the .ui files and dynamically updating values. You can look at decompiled server code for reference here too, there is sure to be something similar to what you plan on doing.

#

I've learned a lot about how to work with custom UI from hyphen45's early videos on youtube where he shared his early findings. Though I bet there are more comprehensive tutorials and guides now

carmine sorrel
#

Is there any way to remove a block from the game? Be it removing the block entirely or more likely removing it from creative menu + its recipe? Trying to add block conditional on a config option

neat pelican
sterile forum
# viscid lily God bless u brother

Dani linked me someone else before as well, it was Buuz135 admin ui on github.
All my ui work I have based of that one since it have some limited dynamic view with scrollbars and button logic, not sure how it compares fully with hyphen45 or newer things, but it got the ui files and the java implementations and commands you need.

carmine sorrel
sterile forum
#

PrisonContent? As in in game prisons, or blocking content that would not be legal to show in a game in prison? Or content that would land you in prison if you have it on your server? 😛

carmine sorrel
neat pelican
carmine sorrel
#

But if isnt something cando yet, isnt something can do yet! Thankyou anyway 🙂

neat pelican
#

it's all asset-based and data-driven so everything can be configured. the main holdup is just that we have limited ability to tell the client to update it's assets live

sterile forum
#

wait wait wait.

carmine sorrel
#

I dont want to do it live, , this is more, choices made before serrver started up I was hoping to have

sterile forum
#

Not sure how well it would work, but could you just not unregister the entities and codecs with a run before/run after.

#

well yeah it still wouldn't be runtime.

carmine sorrel
#

I dont expect people to be turning this config on while the server is running, if that makes sense?

sterile forum
#

Ah ok.

#

Then you could probably make something that catch creation of component or entities and remove them, or add a component and listen for events involving them and filter them out.

carmine sorrel
#

I couldn't find the right event to do that with, >.< I might be being dumb

sterile forum
#

Yeah i am not really sure about actual viability.
But any asset should be sent to the client by the server.

carmine sorrel
#

I think will just move on to other functionality for now, I am less sure about being able to filter blocks entirely, but I am confident that eventually will get the ability to remove blocks from the creative menu / recipes programatically

#

if it doesnt exist already

neat pelican
#

Look at which packet is sent to the clients when you remove a recipe in the asset editor

sterile forum
#

You would have to adapt the world gen and prefabs as well so it doesn't add block and things that should not exist.

shell geyser
#

hi gamers

i'm making a magic mod and for things like magic projectiles and glyphs and such i need to keep track of the entity responsible for casting these spells. i assume an entitystore ref is sufficient, but i'm not sure if that's a good approach because from what i can tell these refs are kinda fleeting in the sense that they may point to one entity but can be replaced with another when that initial entity is gone. like how minecraft uses UUID for an entity, an entitystore ref can't be treated as a permanent reliable ID like that

ideas?

near onyx
#

dont entities have a UUID component as well?

shell geyser
#

do they? oh i should check

neat pelican
# shell geyser hi gamers i'm making a magic mod and for things like magic projectiles and glyp...

Refs can become invalid quickly, yes. But do you really need to keep track of these caster entities for a long time? In ECS, this is generally done by putting a tracker component on entities you want to track, so that you can just query the store for all those entities. And for individual actions, you get the entities Ref every time something happens to it (e.g. it casts a spell).
If you do need to identify it for an external system for example, yes you can use the uuid and fetch the ref via Store#getExternalData().getRefFromUUID(uuid)

shell geyser
#

yes because what if a spell hits something when the caster has died or despawned already
or some spells also need to affect or not affect entities that are allied with the caster, would be a separate solution for which i need to make a component im sure but basically yeah i need to keep track of the entity responsible for casting a spell because a spell being brought into existence and it actually doing something can be a very long time apart

fossil adder
#

The --transport TCP flag is currently server-side only.

Even with this flag enabled, the client still defaults to QUIC (UDP) for the handshake.
We need a way to force the client to use TCP as well. The server-only flag doesn't solve the connection issue if the client doesn't switch protocols

near onyx
#

i feel like you wouldnt be able to force a client to use the protocol of your choice.
That would need to be a decision they'd have to make

sterile forum
#

The uuid component exist for all entities that exends living entity atleast but I think uuid exist for all and networkid component for those that needs to talk between server and client.

#

I said the same the other day, the last thing we need is a way for servers or programs to toggle things on the client without user choice.

#

Specially when the main reason its not permitted is because its harder for russia to do deep searches of the package data.

warm forge
#

I'm kind of confused about component registry. not sure what to do about second argument

ComponentType<EntityStore, VelocityComponent> type= getEntityStoreRegistry().registerComponent(VelocityComponent.class, VelocityComponent);
neat pelican
# shell geyser yes because what if a spell hits something when the caster has died or despawned...

what if a spell hits something when the caster has died or despawned already
The ProjectileComponent keeps track of it's creator via UUID as well (check out it's onProjectileDeath function). I don't know how the components Projectile and ProjectileComponent relate to each other, that might be useful to check out for your use-case.

some spells also need to affect or not affect entities that are allied with the caster
Yep, that's a simple component lookup of your custom "allegiance component". Don't keep track of entity allegiance in a central place, put this information directly on each entity. That also handles all of the threadsafe logic for you when entities switch worlds.

neat pelican
neat pelican
#

Try ServerManager.get().getPublicAddress() (or .getNonLoopbackAddress() if no public one is available or local network addresses are expected)

void wagon
#

I still don't understand all the components. If I wanted to print the name of an entity, how would I get that? It'll be NameTranslationKey as per the JSON but not sure in Java. And perhaps the role? To determine if it has a tamed role (or isTameable).

neat pelican
#

both? or did you bind to a loopback address? then you need getLocalOrPublicAddress(), thats the most permsissive one

void wagon
#

Oh, those messages were deleted lol

neat pelican
#

gonna assume it was a layer 8 problem then, lol

warm forge
#

Shall I keep systems in "events" folder as well? file management... 🫠

neat pelican
#

I have a folder for each module and each module has it's own folders for components, systems, assets, etc

void wagon
#

Alright getting the Role is sorted, and thus getting the name is sorted too... but oddly, isTameable is not in the role. Where in the heck is that? It's defined in the role in JSON, so it must be part of something else...

NPCEntity npc = store.getComponent(ref, NPCEntity.getComponentType());
Role role = npc.getRole();
sterile forum
warm forge
#

I thought I knew java but I feel like I'm relearning java going into this :')

sterile forum
#

It's aperently a supplier class that want a method as input that will return the type.

hearty orbit
#

Hello!
My name is Sadim, and I’m a passionate Hytale player.
I would like to create a mod for recording and replaying scenes in-game, like a small cinema studio:

A placeable camera to record movements

A pause/resume feature for the film

A mini-screen to preview the recording live

The ability to generate a unique code to replay the film on a screen block

I’d like to know:
1️⃣ Does the current SDK allow this type of mod?
2️⃣ Are there any specific rules for sharing or testing this mod?

Thank you very much for your help! This would allow me to create RP films and creative content in Hytale

light panther
void wagon
#

You're right. Some JSON is NEVER referenced in code at all... although I feel like there must be a way, how else are plugins supposed to access additional role info?

But I did find it near the bottom of Template_Animal_Neutral:

{
  "Type": "Role",
  "Role": {
    "Compute": "TameRoleChange"
  },
  "State": "$Tamed"
}
neat pelican
# hearty orbit Hello! My name is Sadim, and I’m a passionate Hytale player. I would like to cre...

A placeable camera to record movements
Already in the game
A pause/resume feature for the film
Not enough information, but if I understand correctly, already in the game
A mini-screen to preview the recording live
Not possible without additional client features
The ability to generate a unique code to replay the film on a screen block
Easy

1️⃣ Check out the Cinematic tools already in the game.
2️⃣ Nothing to be concerned about. https://hytale.com/eula, https://hytale.com/community-guidelines

hearty orbit
languid wren
#

Im trying to figure out if it's possible to have a model dynamically textured in game, anyone know if thats achievable?

neat pelican
#

Textures are bundled into the .blockymodel file, right? so you'd have to swap out the whole model

light panther
#

But you can still use and apply the available gradientmappings defined in the jsons in the folder TintGradients (I think that's the name)

#

Any of the provided tokens can be used like so in the specific Models *.json
"GradientSet": "Colored_Cotton", "GradientId": "Blue",

snow monolith
#

When adding a new ObjectiveAsset, how can I change the string displayed, currently it's still "server.objectives.first_quest.taskSet0.."

sterile forum
#

It's weird I found code that explains how you set up a component to be written and read with a codec when added to a entity, and I have found code that allows create an plain entity by using a base component as a holder and attach more components to it, and add it to the world, and I have found code that have set up holders that can be used for the same thing except that the holder is predeclared in an asset, and that part i have not figured out quite yet.

I know i could limit my self to adding and extending npcs and interactions, and new components, but it feels like the true potential is still combined with being able to easily define and manage one owns entities.

#

Bah. I will see if i get some evening or this weekend to dig more into it...

slow idol
#

Hello. I was wondering if there is a way have suffix in front of players name when they chat on the server, etc owner,op,mod?

slow idol
#

no i do not

gusty hull
#

You will need something that controls chat. I use LuckPerms for my permissions, and I use this to add prefix.

slow idol
#

ok

gusty hull
#

It ins't hard using LuckPerms. Do you have a permissions plugin you are using?

dark heart
#

what are the values for storage in

world add <world> --gen=Void --storage=<>?

Can i make it so a other world have different inventory?

deft path
#

Hey, I'm trying to find a way to stop mobs from spawning in an area i define with out having it do /entity clean --confirm is there a better way i want to use entities, but I dont want mobs to spawn

gusty hull
dark heart
#

theres a mob spawner? cant seem to see in creative inventory

gusty hull
#

No, it is a clear block that is coded to spawn mobs. Not really a mob spawner like in Minecraft.

dark heart
#

can it be placed? how do u set it?

gusty hull
#

not that I have seen.

sterile forum
#

But it wouldn't be that hard to add a monsterspawner block that contains spawner logic.

gusty hull
#

That is the only way to do it currently. Make a mod/plugin to do it.

sterile forum
#

The interesting thing is that one could make a boss monster with a monster spawner attached to them and logic when they add more.

#

Also saw some code example where someone used the weather system to spawn mobs.

carmine sorrel
#

sorry for more weird questions! is there any guide to making a custom UI that also shows the player's inventory?

brave mural
#

Heyo, quick question but custom hud components. When you want each player to have for example a custom hud component. Do i need to track each players hud component to for example send updates there? Or can i do like player.gethudcomponent or something ?

sterile forum
# brave mural Heyo, quick question but custom hud components. When you want each player to hav...

The hud is a unique hud object that you access the same way as when you add it trough the custom ui manager on the player ref. So if changes are internal events the hud can simply listen to them and use the set and clear command towards your #namedelement and set to set new data the same way you set data during the elements build phase but using set for the target instead of appending the ui file and building.

Kinda

sterile forum
verbal kelp
#

anyone know how I can set an npc to follow a specific player?

quasi echo
#

Wonder why they made the other server plugin read only instead of archiving it

bold pulsar
#

It still has useful info.

neat pelican
#

yep it was archived initially but we asked for it to be available again. I still regularly use context from there to answer questions

carmine sorrel
#

Windows can't be custom, can they?

quasi echo
bold pulsar
#

Custom how? A custom UI in game? Of course it is possible.

neat pelican
carmine sorrel
quasi echo
neat pelican
#

but yeah the native inventory is not editable yet

bold pulsar
carmine sorrel
bold pulsar
#

Sounds like you want to add to/change existing UI. Not add a custom UI window.

#

There are mods that add to the inventory UI, like new tabs for the workbench.

carmine sorrel
#

I wanted to have a block, with a UI that people can put an item from their inventory in it, and had multiple buttons, it would change action based on those buttons, (basically, a x1 , x10, and x100 buttons, and the output changes depending on how much input they eat

#

this means I need the inventory visible, and able to be dagged from, like a bench or window

bold pulsar
#

Look at how storage or other container items work and lean on them for how to do it.

carmine sorrel
#

basically, like how salvager's workbench, or alchemists workbench are all, inventory + a window. I looked at that but it looks like which UI they open are hard coded

neat pelican
bold pulsar
#

Not saying change them, but copy how they are done.

#

Oh. Client, I see. Havent dug that far. Only done a little packet work due to the server api being limited.

carmine sorrel
#

so yeah, I was hoping it would be, a custom window could provide a .ui file, like a custom page can, but instead it's hard coded what ui they open

void wagon
quasi echo
#

Didn't they mention they were planning to redo the GUI system anyway

neat pelican
bold pulsar
#

Seriously? Or is that old details?

#

Neosis is C++ and xaml. Weird combo. But supported by most game engines and stuff already. Would be a a nice change. 😄

#

But finding accurate news is so hard with the license lost mess and swapping back to the old engine. I can't keep track.

neat pelican
#

Custom UIs
Right now, our UI situation is messy:
We are using three UI frameworks at the same time.
We are in the process of ripping out two of them and consolidating on NoesisGUI.
Noesis Technologies has been extremely helpful to us, and we want to acknowledge their role in helping make Hytale happen.
What this means for you:
We already have asset-driven UIs, but they are incomplete and limited.
You can start experimenting with them now.
Tell us what you are trying to build and where you get blocked, and we will prioritize unblocking you.
https://hytale.com/news/2025/11/hytale-modding-strategy-and-status

quasi echo
#

I can't wait to see what we can do with my mod I use GUI for a lot

bold pulsar
#

Awesome, thanks.

neat pelican
#

yeah noesis has an amazing graphical editor for ui

#

very hype

bold pulsar
#

Current system to make UI's isn't fun, but doable.

#

Would love to be able to make them with xaml though, even without the visual editor.

carmine sorrel
#

Thanks! Fingers crossed it can be a bit more flexible

sterile forum
#

Hmm dont stab me.
Is anything but the opinion that its a bad idea, preventing one from offloading bigger data processing into a dedicated c# service using something like gRpc etc and then returning the results for hytale to react persist etc on?

sterile forum
bold pulsar
#

Can do that now, there are web based UI editors for Hytale already. I find them more annoying than say a visual editors like for Visual Studio. Would rather write code and check than do a prototype UI, then plug in info and then tweak.

sterile forum
#

Depends could see me set up a system that monitors changes i do on a specific file and display it in a preview window on my other screen. Atleast figuring out basic layout i dont like going in and out of the game. ^^

bold pulsar
#

Compiling a plugin and launching a server with just the plugin makes testing it fairly quick, faster if you automate some of it with your build methods.

sterile forum
#

Yeah probably not there either of the bottlenecks will be.

olive smelt
#

Is there any way of mobs dealing elemental damage? Like Ice, Fire

viscid lily
#
[17:38:48] [ERROR] [SERR] decodeJson: class com.hypixel.hytale.codec.DocumentContainingCodec
[17:38:52] [ERROR] server.commands.errors.noSuchWorld{name=com.hypixel.hytale.protocol.StringParamValue@bf4c6e40}
[17:38:52] [ERROR] server.commands.errors.noSuchWorld{name=com.hypixel.hytale.protocol.StringParamValue@bf4c6e40}

hello i am facing with these issues and my commands is not working. what should i do ?

sterile forum
#

Its trying to read data for a world that doesnt exist. Restart the server. If that doesnt work start reading logs for where it went wrong and what mod broke it.

eternal spade
#

Hey with regard to mods that have All Rights Reserved, are public commercial servers unable to use mods without their consent or a license/permission to operate?

quasi echo
#

depends on the mods terms

sterile forum
#

If they dont explicitly say you can use it, you technically cant, license missing is not permission but would fall back on copyright laws.

eternal spade
#

I mean I'm just saying, all the modders are making mods, creating them all under All Rights Reserved instead of ideally using an MIT or GenU license, and not giving ample legal instruction or permissions to utilize mods, and I imagine majority of public commercially available servers are essentially doing things wrong.

sterile forum
#

There is also a difference between using the mod and taking content from a mod.

long juniper
sterile forum
#

But unless a large company gets involved or large amounts of money get involved.

long juniper
sterile forum
#

Annually recurring revenue?

long juniper
sterile forum
#

Yeah thats what i mean. It defaults to creators rights.

long juniper
#

I would personally avoid using said mods on public servers if possible though

sterile forum
#

Yeah. That said mod makers could avoid arr issues for users by simply not publishing on curseforge or public git.

eternal spade
#

or just publishing using a GenU or MIT license instead

long juniper
#

arr isnt an issue for mod makers(unless they rely on said mod and werent its creator), its mostly an issue for mod users

sterile forum
#

Yeay but with arr you aim to not provide without payment essentially. So there is probably something of making it publically availble.

long juniper
sterile forum
#

In the sense of if you dont intend to sell or license it somehow arr makes little sense for a mod.

eternal spade
#

I don't think, the majority of mod creators are creating mods in the hopes of trying to get it monetized. I imagine they want as many people to use their mods, or for their mods to be showcased on servers, but make it hard to do so without the appropriate legal permissions. Also kind of goes against Simons philosophy regarding mods being openly accessible to everyone.

long juniper
#

100%

neat pelican
#

A big thing is that ARR is the default on Curseforge and authors are not properly educated on what it means

#

Have seen multiple mods that list ARR on Curseforge and MIT on GitHub

long juniper
#

also 100%

sterile forum
#

Finally got a bit more focused idea of the mod i want to make. A limited time session, role based production company work day. Named Incident report or some such.

#

Need to break it down and start somewhere.

sick ridge
#

do u guys know why a chunk in my srvr disappeared and the blocks inside it are invisible but got collisions, is kinda corrupted, u know how to fix this?

mental marsh
#

the mod I created uses the unlicense (public domain) as I mainly used AI and I can't really say that I own the code produced. but this is a further thinking on licensing

sterile forum
#

Probably a good idea with a ai vibe slop mod.

mental marsh
#

I'm still a developer so it's not just slop

sterile forum
#

I see it a bit like asbestos.

#

When you are making a sandwich the amount of asbestos is not the only concern but more the fact its in the sandwich to begin with.

knotty vigil
shadow solstice
#

Short answer: no

bold pulsar
#

Intellisense for code auto complete is a form of AI and many developers hated the idea of it at first. AI is just another tool that can be used right or wrong too.

shadow solstice
#

Real game developers work on developing the game, not having AI do it for them. You don't get hired in the IT world for plugging stuff into AI. Anybody can do that. Can you with your own two hands actually make something though? That's the question. Should be using AI minimally if at all. Whatever happened to doing things yourself?

mental marsh
bold pulsar
#

Why use that hammer for that nail when you have a perfectly good wrench.

mental marsh
#

I used AI to explore the code of Hytale before any docs existed

bold pulsar
#

It is great at stuff like that. All tools can be used right or wrong. Can develop in cli if you want, doesn't mean everyone has to.

stoic condor
mental marsh
#

I'm literally working as a software engineer in any case

stoic condor
bleak swan
#

I think the deadline is way too soon for people who would start developing now, since mods are even allowed who are already created since early access released. The deadline also is much earlier when popularity is obviously taken into account.

But I like the idea. Just not 100% happy with the details.

stoic condor
bold pulsar
#

Or...just existing mods submitted.

long juniper
#

its illegal 100%, but in practice, you probably wont get sued

dark heart
#

is there a way to set weather on selected places?

upper dove
#

Can you do shaders?

ripe trail
upper dove
#

Is there no equivalent or something similar to gl shaders?

ripe trail
#

Theres no client mod support and servers don’t send shaders to the client

#

Theres no server asset type for shaders

upper dove
#

So the only way to do cool effects, is by using the effect editor?

ripe trail
#

Yeah pretty much

#

I mean you can do a few things for visuals just not custom shaders

#

You can move entity models around or whatever if that helps you

brave mural
#

is there something like zIndex for hud elements?

runic vector
#

Does anyone have any ideas on how to make an entity's ticking continue even when you move away? I tried using a chunk loader, but without success.

nova bronze
#

shaders would be neat but so not worried about it rn

knotty vigil
open chasm
#

Can anyone help me to understand how to create config in asset editor for DeployableConfig. I want to spawn deployable by my self

timid pivot
#

how tricky is it to learn to make a custom weapon, would you guys say?

neat pelican
austere cloak
#

Why is my hud not showing up? It seems that the build command is not being executed:

public class GoblinArmyUI extends CustomUIHud {

@Override
protected void build(UICommandBuilder commandBuilder) {
commandBuilder.append("Hud/GoblinArmyUI.ui");
commandBuilder.set("#GoblinArmyLabel.Text", text);
commandBuilder.set("#GoblinArmyBox.Visible", visible);
built = true;
System.out.println("[GoblinArmy] Built HUD for player: " + getPlayerRef().getUsername());
}

neat pelican
austere cloak
neat pelican
austere cloak
neat pelican
austere cloak
#

Ah thanks

austere cloak
# neat pelican settings menu in your client

I am getting this error:

Selected element in CustomUI command was not found. Selector: #GoblinArmyLabel.Text
my set command:
commandBuilder.set("#GoblinArmyLabel.Text", text);
Part of my ui file:
Label #GoblinArmyLabel {
Padding: (Full: 0);
Text: "Cleared 0%";
Style: (TextColor: #ffffff, RenderBold: true, Alignment: Center);
}

open chasm
#

How to create config in asset editor for DeployableConfig? I want to spawn deployable, but i need config(which i cant create).

sterile forum
shut cipher
#

Hy guys ! I want to know how create a marker and show it on the player map. I don't find recent exemple. I can create a marker and show it on the compass but not on the map. Btw: i can't add my custom icon to the marker, i don't know what i have to write in the setIcon string parameter

near onyx
#

for the icon, use "MyIcon.png" (making sure its in... i think Common/UI/WorldMap/MapMarkers)

to add it to the map:

WorldMarkersResource worldMarkersResource = store.getResource(WorldMarkersResource.getResourceType());
worldMarkersResource.addUserMapMarker(userMapMarker);
hexed valley
#
private class DamageListener(private val hub: HubPlugin): EntityEventSystem<EntityStore, Damage>(Damage::class.java) {
    override fun handle(
        index: Int,
        chunk: ArchetypeChunk<EntityStore?>,
        store: Store<EntityStore?>,
        commandBuffer: CommandBuffer<EntityStore?>,
        event: Damage
    ) {
        this.hub.logger.atSevere().log("DAMAGE")
        event.isCancelled = true
        event.amount = 0f
    }

    override fun getQuery(): Query<EntityStore> = Archetype.empty()
}

do you why event triggered but still not canceled nor the good amount of damage?

near onyx
#

i had the same issue, after lots of searching, i found/added this and it works

@Override
        public @NotNull Set<Dependency<EntityStore>> getDependencies() {
            return Collections.singleton(RootDependency.first());
        }
hexed valley
#

oh

#

thanks

hexed valley
sterile forum
#

You could probably just do

     new SystemGroupDependency<>(Order.BEFORE, DamageModule.get().getGatherDamageGroup()),

To make it execute before the rest of the Damage calculations if you intend to cancel it.

near onyx
hexed valley
#

okayyyy

sterile forum
#

The example i gave you can specifiy more exactly between what systems or groups you want your logic to step in.
When you let the event run since it go trough all events unless canceled and share data trough all steps order really matters.

near onyx
#

one day ill maybe understand half the crap i write 😂

hexed valley
sterile forum
#

If you have access to the server jar and searching set upp properly you could just search for getDependencies() and take a look on how they set it up in different places.

#

thats probably the best way to get insight to what it is and what you might need.

hexed valley
#

yeah makes sense thank you though

sterile forum
#

Yeah heading to sleep good luck hope it works out.

nova bronze
#

sleep is for quitters

sterile forum
#

Or people with work. 😛

lone crag
#

is anyone using Betterdayz's dyeable wood mods? im trying to figure out why the workstation for it doent show in the workbench

stark holly
lone crag
#

it shows in the creative inventory. damn

stark holly
#

for me (with no other mods) its in the crafting tab below the farmer's workbench (new save nothing unlocked so order might change if you have things unlocked by tiering up your workbench)

stark holly
# lone crag crap

it almost vaguely looks like a paintbrush and a bolder with a sponge on it from the small icon once its bigger you can see its not but it should stick out like a soar thumb cause its pink paint on it

lone crag
lone crag
lone crag
#

seems like dyable tropical wood is the culprit

#

wow, trying dyable tropical wood by itself without the other dye mods rsults in failure to load, with the failed to validate npcs error

stark holly
# lone crag which particular one did you try?

i didnt try any i just looked to see if you could make its workbench in the base game workbench cause thats what you said was wrong with it i unfort dont have time to test their whole mod you said " im trying to figure out why the workstation for it doent show in the workbench" so thats what i looked into

stark holly
lone crag
stark holly
lone crag
midnight hamlet
#

Anyone know off the top of their head what the Minecraft setOp and dispatchCommand equivalent is in the Hytale plugin API?

tribal hinge
#

Is anyone know how to fetch player skin for web display?

near onyx
midnight hamlet
near onyx
#

actually its easy
PermissionsModule perms = PermissionsModule.get();
then
perms.removeUserFromGroup(uuid, "OP");
or
perms.addUserToGroup(uuid, "OP");

near onyx
somber lodge
near onyx
#

oh lets see if i can event send the link

#

nope (i cant send it)... but its in the docs (its a section btw)

somber lodge
#

i see it but i must be entering it wrong lol, and theres no examples, i tried

on player setup connect:
play sound "Avatar_Powers_Enable_01"
to-players = context-playerref
volume = 1.0
pitch = 1.0
sound-category = ui

or am i grossly off

near onyx
#

the sound isnt a string (just remove the quotes)

#

it'll be easier to help you on Skript Hub's discord
(i cant send an invite link, but its on HySkript's github/curseforge)

somber lodge
#

omw

hexed valley
#

Hii Im currently trying to cancel InteractivelyPickupItemEvent so I checked on the source code, here was where it was used in ItemUtils:

InteractivelyPickupItemEvent event = new InteractivelyPickupItemEvent(itemStack);
componentAccessor.invoke(ref, event);
if (event.isCancelled()) {
    ItemUtils.dropItem(ref, itemStack, componentAccessor);
    return;
}

And how it gets treated when dropped:

DropItemEvent.Drop event = new DropItemEvent.Drop(itemStack, throwSpeed);
componentAccessor.invoke(ref, event);
if (event.isCancelled()) {
    return null;
}

However when I cancel the Drop event, the block is still being destroyed but nothing get dropped which is a good news.
So I thought that it was because of the dependencies since my system may be treated after other systems.
And I added:
override fun getDependencies(): Set<Dependency<EntityStore>> = RootDependency.firstSet()

However it still has no effect even though I cancel it.

somber lodge
hexed valley
somber lodge
#

if InteractivelyPickupItemEvent is cancelled, wouldn't the code immediately call ItemUtils.dropItem(...) and return ?

hexed valley
# somber lodge if InteractivelyPickupItemEvent is cancelled, wouldn't the code immediately call...
@Nullable
    public static Ref<EntityStore> dropItem(@Nonnull Ref<EntityStore> ref, @Nonnull ItemStack itemStack, @Nonnull ComponentAccessor<EntityStore> componentAccessor) {
        return ItemUtils.throwItem(ref, itemStack, 1.0f, componentAccessor);
    }
 @Nullable
    public static Ref<EntityStore> throwItem(@Nonnull Ref<EntityStore> ref, @Nonnull ItemStack itemStack, float throwSpeed, @Nonnull ComponentAccessor<EntityStore> componentAccessor) {
        DropItemEvent.Drop event = new DropItemEvent.Drop(itemStack, throwSpeed);
        componentAccessor.invoke(ref, event);
        if (event.isCancelled()) {
            return null;
        }
        throwSpeed = event.getThrowSpeed();
        itemStack = event.getItemStack();
        if (itemStack.isEmpty() || !itemStack.isValid()) {
            LOGGER.at(Level.WARNING).log("Attempted to throw invalid item %s at %s by %s", itemStack, Float.valueOf(throwSpeed), ref.getIndex());
            return null;
        }
        HeadRotation headRotationComponent = componentAccessor.getComponent(ref, HeadRotation.getComponentType());
        Vector3f rotation = headRotationComponent != null ? headRotationComponent.getRotation() : new Vector3f(0.0f, 0.0f, 0.0f);
        Vector3d direction = Transform.getDirection(rotation.getPitch(), rotation.getYaw());
        return ItemUtils.throwItem(ref, componentAccessor, itemStack, direction, throwSpeed);
    }
#

no it will call Drop event first

#

and that's where I struggle to cancel Drop event

#

I've seen that in the Temple with the memories on the exploration map you can't pickup items so its definetly possible to cancel that

sterile forum
#

If you cancel the drop event nothing will drop and that is what you said you where seeing right?

hexed valley
sterile forum
#

From the terrain?

hexed valley
#

Yes

#

Maybe its because of from where ItemUtils#interactivelyPickupItem is used it might already break it before calling the event

sterile forum
#

That would have nothing to do with the drop event. The drop event is a event that happens because the block broke.

somber lodge
#

DropItemEvent.Drop cancellation prevents the dropped entity from spawning, but the block removal is controlled by the interactive pickup handler, not by throwItem()

#

You need to cancel the earlier interaction/use event that triggers the pickup, or patch the pickup handler so it doesn’t remove the block when the pickup event is cancelled or when drop returns null

#

i cant see that part in your snippet

hexed valley
#

Yes it's from where its being called in:

    public static void performPickupByInteraction(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3i targetBlock, @Nonnull BlockType blockType, int filler, @Nonnull Ref<ChunkStore> chunkReference, @Nonnull ComponentAccessor<EntityStore> entityStore, @Nonnull ComponentAccessor<ChunkStore> chunkStore) {
        // SOME CODE
        if (!blockType.isUnknown()) {
            int fillerX = FillerBlockUtil.unpackX(filler);
            int fillerY = FillerBlockUtil.unpackY(filler);
            int fillerZ = FillerBlockUtil.unpackZ(filler);
            if (fillerX != 0 || fillerY != 0 || fillerZ != 0) {
                affectedBlock = affectedBlock.clone().subtract(fillerX, fillerY, fillerZ);
                String oldBlockTypeKey = blockType.getId();
                blockType = worldChunkComponent.getBlockType(affectedBlock.getX(), affectedBlock.getY(), affectedBlock.getZ());
                if (blockType == null) {
                    return;
                }
                if (!oldBlockTypeKey.equals(blockType.getId())) {
                    worldChunkComponent.breakBlock(targetBlock.getX(), targetBlock.getY(), targetBlock.getZ());
                    return;
                }
            }
        }
        // SOME CODE
        BlockHarvestUtils.removeBlock(affectedBlock, blockType, setBlockSettings, chunkReference, chunkStore);
        HarvestingDropType harvest = blockType.getGathering().getHarvest();
        String itemId = harvest.getItemId();
        String dropListId = harvest.getDropListId();
        for (ItemStack itemStack : BlockHarvestUtils.getDrops(blockType, 1, itemId, dropListId)) {
            ItemUtils.interactivelyPickupItem(ref, itemStack, centerPosition, entityStore);
        }
#

it calls the WorldChunkComponent#breakBlock