#help-development

1 messages · Page 385 of 1

lost matrix
#

And i have to keep in mind that every machine has a maximum transfer rate which can not be exceeded.

#

Well i could simply let pullers not pull from other pullers and pushers not push into other pushers

eternal oxide
#

I guess it depends how you want to be handling stored energy...

#

If it's in a consumer do you want it able to be pulled and used elsewhere or is it then stuck

lost matrix
#

Fk you brought a point to my attention. I will have energy storage devices which contain energy.

#

But not actively consume/produce energy

lost matrix
kind hatch
eternal oxide
#

thats partly why I recommended only to pull.

lost matrix
eternal oxide
#

if a machien is full it does nothing

#

producers don;t push, just get pulled from

#

lots less logic

#

and it means batteries work simply

lost matrix
eternal oxide
#

shorting?

kind hatch
#

Could you give an example?

eternal oxide
#

oh right

lost matrix
eternal oxide
#

I'd get storage/distribution workgin before considering directions 🙂

#

a battery pulls if it has room

#

thast it

lost matrix
#

I wont introduce directions honestly

eternal oxide
#

no device can pull more than the source has until they are balanced in energy

#

so battery has 100% energy, machien is empty, the machien will pull until they are 50/50

lost matrix
#

Well then there is again the problem with fairness. Every puller needs to pull the same amount from
all energy stores

eternal oxide
#

no you just do one pull per tick

#

the network will load balance over time

lost matrix
#

Only if there is a surplus of energy

eternal oxide
#

each machien will pull until they are all equal in energy

#

there is one downside though

lost matrix
#

Well if a machine consumes 100e/tick and draws all the energy from
the network (50) then he simply consumes all the energy all the time and
no other machine ever gets to work

eternal oxide
#

with a push system, push only happens if there is energy to distribute so only ticks producers. With a pull any consumer which is not full will attempt to pull each tick

lost matrix
lost matrix
#

Ok but how do i handle batteries now...

eternal oxide
#

batteries are consumers and producers

lost matrix
#

So generators will push into batteries because they see them as consumers.
And batteries push into all consumers. I think this makes sense.

eternal oxide
#

yep

#

you could hasve batteries exclude other batteries to prevent a cycle

kind hatch
#

You could also view consumers as pullers if you go that direction.

#

Even if batteries were connected, wouldn't the result just be zero if they were put in a loop?

#

Assuming it's just the batteries in the loop

eternal oxide
#

if you have balancing then they would just distribute power between them until equal

lost matrix
eternal oxide
#

else one battery woudl push to another and then in it's tick it pushes back

#

yep

#

sounds a plan

lost matrix
#

Hm ok i think ill implement this. It also saves my problem with chunk loading as
unloaded nodes simply get not traversed. Lets hope the O(n) scaling is not a huge
problem

little horizon
charred blaze
#

do you guys also see this in your startup?

#

i clicked open file location and it claims to be discord

#

i dont have discord....

#

i use browser

lost matrix
#

I just realised that this is actually O(n^2) because every machine has to traverse the tree...

eternal oxide
#

Consumers should not be traversing

eternal oxide
#

?1.8

undone axleBOT
lost matrix
charred blaze
#

intresting. do you have discord installed?

#

i dont

#

okay wait

buoyant viper
charred blaze
buoyant viper
#

burning ur disk?

#

did a fresh windows install from cd?

charred blaze
#

i just switched from 32bit to 64

tawdry echo
#

u has written reason why it dont work

charred blaze
#

why is it white

buoyant viper
#

bc it doesnt exist (anymore)

#

i think

charred blaze
#

hmmm

#

it was slowing my startup when it wasnt even installed

magic wharf
#

PlayerInteractEntityEvent

tawdry echo
#

read docs lol

charred blaze
#

"Code"

#

in appdata

#

shall i delete it?

magic wharf
#

i think its from vscode?

charred blaze
#

maybe

paper venture
#

I'm working on mines and I need to store information about them. Mines are placed by PlayerInteractEvent. Firstly I wanted to store their location in player's PersistentDataContainer, but I found it quite inconvenient. Now I'm thinking about adding a static field to this event and store location of mines in this field. Is it a good solution?

tawdry echo
#

When i have already declared File and check if no is exist then when i save Resource i need to declare new file or this one still work and has content from saved resource?

paper venture
#

It would definitely work, but it seems to me it's not the best practice...

eternal oxide
tawdry echo
#

ty

lost matrix
#

Well if you interact with an entity you cant exactly have clicked a block, can you.

#

PlayerInteractEvent has getClickedBlock

tender shard
#

ugh what's wrong with my build.gradle

quiet ice
#

welcome to gradle hell

#

Either way, that is a new error

lost matrix
tender shard
#

i dont think so

lost matrix
#

But if its a default method then wtf

#

Yeah according to gradle its a standard task

#

Well then you broke your gradle again...

tender shard
#

it's freshly generetad with "gradle init", i just added the spigot repo and dependnexy

onyx fjord
#

What gradle version is it

lost matrix
#

@eternal oxide You still around? Im thinking about an implementation problem for STORAGE types and their max transmission rate.
Every machine has a max transmission/tick so if a battery recieves its max transmission rate in one tick then it wont be able to push out
any energy afterwards...

tender shard
onyx fjord
#

I updated successfully so no idea

#

What if you run it manually outside intellij

lost matrix
#

Eg a rate of 100/t and it receives 20, 30 and 50 from three producers. Then its the batteries turn but it cant push out energy
as the max transmission has been reached

sullen marlin
#

Why are you using gradle

eternal oxide
tender shard
onyx fjord
#

All the weird bugs that I encountered when using gradle were ij fault

lost matrix
#

No i cant do that. Receivers need to be limited as well.

onyx fjord
#

For example I couldn't setup paperweight in intellij but I could outside of it

eternal oxide
#

then it needs two limits

#

send and receive

tender shard
onyx fjord
#

That's not gradle 8

rough drift
#

Capturing all logs

lost matrix
#

Yeah that was my initial thought as well... i guess its needed

tender shard
#

I have tried 8.0.1 and 7.5.1

onyx fjord
#

Perhaps delete .gradle

eternal oxide
#

so basically you have two types producer and consumer with batteries implementing both

tender shard
#

usin 8.0.1 has the same proble,

eternal oxide
#

each type implementing a transmission limit

tender shard
quiet ice
#

I doubt it does anything, but better be safe than sorry

onyx fjord
#

Oh yea show entire gradle build

#

I think I know what's nissing

#

Missing

tender shard
#

weird that it's not mentioned in the spigot docs

