#help-development

1 messages ยท Page 1331 of 1

dry forum
#
    @EventHandler
    public void onRedstoneChange(BlockRedstoneEvent event) {
        Block block = event.getBlock();
        Bukkit.getLogger().info("powered 1");
        if (block.isBlockIndirectlyPowered() || block.isBlockPowered()) {
            Bukkit.getLogger().info("powered 2");
        }
    }```
why does this event get called like 5-20 times when i just power a block on/off once
chrome beacon
#

I'd assume it's triggered for every redstone update

dry forum
#

i only have 1 redstone circuit on my server though and its where im testing

chrome beacon
#

yeah so the thing with redstone is that it does a LOT of updates

dry forum
#

oh so when i turn it on/off its doing some random updates that arnt "visible"?

chrome beacon
#

yeah

dry forum
#

ohhh ok thanks

#

is there a better way to detect power on/off then?

chrome beacon
#

I know there's a good video that visualizes it

#

but I'm having a hard time finding it rn

chrome beacon
#

but there might be something that can be done depending on what block you're looking for or something else specific

dry forum
#

its a sign, ill keep trying stuff ty though

thorn isle
#

look at whatever craftbook does

#

craftbook did powerable signs before most current plugin devs were out of their diapers

round finch
#

curious how do people work with forking spigot?

chrome beacon
#

?contribute

chrome beacon
#

Contains info on how to build and manage stuff ^^

fervent thicket
#

any1 wanna help dev my minecraft server im trying to do staff stuff rn i need help

round finch
#

I'm also trying to figure out how to make things there doesn't break Mojang's copyrights

undone axleBOT
chrome beacon
#

If you're forking Spigot you can probably just fork BuildTools and make it build yours

round finch
#

whats the legal way of making modification like spigot?

chrome beacon
#

Don't distribute Mojangs code

#

(Not legal advice. Ask a lawyer*)

thorn isle
#

do whatever you want

#

laws aren't real

round finch
#

ah it's patches

like minecraftserver.patch

#

thanks guys

mortal vortex
round finch
#

๐Ÿ˜†

wet breach
#

Everyone in the industry has not allowed that issue to go before the supreme court because odds are the supreme court will not rule in their favor in that decompiled code is the same as source code when it is not lol

#

Therefore, copyrights do not apply to decompiled code ๐Ÿ™‚

chrome beacon
#

It'll be real expensive to defend yourself

wet breach
#

no

#

the person who brings forth a lawsuit is the one that has the burden of the majority of the cost

#

second, if you can't afford a lawyer the court will just appoint one for you as they are required to especially if you are not able to adequitely defend yourself

lilac dagger
#

isn't it a derivation anyway?

#

might not be source code but it's still their property

#

rockstar goes after those who make cheats

#

i also see this

wet breach
#

However if you want to treat it as such you can, which is perfectly fine. Just as long as you don't use everything you are generally fine

wet breach
#

or can also be classified as illegal as you are accessing the system in an illegal way

#

Reverse engineering is legal in the US

#

No one can 100% argue that decompiled code is a derivative work simply because you are using software to interpret software

#

you also can't argue that method names being the same is enough either. Also, you can't copyright API methods from Java either(mainly because there is limited or a single way you can really write something to access a particular api as well as you can't copyright someone elses work just because you rely on it) and can only copyright code that you solely created. So you have to use code that is in the methods which may not be exactly the same in the decompiled or at all.

#

this is why all cases that involved decompiled code solely has stopped short from going any higher because the odds that it is ruled that decompiled code is not covered under copyright is really possible

#

so because of this, many of those for legal purposes just say yeah its covered under copyright to protect themselves, but reality is its just a big grey area because copyright doesn't address this and there is no official rulings on it from any high courts. IE no one really knows. I am on the side that, well its not specifically addressed therefore its legal simply because there is more precedent for things not being specifically addressed as being legal or not covered by a law.

#

closest we got to a case is AI generated stuff. Anything generated by AI can not be copyrighted

#

simply because AI can not be an author nor own anything

#

supreme court in the US ruled on that last year

#

As for other countries, I can not say though as I don't particularly care for laws in other countries

lilac dagger
#

i see

chrome star
#

You can try

wet breach
chrome star
#

It is a tool for development assistance

wet breach
chrome star
#

ai this a not real developer

#

This is the assistant

#

!

chrome star
#

What was created by AI

#

?

#

The answer is: they won't prove it

wet breach
#

Not sure what you mean

#

but ok

#

knowingly filing a copyright that is fraudulent is a much worse offense then violating a copyright

#

and when you sue on copyright basis, you have to prove your copyright is valid

#

not that someone violated it

chrome star
#

You may not understand me.

wet breach
#

I see so not even someone in the US

chrome star
wet breach
chrome star
#

It's stupid to bring up this topic at all.

chrome star
wet breach
#

when you sue someone, the burden of proof lies on you. Also, the defense can subpoena any evidence in your possession to include materials on computers and development environment as well as subpoena your employees or anyone else that may be witness

#

you are required to hand over any evidence already that may help the defense as well. You can't exclude evidence because it hurts your case lol

chrome star
wet breach
#

Except you don't know how it actually works since you are not from here.

chrome star
#

Can you find me any cases like this?

wet breach
#

Supreme court case in 2025

chrome star
#

send a link

worldly ingot
#

I mean let's be honest, even if he sent it, you would have read only the headline lol

#

But it wasn't the SCOTUS, it was the Supreme Court of D.C. whose ruling was challenged in the SCOTUS but has yet to be heard

#

Thaler v. Perlmutter, case No. 1:22-cv-01564

#

Unsure where the disagreement lays, but you're both correct. You can create something with AI and the government won't care, but you cannot copyright that work in the United States according to the Supreme Court of D.C. ruling against it

random grove
#

Does Spigot/craftbukkit include sqlite?

slender elbow
#

yes

livid thorn
#

Does ItemFlag#HIDE_POTION_EFFECTS still work to hide "Interact with Spawn egg:" on spawners?

slender elbow
#

idk about that, but ItemFlag.HIDE_BLOCK_ENTITY_DATA should do it

livid thorn
chrome beacon
livid thorn
chrome beacon
#

No

slender elbow
#

if hide_block_entity_data doesn't do it, that's a spigot bug

livid thorn
#

It does not even do anything lol something weird is happing

slender elbow
#

sounds like you are misusing the itemstack/itemmeta or something idk

#

can't really tell without seeing any code

livid thorn
#
public ItemStack createSpawnerItem(String type, int amount, int level, int stack) {
        ItemStack item = new ItemStack(Material.SPAWNER, Math.max(1, amount));

        ItemMeta meta = item.getItemMeta();
        if (meta == null) return item;

        meta.setDisplayName("Test Spawner");
        meta.setLore(List.of("Line 1", "Line 2"));

        meta.addItemFlags(ItemFlag.HIDE_ADDITIONAL_TOOLTIP);

        item.setItemMeta(meta);
        return item;
    }```
