#help-development

1 messages · Page 429 of 1

young knoll
#

Idk which we are talking about

quaint mantle
#

trapdoors

#

logs

#

etc

tardy delta
#

uh oh

remote swallow
#

use the wooden tags

#

you might need to make ur own sets for some of it

quaint mantle
#

yea i got it

#

ah yes

tawny remnant
tardy delta
#

uhh wha

young knoll
sterile token
#

I cant find the way of representing them

quaint mantle
tardy delta
#

just as a literal?

tender shard
#

mynumber: 3

sterile token
#

Its giving an cast exception

quaint mantle
#

because your using int or something

tender shard
#

what config framework do you even use?

tardy delta
#

what ur doing? getLong?

sterile token
sterile token
tardy delta
#

dont use a raw get

sterile token
tardy delta
#

that returns an onbject ah wait thats no fileconfiguration

tender shard
#

it looks you just use a Map<String,Object>

sterile token
#

Yes its configuration serikliazable

tender shard
#

check if it's an int, if yes cast it to int

tardy delta
#

ig getLong gets a Number and calls ::longValue

sterile token
#

Im using configuration serialization

#

From bukkit

#

I never had this issue before

tardy delta
#

well its a raw map

sterile token
tardy delta
#

((Number) map.get("whatever")).longValue()

sterile token
#

oh ok

#

that should work?

tardy delta
#

fileconfiguration wraps that

#

should

tender shard
undone axleBOT
sterile token
#

Maybe this is the causing the issue

tender shard
quaint mantle
tender shard
tender shard
tawny remnant
tender shard
#

?learnjava

undone axleBOT
smoky oak
#
public void onInteract(PlayerInteractEvent event){
  event.getItem().setType(Material.AIR);
}

Can someone explain why this does NOT remove the item in my hand?

#

im not in creative

rotund ravine
#

That’d work better on chloe

tender shard
#

true

smoky oak
#

nevermind, apparantly itemstacks are cloned when queried

#

for SOME reason

tardy delta
#

this is gonna be fun 💀

rotund ravine
#

Looks gine to me

sterile token
tardy delta
#

minedustry source

sterile token
#

A library

young knoll
#

It's a game

tardy delta
#

this game

sterile token
#

Hee?

#

Minedustry is java game?

heavy perch
tardy delta
#

tell that my bios update that doesnt like linux

heavy perch
#

Just get better bios bruv

#

¯_(ツ)_/¯

tardy delta
#

looks like the attempt to change the color of a app bar terribly failed

quiet ice
heavy perch
#

Minedustry is Multiplayer by any chance? or should I revert to Terraria

tardy delta
#

bruh switched the wrong one

#

multiplayer yes

quiet ice
#

Mindustry can be multiplayer

heavy perch
#

Is it popular though?

quiet ice
#

It is rather popular

tardy delta
#

much better

quiet ice
#

Chances are you played the classic version years ago on android

heavy perch
smoky oak
tardy delta
#

do all what?

#

i clicked a switch thing

#

ahh you thought i modified the client, no

winged anvil
#

looks like factorio

quiet ice
#

There are like 5 "big" games written in java: Minecraft, OSRS, Mindustry, Project Zomboid and Starmade.

I'll leave out most of the fringe primarily android games since there are many of them.

hazy parrot
quiet ice
heavy perch
# hazy parrot 💀

Dude use Arch or Mint, like seriously any other Linux Distro or Windows/Mac sucks

smoky oak
hazy parrot
#

wait you use arch btw ?

heavy perch
#

Nah I use Mint

heavy perch
quiet ice
onyx fjord
#

hi chat

smoky oak
heavy perch
tardy delta
#

mint 💀

quiet ice
#

Project Zomboid and Starmade are rather fringe though but still notable enough to award the list

quiet ice
smoky oak
#

but i dont know osrs or starmade

heavy perch
quiet ice
#

Yes

onyx fjord
#

i use gradle cli anyway

heavy perch
#

Groovy

onyx fjord
#

for the most part

heavy perch
#

Don't kotlin me

quiet ice
onyx fjord
#

you rule

quaint mantle
#

how do i go in subfolders in config

smoky oak
#

i never said i know acronyms lol

quiet ice
#

Heh

onyx fjord
#

WINE

heavy perch
#

STOP THE WINE TALK

quiet ice
#

WINE is not an emulator

heavy perch
#

It does the job though

onyx fjord
#

yessir

heavy perch
#

It processes all Windows'es apps

onyx fjord
#

yk whats even better

#

not using windows api at all

heavy perch
#

tru

quiet ice
heavy perch
#

But can't

#

I love Lutris

#

I love rocket league

tardy flame
#

Source 2

#

Cs 2

quiet ice
#

Was about to say that

heavy perch
#

CSGO and CS2 will be source runned

onyx fjord
#

fps ⬇️

smoky oak
#

but youll have reflections

hazy parrot
#

nvm bad joke

heavy perch
#

Run 2.4Ghz runners on any system while playing CSGO, you'll cry to mommy

quiet ice
heavy perch
#

Anyways

#

Eclipse

#

WHY.

quiet ice
#

Why intelliJ?

heavy perch
#

Cuz

#

Beauty

#

Speed

onyx fjord
#

VI IMPROVEd

heavy perch
#

auto completions

quiet ice
#

Yeah, and apply that same argument to eclipse

heavy perch
#

Breakpoints

onyx fjord
quiet ice
#

Eclipse has that too

heavy perch
eternal oxide
#

Everythign you mentioned Eclipse has

onyx fjord
#

what

quiet ice
#

I heard eclipse even has the better debugging support

onyx fjord
#

the fuck u mean gnome

hazy parrot
#

Breakpoints, auto completions
aren't those like... part of every ide

heavy perch
#

Some can some don't

quiet ice
#

VS Code users be like: :unhappy_face:

eternal oxide
#

He's clearly never used Eclipse. He's just parroting what he's heard.

chrome beacon
heavy perch
#

I used to use Eclipse for the long run actually

quiet ice
#

Oi

heavy perch
#

5 years of my coding was in there

onyx fjord
#

when ur ide is a web browser

hazy parrot
#

vsc is not ide

onyx fjord
#

it is

quiet ice
heavy perch
#

yup

hazy parrot
#

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.

quiet ice
#

That feature is gone by default in Java 21

#

Was deprecated in Java 9

onyx fjord
#

debugger is not a part of a text editor

heavy perch
onyx fjord
#

21 lts?

quiet ice
#

Yeü

heavy perch
#