quiet ice
#

it should be present on any java applications

onyx fjord
#

Java-library?

#

How's that different than java plugin

onyx fjord
#

But that could be because I use Minecraft plugin for intellij

quiet ice
#

It depends on the template you use

#

mfnalex used the most minimalistic template out there - which is not meant for java development

quiet ice
onyx fjord
#

The one I mentioned 100% isn't

#

Maybe it's an alias or something

quiet ice
#

Ah no, java-library is a superset of java

#

Hence java is technically inferior to java-library

#

The key difference between the standard Java plugin and the Java Library plugin is that the latter introduces the concept of an API exposed to consumers. A library is a Java component meant to be consumed by other components. It’s a very common use case in multi-project builds, but also as soon as you have external dependencies.

tender shard
#

i got nothing to do

remote swallow
#

smh

lost matrix
hushed spindle
#

is there anything that spigot does differently from forks like paper or purpur when it comes to comparing items

eternal oxide
#

the question should be the other way around

#

Spigot is the base so it's, do they do things differently

hushed spindle
#

i got a list of items and im trying to check if it contains a certain item, if i do .toString() on both the list item and that certain item i see that they are both identical, yet if List#contains() is used on spigot it will be false

#

and on paper/purpur its true

#

i know, but it feels like it's working the wrong way on spigot

eternal oxide
#

toString is not an instance comparison

hushed spindle
#

i know but why does it work on paper/purpur

#

do they compare with hashcodes while spigot compares with instances or smtn

eternal oxide
#

the #contains will only be true if that specific item is in the Collection

#

new ItemStack(Material.STICK) != new ItemStack(Material.STICK)

hushed spindle
#

so spigot doesnt use hashcode for comparison then

eternal oxide
#

everythign about them is identical btu they are not the same ItemStack

hushed spindle
#

i understand how that works but why does it work like that

eternal oxide
#

because oop

hushed spindle
#

no i mean why was that choice made

eternal oxide
#

because that is how all oop works

hushed spindle
#

it seems more sensible to do it with hashcode

eternal oxide
#

a hash code would only compare data not the item itself

hushed spindle
#

it seems more sensible for spigot to compare items using their properties and not their instances

#

yeah thats the point

eternal oxide
#

Why?

mortal hare
#

i hate how much clutter does the default file explorer have

#

OldExplorerPatcher ftw

quiet ice
#

There are 2^32 possible hashcode values, but almost infinite amounts of possible object configurations

eternal oxide
#

you have ItemStack.isSimilar for data comparisons

quiet ice
#

Using hashcode for comparision would be a SERIOUS security risk

lost matrix
hushed spindle
#

how is it a security risk

quiet ice
#

Password comparision could easily be brute-forced

eternal oxide
#

my example before would mean those two items would be the same

mortal hare
#

because it cant really tell that its really equal

#

since hashcodes can collide

lost matrix
hushed spindle
#

well yeah but does this not make more sense for itemstacks specifically

mortal hare
#

two distinctive objects can return the same hashcode

quiet ice
#

2^32 is an incredibly small number for today's computers

eternal oxide
#

a hash of two ItemStacks could give the same value when they are actually different items

quiet ice
#

It kinda is like comparing the identity hashcode (I call it the system hashcode, but that is the wrong name :P) but that isn't truely correct

#

i.e. if you allocate more than 2^32 objects you are guaranteed to have a colliding identity hashcode somewhere, but no distinct objects will == each other

hushed spindle
#

im just having trouble understanding why its not done with itemstacks, if you have a custom item and someone somehow makes an item with identical properties, allowing their hashcode to match, why is that a bad thing?

quiet ice
#

There's .equals for that anyways

hushed spindle
#

players arent capable of that anyway, obviously depending on how you define your custom items

eternal oxide
#

if I have two apples in my hand. they can LOOK identical btu they are not the same apple

mortal hare
#

but also for random objects too

quiet ice
hushed spindle
#

so using the same comparison you could have an apple and a banana and they could still have the same hashcode?

lost matrix
hushed spindle
#

ah i see

mortal hare
#

hashcode is used primarily for maps, which guarantee amortized O(1) access to an object using .get() method

#

but its not constant O(1)

#

just because the hashcodes could collide (if it collides, it uses linear search to find the item)

hushed spindle
#

so if i want to use List#contains to check for an identical item i would have to use something like list.stream().anyMatch(equals/isSimilar)?

lost matrix
#

Well its used for hash buckets which are not exclusive to Maps. But yeah those are mainly used to implement most Maps.

quiet ice
#

List#contains uses Object#equals

lost matrix
mortal hare
#

i think you're fine with contains()

quiet ice
#

If you want to get the same identity you'd need a for loop or something and use ==

mortal hare
#

just dont use == operator in this case if you want to find similar items

hushed spindle
#

what method aside from isSimilar can be used to compare an items properties

quiet ice
#

equals.

lost matrix
quiet ice
#

For comparing two objects it's always equals.

eternal oxide
#

equals compares all properties AND stack size

#

isSimilar compares only properties

hushed spindle
#

this list is basically a recipe's ingredients and i want to check if the crafting grid contains all these ingredients (shapeless recipes arent compatible with exact meta requirements)

#

i dont care for item instances

#

only the properties

quiet ice
#

then isSimilar

lost matrix
#

Then you need to use isSimilar

hushed spindle
#

i guess i could check for amounts after the fact

quiet ice
#

But be aware that you must be aware of stack sizes that are not "ideal" in that case

mortal hare
#

yea ^^ using .equals() you would check stack size too, so use isSimilar to detect if the itemstack is present regardless of the quantity

hushed spindle
#

ill try it and see if it works

#

thanks guys, i learned a thing :)

mortal hare
#

is it normal for intellij to index my project everytime i open it

#

its slow af (in my terms :D)

#

it takes at least 2-3 minutes

mortal hare
#

Thank god I upgraded my HDD to SSD

#

now i need to upgrade my cpu from i3 to at least i5 and i will be good to go

#

but it works for now

half bane
#

How can i use &<color code> instead of ChatColor.<color name> in messages?

gleaming lake
#

Is it possible to adjust the player movement and possibly jump height of the player, via a code?

I want a player to jump a maximum of 6 to 7b jumps in 0.55s before the floor is removed, however this is barely possible on my server, any solutions?

lost matrix
lost matrix
half bane
#

ok thanks

gleaming lake
#

It's java 8

lost matrix
undone axleBOT
gleaming lake
#

with viaversion support

lost matrix
#

I dont think it is. Try to explain it in more detail.

half bane
#

uhhh what happened to my maven actions?