#

created it just for testing

livid thorn
#

HIDE_BLOCK_ENTITY_DATA does not exist for me

chrome beacon
#

What version are you depending on

slender elbow
#

^^ may you be depending on an old api version?

#

or god forbid, not spigot ๐Ÿ˜ฑ โ€ผ๏ธ

livid thorn
#
            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.21.11-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
chrome beacon
#

?whereami

chrome beacon
#

Not using Spigot ๐Ÿ˜ญ

livid thorn
#

why should i use spigot xD

chrome beacon
#

Head over to the Paper discord

slender elbow
#

i mean, you can use whatever you want

chrome beacon
#

^^ This is not the place to ask for help with it

slender elbow
#

but you should be asking for support to the platform you are using

vital umbra
#

Bruh. I saw similar things multiple times on the forge server. Why do people do that? Do they think it's all the same or are they trying to waste the time of others?

vagrant stratus
#

Probably the former

#

That or they think the people on the server know all of the forks under the sun

low sorrel
#

hey guys, im looking for minecraft developer, dm me for paid jobs

vagrant stratus
#

?services

undone axleBOT
torpid blaze
#

Hey,
I am currently developing a Minecraft Minigame Plugin of which I want to combine the base classes into a API Plugin to use in all my minigames. So I started creating generic classes. But now I have a problem with circular dependencies as I pass the used types through.
Now I am only confused anymore and don't know how to fix it without loosing type safety...
https://github.com/KesSaft/EnderGames
The problem is in the GameStateManager and other connected classes.

GitHub

A minecraft plugin for the well known Endergames minigame - KesSaft/EnderGames

ivory sleet
#

What exactly is the point of the generic types params in this case?

vagrant stratus
#

Sounds more like a ground up rewrite is needed to properly take into account having an API

ivory sleet
#

well abstract class BaseGameData<E extends Enum<E>, P extends BasePlayerData<T>, T extends BaseGameStateManager<E, BaseGameData<E, P, T>>>, not saying this isn't needed, but this is a lot of generic type params

#

do u really need this kind of type awareness to shine through and propagate the rest of the code base

vagrant stratus
#

they probably don't lmfao

ivory sleet
#

๐Ÿ˜…

lilac dagger
#

i have very little generic stuff in my game engine

#

i just take advantage of polymorphism

ivory sleet
#

yea that can I understand

vagrant stratus
#

Something like this would be better lmfao

public abstract class BasePlayerData {
}

public abstract class BaseGameData {
  private BasePlayerData data;

  public BaseGameData(BasePlayerData data) { this.data = data;}

  public BasePlayerData getPlayerData();
}
vital umbra
vagrant stratus
#

Unironically probably to an extent

#

$$$$$$$$$$

#

I gave up on unity due to their dumb decisions though lol

torpid blaze
vagrant stratus
#

That is cleaner than.... whatever the fuck you're doing

torpid blaze
ivory sleet
#

idk if u actually need like

vagrant stratus
#

If you're programming the implementation plugins correctly, you'll only have to cast once anyways

ivory sleet
#

type params at all in ur case

torpid blaze
lilac dagger
#

you can technically have a simple cast at getGameManager(Class class)

#

and from there you can access game specific methods

ivory sleet
vagrant stratus
#

Only the implementation plugin has to cast, and if you program correctly you're only casting once lol

lilac dagger
#

SpleggManager manager = registry.getByClass(SpleggManager.class);

ivory sleet
#

you can probably scope ur types kess-apps

vagrant stratus
#

e.g. This is how casting in Java works. Note the first line