This Java update shit is now dreading me

onyx fjord
heavy perch
#

ζ͜͡Yes

smoky oak
#

Ye5

quiet ice
heavy perch
#

Lemme move over that Internal Combustion loving country

quiet ice
#

Hey, by 2030 we only sell electric cars

heavy perch
#

Ya'll rejected that law

heavy perch
#

Germany was the only country in the EU to reject it

quiet ice
#

On the other hand our trains will only have a unified timetable by 2070

lost matrix
heavy perch
#

Internal Combustion>>>EV
Change my mind.

quiet ice
smoky oak
# quiet ice No.

if you mean ü and ß you would be right but the s is on the other damn side of the keyboard

tardy delta
#

this is gonna be interesting

smoky oak
#

this was deliberate geol

heavy perch
#

Don't kill your pc mate

quiet ice
# smoky oak this was deliberate geol

(I actually wanted to press the enter key which is the key next to the key next to ü - so I just made the joke of wanting to press s, which is at the opposite side of the keyboard)

smoky oak
#

ah

quiet ice
tardy delta
#

idk im just refactoring some stuff

#

theres a bunch of stuff where i think "why"

heavy perch
round finch
#

in such a nested way

tardy delta
#

could use a sql case here

ancient plank
#

I like moats

tardy delta
#

its better than before bruh

round finch
#

maybe have return unix or windows if the case

ancient plank
#

Root beer moat

quiet ice
tardy delta
#

looks better

round finch
#

oh no code gore help

quiet ice
#

Then you have an issue with the definition of better

drowsy helm
#

Does that really have to be turnary lol

tardy delta
#

something more readable means better for me

round finch
#

cleaner would be nicer

tardy delta
#

hmm when you close an unbuffered Writer, it will be flushed right, or are there no guarantees?

quiet ice
#

depends on the Writer impl

tardy delta
#

its probably time to use lombok now

#

cuz im looking at a few hundred public fields rn

round finch
#

is there something wrong with using org.bukkit.event.inventory.PrepareSmithingEvent?

young knoll
#

No?

round finch
#

it doesn't output anything

#

for me

#

?paste

undone axleBOT
round finch
#

i know my naming isn't perfect
i shall fix that later

young knoll
#

Is that the experimental table

round finch
#

just figuring things out

young knoll
#

That does not answer the question

round finch
#

my answer is yes

#

experimental

young knoll
#

Idk if the event works for that one yet

round finch
#

i shall try PrepareAnvilEvent

#

🤦‍♂️

#

that is smithingtable code nvm

#

i were being dumb

#

i wanted to work with anvils lol

sterile token
#

Anvils are a mess

#

Specially while working with the text thing

terse ore
tardy delta
#

file thingie

terse ore
#

yeah

#

from where is it

tardy delta
round finch
tardy delta
#

those two snippets should be the same right?

#

my brain is going brr

pseudo hazel
#

yes that seems correct

#

kinda weird though

eternal oxide
#

no

#

the first one has to match both conditions.

tardy delta
#

well building is entity actually

eternal oxide
#

second only has to match one

lost matrix
#

He inverted the result so this looks correct to me

eternal oxide
#

yep

tender shard
#

building.liquids? Core.bundle.get("bar.liquid")? what the heck is that lmao

tardy delta
#

not my code at least

lost matrix
tardy delta
#

man using so much generics that i cant figure out what the actual type is 🤔

#

he also made his own version of the java functional interfaces aaaaaaaaa

lost matrix
#

show

tardy delta
#

my brain cant handle it anymore

lost matrix
#

Tha fk is "Cons2"

tardy delta
#

literally a consumer

lost matrix
#

So a BiConsumer

young knoll
#

Didn't spigot remake some of the function interfaces

tardy delta
#

there is a Consumer that im aware of

#

or there was

lost matrix
#

Bootleg fastutils?

tardy delta
#

always fun when i change smth in one place, that error goes away but 5 others show up :(

#

maybe thats why he decided to use raw types 🥹

#

this not a thing?

#

ah wait i need ?

lost matrix
#

You need to define the constraints earlier

#
public <T extends Number> void yourMethod(Class<T> clazz) { }
tardy delta
#

ah got it

#

me trying to figure out the exact type needed, i currently have ObjectMap<Class<?>, Cons2<? extends Building, Integer>> lol

#

43 unchecked cast warnings now

#

isnt there a way to do private final <T> ObjectMap<Class<T>, Cons2<? extends Building, T>>?

lost matrix
tardy delta
#

you sure that works as a field?

quaint mantle
#

@round finch not sure this is helpful but you can use InventoryClickEvent and check if the clicked inventory is instanceof SmithingInventory

lost matrix
tardy delta
#

ah nope

lost matrix
#

For fields the type is concrete

round finch
tardy delta
#

ig i better make that field not public and write a method that casts it 💀

lost matrix
#

If unknown then ObjectMap<Class<?>, Cons2<? extends Building, ?>>
But then it needs to be strongly encapsulated. Unsafe casts are needed

#

You should never make any field public...

tardy delta
#

i didnt 🥹

#

oh man, maybe better that i dont have classes tmrw

lost matrix
tardy delta
#

bae

vocal cloud
#

That's an L

#

Are they 2h each?

lost matrix
#

2x 4h

vocal cloud
#

Woooof

tardy delta
#

i actually have 2 but im not going to be 4 hours away to follow 2 hours that dont teach me anything

lost matrix
#

At least some interesting topics

#

bb

vocal cloud
#

The history of watermelons

tardy delta
#

oh 4 hours after eachother sucks

#

the max we have is 3 hours networking after eachother

vocal cloud
#

How to make bratwurst

tardy delta
#

anyways is there a dif between ? and Object as generic params?

#

or does ? mean that no assumption can be made about the type and Object that everything will match?

hazy parrot
#

I mean Object is just object, and because every class in java inherites Object, means you can put basically anything

#

end effect is basically same

#

i mean you also if you have method for example

public void foo(List<Object> smth) {...}

public static void main(String[] args) {
  List<?> smth2 = ...;
  foo(smth2); // will not work
}
#

because ? might not be Object, even if its impossible in pratcice

amber vale
#

How can I create an Item Frame at a specific location?

#

How can I get the direction of a chest?

young knoll
#

?jd-spigot

undone axleBOT
round finch
#

then I resize Minecraft it does PrepareAnvilEvent with Items in the anvil

#

huh? woah

#

i didn't know this about the viewer

ivory sleet
#

Object is just a type

#

? means any type

#

? extends T means as long as the type is a derivative or T itself its fine

#

? super T means as long as the type is an antiderivative or T itself its fine

#

this is why you often when writing higher ordered methods use wildcards

#

void takeSupplier(Supplier<? extends Animal> supplier)
here the type Supplier<Dog> (suppose Dog extends Animal)) is acceptable