#

(Intelij IDEA)

#

im just probably stupid

gleaming lake
onyx fjord
#

what channel does forge use to reveal itself?

dire marsh
opal juniper
bold cosmos
#

How to fix this Teams bug? I have nametag visibility set to NEVER, but if I'm on a different team I can see the nametags of other people in that NEVER team still

mortal hare
bold cosmos
#

it's only teams created by spigot with the issue

mortal hare
#

maybe you have other plugins

#

that modify the scoreboard?

#

scoreboards created via bukkit api are shared among the plugins

dense falcon
#
            Player players = (Player) Bukkit.getOnlinePlayers();
            PotionEffect effectEyes = new PotionEffect(PotionEffectType.WEAKNESS, 10);
            
            players.addPotionEffect(new PotionEffect(effectEyes));
``` I would like to add an effect to all players, this effect can not let them see the map around them and I do not remember :(.
bold cosmos
#

It seems like the bug was I did getNewScoreboard instead of getMainScoreboard and that was causing the issue?

dense falcon
lost matrix
#

lol

mortal hare
#

PotionEffectType.BLINDNESS

#

since 1.18 or 1.19 i dont remember there's also another blinding effect

#

that pulsates

dense falcon
#

And how I set it with no end?

mortal hare
#

specifically made for the warden

dense falcon
#

I mean infinite duration.

mortal hare
#

use Integer.MAX_VALUE

#

instead of 10

remote swallow
dense falcon
#

Ah ok and what's the last argument, I do not understand it : amplifier 🤔 .

mortal hare
#

im surprised that bukkit api doesnt have constructor for infinite potion effect, and we should use hacky ways like Integer.MAX_VALUE to set the potion effects lmao

mortal hare
dense falcon
#

How can I "browse" Bukkit.getOnlinePlayers();?

opal juniper
#

loop through it?

mortal hare
#
for (Player player : Bukkit.getOnlinePlayers()) {

}
#

?learnjava

undone axleBOT
dense falcon
#

I do not kow what I did but it was not working but ok...

hazy parrot
#

You casted list of players to player

#

Of course it won't work

mortal hare
#

why we call WORD 32 bits nowadays

#

when we have mostly 64 bit computers today

#

on windows Double word is 32 bits

#

and QWORD is 64 bit

quiet ice
#

microsoft being microsoft

mortal hare
#

In the terms WORD is the big as the maximum size of bits of cpu architecture can process at the same time

quiet ice
#

And windows being very old - large parts were written in the 16 bit era

mortal hare
#

iirc

#

32bit should be deprecated by now

#

tbh

#

i havent seen any consumer pc which still uses 32 bit architecture today

#

apart from embedded systems

quiet ice
#

I believe Win 11 no longer supports 32 bit

mortal hare
#

but it still suports 32bit apps

#

it still haves WoW64 in it

quiet ice
#

Yeah for good reason

#

Plus I mean translation shouldn't be too hard.

mortal hare
#

32bit support for me personally should be a separate module from windows

#

that you can install as an update

#

like with other optional features

quiet ice
#

Some windows internals are probably still 32 bit

mortal hare
#

Windows really screams for refactoring

quiet ice
#

Microsoft never removes old features - they just tape over it

mortal hare
#

and i cant even imagine how much spaghetti code there is there

lyric meteor
#

every game released before 2012 pretty much was 32 bit so idk haha

mortal hare
#

yea, but it should be a separate module

#

like C++ runtime libraries

#

you can uninstall them

#

the fact that windows still had 16bit app support in windows 10 32 bit version bogs me down

quiet ice
#

Why though? There are pretty much no operating systems that don't support running 32 bit applications

#

Remember that linux still supports devices from 20 years ago.

mortal hare
#

maybe you're right

quiet ice
#

Windows removing 32 bit support would be the most windows thing ever

mortal hare
#

To make windows good again, they need revamp NTFS and refactor some old shell code

quiet ice
#

oh, they need to do MUCH more than that

lyric meteor
#

kind of the same reason that GPU drivers still always include DX9

quiet ice
#

They have decades of technical debt

#

I'm speaking of almost half a century there

dense falcon
#

There is a way to do a waiting?

remote swallow
#

Wdym

#

Like a delay?

quiet ice
tawny remnant
#

?upload

#

?paste

undone axleBOT
tawny remnant
dense falcon
quiet ice
#

?scheduling

undone axleBOT
quiet ice
#

I'll never get behind some of the command names

mortal hare
#

you can simply use == because you're using enum statically, thus the same object will be returned

tawny remnant
dense falcon
quiet ice
mortal hare
#

why not

quiet ice
#

While of course it probably won't break anytime soon it is likely that your IDE will complain sometime soon

mortal hare
#

why

quiet ice
#

Material refractor

#

It won't be an enum for all too long

mortal hare
#

it would anyways break the api

#

Registries prob would be used

#

and prob materials would be still supported as a deprecated feature

quiet ice
#

Nah, they'll overwrite the class

#

ABI compat should be preserved - mostly.

mortal hare
#

ah, yes, Microsoft tape everything tactic

quiet ice
#

Well the old API is no longer available, so not really

remote swallow
#

Theres a pr open for it atm

quiet ice
#

Yeah, if only I had access to PRs so I had some knowledge of what is going on.

#

So right now I'm just guessing based on my own experience with refractoring enums into regestries via ASM and the release announcements that warn of the change

#

The worst thing about the change will most likely be entirely compile-time with switch-on-enums not being a thing.
If they don't wish to do ASM hackery, EnumSet and EnumMap will also not be available.

#

However if one is really smart the entire change can be done in a way that the only thing that really breaks is reflection.

#

(And with that ObjectOutputStream & ObjectInputStream)

mortal hare
#

does any of you know why my void world generator-settings do not work on the server

#
generator-settings={"layers"\:[{"block"\:"minecraft\:air","height"\:1}],"biome"\:"minecraft\:the_void"}
#

it generates normal world for some reason

#

fixed it

#

apparently minecraft:single_biome_surface (buffet mode) does not work with the generator-settings (at least with my settings)

dense falcon
#
    private void GiveTiem(Player plr) {
        plr.setExp(15);
        Bukkit.getScheduler().runTaskTimer(plugin, new BukkitRunnable() {
            @Override
            public void run() {
                if (plr.getExp() == 0) {
                    cancel();
                } else {
                    plr.setExp(plr.getExp() - 1);
                }
            }
        }, 0, 20);
    }
``` Just I am not sure I setExp and getExp work like this, is it good or no? I want to do a timer with levels of the player, 15s.
mortal hare
#