TriggerZones plugin = (TriggerZones) pluginManager.getPlugin("TriggerZones");
RegionManager regionManager = plugin.getRegionManager();
Location minCorner = new Location(getServer().getWorld("world"), 100, 50, 100);
Location maxCorner = new Location(getServer().getWorld("world"), 110, 60, 110);
TriggerZone trigger = new TriggerZone("example_zone", minCorner, maxCorner);
trigger.addAction(TriggerZone.TriggerEvent.ENTER, new SendMessageAction("You have entered a zone");
regionManager.addRegion(trigger);
lilac dagger
#

totally fine to do the cast manually as optic did ๐Ÿ˜„

vagrant stratus
#

You'd just store TriggeZone variable and pass that around w/o needing to cast every time

lilac dagger
#

but the game engine shouldn't care about game specific stuff

vagrant stratus
#

^

ivory sleet
#

for example, if u have some player data in a specific minigame, then just have a player data type for that minigame

lilac dagger
#

only enter point should be a generic method where you up cast

lilac dagger
#

and that's all the generic you need

vital umbra
torpid blaze
#

thanks

#

But for the GameState Enum I would need a type right?

ivory sleet
#

either way kess apps, you can think of generics as type constructions, you can have a list of ints and list of strings and they're different types

torpid blaze
#

that would only be one type so not that big of a problem ig

ivory sleet
#

you wouldn't want to create a list type for every other type yk

lilac dagger
vagrant stratus
#

I mean, if the GameState enum isn't shit you don't need to polymorph or cast

lilac dagger
#

this is my impl of game state, i name them phases

#

this is in the base library and i can switch them up if a game needs something different

torpid blaze
vagrant stratus
#
public enum GameState {
    CREATED,
    WAITING,
    RUNNING,
    ENDING,
    ENDED
}

Kinda covers everything you'd need for a basic GameState system

ivory sleet
#

I mean I do understand the idea of generalizing game states since different minigames might have different state machines

lilac dagger
#

yeah

#

an enum isn't enough

torpid blaze
lilac dagger
#

i actually do for my auto join system

vagrant stratus
ivory sleet
#

yea

lilac dagger
torpid blaze
lilac dagger
#

this is what i have

vagrant stratus
ivory sleet
vagrant stratus
#

State does not necessarily mean Phase

torpid blaze
#

for endergames I have LOBBY, PREPARE_MAP, SPAWN, GRACE, PLAY, END,
but for getdown I have LOBBY, PREPARE_MAP, JUMP, JUMP_END, SHOP, DEATCHMATCH_PREPARE, DEATHMATCH, END

vagrant stratus
#

You might have a

public abstract class GamePhase {

  public abstract void onEnter();

  public abstract void tick();

  public abstract void onExit();

}

class, for example

torpid blaze
#

I think it is a bit cleaner when I do it this way

vagrant stratus
#

You'd just have a GameType.DEATHMATCH and then use GameState

ivory sleet
#

Yea thats for the internal ones, but those are encapsulated more or less to each minigame, you might wna map
for example:
LOBBY --> PRE_GAME
PREPARE_MAP, SPAWN, GRACE, PLAY, --> RUNNING
END --> POST_GAME
and then let pre game, running and post game be for api where its shared for every minigame

vagrant stratus
#

Regardless they're implementing it from the very beginning really poorly

ivory sleet
#

yea, I do like the honest attempt with generic type parameters

torpid blaze
#

then I would have two state mashines inside another. not sure if that would make more readable

vagrant stratus
#

GameType & GameState are like the bare minimum

#

or perhaps turning it from an enum to a proper abstract class

#
public abstract class BaseGameType
{
  private GameState state;
  // Other variables

  // constructor & other code
}
torpid blaze
#

well, thats what I have

vagrant stratus
#

Which is one of the cleaner ways to do it lol

#

You're trying to over complicate things

#

Sometimes simple is better lol

torpid blaze
#

probably

#

thank you very much. I will try and simplify it a bit ๐Ÿ˜„

ivory sleet
vagrant stratus
#

for me personally the implementation is

public class BedwarsMinigame extends AbstractMinigame {
  public BedwarsMinigame(GameContext context) {
    // Context handles max players and stuff
  }

  // everything else
}

though you could do the following too

public abstract class AbstractMinigame { /* Code */}
public abstract class SingleplayerMinigame extends AbstractMinigame {
   private Player player;

   // Code
}

public abstract class MultiplayerMinigame extends AbstractMinigame
{
   private TeamManager teamManager;

   // Code
}
torpid blaze
#

๐Ÿ‘

vagrant stratus
#

I'm not releasing my library though lmfao

lilac dagger
#

alright, keep your secrets ๐Ÿฅฒ

vagrant stratus
#

It's for my own server KEKW

topaz cape
#

how do i tell if BlockExplodeEvent is caused by Wind Burst

lilac dagger
#

the only thing that comes to mind is on attack or interact if player used a mace with windburst to add it to add the player to a set, and on explosion check if said player is there

topaz cape
#

that sounds horribly hacky

lilac dagger
#

i can't think of a better way

#

maybe there's a better event

#

does explosionprimeevent triggers?

#

if so it has the entity who triggered the event, you'd only have to check the hand for a mace with wind burst

topaz cape
#

good question

#

let me check

#

but its an entity event and i highly doubt its called here

lilac dagger
#

worth a try

#

oh

#

there's EntityExplodeEvent

topaz cape
lilac dagger
#

ah

#

did you try explosion prime event?

topaz cape
#

still on it

lilac dagger
#

alright

#

still have a hope

#

๐Ÿ˜„

ivory sleet
#

btw @lilac dagger what kind of caching strategy do u usually resort to when u deal w lets say user/player data and state

lilac dagger
#

hashmap?

#

or for database stuff

#

it's the same for database too actually

ivory sleet
#

oh I more meant like write behind, write around etc

lilac dagger
#

i'm not familiar with the terms

#

let me see

#

i'll tell you how my system works in bedwars

ivory sleet
#

go for it ^^

lilac dagger
#

when the player joins their data is pulled from the database into local memory, after that when the data changes or needs to be sent i use a method like this to update the database

#

i'm yet to find time to do this system in frconomy

vagrant stratus
#

Yea, I just do it all in local memory & save on quit, disable, and every x amount of time lol

ivory sleet
lilac dagger
#

that's how i did it in frconomy because vault doesn't have async callbacks

vagrant stratus
#

Good thing I don't use vault for my server LMFAO

lilac dagger
#

but i have a solution in mind

ivory sleet
#

vault is... vault yeaa

mystic sky
lilac dagger
#

confirmation based transactions

vagrant stratus
#

I do though ๐Ÿ˜Ž

mystic sky
#

I'd say lot of plugins use vault dependency

ivory sleet
lilac dagger
#

you try to send data once, and then it tells the user if it's not cached to try again in a few seconds

ivory sleet
#

or well I mean sometimes sadly so

lilac dagger
#

so the database has time to cache that data async

mystic sky
#

I avoid using vault and protocolib for example, but this is hard

vagrant stratus
#

I just have a simple

public class User {
  private UUID uniqueId;
  private BigDecimal balance = BigDecimal.ZERO;

  public (UUID uniqueId) {
    this.uniqueId = uniqueId;
  }

  // code
}
vagrant stratus
ivory sleet
vagrant stratus
#

I code almost everything from scratch for my server

lilac dagger
#

20 minutes by default sounds like a good amount

ivory sleet
mystic sky
ivory sleet
#

but vault is still a bridge many servers use

vagrant stratus
#

fuck vault lol

ivory sleet
#

yea but for packet listening it can be nice w packet events

lilac dagger
#

i'm actually gonna spend some time tomorrow to fix fr conomy

#

i really like that project :d

ivory sleet
#

:)

lilac dagger
#

it deserves some time and love

vagrant stratus
#

#YayForBeingProgrammerNerd

mystic sky
vagrant stratus
#

Don't need packet events when i can just add patches to paper lmfao

ivory sleet
#

yea

umbral ridge
#

why is vault so popular though, if you make your own system, you dont need it

vagrant stratus
mystic sky
vagrant stratus
mystic sky
umbral ridge
#

whats an eco system bridge? i feel like this could be much simpler, economy at the end of a day is just a number and doesn't need 2 mb of code

vagrant stratus
#

Don't need that either

umbral ridge
#

you could do an economy plugin with api in a few classes and be done with it

#

why is vault so big

vagrant stratus
#

Gotta remember this is a plugin from 2011 @umbral ridge

#

It's old

mystic sky
umbral ridge
#

ohhh compatability

vagrant stratus
#

Times were different back then, which gave vault an edge which made it standard decade later lol

mystic sky
#

True

ivory sleet
vagrant stratus
ivory sleet
#

placeholder api, or any plugin that consumes economy balance

vagrant stratus
ivory sleet
#

true

vagrant stratus
#

It's simple. It's old as fuck. It's cemented as a core API and likely will be for years

mystic sky
#

same as protocolib or citizens by the way

vagrant stratus
#

Are there better libraries? Yes
Are they as supported as Vault? Hell no

#

It would take a lot for there to be a new standard library for that kinda thing

umbral ridge
#

I made my own system and didnt use any existing plugins, economy, permissions, ..

vagrant stratus
#

Similar situation to LP.
It's the most feature complete, pex died, groupmanager stagnated, and the other alternatives just aren't as good

umbral ridge
#

made a cool database hikari wrapper plugin

#

then built permissions and economy on top of it

#

its really cool

#

both perms and economy plugin have an api to events, methods etc

mystic sky
vagrant stratus
#

Most of my stuff is custom, but I won't waste my time making a custom permissions system lol

vagrant stratus
umbral ridge
vagrant stratus
#

Almost all of my plugins are private, for example. This means I don't have to rely on third-party libraries and can make everything from scratch to properly suit my needs

vagrant stratus
umbral ridge
#

really simple..

mystic sky
#

Plugins like LP, WorldEdit, ViaVersion hell