#

since it doesn't matter, as long as we know the supplier will yield an instance of Animal when calling get()

ivory sleet
#

this is also why
void takeConsumer(Consumer<? super Dog> consumer)
here we use super since a Consumer<Animal> should be fine as it doesn't really use any methods from a Dog derivative type

round finch
#

how do I check if player can repair on Anvil?
and if not... is it possible to bypass that?

#

i will just getResult i think..

#

ah i forgot there won't be result cus no trigger

#

i wanna be able to combine that

#

i were wrong it does trigger event interesting

raw sky
#

When downloading plugins on spigotmc I got a 403 error, anyone know why?

warm mica
raw sky
#

Okay thank you

#

I believe we are using spiget rn, let me see

warm mica
#

It's also possible that the resource is payed

#

Spiget is only for free ones I believe

#

Or it's using an external link

raw sky
#

It is iirc, we do have detection for that in our library not sure if they used it

#

External links handled, GitHub’s handled

#

We do have to download 200k plugins or more though

remote swallow
#

why would you be downloading that many

raw sky
remote swallow
#

you have to do that because?

raw sky
#

Building a plug-in

wet breach
#

o.O

raw sky
#

We have to download every single plugin ever on spigot

#

We got all the .jar files out of the 108.9k plugins out rn or so

#

It’s rough man

#

We gotta support every main plugin distributor out there rn

next plume
#

Who is "we"?

raw sky
#

Spigotmc is coded, but I’m making a plug-in system to cover other websites

raw sky
next plume
#

"The plug-in team" for what?

raw sky
#

For a “plugin package manager” plugin

next plume
#

So why do you need the .jar files themselves?

remote swallow
#

you mean the spigot resource page? or google?

raw sky
raw sky
#

Not sure if your talking to me or not

#

Ohhh

remote swallow
#

idk why people would need that as a plugin, most server hosts supply a plugin browser

raw sky
#

All from in game, automatic updates, malware checking, installing and enabling without restart etc

#

Never used a host like that

#

I meant I’m making a system that can download from Hangar, Modrinth, curseforge, possibly Ore, etc not just spigotmc

echo basalt
#

can't you just index all the files and redirect downloads to spigot's cdn?

#

How would you handle premium plugins, deleted stuff

next plume
#

Not to mention dozens of old version of plugins.

raw sky
#

We index “id:name” currently

next plume
#

Dev builds.

raw sky
#

Even if it’s old

tiny plume
#

I'd imagine there are far more efficient ways to achieve what you're wanting to do rather than downloading every single plugin across all platforms?

raw sky
#

I am sure there is, can’t really think of one rn

#

We have to store the sha256 so we can support multiple stores

#

We are just storing it in a database and using a rest api

next plume
#
  1. Search with Google.
  2. Download from the original source.
  3. Profit!
raw sky
#

How are we going to search for 500k plugins though

#

500k different builds atleast, not sure how many individual plugins we will support

next plume
#

Are you actually distributing the plugins? i.e., people are downloading your copies?

raw sky
#

We are downloading inside of our plugin from spigotmc currently

#

We are getting the download link from spiget, if it’s external then we calculate how to download from there

#

We support direct downloads and GitHub ontop of spigotmc

#

We have a method to manually put a download link thougu

next plume
#

You're providing a service? A plugin catalog? Where do the users ultimately download from? Your servers?

tiny plume
#

From what I can get, he's downloading each plugin to get a shasum in order to prevent them listing the same plugin several times

#

so I'd imagine that they download each jar, grab the shasum store it (along with the download url and whatever else) and then delete it off

raw sky
#

Will also let us recognize already downloaded plugins, our current plugin has a few bugs but we remade it in kotlin, made a library, updated the rest api etc and we are releasing that tomorrow

tiny plume
#

then when someone requests for a plugin to be installed onto their server, it uses their database to fetch a download url (such as from github, spigot cdn etc) and downloads it to the server

#

yep

raw sky
#

Pretty close yea

next plume
#

OK. I don't really see the point, but good luck.

raw sky
#

Shasum isn’t in the current version sadly

young knoll
#

I mean I guess updating from in game is nice

raw sky
young knoll
#

Enabling plugins at runtime though is gonna break 500 things

raw sky
#

And ty!

raw sky
#

Some plugins will be manually disabled like plugmanx does, never really had much issues with reloading a single plugin

young knoll
#

What if that plugin has worldgen

remote swallow
young knoll
#

What if it has active dependants

raw sky
#

Semi rare

remote swallow
#

theres hundreds of plugins which depend on others

raw sky
#

Most common is prob protocol Lib

#

Which are some popular ones?

young knoll
#

Isn’t the second most downloaded plugin on spigot worldedit

remote swallow
raw sky
#

World gen is something we can’t combat

young knoll
#

Which has a ton of dependants

hazy parrot
#

kinda pointless if you ask me

remote swallow
#

you prettty much have to read the plugin.yml before installing you are gonna have people get errors

raw sky
#

Like dependency’s in plugin.yml or another form of dependant

young knoll
#

Plugin.yml

raw sky
#

What does world edit require?

#

We are planning on supporting dependency’s eventually though

next plume
#

server owners who want to download plugins safely
They won't use a third-party.
What happens when your software picks up a malicious plugin. Or someone creates a plugin named Multiverse-Core with malware and your system indexes it?

ancient plank
#

solution: code better

raw sky
#

Spigotmc scans for malware

ancient plank
#

wug

raw sky
#

We are going to have a anti malware system once we support other websites

next plume
tiny plume
#

^^

raw sky
#

We will go through looking for duplicate names

raw sky
ancient plank
#

spigotmc doesn't scan for malware lol, optic does but he's only one guy

raw sky
#

Can he not scan the entire storage

ancient plank
#

no

next plume
#

There have been hundreds of plugins with malware hosted on Sipgot.

ancient plank
#

he does it the same way you do it, download a hundred+ plugins with spiget, then use his custom resource to scan

raw sky
#

We will be scanning for malware soon though

#

Ah so it’s quite slow I would assume

#

We will have virustotal api integration, we will add our own custom back door protection ontop of that

hazy parrot
#