get the xp level of the player

#

multiply it by 20

#

add it to period field of runTaskTimer()

#

wait no

#

lol

tawdry echo
#

player can quit while run this, add check

dense falcon
#

Ah bruh I can use setLevel and getLevel?

#
    private void GiveTiem(Player plr) {
        plr.setLevel(15);
        Bukkit.getScheduler().runTaskTimer(plugin, new BukkitRunnable() {
            @Override
            public void run() {
                if (plr.getLevel() == 0) {
                    cancel();
                } else {
                    plr.setLevel(plr.getLevel() - 1);
                }
            }
        }, 0, 20);
    }
``` this will be better no? 🤔
quiet ice
#

yeah

dense falcon
#

Alright.

#

Thank you for your help :).

onyx fjord
#

can i somehow add just bungee chat api to my gradle project?

charred blaze
#

what does packet id 154 stands for in minecraft protocol?

remote swallow
#

Comes with spigot api iirc, or spigot buildtools

remote swallow
remote swallow
charred blaze
remote swallow
onyx fjord
charred blaze
#

there are so many things

charred blaze
onyx fjord
#

im pretty sure ids are different for different versions

charred blaze
#

...

onyx fjord
#

usually it works tho

charred blaze
dense falcon
quiet ice
#

First you need to know whether your packet is clientbound or serverbound @charred blaze

charred blaze
#

if you mean that

quiet ice
#

then it's clientbound

quiet ice
#

Are you sure that it's 154?

#

Because that is an awfully high number for any packet (largest clientbound packet is 0x6A - which is 106 - at the moment).
Also, what is the protocol version?

charred blaze
#

756

#

wait

#

maybe its 754

#

intelij is lagging

#

yeah its 754

quiet ice
#

Yeah then you are improperly getting the packet id

#

that is no a valid packet

#

Unless you are using modded minecraft, at which point I can only say: GL have fun

charred blaze
#

am i getting packetID wrongly?

quiet ice
#

Are you parsing packets at all?

#

Are you accidentally using a compressed connections when you shouldn't?

charred blaze
#

anyway

quiet ice
#

Yeah your code is completely wrong

charred blaze
#

whats wrong with my code?

charred blaze
quiet ice
#

You are not parsing packets

#

And you are not supporting compression

charred blaze
#

how do i

#

why isnt there any tutorial for this

quiet ice
#

Also, from where did you get that code?

charred blaze
#

chatGPT

#

xd

quiet ice
#

Oh well that explains it

#

That code has to be at least 10 years old

#

If not 12

charred blaze
#

letme try askin gpt about compression

#

what should i ask?

quiet ice
#

Nah, it's entirely wrong

dense falcon
#
        Bukkit.getScheduler().runTaskTimer(plugin, new BukkitRunnable() {
            @Override
            public void run() {
                plr.setLevel(plr.getLevel() - 1);
                
                if (plr.getLevel() == 0) {
                    cancel();
                }
            }
        }, 0, 20);
``` why I have an error about this sheduler?
quiet ice
#

That is the protocol for minecraft beta

#

And trust me I know that since I attempted to write a minecraft server on that version

dense falcon
hushed spindle
#

might complain about the numbers being ints instead of longs but i dont think that will cause a compile error

hushed spindle
#

you cant call methods on a null object

quiet ice
#