vagrant stratus
#

Not really crazy, a lot of large servers are like that

mystic sky
vagrant stratus
#

Still makes no difference. How often do you think core plugins get updated lol

mystic sky
#

Still crazy

umbral ridge
#

i own my plugins and the systems i have

mystic sky
vagrant stratus
#

Debatable. I can make a moderation plugin and then never have to update it again

umbral ridge
#

i dont want someone elses work in my stuff

#

I make things

#

i'll make sure its good

mystic sky
umbral ridge
#

I dont need it

vagrant stratus
umbral ridge
#

i dont need via version

#

or any of that stuff

mystic sky
#

Latest MC version?

vagrant stratus
#

That's the only version I support, personally lol

mystic sky
#

Because if you want multiple protocol support you will need it

umbral ridge
#

yeah the server is always the latest, and specific version only

#

if you dont wanna play or dont have that version... just dont play

mystic sky
#

That explains why you want all custom, imagine 1.8+ to latest

umbral ridge
#

yeah that would be a pain to do

#

i hate 1.8

vagrant stratus
#

You can do all custom even with ViaVersion lol

umbral ridge
#

item ids were weird

vagrant stratus
#

You'd just have a wrapper API or something

umbral ridge
#

no

#

i dont need viaversion

vagrant stratus
#

Never said you had or needed too, just saying it's possible lol

mystic sky
# umbral ridge i hate 1.8

I love that version I played it for many years when I was a kid. I still maintain the 1.8 paper a lot.

mystic sky
umbral ridge
#

they have an api?

vagrant stratus
#

For me personally, I could never work with anything lower than 1.13 for free lol

mystic sky
umbral ridge
#

EH

#

no more wrappers

mystic sky
#

I use it to display on name tags protocol version

vagrant stratus
mystic sky
#

xmaterials intensifies

umbral ridge
#

my next project is probably a kingdoms plugin... that will be fun :DD

#

also have to do custom npcs for town shops

#

that will be pain in the ass

mystic sky
vagrant stratus
#

Mannequins at least makes that easier lol

mystic sky
#

Both need 0 dependency

#

And are packet based

vagrant stratus
umbral ridge
#

thank u i could take a look. but my goal is to make everything by myself so i know exactly how it works... because i have everything custom..

vagrant stratus
#

as previously stated lol

#

Just build off of Mannequins since you're on a version which has em

umbral ridge
#

how well does it work?

vagrant stratus
#

As long as you're not needing pathfinder goals or anything you won't have to use NMS or anything

umbral ridge
#

any bugs?

vagrant stratus
#

Don't believe so

umbral ridge
#

is it open source?

vagrant stratus
#

No, the actual NPC thing minecraft added lol

umbral ridge
#

oohh i didnt know about this

vagrant stratus
#

Yea, it's a 25w36a thing

umbral ridge
#

I need to think it through

#

i might need path goals

vagrant stratus
#

part of 1.21.9

umbral ridge
#

because i dont want the town to be dead

#

i want the npcs do to something

#

need to make a plan for it

vagrant stratus
umbral ridge
#

i haven't done nms for a long time

vagrant stratus
#

or if you're using paper then their ai goal thing. not that i know how to use it

#

but the new Mannequin is the better way to do it from scratch nowadays lol

umbral ridge
#

what takes most of the time is to make it customizable.. like.. little things.. i did a config class which auto synces values to its values class and has an event, when config reloads

vagrant stratus
#

w/o that you'll have to do it via NMS like Citizens and stuff

vagrant stratus
umbral ridge
#

im using paper because i like their Components

#

XD

vagrant stratus
#

Yea, then just learn their AI Goal api and you're golden most likely

umbral ridge
#

hmmm ill see how well its documented

#

ty optic

vagrant stratus
#

no clue lmfao

mystic sky
vagrant stratus
#

They won't

#

they'd prefer to have everything from scratch lol

umbral ridge
#

I'm tempted to use it

#

I'll look at it over the weekend

#

the thing is, i like the process of learning new things... not just getting everything instantly

mystic sky
#

When I make a plugin or modification, it's usually because something is lacking, not because it's mine, at least in my case

mystic sky
vagrant stratus
umbral ridge
#

its a good headache

#

XD

lilac dagger
#

i write instantly to the cache and then send it asynchronously to the db

vagrant stratus
#

Mannequin#setDescription(String) // The "NPC" part of the name
Mannequin#setCustomName(String) // The player name
Mannequin#setCustomNameVisible(true);
Mannequin#setPlayerProfile(playerProfile);
Mannequin#setImmovable(true);

Bare minimum

umbral ridge
#

How do you do that

vagrant stratus
#

Invisible armor stand or something along those lines iirc

#

There are a lot of shenanigans with custom models and invisble armor stands and stuff

umbral ridge
#

yeah

vagrant stratus
#

THere's a plugin, somewhere in this discord which shows all that stuff. Lemme find it lol

#

Mod*

umbral ridge
#

cool cool

#

eh, i was never a fan of resource packs

vagrant stratus
#

Yea, used that on a server to see how they do things. It's just item & armor stand shenanigans lol

young knoll
#

Skyblock doesnโ€™t use one

#

Those items are just armor stands

vagrant stratus
#

see my previous messages lol

umbral ridge
#

if its armor stand.. I didn't know you can display an item on it

vagrant stratus
#

It's just holding the item & invisible

umbral ridge
#

ohhhhhh

vagrant stratus
#

You're just setting the location to something that looks good

umbral ridge
#

its an entity with an item but entity is invisible

vagrant stratus
#

Yes. It's just holding the item in one of it's arms, set to be invisible and unmovable, and positioned somewhere

mystic sky
vagrant stratus
#

Similar to how balloons and stuff work

umbral ridge
#

cool

vagrant stratus
#

This uses invisible item frames, items, and barriers + a resource pack

umbral ridge
#

can it cause lag?

#

fps drops?

mystic sky
#

Surely for bad hardware

vagrant stratus
#

As long as you don't over do it it won't

mystic sky
#

Any ways clients always can disable stuff

umbral ridge
#

Yeah

vagrant stratus
#

Better example lol

umbral ridge
#

cool stuff

vagrant stratus
#

Note the characters in the player name for the status & rank name as well

#

You can get real fancy with resource packs, albeit they ain't safe LOL

umbral ridge
#

or a resource pack i guess

vagrant stratus
#

resource pack + character in a language you'll never use + other stuff

umbral ridge
#

I need to rewrite my nametags functionality... planning to use TextDisplay and don't use teams at all

worldly ingot
#

Better, in a font you'll never use

mystic sky
umbral ridge
#

and also use the packets a little

worldly ingot
#

You can provide a font in components, which you should do instead of replacing the vanilla font characters

vagrant stratus
young knoll
#

You should but spigot doesnโ€™t have good api for that

mystic sky
#

He's using paper