I really see no benefit of indexing and downloading every single plugin over just pointing to spigot cdn

raw sky
#

How are we meant to get all plugins for tab complete?

#

Oh you mean

#

We need to recognize already downloaded plugins

young knoll
#

Solution: don’t

#

I feel like tab completing 100k plus entities will make brigadier very unhappy

raw sky
#

We have it already coded, we are scanning right now

ivory sleet
#

it can be done async but ye

raw sky
#

It will show maybe 3k max, we won’t show tab compete for the first 3 letters

#

Not all 100k resources are plugins either

ancient plank
#

"lifesteal- 300000 possible matches found"

young knoll
#

Lol

sterile salmon
#

does anyone know if it is possible to make a PR for the Spigot repo?

young knoll
#

Yes

ancient plank
#

what's the command

#

?cla

undone axleBOT
ancient plank
#

there it is

remote swallow
#

?stash

undone axleBOT
remote swallow
#

?contributing

young knoll
#

Give MD your address

#

He likes to visit

remote swallow
#

fly in on his kangaroo

ancient plank
#

can confirm he flew to visit me after I signed the CLA

raw sky
#

We have never seen any lag with tan complete though

#

Tab

sterile salmon
#

thanks!

raw sky
#

No matter the version, server fork, or situation

ivory sleet
#

i mean it looks cool

#

might use it on a dev server

round finch
#

can i get the max of enchantment level there is safe to enchant?

young knoll
#

Isn’t there a getMaxLevel

round finch
#

weird it just turns the enchatment level for me

#

exact number

young knoll
#

What

bold crane
#

org.bukkit.command.CommandException: Cannot execute command 'discord' in plugin MoonSimple vv1 - plugin is disabled. at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:906) ~[paper-1.19.4.jar:git-Paper-468] at org.bukkit.craftbukkit.v1_19_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[paper-1.19.4.jar:git-Paper-468] at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[paper-1.19.4.jar:?] at net.minecraft.commands.Commands.performCommand(Commands.java:322) ~[?:?] at net.minecraft.commands.Commands.performCommand(Commands.java:306) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2280) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$20(ServerGamePacketListenerImpl.java:2240) ~[?:?] at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.4.jar:git-Paper-468] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1341) ~[paper-1.19.4.jar:git-Paper-468] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.19.4.jar:git-Paper-468] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1318) ~[paper-1.19.4.jar:git-Paper-468] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1311) ~[paper-1.19.4.jar:git-Paper-468] at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1427) ~[paper-1.19.4.jar:git-Paper-468] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1173) ~[paper-1.19.4.jar:git-Paper-468] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.19.4.jar:git-Paper-468] at java.lang.Thread.run(Thread.java:833) ~[?:?]

#

this is the error

young knoll
#

Your plugin isn’t enabled

#

Check logs to find out why

bold crane
#

Logs are clear this the code why it isnt working

rough ibex
#

that's the entire log?

#

there's a reason it was disabled

round finch
#