Noone did it yet (outside of truecraft - but that's beta 1.7) and wanted to have a fun learning experience

dense falcon
#

Wait it's not the good one 🤣.

#
                    for (int i = 1; i < 4; i++) {
                        String config_p = (String) plugin.getConfig().get("roles.loup-"+i);
                        if (!Objects.equals(config_p, "None")) {
                            Player loup_p = Bukkit.getPlayer(config_p);
                            if (loup_p != null) { GiveTiem(loup_p); }
                        }
                    }
#

This is teh current code.

#

For call the function with the getScheduler.

hushed spindle
#

good god

charred blaze
tawdry echo
charred blaze
#

or teach me how to read from that wiki

quiet ice
charred blaze
#

okay never mind :(

#

how do i compress packet?

#

wiki.gv does not provides ANY of sample code for anything

quiet ice
#

I never worked with compression, so I can't give insight on that one

dense falcon
# tawdry echo first check if player lvl equal 0 and next minus 1

https://hastebin.com/share/kicojovoti.css ```java
private void GiveTime(Player plr) {
plr.setLevel(15);
Bukkit.getScheduler().runTaskTimer(plugin, new BukkitRunnable() {
@Override
public void run() {
if (plr.getLevel() > 0) {
plr.setLevel(plr.getLevel() - 1);
}

            if (plr.getLevel() == 0) {
                cancel();
            }
        }
    },0,20);
}

```java
                    for (int i = 1; i < 4; i++) {
                        String config_p = (String) plugin.getConfig().get("roles.loup-"+i);
                        if (!Objects.equals(config_p, "None") && config_p != null) {
                            Player loup_p = Bukkit.getPlayer(config_p);
                            if (loup_p != null) { GiveTime(loup_p); }
                        }
                    }
                    return true;
hushed spindle
#

you code in an incredibly strange way

dense falcon
tawdry echo
chrome beacon
dense falcon
chrome beacon
#

?conventions

dense falcon
#

Ok and?

hushed spindle
# dense falcon ?

why do you cast config.get() to string instead of just using config.getString()?
why do you do Objects.equals() instead of just string.equals(otherstring), and why is your string null check after the equals check

#

makes no sense

quaint mantle
#

minecraft source code looks scary.

dense falcon
#

It does not matter lol 🤣.

#

And because maybe getString is for String value?

tawdry echo
#

work harder, not smarter

dense falcon
#

loup: None != loup: "None"

quiet ice
#

@charred blaze Yeah looks like my old projects have not stood the test of time

dense falcon
#

@hushed spindle

hushed spindle
#

it does matter, it makes your code more readable

#

this is a mess

#

what do you want

dense falcon
tawdry echo
#

lol

hushed spindle
#

yeah if you want people to help you thats a nice attitude to have

#

i understand your code and thats why i understand it looks like shit

#

good luck

dense falcon
#

So you as soon as you see a complicated code, you will not try maybe lol?

hushed spindle
#

complicated he says

#

very complicated code yes yes

#

i am stupid wahh baby i dont know how to read

quaint mantle
dense falcon
hazy parrot
#

Unless you have some special char

mortal hare
#

why doesnt bukkit implementations allow uppercase commands?

#

is there any limit defined in the nms for that?

quaint mantle
#

so, what is the problem?

hazy parrot
quaint mantle
#

that is not css.

mortal hare
#

i mean you're prob right

#

it would be annoying to have case sensitive commands

hazy parrot
#

Yeah

dense falcon
#

It's auto.

quaint mantle
#

wait

#

(task) -> { task.cancel(); } ?

dense falcon
quaint mantle
#

doesn't the lambda have a task argument?

tawdry echo
#

u have got it, its not hard

tawdry echo
#

BukkitRunnable#runTaskTime(...)

dense falcon
hushed spindle
#

after a google search the main issue people seem to have is that they're using a deprecated method

#

does the method you're using get a strikethrough line

quaint mantle
#
  // code is written here.
});``` is the code.
chrome beacon
#

Without the BukkitRunnable there

dense falcon
#

Without.

#

And how I set up it every seconds? 🤔

chrome beacon
#

Either you use a BukkitRunanble with the run method on it or you use the scheduler with a normal runnable (or lambda)

dense falcon
#

I mean, it's auto?

tawdry echo
#

MainTestTask is class with extends BukkitRunnable

quaint mantle
#

just write lambda without the BukkitRunnable.

hushed spindle
#

runtasktimer requires two long arguments right, delay and period

hazy parrot
slate mortar
#

id say just use Bukkit.getScheduler().runTaskTimer(() -> { //your code }, 0L, 20L); for every seconds

#

fml

quaint mantle
slate mortar
#

uh

#

oh

hushed spindle
#

i dont think you need to do that

#

you can just call cancel() right

slate mortar
#

lol

tawdry echo
chrome beacon
hushed spindle
#

ah

slate mortar
#

i didnt use these normal methods for a long time since my lib exists lol

dense falcon
#

Cannot resolve method 'runTaskTimer(<lambda expression>, long, long)'

slate mortar
#

ye

#

sec

quaint mantle
#

you need the plugin

#

get an instance of your plugin.

slate mortar
#
Bukkit.getScheduler().runTaskTimer(yourPluginInstance, () -> {
//your code
}, 0L, 20L);
dense falcon
#

And yeah.

#

Thanks.

quaint mantle
#

and pass it as the first argument.

slate mortar
#

i fucked up

dense falcon
#

Yes.

#

Ik.

#

Thanks.

hazy parrot
chrome beacon
hazy parrot
#

Talking about this use case

quaint mantle
#

is there an easy api like bukkit for writing mods?

hushed spindle
#

what you mean like forge or fabric?

quaint mantle
#

the minecraft source code is kind of scary.

#

yeah i am trying to make fabric mods.

slate mortar
quaint mantle
#

that is what i am currently on.

slate mortar
#

way easier in terms of compatibility with other mods

quaint mantle
#

i dont know what to do lol

#

where to start lmao.

slate mortar
#

and also more lightweight than forge

slate mortar
quaint mantle
#

that is where i started, and i can do a lot of stuff but not everything it seems.

#

not sure if there is a documentation that covers all of minecraft's codebase.

slate mortar
#

ofc not

dense falcon
slate mortar
#

that'd be way too much

dense falcon
#

I did not use fabric but forge is very... strange for older versions.

slate mortar
#

minecrafts codebase is way too big to be covered, also why would you need to cover everything

brave sparrow
#

Minecraft’s codebase is also mostly intentionally undocumented for third party developers, modding isn’t officially supported

quaint mantle
#

i know, mojang allows it but does not support it.

slate mortar
#

i mean... what do you need mojang documentation for

#

yarn covers a lot of documentation by now

quaint mantle
#

yarn?

slate mortar
#

the fabric mappings

#

aka the stuff that makes it not look like ass

#

by default stuff is obfuscated, aka fields and stuff are called field_ir93i932f and similar

#

good luck working with that lol

dense falcon
#

I do not understand one thing as well: we can not share the code we see...

#

When are coding mods.

slate mortar
#

you cannot publish mojang code, yes

dense falcon
#

Because it's copyrighted.

slate mortar
#

thats the reason yarn exists

dense falcon
slate mortar
#

the yarn mappings are different from mojang, you can public mods using yarn without issues

brave sparrow
slate mortar
brave sparrow
#

Any way you would “show” it to someone online is a type of publishing

onyx fjord
#

mojang half assess being mod friendly

quaint mantle
#

so, how do i create a mod that uploads the world folder, to a cloud platform, let's say.

#

i know how to upload stuff to cloud platforms.

slate mortar
#

i won't cover any particular code here

#

just read the wiki

onyx fjord
#

compress and then send using some file sharing protocol

#

ftp, sftp

#

webdav

quaint mantle
#

i am just trying to figure how to get the world folder then register a command that does it all in an async thread.

chrome beacon
slate mortar
#

the folder is easy

File file = new File("./saves/yourWorldFolder/"); assuming you are using the default directory
chrome beacon
#

?

quaint mantle
#

but only upload chunks that have been modified.

slate mortar
#

ugh

brave sparrow
#

Only chunks that have been modified are going to be saved on the file system anyway

quaint mantle
#

so i only save the changes, not necessarily the entire world folder.

chrome beacon
#

You can diff the old and new file

quaint mantle
#

so i could do rollbacks and stuff.

brave sparrow
#

The world is procedurally generated and saved as you explore it

quaint mantle
#

so i would have to add like an event handler in case a block is placed or broken.

slate mortar
#

i mean, you could check for every file in the folder if it's edit date is new

quaint mantle
#

and if it is, that chunk is added to the backup queue.

brave sparrow
#

If you’re trying to do rollbacks you’re going to need to track when the types of changes you want to roll back occur and store them, the game won’t do that for you

quaint mantle
#

just gonna have something like, make backups every 5 mins.

#

rollback changes made 45 mins ago.

#

just rerolls entire minecraft chunks.

#

that were modified.

#

much like git.

#

making a mod vs. making a plugin are so different.

brave sparrow
#

do while will always execute once because it checks the condition after each execution, so if you try to read a byte from an empty stream it will throw the exception

slate mortar
#

i believe all the stream reader methods do

brave sparrow
slate mortar
#

well, fabric isnt an api by itself either

quaint mantle
#

i first thought i would just look in the world folder

#

but no

#

they not saved in individual chunk files

#

they are saved in region files of 32*32 chunks.

slate mortar
#

fabric does have an api, but it's entirely optional when creating fabric mods

brave sparrow
#

Yeah I wouldn’t know, I don’t use any of the third party modding tools when I’m doing client stuff for myself

slate mortar
#

main issue with the api beeing that people are too stupid to include the api-modules into their mods, so users constantly complain about having to download the api as well

#

while the api page even states that you should include the modules you need

quaint mantle
#

fabric api does not seem to have a lot of events.

slate mortar
#

yep

#

fabric event module sucks

mortal hare
#

is downloading automatically jars from the private repos against spigot tos?

#

im just curious

#

it should be right?

quaint mantle
#

depends on the repo.

chrome beacon
#

wdym?

#

at runtime?

mortal hare
#

autoupdating at runtime

#

kinda

slate mortar
#

why would it lol

remote swallow
#

Not against it but annoya admins

quaint mantle
#

is there an event for a block being broken or placed in the minecraft world?

slate mortar
#

uhh

chrome beacon
#

BlockPlace and Break Event

slate mortar
#

in fabric or spigot now

brave sparrow
quaint mantle
#

in fabric.

slate mortar
#

i dont think so

charred blaze
quaint mantle
#

i probably won't do modding.

#

anytime soon.

fierce whale
#

How can I use Bukkit API plugin with BungeeCord?

slate mortar
brave sparrow
# charred blaze and itll fix?

The exception occurs when you reach the end of the stream and you’re still expecting data to be there. You need to handle the occurrence of that exception or your program will break when that situation happens

quaint mantle
#

how do i learn it?

brave sparrow
mortal hare
#

lets say i have shadeable plugin api which you can access by using it as a plugin or shading it inside your project

slate mortar
#

mostly by reading the wiki, what exactly depends on what you want to learn

fierce whale
#

Is it possible to use Spigot plugin with BungeeCord?

mortal hare
#

i wonder if it possible to dynamically "shade" classes if the plugin does not exist inside the plugins directory

#

as a fallback

#

or smth like that

brave sparrow
mortal hare
#

loading plugin, would be an overkill

charred blaze
mortal hare
#

and it would be annoying but loading specific shaded classes would be good, since no plugin instance would be created

brave sparrow
fierce whale
#

Well.. How can I learn about BungeeCord Plugin?
There are not much informations. 😦

slate mortar
brave sparrow
fierce whale
#

OH thanks 🙂

hazy parrot
#

Download jar, and use classloader to load those classes in runtime if necceserry

fierce whale
#

Is there a way to use MythicMobs in BungeeCord?

brave sparrow
#

No

#

BungeeCord is a proxy to connect users to game servers, it’s not the game server

#

It doesn’t have any of the gameplay functionality on it

hazy parrot
charred blaze
brave sparrow
#

You now need to handle that exception and decide what your program is going to do when that happens

charred blaze
#

i cant understand what are you saying exactly

tardy delta
#

whats that

charred blaze
#

im trying to connect to a minecraft server with protocol

chrome beacon
#

How to read a var int from a packet

brave sparrow
#

I’m not going to write your code for you, no

mortal hare
#

i wonder if i should attempt to retrieve Reflection constructor to class field through a static block

#

or through a constructor

#

which option is better guys/gals?

rapid aspen
#

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

why it is not setting the sneak?
i already check, the TrollUtils.shift.contains(name) is true and when i'm sneaking it runs the code, i already try cancelling the event, setting the players walking speed, but nothing works

brave sparrow
#

Because the client is constantly trying to make itself sneak and knows that the user is holding sneak, so it’s acting like it

#

Presumably

rapid aspen
#

there is any way to like increase the player's speed when sneaking and when is in the edge of a block he can fall?

brave sparrow
#

The client isn’t going to walk off the edge of a block if it thinks it’s sneaking

#

He can make them go faster but not walk off the edge of a block without teleporting them when he assumes they should which is going to seem jank

rapid aspen
#

and if i create a mod? i can put a player's tag in the plugin and check in the mod right?

brave sparrow
#

They don’t necessarily need to

#

The server can run normal spigot

#

The client can run the mod

rapid aspen
#

i don't have much experience in mod's but i'll try

brave sparrow
#

if ((xCoord != 0 && zCoord != 0) && (xCoord % 30 == 0 || zCoord % 30 == 0))

#

For one thing worldedit can’t make an infinite wall

#

You’d have to keep running more worldedit

#

World generation is going to be a better bet for performance though

#

That’s not an infinite wall

#

Lol

#

If you’re making this setup one time then yeah use worldedit

#

If it needs to happen dynamically then do world generation

paper viper
#

protocollib

#

why

#

lmao

#

why make your life harder

#

They might not be hard, but they are a bitch to

#

a) setup (debof)

#

b) handle (reflection)

tawny remnant
#

How do i make an Axe that cuts down a whole tree?

tardy delta
#

loops my friend

chrome beacon
#

BlockBreakEvent*

paper viper
#

How else are you going to handle different NMS versions...

chrome beacon
#

Multi-module uwu

paper viper
#

that still requires reflection, no?

#

How does it work

#

Cause currently im using multimodule and i still have to use reflection to initiate a class by appending the version to the package

#

I have something like

v1_19_R1 module -> io.github.pulsebeat02.example.v1_19_R1.NMSClass
v1_18_R2 module -> io.github.pulsebeat02.example.v1_18_R2.NMSClass

paper viper
#

and i would append to append the version name to io.github.pulsebeat02.example and then add NMSClass to get the class

quiet ice
paper viper
#

and use some sorta abstraction obviously

brave sparrow
paper viper
#

Oh nvm we pretty much do the exact same thing

quiet ice
brave sparrow
#

Very very light but I would say it still counts

quiet ice
#

I mean yeah it is reflection for getting the version - but you could do it any other way

paper viper
#

Either way, I would still use protocollib when possible 🤷‍♂️

quiet ice
#

You could use the bukkit method but that leads to unexpected behaviour with some stupid fork being stupid

brave sparrow
quiet ice
#

I understood it as using reflection to initialize the module.

#

Which is not needed

paper viper
#

i always use a pattern from the package name

brave sparrow
quiet ice
#

There is also that one stupid programmer that wants to have "SuperCoolVersion" in the top right corner or whatever cursed stuff they want

#

*top left

paper viper
#

Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3]; this is what i use

quiet ice
#

Yeah until you have someone using that software. And those people tend to be rather entitled

paper viper
#

Though I'm wondering, don't you guys get these weird IDE errors when you import NMS modules? (like with the NMS libraries itself)

quiet ice
#

As long as each module is it's own project - no

paper viper
#

Errors relating to package conflicts

#

Oh, so they aren't actually modules?

#

I see

quiet ice
#

And of course the classes need to be uniquely named

#

Otherwise you need to reference them by their fully qualified name

paper viper
#

I think i had to use reflection because i was dealing with submodules

#

and i couldnt import the NMS modules and instead made another "final" module to package everything together

#

but in the main module i would use reflection to get the specific adapter

quiet ice
#

I'm takling about the wrapper implementations having unique names.

#

Unless you are talking about some witchcraft I am not familiar with

paper viper
quiet ice
#

IJ moment.

paper viper
#

I'm not sure why then

#

same directory as the main module right?

quiet ice
#

ow, that might cause issues

paper viper
#

using gradle shouldn't change anything

quiet ice
#

You should use a unique package for each module otherwise you are going to get issues

paper viper
#

Yeah I was

tardy delta
#

does each submodule has its own pom.xml?

paper viper
#

Yeah that's what I did

#

But with gradle

#

Main depends on api module, and lib depends on main + nms modules

#

If I try to depend on the nms modules from the main module i get the annoying compile errors

brave sparrow
#

What are the annoying compile errors you’re getting

#

Also just to satisfy my intense curiosity

#

Why

paper viper
#

im too lazy to change it into multiple classes lmfao

brave sparrow
#

Change what into multiple classes

quiet ice
#

Well no, but yes.

paper viper
quiet ice
#

@Contract and stuff doesn't work regardless

brave sparrow
quiet ice
#

@NotNull and @Nullable doesn't work by default, but you can configure so it works

quiet ice
#

The only issue is that Eclipse's null inference is a bit (read: very) pedantic.

brave sparrow
#

I’m asking why you broke it up into field definitions and then immediately underneath assigning them values

#

Not line 137, line 96

paper viper
#

that will just assign them right before constructor

#

i mean

brave sparrow
#

Yes

#

So my question is

#

Why not just

quiet ice
#

I.e. a String constant that isn't marked as @NotNull will be considered to be of undefined nullability even though it is very obvious that it isn't null.

brave sparrow
#

private final Map<K, V> mapField = new ConcurrentHashMap<K, V>();

paper viper
#

I'm weird in that i like to make my own blocks, look at my static blocks lmfao

rough basin
#

I'm having an issue with an ArrayList<> not appending properly,
when I add it, all the other values that existed are replaced with the value I just added. why this damn thing happen?

brave sparrow
#

Well the static block is at least doing a try catch so that has to be there

paper viper
#

nah in general

undone axleBOT
paper viper
#

i usually initialize my immutable variables and stuff without try/catch or other functions

#

in static blocks

brave sparrow
#

It’s so oddly verbose

paper viper
#

no particular reason, its easier to stare at less for my eyes side to side

brave sparrow
#

Well that’s not a particularly satisfying answer but at least now I know

paper viper
#

and also yes im aware a lot of people think it looks like shit too lmfao

#

lots of people flame me for it

#

i had considered but im going to be honest i was too lazy to implement it

remote swallow
#

quite a few exist out there

mortal hare
#

already using submodules

#

but with gradle

#

they're very cool

#

you can have multiple gradle or maven projects within the same window

eternal night
#

I mean, you have static jsondata

tardy delta
#

catching a npe kek

eternal night
#

neither of the fields in BlockWeapons$Data should be static

tardy delta
#

i love them when they are internal

quiet ice
rough basin
tardy delta
#

i believe ij has a hacky way to allow it too

eternal night
#

the Data class itself can be static/should be

rough basin
#

man i really hate static

#

thanks guys

eternal night
#

np

quiet ice
#

Yeah it's probably not new at all

#

JPMS/Jigsaw modules are different to the modules we know

#

Nah, those have been there for much longer

mortal hare
#

Java modules are different from intellij modules

#

Java modules allows you to partition jar files into modules

quiet ice
#

Maven 3.0 (which likely supports modules) has been release back in 2009

#

In what way do they differ?

#

allows cyclic dependencies between modules?

#

Okay - maven supports multi-module builds since maven 2.0 - so 2005

#

Yeah then pretty much maven's aggregation system

grand magnet
#

Can someone help me how to prevent moving items in the inventory. Because when my mouse is in the inventory and I press the number on my keyboard where the item is located, the item moves anyway.

grand magnet
#

No offense but that doesn't get me anywhere either. I have already come this far

chrome beacon
#

Also to prevent people dragging items use the InventoryDragEvent

grand magnet
river oracle
#

Read the docs?

grand magnet
#

I don't think you know what I mean. Here is a video

lost matrix
grand magnet
#

no

lost matrix
#

Then take a look at the InventoryCreativeEvent

tardy delta
#

handling creature stuff goes brr

undone axleBOT
grand magnet
grand magnet
#

Thank you it worked. But how do I fix this:.

lost matrix
#

WorkloadRunnable okayge
Do you want to connect them with a certain color?

#

Should it be filled or be hollow?

quaint mantle
#

calling it before closing the inventory!

lost matrix
#
        for (int x = startX; x <= endX; x += 30) { // Generate wall every 30 blocks
            if (!this.concreteWalls.containsKey(x)) {
                final Material concrete = this.getRandomConcrete();
                if (concrete == null) continue;
                this.concreteWalls.putIfAbsent(x, concrete);
            }
            for (int y = 0; y <= 255; y += 1) { // Generate wall from top to bottom
                for (int z = 0; z < wallThickness; z++) { // Fill the wall along the z-axis
                    this.workloadRunnable.addWorkload(new PlacableBlock(world, x, y, z, this.concreteWalls.get(x)));
                }
            }
            for(int sx = 0; sx <= 30; sx++) {
                int globalX = x + sx;
                for(int sy = 0; sy <= 255; sy++) {
                    for(int sz = 0; sz <= wallThickness; sz += wallThickness) {
                        this.workloadRunnable.addWorkload(new PlacableBlock(world, globalX, sy, sz, this.concreteWalls.get(x)));
                    }
                }
            }
        }

Try this

grand magnet
quaint mantle
#

Share your code

grand magnet
#

*null

quaint mantle
#

I’ll spoonfeed you i don’t mind it lol

#

I know you are interested to learn how to do it

lost matrix
#
        for (int x = startX; x <= endX; x += 30) { // Generate wall every 30 blocks
            if (!this.concreteWalls.containsKey(x)) {
                final Material concrete = this.getRandomConcrete();
                if (concrete == null) continue;
                this.concreteWalls.putIfAbsent(x, concrete);
            }
            for (int y = 0; y <= 255; y += 1) { // Generate wall from top to bottom
                for (int z = 0; z < wallThickness; z++) { // Fill the wall along the z-axis
                    this.workloadRunnable.addWorkload(new PlacableBlock(world, x, y, z, this.concreteWalls.get(x)));
                }
            }
            if(x == endX) {
                continue;
            }
            for(int sx = 0; sx <= 30; sx++) {
                int globalX = x + sx;
                for(int sy = 0; sy <= 255; sy++) {
                    for(int sz = 0; sz <= wallThickness; sz += wallThickness) {
                        this.workloadRunnable.addWorkload(new PlacableBlock(world, globalX, sy, sz, this.concreteWalls.get(x)));
                    }
                }
            }
        }
grand magnet
#

?paste

undone axleBOT
grand magnet
small hawk
#

Does anyone have example of ItemManager (ItemCreator or so). I mean this will create custom items, u know (name, lore, flags etc.). I'm struggling a little bit with it and i am trying to write down this like 7th time?

quaint mantle
#

Before e.setCancellled

#

Call e.setCursor(null);

#

Just add that line

#

Let me know if it works

grand magnet
quaint mantle
#

Ah dude

#

You are opening an inventory

grand magnet
quaint mantle
#

Ok, instead of before e.setCancelled, try before opening the inventory

grand magnet
#

It works thank you very much

gleaming lake
#

wtf is bro trying to create 💀

tardy delta
#

something with walls

half bane
#

how can I parse minecraft .dat file as json/dict or whatever that's easy to edit?

ornate mantle
#

does ascii show up in lore?

drowsy harness
#

Best way to stop an entity from completely moving?

livingEntity.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE, Integer.MAX_VALUE, false, false));```

I have this code but it's moving ever so slightly.
restive rapids
#

is there an event for me to set a custom tablist for each player?
list header and footer

chrome beacon
#

You can set it on join or whenever you'd like it

restive rapids
#

ah okay

rapid aspen
#

how can i make hunger drain faster?

restive rapids
#

Why isn't there any setPlayerListHeaderFooter

#

I am using 1.12.2

quiet ice
#

while loops are pretty much all you need

#

Although foreach is something I'd recommend to be able to understand as it's nice.

#

But I mean the syntax of a for loop is pretty easy

for (initializer; condition; operation) {
  body;
}

which boils down to

initializer;
while (condition) {
  body;
  operation;
}
remote swallow
#

for loops can also be ```java
for (Type type : map/list/set/etc) {
type.something();
}