young knoll
#

If only there was a PR to add component support to everything that wasnโ€™t dead

worldly ingot
#

If only

sly topaz
#

I honestly don't understand why that PR is dead

mystic sky
vagrant stratus
#

I don't even know what's on the JIRA lol

#

OH choco did anything come about when it came to our talk about implementing that random teleport api lol

sly topaz
#

the only negative review it got was MachineMaker's comment about the bad interopability with the old methods

worldly ingot
#

Yeah at which point I gave up

vagrant stratus
#

I already had the RIP prepared for that reaction LOL

sly topaz
#

I don't believe that was enough to just disregard merging the PR, but welp

worldly ingot
#

I don't either

vagrant stratus
#

how many dead prs are there xD

sly topaz
#

well, some are dead with actual reasons, this one in particular just got enough friction in it to leave it in the limbo state that it is now

#

same deal with the material to itemtype/blocktype conversion

wet breach
rotund ravine
#

If you just heard of client flags you should leave it as default. You wonโ€™t be able to do better than default without proper knowledge, even if your skript is 1 thousand lines long

ivory sleet
#

yea didnt they recently change the vanilla client to run on gzgc or also

#

or well not recently

#

but not too long ago

merry swallow
chrome beacon
ivory sleet
#

oo right right

merry swallow
#

oops sorry

chrome beacon
#

With helpchat I mean the website

merry swallow
#

found it , awesome

young knoll
#

Wasnโ€™t gzgc made the default in a certain java version

ivory sleet
#

iirc generational mode by default

#

for zgc

chrome beacon
#

G1 is still default as far as I'm aware

ivory sleet
#

yea

#

oh well would u look at that, j24 seems to have removed non gen mode for zgc

fading drift
#

is there a way to determine what world a player joins when they join a server before theyre sent to the world

summer scroll
fading drift
#

yes thank u

#

I have a duels server that has a couple of duels, and each duel requires some different login in some listeners. is there a smarter way to go about this rather than checking what duel the player is in in each listener. I feel like this isnt expansive as the listeners would just become slabs of code growing with each new duel type.

I am thinking about having a sort of "ClassicDuelListener", "UHCDuelListener" etc class, or is this overengineering?

buoyant viper
#

no such thing as overengineering

#

simplicity is your enemy

drowsy helm
#

Separation of concerns

thorn isle
#

doesn't make a difference performance wise

#

at least not on paper where they do evil asm bullshit rather than reflection for calling eventhandlers

#

on spigot there might be a difference you might be able to measure with a microbenchmark harness or something, it would indeed be negligible

thorn isle
#

yeah you generate classes/bytecode at runtime to directly call eventhandler methods, while spigot does it reflectively

#

or did you both switch to methodhandles now?

slender elbow
#

pretty sure we replaced all that asm bs with a much simpler constant methodhandle approach

#

spigot still uses a non-constant foldable Method afaik

#

yippee

buoyant viper
#

lambdametafactory bs my beloved

thorn isle
#

i didn't really mind the asm nonsense but i remember someone complaining about it

#

i guess it did allow billy to create his EntityMoveEvent without killing the server just with the reflection overhead

slender elbow
slender elbow
#

the current code should be at least just as fast

#

and is far simpler

thorn isle
#

yeah probably not nice to maintain

slender elbow
#

there were straight up whole classes of dead code

#

it was so funny

buoyant viper
#

looking at it now

#

similar-ish approach for using LMF but more interesting, never seen defineHiddenClassWithClassData

short pilot
#
public void onPlayerMove(PlayerMoveEvent event) {
    if (event.getFrom().getBlockX() == event.getTo().getBlockX()
        && event.getFrom().getBlockY() == event.getTo().getBlockY()
        && event.getFrom().getBlockZ() == event.getTo().getBlockZ()) {
        return;
    }
}
slender elbow
#

thank you

buoyant viper
#

?paste

undone axleBOT
buoyant viper
#

both basically give u a POJO that gets called rather than a reflect call ig

#

based on an event bus that isnt as strict about input types however, iirc lmf is picky about param types otherwise

short pilot
#

asm sounds nostalgic

grave sandal
#

Hello there, i am sorry for this request, this is not publishing or advertisement i am just looking for someone can help me

umbral ridge
#

is there an event when that happens or is that totally client side? when glass attaches to blocks next to it

grave sandal
#

I know basics but very basics of java and I am interested at learning how to make plugins... at the moment i am looking at a developer teacher can teach me how plugins works and how to give a structure to those, because i am a beginner i had in my intention to pay for those lessons

#

For more info please just direct message me, and I thank you all for your availability

chrome beacon
#

or whatever it was called ๐Ÿ’€

umbral ridge
#

nice

#

there isnt one

worldly ingot
#

BlockPhysicsEvent

chrome beacon
#

^ that's the one

#

though might not work ๐Ÿคทโ€โ™‚๏ธ

umbral ridge
#

great

worldly ingot
#

Just be careful with what you do in that listener. It's called very often

umbral ridge
#

idk if glass connecting to the block next to it is considered a physics

#

but ill try

worldly ingot
#

I believe it's "physics" in the Minecraft world :p

umbral ridge
#

hahaha right

lilac dagger
#

i'm really close to making an async economi api

#

vault api just doesn't cut it

#

it wants data now

#

doesn't matter if it's in a blocking database

#

๐Ÿ™

ivory sleet
#

and just falling back to 0 whilst loading isnt an option?

lilac dagger
#

there's also has account checks

#

with no way for players to know

#

that they have to wait a bit

#

if there's an offline player shop

#

this would be annoying

#

there's withdraw and deposit with an economy respone

#

where i could embed a message to wait

#

but if the plugin does if economy.has first

worldly ingot
lilac dagger
#

there's no way to let players know

lilac dagger
#

i have already made the futures

lilac dagger
#

I think i'll implement 2 vault hooks

#

One that's blocking and one that you can click twice to buy

#

And let users choose which one they want more

#

Also about caching offline players i have to worry about players on a different server being online with a changing balance

#

In mysql mode

thorn isle
#

vault really doesn't lend itself to anything blocking

#

i you can, i would recommend just writing against your eco backend/plugin directly

umbral ridge
#

ill just cancel everything

#

XD

thorn isle
#

clearlag "stop-lag" mode in a nutshell

onyx fjord
#

actionbar native api would be nice to have in bukkit

#

the issue has always been action bars overriding themselves

#

lets say you have a 24/7 actionbar with some stats

#

but another plugin sends a notification thru actionbar

#

next tick its gone

#

bukkit could have a priority based system

ivory sleet
#

similar to hide/showEntity where u pass in the plugin instance?

onyx fjord
#

similar goal

#

but it would require priority like events

thorn isle
#

this would definitely be nice

#

currently i end up jerryrigging this through protocollib

echo basalt
#

I designed a system like this at work a few years ago