public final class MoonSimple extends JavaPlugin implements CommandExecutor, Listener {
public class GravityBlocks extends JavaPlugin implements Listener, CommandExecutor {

why 2 extends JavaPlugin

#

making 2 plugins in 1?

#

hehe

bold crane
#

Ah ggs

round finch
#

or is this 2 plugins in 1 post?

#

,
i feel kinda dumb i can't figure out the canEnchantItem method

#

how would i do the check?

lavish cliff
#

Guys how can I do that , if a player accepts a request from a player , if the player accepts it , that player who has accepted and the one who sent it can not 'attack?

young knoll
#

If Enchantment.canEnchantItem(myItem)

round finch
#

Cannot make a static reference to the non-static method canEnchantItem(ItemStack) from the type Enchantment

#

nvm lol sleepy brain

#

Thank you much Coll

bold crane
#

Fixed thank you

regal scaffold
#
unmappable character (0xA7) for encoding UTF-8
#

I hate section

#

§

indigo frost
#

when I use block.setType(Material.WHITE_SHULKER_BOX); how would I change the direction it's facing?

regal scaffold
#

What encoding do I even use for section?

worldly ingot
#

It's probably a bit better to create the block data and set it instead of the material

block.setBlockData(Material.WHITE_SHULKER_BOX.createBlockData(blockData -> {
    ((Directional) blockData).setFacing(BlockFace.EAST);
}));
#

(you can cache that BlockData if it's not dependent on some local variable if you want)

indigo frost
#

ur a life saver tysm!

regal scaffold
#

Why would my IJ be crashing instantly when trying to install a project to my local repo

#

Completely frozen

#

Third time

#

what is going on

sterile salmon
#

In the spigot repo, if I want to replace this

    public void removeVehicle() {
        if (this.vehicle != null) {
            Entity entity = this.vehicle;

            this.vehicle = null;
            if (!entity.removePassenger(this)) this.vehicle = entity; // CraftBukkit
        }

    }

with something like this

    public boolean removeVehicle() {
        if (this.vehicle != null) {
            Entity entity = this.vehicle;

            this.vehicle = null;
            if (!entity.removePassenger(this)) {
                this.vehicle = entity; // CraftBukkit
                return false;
            };
            return true;
        }
        return false;
    }

what's the best min-diff way to do that?

viral temple
#

better to compile a plugin for java 16 or java 17?

jagged monolith
#

What's the highest version you plan to support?

#

@viral temple

jagged monolith
#

Use Java 17 then.

viral temple
#

nvm, i already choose to keep my plugin up to date

#

and future proof

viral temple
forest pumice
#

I'm trying to get the description of something inside of something that is inside a list in a configuration. That probably didn't make sense, but here's a code to explain it:

people:
  names:
    joe:
      desc: "joe is joe"
    alex:
      desc: "alex is alex"

I basically want the description of Joe. How can I get that?

jagged monolith
forest pumice
#

whats getKeys

pseudo hazel
#

something you dont need

#

just use getString

#

with the path being people.names.joe.desc

jagged monolith
#

Forgot to remove the getkeys from the copy/paste 😛

forest pumice
#

what do I feel like I tried this before and it did "nope" to me

pseudo hazel
#

because you made a typo?

jagged monolith
pseudo hazel
#

or because your data file isnt consistent enough

tender shard
#

.you should ask for the LOWEST version

tender shard
torpid blaze
#

Hey,
Does anyone know what I need to change in the dependencies of a bungeecord plugin when when I want to create a plugin for 1.8.8?

tender shard
#

that depends on what you already have in your dependencies

#

latest bungeecord works fine even for your outdated mc version

#

so just upgrade your bungeecord dependency to latest, and there you go

ocean hollow
#

how to check for an empty slot in inventory? if I need to do it in a cycle, then I need to check for null or for Material.AIR?

tender shard
#

yes

eternal oxide
#

lol

amber vale
#

How can I check the water level of a cauldron, since trying to look into it the methods needed seem to all be deprecated?

tender shard
#

cast the cauldron's blockdata to Levelled

eternal oxide
#

For breakfast should I do a fry up or have a sandwitch?
mfnalex yes.

tender shard
#

only WATER_CAULDRONS and SNOW_CAULDRONS are levelled though, lava cauldrons are not

tender shard
eternal oxide
#

I read it both ways 🙂

#

your yes was perfect 🙂

tender shard
#

items in an inventory are nulalble, but sometimes they also return Material.AIR so I would always check both lol

ocean hollow
#

okey

#

thank you!

tender shard
#
    public static void forEachNonNullItemInInventory(Inventory inventory, Consumer<ItemStack> consumer) {
        for(ItemStack item : inventory) {
            if(item == null) continue;
            if(item.getAmount() == 0) continue;
            consumer.accept(item);
        }
    }

can't hurt to double check it

#

yeah because this would be sooooo much better as instance method, right

#

actually it'd be pretty stupid to not make this method static

amber vale
icy beacon
#

not everything static is bad

chrome beacon
#

?jd-s

undone axleBOT
tender shard
amber vale
#

Ah, thanks

tender shard
glossy venture
#

lmfao

amber vale
#

"oh mah gawd, STATIC, you must suck at programming"

tardy delta
#

i thought about rewriting this whole class, nah man

#

this class is 2000 lines and dude did made all his fields public :)

#

lombok moment

tender shard
#

just replace

public (.*)\s+(.*)(\s+=\s+.*)?;

with

@Getter private $1 $2$3;
#

should work for both normal fields and fields with a value

tardy delta
#

then move all the calls to that getter 💀

tender shard
#

you can also select all the fields, Refactor -> Refactor this -> Encapsulate

#

then check "Use accessors even when field is accessible" or set the field's visibility to private

tardy delta
#

oh

#

kinda wondering how i should interpret some things lol

tardy delta
#

javadocs are great bruh

amber vale
#

How can I reduce the durability of a tool?

#

Since ItemStack#getDurability and ItemStack#setDurability are depricated

dire marsh
#

damageable interface or something

#

honestly i prefer the old api

amber vale
#

Cheers!

tender shard
#

be sure to import org.bukkit.inventory.meta.Damageable and not org.bukkit.entity.Damageable

tardy delta
#

what the

amber vale
#

How do I get back the ItemStack from the damageable?

dire marsh
#

you cast the meta to damageable then set the meta on the stack

eternal night
#

literally when is java gonna get a @Delegated without lombok 😭

tardy delta
#

references are fancy pointers

#

an alias is auto& x = c

#

or something that looks like tat

#

cmon bruh

#

must i really cast a BiConsumer<?, ?> to a BiConsumer<Object, Object> bruh

#

does this even make sense, building for java 8 but using java 16 features?

icy beacon
#

how would that even work

tardy delta
#

idk i dont use gradle

young knoll
#

Some new features can still be compiled to java 8 compatible bytecode

eternal oxide
tardy delta
#

im just getting an error

eternal oxide
#

I've never seen maven accept anythign but the same source/target

tardy delta
#

uhh what i just changed it

eternal oxide
#

probably didn;t clean

worldly ingot
#

I would recommend making use of toolchains instead for Java versioning

#
java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
}
#

A little nicer

tender shard
tardy delta
#

uhh that gradle file has 39 warnings so id rather not touch it

worldly ingot
#

I think you can do some groovy-syntax stuff too with java.toolchain.languageVersion = JavaLanguageVersion.of(17)

#

But I'm no Groovy expert

tender shard
worldly ingot
#

lmao beats me. I just know that toolchains are newer

tender shard
#

lol ok

tardy delta
#

stuff writing 4000 images to the compiled version 💀

#

and after i executed the clean task, still same error

worldly ingot
#

The advantage is that Gradle can handle any inconsistencies across JDK versions in how exactly the JVM encodes the vendor information.

#

So basically you can also set which vendor you want to use

#

vendor = JvmVendorSpec.ADOPTIUM

tardy delta
#

ah here maybe

worldly ingot
#

I'm sure there are some other things you can do with toolchains though

tardy delta
#

i have no clue how to fix this error, i thought i change the version everywhere

#

what do we have now bruh

#

even though i add the --add-exports the package is not visible

worldly ingot
#

com.sun.tools? o.O

#

Feels like a shit import

amber vale
#

Oh boys:

I have 2 identical arrays:

(when converted into strings:)
[[IRON_INGOT], [IRON_INGOT], [IRON_INGOT], [IRON_INGOT], [null], [IRON_INGOT], [null], [null], [null]]

and

[[IRON_INGOT], [IRON_INGOT], [IRON_INGOT], [IRON_INGOT], [null], [IRON_INGOT], [null], [null], [null]]

But for what ever reason, the first array != the second array and it's fuckign everything up

tardy delta
#

its something with annotations

worldly ingot
#

How is it you're comparing them?

amber vale
worldly ingot
#

That checks for referential equality

#

Arrays.equals()

amber vale
#

Oh dang

#

I can see why you shouldn't stay up for 28 hours coding

worldly ingot
#

If it's an array of arrays you'll want Arrays.deepEquals()

#

(because that string looks like an array of arrays)

tardy delta
#

wdym does not export it, i added the --export

worldly ingot
tardy delta
#

im trying to compile a project bruh

#

its a fork

worldly ingot
#

Yeah, of?

tardy delta
#

updating it to newer api

#

minedustry

worldly ingot
#

TDG?

tardy delta
#

dunno what that means

worldly ingot
#

Tower defense game?

smoky oak
#

ye

worldly ingot
#

I have no idea why they feel compelled to use com.sun packages. Those are JDK internals

tardy delta
#

i have no clue why everyone is using gradle either

smoky oak
#

i mean

#

only reason im on maven is cuz its the first thing i found that worked

tender shard
eternal oxide
#

I use maven because it does everything I need and I've no reason to use anything else.

tender shard
#

according to some websites, over 78% of java devs use maven, gradle is at 38%

amber vale
#

wait hold on a moment

#

hmm

tardy delta
#

i use maven cuz i dont understand gradle kek

amber vale
#

"78%" + "38%"

#

...

#

"78%38%"!

tender shard
#

you do realize that you can use both right?

eternal oxide
#

overlap

tender shard
amber vale
#

That's impossible

#

Trust

tardy delta
#

all my forks use gradle and i add them to my maven project

#

what bothers me are the 38 warnings in the build.gradle file

tender shard
#

now update gradle and the 38 warnings will turn into 117 errors

tardy delta
#

oh those are errors actually

#

time to add more module exports then ig

#

error: package com.sun.tools.javac.code is not visible wdym i added '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED'

young knoll
#

So is mindustry even more jank than minecraft?

#

:p

wet breach
tardy delta
tender shard
#

sometimes I think gradle was meant as a joke but some people didnt get it so they started to use it

tardy delta
tender shard
#

hm at least I dont remember doing that

tardy delta
#

stuff also tells me to use tasks.register instead of task

sacred wyvern
#

Anyone have trouble with updating Minecraft? It gets to 60% then drops down to 40% then stutters up to 50% and crashes.

tender shard
#

works fine for me using MultiMC on macOS and win 11

sacred wyvern
#

Hmm k will try rebooting. I wasn't sure if there's a cache I should clear or somethig

smoky oak
#
listOfEnchants = Arrays.stream(Enchantment.values())
                .map(e -> e.toString())
                .map(e-> {
                    return e.substring(e.indexOf(',')+2,e.length()-1);
                })
                .toList();

contains ARROW_DAMAGE
BUT

Enchantment enchantment = Enchantment.getByKey(NamespacedKey.minecraft(strings[0].toLowerCase(Locale.ENGLISH)));

is null if i stuff ARROW_DAMAGE in as argument. why, and how do i fix it?

tardy delta
#

ij wtf

#

removing the build folder should not give that bruh

smoky oak
#

the string 'infinty' works despite not existing in the enchantment enum???????

tardy delta
#

gen things seems to be gone

pine forge
#

Is there a way to prevent particles like the totem one from falling to the ground? Changing the speed does not influence this unfortunately

#

nope

#

theres only a max speed value

#

which makes it not fly away randomly

tardy delta
#

classes gone bruh

charred hazel
#

hello I am trying to disable the spawn of wither skeleton on my pvpfaction 1.8.8 server, but I can't find how to do it, can help me ?

tender shard
#

listen to EntitySpawnEvent, cancel it if it's a wither skeleton

tardy delta
#

bruh always the same thing, but i added in my build.gradle and gradle.properties

tender shard
tender shard
tardy delta
#

i need newer api

bitter mural
#

Hey, all! Is there a standard or well-known plugin api that makes creating flicker-proof dynamic scoreboards easy? Or perhaps a standard way? I've researched for days and can't figure it out.

tender shard
#

FastBoard

sullen canyon
remote swallow
#

I should look into scoreboards

smoky oak
bitter mural
tender shard
smoky oak
#

im asking cuz thats how id do it

#

checking instanceof instead of entity type

tender shard
#

both will work fine

worldly ingot
#

Either works. instanceof will account for subtypes of wither skeletons though

#

There aren't any currently but maybe in the future

smoky oak
#

custom entities

#

hm

#

in that case

#

if something extends the nms classes would instanceof still catch it?

tender shard
#

yeah but custom entities will always have to return an existing EntityType anway, so they'd also just return EntityType.WITHER_SKELETON

#

but yeah instanceof would be better in case there would suddenly be any "subtypes" of wither skeletons, that's true

tender shard
#

it's an enum

worldly ingot
#

lol

smoky oak
#

i mean

#

enchantment has an 'add' method

#

thats why im asking

tender shard
#

enchantments are not enums

#

Enchantment is an abstract class

smoky oak
#

ah thatd do it

tardy delta
#

another error now lol

quaint mantle
worldly ingot
#

NOOOO

tender shard
#

that is ugly

quaint mantle
#

It's beautifull 🥺

#

One line for the future

worldly ingot
#

I understand you're doing ignoreCancelled which is great but if there's any possibility where you can call setCancelled(false), don't do it

quaint mantle
#

I mean, by default that's the even behaviour

tardy delta
#

you dont want to uncancel previously cancelled event

worldly ingot
#

It's a bad habit to get into because you'll inevitably end up un-cancelling some other listener

#

Again, in this case you're ignoring cancelled events so it's not an issue

#

but it's a bad habit

tender shard
tardy delta
#

man gradle sucks

#

😳

tender shard
tardy delta
#

wondering how long its been now

#

ive tried all build.gradle files now

quaint mantle
worldly ingot
#

in this case you're ignoring cancelled events so it's not an issue
but it's a bad habit

worldly ingot
#

Is that what you call it? lol

quaint mantle
#

Just look at it, everything is in one line, you don't need to scroll to read

#

It's amazing ❤️

#

(obviously I'm joking)

tender shard
#

the rules for that repo were "max 3 semicolons per line, max 35 lines per contributor"

#

imports and package declarations not counted

quaint mantle
#

wtf, you are not joking

#

But reading the project objective I understand everything

tardy delta
#

lmao same error in ij

sacred wyvern
#

The chat system in minecraft. Does it propgate to everyone in the world or just people nearby?

pseudo hazel
#

default chat sends to everyone in the server im 90% sure

sacred wyvern
pseudo hazel
#

yeah sure

sacred wyvern
#

Thank you

remote swallow
tender shard
#

yeah no shit

#

well I just removed newlines and whitespaces

hasty prawn
#

If he wrote that originally like that instead of shrinking it then he would be psychopath

#

No one in their right mind would ever write code like that

tender shard
#

well I wrote it exactly like that, just with more newlines

sterile token
#

Is there any ORM for Java which allow you manage SQL and NoSQL as model, so them you dont care about what db they use

#

So them you can code being independent from their storage

tardy delta
#

sun code be like: values.head.fst.name.table.names.value

sterile token
worldly ingot
#

Good. Don't. If you're using a com.sun package you're already doing something wrong

tardy delta
#

well i nearly fixed my errors

#

only need access to sun.reflect.annotation package

#

exporting a package from system module jdk.compiler is not allowed with --release smh

#

and doing '--add-modules=jdk.unsupported' still says error: package sun.reflect.annotation is not visible import sun.reflect.annotation.AnnotationParser; ^ (package sun.reflect.annotation is declared in module java.base, which does not export it to the unnamed module)

pine forge
#

How can i launch an entity exactly X blocks up?

worldly ingot
#

Exactly? I don't think anybody has a direct 1:1 mapping

pine forge
#

Okay, so ill jsut have to try around?

worldly ingot
#

Yeah pretty much

#

Launch a minimum, maximum, and in between, then try to determine a formula for that

#

Unless you're only launching a very specific # of blocks, in which case yeah just toy around until you get the number you want

tender shard
#

the gravity is 13b/s^2 according to google, i guess one could turn that into b/ticks^2 and then calculate the needed velocity or sth

worldly ingot
#

Or you can put in random numbers and hope it works EmbarrasedAsk

wet breach
#

minecraft gravity in regards to earths

#

is approximately 4g's

#

players will accelerate at 32m/s^2

tender shard
#

yeah it's more like 1.33 G

tender shard
young knoll
#

Are you telling me bedrock players have less gravity

remote swallow
#

math is weird

young knoll
#

Wait what’s javas gravity

remote swallow
#

40m/s^2

#

like 6 messages higher

tender shard
#

but it's also from 2011

young knoll
#

It can’t be that different from bedrock

#

Or they would feel super different to play

wet breach
#

with terminal velocity being 78.4 m/s

#

in blocks per tick

#

for the first one its 0.08 blocks/tick^2

#

terminal velocity at 3.92 blocks/tick

#

and the drag 0.02

#

it is also in java edition minecraft

#

it depends on which way you are determining it

#

spherical vs flat plane

bright jasper
#

Can someone possibly do a code review of this? https://github.com/JSH32/DiscordLink/
I've been trying to get my plugin to support multi platform so i've split spigot and core into separate modules. Providing spigot implementations and my own annotation based command framework which is read and registered using brigadier/commandapi

#

(it is in a not completed state)

hybrid spoke
wet breach
#

indeed

#

my number could be wrong though

bright jasper
#

Yeah i should've linked the command system since thats the stuff i actually need taken a look at

wet breach
#

and could be for bedrock lol

#

but I am pretty sure both are relatively the same though

#

since bedrock borrowed some numbers from java edition

#

like the acceleration for players

wet breach
#

yeah the drag

#

its at 0.02

tardy delta
#

is there a command alternative for mvn clean build in gradle?

wet breach
#

not sure if that is also the same in bedrock but again wouldn't surprise me if it was

remote swallow
wet breach
#

also seems I am slightly off, 3g's

hybrid spoke
wet breach
#

however knowing all that

#

you could launch an entity or player exactly however many blocks

#

if you know how to work out the math 🙂

#

I will say

tender shard
#

I got these as differences in velocity per second

wet breach
#

its easier to launch a player or entity straight up as opposed to other angles

quaint mantle
#

hi.

wet breach
quaint mantle
#

this question might be out of place for this server and channel but actually nvm.

wet breach
#

not sure how you figure launching an entity or player straight up isn't easier o.O

tardy delta
#

bruh i needed

sacred wyvern
#

Is there a way to have a villager that is not aware look at a player when they right click on them?

tardy delta
#

43 problems in my build.gradle but thats something else

hybrid spoke
#

not sure how i came up with 0.08 then

wet breach
#

which is correct in what you got

#

if you convert it to m/s^2 its 32

tender shard
#

yeah DEFAULT_BASE_GRAVITY in LivingEntity is 0.08 b/t^2 so it's indeed 32b/s^2

bright jasper
#

GPT says ```java
public void launchPlayerAtTarget(Player player, Location target) {
// Calculate the direction vector from player's position to target
Vector direction = target.toVector().subtract(player.getLocation().toVector()).normalize();

    // Calculate the horizontal distance to the target
    double distance = Math.sqrt(Math.pow(target.getX() - player.getLocation().getX(), 2) + Math.pow(target.getZ() - player.getLocation().getZ(), 2));
    
    // Calculate the vertical distance to the target
    double heightDifference = target.getY() - player.getLocation().getY();
    
    // Calculate the initial velocity needed to reach the target
    double initialVelocity = Math.sqrt((2 * 9.81 * (heightDifference + 0.5 * distance * Math.tan(Math.toRadians(45)))) / Math.sin(Math.toRadians(45)));
    
    // Calculate the x and z components of the velocity vector
    double x = direction.getX() * initialVelocity;
    double z = direction.getZ() * initialVelocity;
    
    // Calculate the y component of the velocity vector
    double y = initialVelocity * Math.sin(Math.toRadians(45)) - 0.5 * 9.81 * Math.pow(distance / (initialVelocity * Math.cos(Math.toRadians(45))), 2);
    
    // Set the player's velocity to the calculated velocity vector
    player.setVelocity(new Vector(x, y, z));
}
#

🐧

zealous osprey
#

provide a small upwards velocity (vy > 0) to hopefuly avoid the issue of sliding on the initial block

pine forge
#

How do i change my java version to 17 in the pom.xml?

tardy delta
pine forge
#
<java.version>1.8</java.version>
``` Do i change this to 1.17?
amber vale
#

Alright so I am cancelling EntityRegainHealthEvent to implement my own regen system, but the player still loses food as if he was regenerating.

What event handles the player losing food when low hp?

pine forge
amber vale
#

ty

pine forge
#

why was it at 1.8 before then?

amber vale
#

That

#

Was the java version

pine forge
#

That worked thanks :D

wet breach
#

you are not wrong in calling it 1.17

#

it is technically correct

#

however, in code and how the version is derived it is actually 17

#

Oracle dropped the 1, because like minecraft there isn't going to be a version 2

#

well if there is, it won't be the same as we know it right now

amber vale
wet breach
#

the change wasn't arbitrary

wet breach
#

it has always been a thing to omit the 1 when referring to java versions

#

so java 1.8 is also known as java 8

#

same with 1.7 being 7

amber vale
wet breach
#

if anything minecraft followed suit of java

tender shard
#

Why would 2.0 come after 1.9?

amber vale
#

People def expected that to a degree

tender shard
#

Idk maybe people who dont know what major/minor/patch versioning is expected it

wet breach
#

very many people expected minecraft to at some point have a version 2

#

however mojang already stated that there won't be a version 2 with the current game

tender shard
#

Yeah but why should that point be exactly 1.10

wet breach
#

not without a major revamp of verything

amber vale
#

How can I detect wether a player is losing hunger from moving around or from being low hp?

wet breach
#

you don't

#

certain packets have expected sizes and if they are larger then that, there is something wrong or malformed about it

#

however for some others, the network code should automatically break up the information to fit into multiple packets automatically

tardy delta
#

did they really forget to add an select all thing, there are like 100 fields 💀

smoky oak
#

F

tardy delta
#

also alex your regex public (.*)\s+(.*)(\s+=\s+.*)?; also matches methods

#

public\s+(@)*.*; seems to select public fields but i cannot figure out how to replace it

sacred wyvern
#

All external API calls by the plugin should be wrapping in a thread. Is the BukkitRunnable the correct class to use for that?

tardy delta
#

wdym by external api calls

sacred wyvern
#

My plugin calls an external API server but without doing it in a task is can be blocking.

bright jasper
# tender shard doesnt work
    public void launchPlayerAtTarget(Player player, Location target) {
        // Calculate the direction vector from player's position to target
        Vector direction = target.toVector().subtract(player.getLocation().toVector()).normalize();
        
        // Calculate the horizontal distance to the target
        double distance = Math.sqrt(Math.pow(target.getX() - player.getLocation().getX(), 2) + Math.pow(target.getZ() - player.getLocation().getZ(), 2));
        
        // Calculate the vertical distance to the target
        double heightDifference = target.getY() - player.getLocation().getY();
        
        // Calculate the initial velocity needed to reach the target
        double initialVelocity = Math.sqrt((2 * 9.81 * (heightDifference + 0.5 * distance * Math.tan(Math.toRadians(45)))) / Math.sin(Math.toRadians(45)));
        
        // Calculate the x and z components of the velocity vector
        double x = direction.getX() * initialVelocity;
        double z = direction.getZ() * initialVelocity;
        
        // Calculate the y component of the velocity vector
        double y = initialVelocity * Math.sin(Math.toRadians(45)) - 0.5 * 9.81 * Math.pow(distance / (initialVelocity * Math.cos(Math.toRadians(45))), 2) + heightDifference;
        
        // Set the player's velocity to the calculated velocity vector
        player.setVelocity(new Vector(x, y, z));
    }
#

maybe? this also has an upwards angle of 45

#

i think its the block slide

remote swallow
tardy delta
#

everything is blocking, depends on how much blocking it is

bright jasper
#

Virtual actors my beloved

#

not for mc tho, that is hell

tardy delta
#

variables my man

#

player.getLocation 🙏

bright jasper
#

idk how many of you guys have used rust but Actix actors are pretty nice, I think C# has orleans too, not sure if java has one

sacred wyvern
remote swallow
#

you can still run singular tasks async with it

bright jasper
# tender shard doesnt work

Here, even more updated. Default launch angle is 45 and if there is a wall in the way it calculates to hop over it

sacred wyvern
#

There's one task that runs a lot to pull a message queue

remote swallow
#

pretty much the same thing

sacred wyvern
#

kk

#

cheers

bright jasper
#

btw since that code is GPT generated, i have no idea why the hardcoded 9.81 is present. I assume its just standard gravity acceleration?

sacred wyvern
# remote swallow pretty much the same thing
Asynchronous tasks should never access any API in Bukkit. Great care should be taken to assure the thread-safety of asynchronous tasks.

Just confirming this means anything internal to Bukkit and not external API's

tender shard
bright jasper
#

minecraft gravity is accurate to earth lmao /s

tender shard
bright jasper
#

i can jump one meter in real life if i try hard enough

tender shard
tender shard
sacred wyvern
#

The one that takes a while is the API call that loads a list of NPC Villagers into the Config file. The response on that request has thrown a warning that it's taking too many ticks

bright jasper
# tender shard now it's going 45° into the other direction

Replace this line:

double launchAngle = Math.toDegrees(Math.atan((initialVelocity * initialVelocity + Math.sqrt(initialVelocity * initialVelocity * initialVelocity * initialVelocity - 9.81 * (9.81 * distance * distance + 2 * heightDifference * initialVelocity * initialVelocity))) / (9.81 * distance)));

With this line:

double launchAngle = -Math.toDegrees(Math.atan((initialVelocity * initialVelocity + Math.sqrt(initialVelocity * initialVelocity * initialVelocity * initialVelocity - 9.81 * (9.81 * distance * distance + 2 * heightDifference * initialVelocity * initialVelocity))) / (9.81 * distance)));

#

💀

#

shocked if it works

onyx fjord
#

what should i use to make a list that puts things in a defined order?

tender shard
bright jasper
#

nvm change launchangle to ```
double launchAngle = Math.toDegrees(Math.atan((initialVelocity * initialVelocity + Math.sqrt(initialVelocity * initialVelocity * initialVelocity * initialVelocity - 2 * 9.81 * (heightDifference + distance * Math.tan(Math.toRadians(45))))) / (9.81 * distance)));

tardy delta
quaint mantle
#

guys who have a kind soul, help. you can make me a plugin radiation (you need to choose a world in which there will be a radiation strength from 1 to 9)
something like this: /red [world] [power].
power 1 = 1 damage in 60 seconds
power 2 = damage in 60 seconds and so on

tardy delta
#

ah cmon not again

#

thats dude s using some kinda of self written library that i dont like

quaint mantle
#

pls ping me or write in private messages

onyx fjord
bright jasper
tardy delta
#

TreeSet with a custom comparator

bright jasper
#

Don't ask me how to run it either

amber vale
#

How can I make a block not drop anything when broken?

tardy delta
#

this is pretty smart

#

man then wrote his own annotation processor to make it behave like a record but i believe it supports getters too

#
Generates ""value types"" classes that are packed into integer primitives of the most aproppriate size.
 * It would be nice if Java didn't make crazy hacks like this necessary.```
#

lol

amber vale
#

How can I make a block not drop anything when broken?

rotund ravine
amber vale
#

Well thank you for this conclusive and helpful answer!

bright jasper
#

Literally just regular byte representation of data. Quite literally a C struct

amber vale
tardy delta
#

dunno how i would use it anyways

rotund ravine
#

Can be used

#

Well

#

Three or more if paper is also included

#

BlockBreakEvent and BlockDropEvent is probably what you are looking for

amber vale
#

Yes

#

I am aware of that

#

But considering all of the information i've found has proven to be incorrect I'd love to hear an actually working solution

rotund ravine
#

?notworking

undone axleBOT
#

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

rotund ravine
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

amber vale
#

What do you want, my empty BlockBreakEvent?

#

For gods sake

#

Some people just choose to be difficult

kind hatch
tardy delta
amber vale
young knoll
#

BlockBreakEvent has a method to set it to not drop items

icy beacon
amber vale
young knoll
#

Do you have other plugins running

tardy delta
rotund ravine