quiet ice
#

that is foreach

remote swallow
#

that gets classed as foreach?

quiet ice
#

Yeah

#

You rarely call Iterable#forEach anyways, so the collision in naming isn't much of an issue

#

However yes - the technical name is "enhanced for loop", but who is going to remember that?

quaint mantle
#

?paste

undone axleBOT
quaint mantle
#

[Java related] Java Swing

quiet ice
#

For arrays

for (var ref : src) {
  body;
}

compiles down to

var copy = src; // Yes, javac does that - even if 'src' is a local variable in the first place
int i = 0;
while (i < copy.length) {
  var ref = copy[i];
  body;
  i = i + 1;
}

Where as for Iterables it compiles down to

var iterator = src.iterator();
while (iterator.hasNext()) {
  var ref = iterator.next();
  body;
}
sterile token
#

var 💀

rare rover
#

just wondering but uh, is this good? Or should i use an Iterator?

#

it works but like im just wondering

#

since better memory management

sterile token
quiet ice
rare rover
quiet ice
#

If it is about your enhanced for loop, look up two messages before yours - enhanced for loops (at least those involving iterable - which in your case is the case) compile down to using iterators

narrow hare
#

where is the resoure pack for the magic plugin???

quiet ice
#

if allocations are an acute concern for you and your list implements RandomAccess you could use a traditional for loop. I.e.