thorn isle
#

it's not very complicated to make happen, issue is mostly adoption; without bukkit forcing developers to register their things with priorities, you have to fall back either with external priorities based on regex or callsites, or treat all plugins not explicitly opt-in as "normal" priority

ivory sleet
#

yea

#

speaking of adoption, has it ever been brought up as an issue or pr to add async support to vault?

thorn isle
#

probably

#

but vault is "feature complete"

#

so it probably isn't ever going to happen

#

they've been fighting over explicit UUID support for years

ivory sleet
#

:,)

lilac dagger
#

All they had to do is provide an AsyncEconomy interface and deprecate the current one

#

People would've implemented both and eventually switched to async economy

sullen marlin
#

Is that much different to the caller just running it async though?

lilac dagger
#

The issue is some plugins would still use the old interface

#

As a economy provider i guess it makes sense to have support for both for a while

#

An economy caller should definitely be async only

thorn isle
#

the main issue with vault is it doesn't offer any kind of transaction api

#

it's not an issue with just threading, but also logging and moderation

#

you can't have a "x paid y to z", you'll have a "x paid y" and "z received y", which you have to stitch together manually

echo basalt
#

didn't vaultunlocked support it

thorn isle
#

neverheard of that

#

which is kind of the problem; adoption

echo basalt
thorn isle
#

vault poisoned the proverbial well with the minimum viable product and now we're stuck with it forever

echo basalt
#

ah no VaultUnlocked is mostly for uuid & bigdecimal

#

no async

#

but there are some async econ plugins

slender elbow
#

also yeah, floats, yikes!

grave abyss
#

is NMS like mixins but for plugins? i cant understand it

vagrant stratus
#

no

#

NMS is the minecraft code itself, no mixins or similar

grave abyss
#

-# also enable ping reply

lilac dagger
#

yes

#

you can do almost everything

#

sometimes reflections are needed to access private methods and fields

#

but it can be done

grave abyss
#

oh okay

#

thanks guys!

vagrant stratus
lilac dagger
#

too much work

vagrant stratus
#

depends tbf

#

w/ me doing a server with 99% custom plugins, forking it makes things easier lol

young knoll
#

I mean you canโ€™t actually modify the vanilla code

slender elbow
#

well not with that attitude

young knoll
#

You can mess with variables, and hook into certain things, but thereโ€™s no equivalent of mixins with spigot

shadow night
#

well...

#

I have created something like a mixin into code that isn't mixinable when working with neoforge
and I am fairly certain that same trick could work with spigot

#

to some degree

young knoll
#

What

vagrant stratus
slender elbow
#

what is a "regular" plugin? and what is an irregular plugin

wet sinew
#

In these NMS packages, each version is installed in my local repository and has jars. When I try to set the scope to system, none of the jars work, and ChatGPT tells me that this won't work. It tells me things I don't understand, like multi-module. I'm new to NMS. I'm not sure how to create NMS's between 1.16.5 and 1.21.11 in a single jar. and load or run the NMS accordingly in a single JAR file.

chrome beacon
#

๐Ÿ˜ญ link not updated

wet sinew
#

i cant reach the website

chrome beacon
#

Check internet archive

#

There is one for multimodule nms as well

wet sinew
wet sinew
ancient plank
round finch
#
Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet login/serverbound/minecraft:hello (PacketLoginInStart) was larger than I expected, found 1 bytes extra whilst reading packet serverbound/minecraft:hello
[03:11:25] [Netty Server IO #3/ERROR]: Error sending packet clientbound/minecraft:disconnect
io.netty.handler.codec.EncoderException: Sending unknown packet 'clientbound/minecraft:disconnect'
#

then people send me incorrect information to my server

#

broo

mystic sky
wide cipher
#

Is there a way to hide the saddle and like leash from an invisible horse? cause i want the player to ride an ball of air, but the saddle is still visible.

wide cipher
#

inbuilt jumping mainly

#

is there a different way you would suggest?

mortal vortex
#

A slime idk

sly topaz
#

for the leash I think since those are now entities, you can just hide the leash entity?

#

maybe not with the API tbh

sullen marlin
buoyant viper
#

?jd-s

undone axleBOT
buoyant viper
#

is it possible to open the enderchest inventory without needing an actual enderchest near the player?

#

i see HumanEntity#getEnderChest is just an Inventory that should be useable for HumanEntity#openInventory so like id assume yes right

sullen marlin
#

yep

#

Like 600 first plugins do that

vagrant stratus
#

too common infact lol

#

If there's an inventory, there's a plugin that lets you open it without needing the actual block lmfao

solar slate
#

Does anyone have tips for storing/sending complex command usages? It's become quite tedious with some of my plugins

buoyant viper
quaint basin
#

How can I listen to a packet using nms?

chrome beacon
#

Use PacketEvents or ProtocolLib

#

it is not worth reinventing the wheel

quaint basin
chrome beacon
#

hm? What are you trying to do

#

Why are you messing with chunk lighting

#

and chunk packets

quaint basin
# chrome beacon and chunk packets

I have a Skyblock-gamemode server, but instead of islands, it's a normal world with borders; it's one world per player, and I'd like chunks outside the world's border to be intercepted with fake chunk data; so, instead of the world being 300x300 for example, it's 200x200 for example, and this way I use less disk space

#

The player cannot go to or interact with the chunks, so there won't be bugs like the player flying etc

chrome beacon
#

You can just stop the chunks outside the border from saving to disk

quaint basin
thorn isle
#

since you're doing skyblock, i assume you'd want them to be sent as air-only chunks, which should be very easy

#

however, in practice i don't think this is going to make any reasonable difference in disk usage, since air-only chunks are also extremely small on disk

quaint basin
thorn isle
#

well you're going to have something to send

#

if it's a regular vanilla chunk with trees and carvers and shit, recreating that from scratch on chunk send is going to be infeasibly expensive

quaint basin
#

smth like that

thorn isle
#

yea no you're not generating that on the fly for each packet

chrome beacon
#

^ better off storing it

thorn isle
#

you need to generate them ahead of time and store them either on disk or in memory

#

if you have multiple worlds/servers with the exact same out-of-bounds chunks, you could store the chunk packets themselves in a database/file shared across them all to reduce disk usage

quaint basin
thorn isle
#

mcWorld.palettedContainerFactory().blockStatesContainerCodec.parse<Tag>(NbtOps.INSTANCE, Converter.convertTag(section.blockStatesTag)).getOrThrow()

#

this parses it from nbt

#

the nbt would presumably come from the disk

#

it doesn't magically generate a full chunk with all blockpopulators and everything applied

#

otherwise initialize them as empty: PalettedContainer(Blocks.AIR.defaultBlockState(),mcWorld.palettedContainerFactory().blockStatesStrategy(), null) and PalettedContainer(biome.get(Biomes.PLAINS).orElseThrow(), mcWorld.palettedContainerFactory().biomeStrategy(), null)
this creates an empty chunk

#

i.e. air only

thorn isle
#

but unless the file/nbt is shared across multiple worlds or servers, there is no point to doing it over just having the chunks saved in region files normally

quaint basin
thorn isle
#

i quoted two parts of the paste

#

and replied to something i suggested

#

i mean you would use the first part of the paste that i quoted to do the something i suggested

quaint basin
#

From what I understand, you're saying to have a template world where the chunks outside the border will be shared between all worlds, and the per-player world doesn't have those chunks in the file. The problem is, I have no idea how to do that

thorn isle
#

you store the nbt in a file, in a database, or whatever

#

then you send it in the chunk packet

quaint basin
thorn isle
#

no, you are loading the already-generated chunk from disk

#

you are still parsing it which is not free either, but is much cheaper than generating it

quaint basin
#

Well, I'm lost. I don't even know how to listen to a packet with NMS, lol

thorn isle
#

you listen to player join and inject a netty stage into their netty pipeline

#

but like someone else said, there's no need to reinvent the wheel; just use protocollib or packetevents and get the packet handle from them

quaint basin
#

But that doesn't make sense to me; if I need to inject into the playerjoinevent to listen for packets, then how do I listen for packets before the playerjoinevent is processed?

#

All the code I sent you uses nms, and with packetevents it's completely different

thorn isle
#

unless you specifically need to put your packet listener at a particular spot in the pipeline e.g. after packets get turned into raw bytes, or before viaversion, there's zero reason to do netty shit on your own, and you should use existing solutions like protocollib or packetevents

#

again, you can get the nms packet handle from protocollib and packetevents

#

and use them with nms code

thorn isle
#

i take it since you're still going for it that it is?

#

i.e. you have many worlds/servers with the same out-of-bounds chunks

quaint basin
#

the world is the same for everyone

thorn isle
#

right

quaint basin
thorn isle
#

i don't know, i've never used it

#

with protocllib you just PacketContainer::getHandle, and cast to the nms packet you want

quaint basin
thorn isle
#

the only annoying part is the that PacketType names don't line up with mojang or the wiki or anything sensible so it's a bit of a guessing game

quaint basin
thorn isle
#

is that bytebuf for the entire packet or the block data

#

because the nms packet has a byte[]/bytebuf for the block data, and heightmaps and other shit stored separately

#

i also don't think you can just reuse the same bytebuf like that

#

have you worked with bytebufs before? they're not exactly like byte arrays; they have read and write indices

quaint basin
thorn isle
#

to reuse it, clone it and pass a mirror/slice to the future packets instead of the clone

quaint basin
#

But I know that they kind of have indexes and advance something like that

thorn isle
quaint basin
#

oh

chrome beacon
#

Just let the chunk be

quaint basin
#

i think is the entire packet

chrome beacon
#

It's not worth messing with

thorn isle
quaint basin
#

This getFullBufferClone method is present in all packets, so I imagine it is entire packet

thorn isle
#

should be then

#

in that case try fixing the bytebuf issue and it might work

quaint basin
#

I've already tried 1001 different things xd

thorn isle
#

when you get the bytebuf from the first packet, clone it before assigning it to the field

#

otherwise, when netty reads it, it will be empty

#

and when passing it to new packets, mirror it; otherwise the first sent packet will again empty it

#

mirror basically creates a "view" into the buffer, sharing the underlying data, but having its own read/write indices

#

clone copies the data as well

quaint basin
#

if (buf == null) { ByteBuf buffer = (ByteBuf) event.getFullBufferClone(); this.buf = buffer.retainedDuplicate(); BoxPlugin.plugin.getLogger().info("v2 chunk loaded by first time"); } else { event.setCancelled(true); buf.readerIndex(0); event.getUser().sendPacket(buf); BoxPlugin.plugin.getLogger().info("v2 fake chunk sent"); }

thorn isle
#

you might want to rather than cloning it, copy it manually into a heap bytebuf or you might run out of native memory

quaint basin
#

i alr tried with readerIndex too

#

but is the same thing

thorn isle
#

pass a .slice() or something instead of changing the index manually

quaint basin
#

i'll try this:

if (buf == null) { ByteBuf buffer = (ByteBuf) event.getFullBufferClone(); this.buf = buffer.retainedDuplicate(); BoxPlugin.plugin.getLogger().info("v2 chunk loaded by first time"); } else { event.setCancelled(true); event.getUser().sendPacket(buf.slice()); BoxPlugin.plugin.getLogger().info("v2 fake chunk sent"); }

thorn isle
#

what's the writer index on the buffer before you copy/slice it?

quaint basin
umbral ridge
#

hey

#

what api for voting do you guys usually use?

#

i just wanna detect votes

#

i haven't done this for awhile so im asking, i used to use nuVotifier or something, idk if that's still an ok thing

chrome beacon
#

It's probably still NuVotifier

round finch
chrome beacon
#

Time to start banning ips

round finch
#

i try!

#

they use proxies to send incorrect data to fuck with my server

chrome beacon
#

There's not much you can do about that

round finch
#

i need to filter it out
sorry im slightly venting here

chrome beacon
#

Building a filter is doable

#

but a lot of work

round finch
#

i managed to block vpns on ping

#

still annoying anyway thank you

umbral ridge
#

you can block them by hiding behind a proxy

#

proxies dont understand that kind of information and therefore ignore it

round finch
#

ah

umbral ridge
#

well

#

they dont reeaaally ignore unknown packet info

#

but yeah i use velocity as proxy

#

i used to have TCPShield

round finch
#

thanks for suggestions man!!

#

๐Ÿ‘

#

it could save me some time

umbral ridge
#

these are generally harmless and cant do anything to your server

#

i never played around with netty much but if you really want to dig deep you could make a netty channel handler

#

you could inject into netty pipeline before wellll ... minecraft decoding

umbral ridge
#

i found some but they all seem to be almost a decade old XD

vagrant stratus
#

HELLO

#

QUESTION

umbral ridge
#

I FIXED IT

#

WORKS CAT-PERFECTLY

vagrant stratus
#

Think Minecraft's AI impl is good enough for modern games, or is there a more modern (or just generally better) apporach to implementing it? I'm making a game & need to know lol ๐Ÿ˜Ž

umbral ridge
#

is good enough ๐Ÿ˜Ž

chrome beacon
thorn isle
#

take a look at finite state machines and behavior trees

#

those are the two industry standards

chrome beacon
#

^

vagrant stratus
thorn isle
#

the new brain system is kind of like a behavior tree

#

using it is fine if you're familiar with it

umbral ridge
#

that's pretty cool now

vagrant stratus
#

Remembered I have a bunch of game dev/design books. Gonna hope at least one of them goes into the AI stuff KEKW

chrome beacon
lilac dagger
#

I'e got this book that i haven't yet read

#

It's by joshua bloch, i see him often as an author in the impl of the standard java lib

chrome beacon
#

That's a nice book

#

Covers many good things

lilac dagger
#

Yup ๐Ÿ˜„

chrome beacon
#

Concurrency in practice is also a good read

lilac dagger
#

I want to get head first java patterns

#

But it's a bit too expensive

#

Design patterns

#

Not java patterns

lilac dagger
vagrant stratus
#

physical books? ew

lilac dagger
#

The feel of paper tho

#

It's unmatched

vagrant stratus
#

Too much $$$$

lilac dagger
#

Well digital ones are still very expensive

#

A bit less i think but still

vagrant stratus
#

Had a look at the old MC AI impl and it's simple enough ig
I should have books that go into other methods, but if anything I can yoink that & ignore the brain impl lol

lilac dagger
#

Yeah

#

Goal selectors and target selectors go brr

vagrant stratus
#

I could use the Brain impl, but I'm doing this in C++ and that's abstracted to hell and i don't wanna figure that mess out in C++ KEKW

lilac dagger
#

A few buffer overflows never hurt anyone

vagrant stratus
#

I mean ig the Brain could be massively simplified too if it's just kept to has/doesn't have memory ๐Ÿค”

lilac dagger
#

Yeah of course

#

Depends on how much functionality you need

#

There's activities, memories

#

Not sure it's that hard to come with your own version

vagrant stratus
#

Yea, not really that difficult really

#

If I have a book that goes into it, I'll use that as a base instead kekw

#

So far, no LMFAO

lilac dagger
#

i'm pretty sure you can find enough online if you want to save money

#

path finder

#

math to look at stuff

#

and then use those in your brain recreation to give activities to entities

vagrant stratus
#

we'll see what happens lmfao

#

if anything, ChatGPT's got my back LOL

umbral ridge
#

OpticFusionGPT

vagrant stratus
#

$1000/question

umbral ridge
#

XD

vagrant stratus
#

๐Ÿ˜Ž

umbral ridge
#

I'm so happy with this, always wanted to do it, but i was on shared hosting before, couldn't do it

#

im on vps with root access now

#

THE best part comes now, making an actual plugin lol

chrome beacon
#

There are plenty of existing ones

umbral ridge
#

no

#

fuck them

#

XD

#

I'm making my own, everything custom

#

Most of my plugins are much more customizable than existing ones

vagrant stratus
lilac dagger
#

making everything yourself means you don't have as much time to actually make sure all the features are top quality and bug free

umbral ridge
#

i take the time with my plugins because i love making them

lilac dagger
#

alright then ๐Ÿ˜„

umbral ridge
#

minecraft offers creativity which i like

#

XD

#

right now im thinking where i put my weighted random generator

#

because

lilac dagger
#

does it use a treemap and a range from 0-1 or 0 to 100?

umbral ridge
#

i dont remember wait

#

need to find it

vagrant stratus
umbral ridge
#

+1 free antimalware check

vagrant stratus
vagrant stratus
umbral ridge
#

XD

umbral ridge
lilac dagger
#

it has to be somewhere

vagrant stratus
# umbral ridge XD

well it's true lmfao
That can take ages if it's not a quick scan or check lol

#

It's usually not even a single plugin, but an entire server's worth

umbral ridge
#

idk where it is

#

nowhere

lilac dagger
#

๐Ÿ™

umbral ridge
#

no fishing

lilac dagger
#

search for 'fishing' in files ont he whole computer

#

might be misplaced somewhere

vagrant stratus
#

Not sure how I'd price the checks though ๐Ÿค”

umbral ridge
#

not found anywhere... might be on other hard drive

#

i shouldn't get too distracted...

vagrant stratus
#

I think I have a weightedrandom impl actually lol

umbral ridge
#

i might end up looking for it for an hour

vagrant stratus
#

gotta wait KEKW

umbral ridge
#

ok ill smoke in meanwhile

#

XD

vagrant stratus
#

Waiting on Everything to update it's DB

#

so much better than windows search KEKW

umbral ridge
#

i know linux, but im more used to windows

#

i do have a mc server and sql server on linux though

vagrant stratus
#

this lol

umbral ridge
#

XD

#

ai is everywhere now

lilac dagger
umbral ridge
#

ty

#

looks cool

lilac dagger
#

yup ๐Ÿ˜„

vagrant stratus
#

Mine's a bit more complex than that. Mine supports weighted lists and stuff lol

umbral ridge
#

very nice

lilac dagger
#

weighted list?

vagrant stratus
#

GIVE IT A SEC

lilac dagger
#

cleaned it up a bit ๐Ÿ˜„

thorn isle
#

this implementation won't work

lilac dagger
#

hmm, what's wrong?

quaint basin
#

PlayerToggleFlightEvent can be called on SURVIVAL mode?

thorn isle
#

you're using the weight as the key, meaning if you have two entries with the same weight, one will override the other

lilac dagger
#

oh

#

that does sound like an issue

#

just make a list t then

#

and then randomly select from the list one element

thorn isle
#

similarly, if you have two entries with weights 0.9 and 1.0, the actual chances to roll them will be 90% and 10%, where you would expect them to be the other way around

#

the way you make it work is you make the key cumulative

lilac dagger
#

i'll fix them up now ๐Ÿ˜„

thorn isle
#

for any given entry e with the weight w, you want there to be an exact span of w from its key to the previous key

#
double weightCumulative = 0.0;
for (var e : map.entrySet()) {
  treeMap.put(weightCumulative, e.getValue);
  weightCumulative += e.getKey() / totalWeight;
}
#

however, there is another issue, which is that the Map<Double, T> you're taking as a parameter will also cause two entries with the same weight to override one another

#

so you should switch it to Map<T, Double>

lilac dagger
#

okay, one moment ๐Ÿ˜„

quaint basin
#

How do I know if a player is pressing two jump keys as if they were going to fly in survival mode?

thorn isle
#

enable the flight capability for them and cancel the toggle fly event

#

note that this will be ass with high latency

quaint basin
thorn isle
#

you could try the PlayerInputEvent or Packet

#

but i don't know if the client reports spacebar inputs midair

#

worth a try i suppose

quaint basin
#

now on survival idk

umbral ridge
#

pretty cool XD

#

cool stuff

lilac dagger
#

okay, here you go ๐Ÿ˜„

#

i didn't test this either

quaint basin
umbral ridge
#

no templates i made it myself

thorn isle
#

i think you might've misread what i said a bit

quaint basin
#

ur vote site is famous?

thorn isle
#

the issue is with the math of how you're building the weights map

quaint basin
#

because vote systems are advantageous if they are famous

umbral ridge
#

im making this for myself

thorn isle
#

it doesn't result in the correct probabilities

umbral ridge
#

XD

quaint basin
umbral ridge
#

yes