int size = lines.size();
for (int i = 0; i < size; i++) {
  var line = lines.get(i);
  // [...]
}
remote swallow
quaint mantle
#

?learn java

#

a

#

what was the thing?

quiet ice
#

?learnjava ?

undone axleBOT
quaint mantle
#

yeet thanks

narrow hare
#

this one

remote swallow
#

wrong discord

quiet ice
#

are you sure that that plugin has a resource pack?

remote swallow
mortal hare
#

is having something like this a code smell:

public interface Foo extends Bar<Baz> {}
#

an empty interface

#

just for the sake of encapsulating generic types

tardy delta
#

probably depends on what you're using it for

eternal night
#

not really tbh

quiet ice
#

For non-primitives? Yes.

#

For primitives? No, not at all

#

For absolutely huge generic signatures? Depends.

eternal night
#

how would that help you with primitives

quiet ice
#

If you keep it empty not at all.
But once you add methods that accept the primtive you can reduce autoboxing ops and thus have a smaller memory footprint

eternal night
#

how would you reduce autoboxing tho via default methods

#

concerning the underlying is using the wrapper

quiet ice
#

have extra methods being used

minor garnet
#

some1 know ?

quiet ice
#

See java's IntSupplier as an exmple.

eternal night
#

that is a different implementation entirely

mortal hare
#

I need to somehow pass the Bukkit player object to the independent classes as an argument, problem is i dont want to expose the generic types of the underlying classes

#

now i have an independent interface Foo<T extends Bad> which allows me to pass T argument as a method

#

and i wrap it with the provided interface above

quiet ice
#

You can still continue to use Foo<T extends Bar> everywhere

mortal hare
#

yea, but i dont like to expose that

eternal night
green prism
#

How can I change Aikar's Experimental HelpCommand colors?

#

geol help

quiet ice
#

then what is the point in having the generics then?

eternal night
#

how would creating an "alias type" help that

mortal hare
#

to pass the object as an argument

#

to the independant class

tardy delta
#

too long ago

green prism
#

How can I change those colors?

tardy delta
#

no clue never did that

#

check internals

quiet ice
#

Uh - I have no idea about what that is

#

At worst use the sun Unsafe to register a javaagent and use that to hotswap classes

frank kettle
#

Is there any good way to check if a player starts sneaking or stops sneaking other than maybe use playermovevent and check or a schduler that checks every few seconds if a player is or not sneaking?

eternal oxide
#

Listen for the statistic change for crouching

small hawk
frank kettle
eternal oxide
frank kettle
#

Also is there an event that happens when a player statistic increases?

#

Oh

eternal oxide
#

statistic increase was for jumping

frank kettle
#

Didn't know that was a thing

#

Does that also get called when player stops sneaking?

eternal oxide
#

yes

frank kettle
#

Oh nice, thanks a lot

small hawk
#

What will be the best not so complicated option to make TIMER. I mean, when u place a block, hologram appears above it, and in one line, there will be Time Left: 5m 0s or diffrent time. And it count's to zero. I know i will have to update hologram every second, but how do i make a timer ?

eternal oxide
#

?scheduling

undone axleBOT