#help-development

1 messages Ā· Page 511 of 1

west oxide
#

yeah thanks man i appreciate your help, thanks alot

silk mirage
#

I should create a multi mapper, like it'd take a base mapping, look up the value in other mapping, and recursively keep on looking till final result

rough drift
#

Inventory slot numbers?

hearty zenith
#

Is there any version of UltraMinion plugin for 1.16.5 as I have the 2 versions out of Whixh which 1 supports 1.12-1.15 and another one 1.17 +

#

So is it available?

rough drift
onyx fjord
#

you would have to update it yourself

#

or pay someone to do it

hearty zenith
onyx fjord
#

none i can recommend

hearty zenith
#

Ok

quiet ice
#

how do I prevent the maven-shade-plugin removing the manifest created by the maven-jar-plugin while still removing any other manifests?

eternal oxide
#

artifact filters

quiet ice
#

Using <artifact>*:*</artifact> matches everything

eternal oxide
#

of course *:* is everything

quiet ice
#

the issue is that that includes stuff genned by the maven-jar-plugin

#

I guess I'll use the org.apache.maven.plugins.shade.resource.ManifestResourceTransformer then

eternal oxide
#

just add a filter

#

exclude not include

quiet ice
#

for whatever reason that will not work

eternal oxide
#

yes it will

wet breach
#

you just need to set the filter up appropriately

#

I don't know it off hand, but md does though

#

he had showed someone else a while back how to do it because they were having issues with a sealed jar

quiet ice
#

Well I mean it would work but we'll look at something like

                        <filter>
                            <artifact>*:gson</artifact>
                            <excludes>
                                <exclude>META-INF/MANIFEST.MF</exclude>
                            </excludes>
                        </filter>
                        <filter>
                            <artifact>org.ow2.asm:*</artifact>
                            <excludes>
                                <exclude>META-INF/MANIFEST.MF</exclude>
                            </excludes>
                        </filter>

because *:* includes the built artifact

#

(imagine that but copy & paste this for 10 different artifacts - no thanks)

eternal oxide
#

just do one filter to exclude ALL MF then include just yours

quiet ice
#

won't work because the exclude overrides the include

#

Regardless of which order the filters are put

eternal oxide
#

true

quiet ice
#

For the sake of completion I'm using


                        <filter>
                            <artifact>*:launcher</artifact>
                            <excludeDefaults>false</excludeDefaults>
                            <includes>
                                <include>META-INF/MANIFEST.MF</include>
                            </includes>
                        </filter>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>**/module-info.class</exclude>
                                <exclude>META-INF/*.SF</exclude>
                                <exclude>META-INF/*.DSA</exclude>
                                <exclude>META-INF/*.RSA</exclude>
                                <exclude>META-INF/MANIFEST.MF</exclude>
                            </excludes>
                        </filter>

right now. But yeah from the looks of it I'll have to use a transformer instead

quiet ice
#

From the looks of it only using

                    <transformers>
                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
                    </transformers>

works - and it'll remember the original manifest

tardy delta
#

whoa robots in disguise

topaz atlas
#

How do I create a UUID hash map in java, I tried this:

    private HashMap<UUID, YourValueType> yourHashMap = new HashMap<UUID, YourValueType>();```
rotund ravine
#

?learnjava

undone axleBOT
topaz atlas
#

I already know quite a bit of java, im still a beginner, but I dont need to start back at step 1

round finch
#

?learnmath

#

sadge

quiet ice
topaz atlas
#

sorry

remote swallow
#

new HashMap<>()

topaz atlas
#

I cant put it in a shorter amount of works

topaz atlas
quiet ice
#

How you do it below is the right way

#

Do you mean HashSet by any chance?

topaz atlas
remote swallow
#

Map<UUID, Type> myHashMap = new HashMap<>()

quiet ice
#

In that case it'd be HashSet<UUID> ids = new HashSet<>();

#

Yeah, in that case you already did it in the second line ...

topaz atlas
remote swallow
#

a value

quiet ice
#

do you know what a HashMap is?

young knoll
#

A hashmap maps a key to a value

#

In this case 'Type' is the type of the value

topaz atlas
#

Ah ok

#

thanks

quiet ice
#

A hashset is a collection of UNIQUE keys

#

(basically a fancy list without duplicates and no strictly defined order)

median trench
#

Hi! Does anyone know what's the best way to "simulate" the block break particles? I have a block that sets to air and I just want to show the particles (without dropping the item, that's why I don't use breakNaturally). I am already using packets so I don't care if that's the way. I tried using spawnParticles but it doesn't feel good at all, if you have any info about the offsets and amount it would be useful šŸ™‚

eternal oxide
#

sendBlockDamage

median trench
#

I mean the block crack particles, not the progress damage

young knoll
#

I would check mojang code for offsets and amounts

#

Probably in the client

median trench
#

mmm will check, not in nms right? I have to get the mcp reborn?

young knoll
#

Or just mojmap the client

#

Use like, yarn or somethin

frail gale
#

Bruh in Spigot 1.8.8 to change the item material data you also need to change the durability of the item using item.setDurability() so strange wtf

tardy delta
#

two words

#

"spigot 1.8.8"

frail gale
young knoll
#

Ew 1.18 is so

#

Not flat

median trench
tardy delta
median trench
#

I know mcpreborn

#

am using it but Coll1234567 told me "or just mojmap the client", that's what I am asking about

tardy delta
#

some deobfuscation i believe

young knoll
#

Yarn is what fabric uses

#

Or is it loom and yarn are their custom mappings?

#

Idfk man too many words

quiet ice
#

yarn are their mappings

#

loom is their gradle plugin

young knoll
#

Yeah thaat

#

Loom should also be able to mojmap

median trench
#

How's the Particle named if not Crack or BlockCrack?

thin frost
#

Hey guys, I want to spawn ghasts into a world and not have them automatically be deleted, how can I do that? šŸ˜„

fallow latch
#

i have a class public class Bullet extends Snowball, and i spawn the Bullet, how can i get the Bullet class when recieveing the ProjectileHitEvent? right now with event.getEntity(), it returns a CraftSnowball

tardy delta
#

dont implement api interfaces cuz the server cannot guarantee that it will use it

rotund ravine
#

You don’t

young knoll
#

Use pdc to tag entities

quiet ice
rotund ravine
#

You can make a wrapper that unwtsps and wraps the pdc.

tardy delta
#

or extend

fallow latch
young knoll
#

What part of don't implement API classes did you not follow

quiet ice
#

nonononnononononono

young knoll
#

Track custom projectiles with PDC

quiet ice
#

Get the CB handle and be happy with that

#

Or well don't do cursed shit and work with PDC like a sane human would

fallow latch
#

Sure I’ll try the handle

#

Or maybe is there a way to change a snowball’s item to something else

fallow latch
#

Oh

#

And then I can set the initial velocity right?

#

So I guess I didn’t need this whole class lol

brisk estuary
#

Hey, does anybody know how a gui title like that is done?

young knoll
#

Looks like just some unicode characters for the title

#

And then player heads

river oracle
#

bump :3 conclure said singleton, but a bit unsure on how to impl that. Only way I can think of is reflection? just unsure if that works

ivory sleet
#

ye one way is singleton

#

I mean Id follow the canonical singleton pattern

#

but with a setter

#
interface MyApi {
  static MyApi get() {
    return MyApi.Provider.getInstance();
  }

  static void set(MyApi api) {
    return MyAPi.Provider.setInstance(api);
  }
  
  static class Provider {
    private static MyApi instance;

    @Deprecated(forRemoval=false)
    public static void setInstance(MyApi api) {
      instance = api;
    }

    @Deprecated(forRemoval=false)
    public static MyApi getInstance() {
      return instance;
    }
  }
}```
#

just made it up

#

that way if u want to mock the api its possible w/o powermocks

#

(sth like that) u might wna isolate the api impl logic behind its own class file

#

ye

#

like (LuckPerms)

river oracle
#

?paste

undone axleBOT
river oracle
sullen canyon
river oracle
#

negative space characters likely

#

its a must if you use resource packs for things

young knoll
#

Probably just normal spacing

#

After all the width is fixed

river oracle
ivory sleet
#

ah then ignore what I said Ig

#

users call the library

#

so just provide them with static factory methods

#

like give them some guarantee towards future conceivable changes

river oracle
ivory sleet
#

yes you shouldn't

#

which is why you just separate implementation from api with interfaces, adapter pattern, proxy pattern, delegation etc

river oracle
ivory sleet
#

may I ask

river oracle
#

the only interaction of the two is Core implements some interfaces and manages some things from API which shouldn't be exposed rather should be exposed through my RavenAPI interface

ivory sleet
#

what is this api?

#

is it to talk to ur plugin

#

or just a total set of library classes

#

or is it both?

river oracle
#

I made it general so I could use it outside of spigot

#

but I intend to use it for spigot

ivory sleet
#

I mean

#

in the core

river oracle
#

core contains implementation for some modules that would be out of scope of implementing within the database part of the API

#

e.g. Object Mapper

#

TypeConversionManager

ivory sleet
#

does this have anything at all

#

to do with like plugin specific stuff

#

or nah?

river oracle
#

no, I made it extremely general on purpose.

ivory sleet
#

ah okay

#

in that case u might just wanna have a singleton to an interface that acts like a factory

river oracle
#

example?

ivory sleet
#
//api
interface API {
  Database create(...)
}
#

and then u have a singleton to that factory interface

#

in which u set an impl from ur core module

river oracle
# ivory sleet in which u set an impl from ur core module

I guess my main wonder, is I can't make API depend on Core because 1. that'd be cyclic and 2. that'd defeat the purpose of the separation in the first place.
secondly, could I get the core module with reflection? because that seems like the best way to set something up like that

ivory sleet
#

dont do that

#

thats a leaky abstraction

river oracle
#

well what you said is what I already have setup

#

but I don't want to expose core

ivory sleet
#

yea

#

so whats the issue?

river oracle
#

how am I supposed to access the impl if its not exposed

#
public class CoreRavenAPI implements RavenAPI {

    @Override
    public DatabaseConnection getDatabaseConnection(@NotNull DatabaseType type) {
        Preconditions.checkNotNull(type, "Database type cannot be null");

        final SupportedDatabase supportedDatabase = SupportedDatabase.fromDatabaseType(type);
        return supportedDatabase.getConnection();
    }

    public void registerTypeConverter(@NotNull TypeConverter<?, ?> converter){
        Preconditions.checkNotNull(converter, "Type converter cannot be null");

        TypeConversionManager.getInstance().register(converter);
    }

}``` this class is great and all
#

but its not exposed

ivory sleet
#

like thats easy as I said

#

u make sure to set the impl

#

somewhere

#

like the api allows its users to provide impl

river oracle
#

I think I'm just misusing a pattern then, because that doesn't really achieve what I want

ivory sleet
#

mye, like thing is

#

if a plugin provides an api to interact with its own functionality

#

then that plugin would be the first one to instantiate and set things up

#

like setting the impl up

river oracle
ivory sleet
#

bootstrap properly

#

but if its the other way around where u just provide a set of framework classes for the api consumer to consume

#

then its not wrong to package the impl along with the interfaces

#

(same module)

river oracle
#

the only reason the API exists is to be used internally, though it could technically be implemented by someone else that is not the intent at all

ivory sleet
#

java does this, bukkit to some extent, spring, caffeine etc

river oracle
ivory sleet
#

na what they do is

#

that they just have one module with the interfaces and the impls relevant

#

for instance
Lock interface in java

#

in the same module u'd find ReentrantLock

#

which is a common/default/standard impl

river oracle
#

I'm wondering if I set this up wrong, cuz like is it okay for me to provide the databse impl even though I don't really want it to be used?

ivory sleet
#

well ask the opposite

#

is it not okay?

river oracle
#

I mean you could, but it'd be better to just use the API methods

ivory sleet
#

I mean u ship the impl in the same module right

#

but u dont have to expose it

#

u can turn the impl into pack priv

#

or be cool

#

and provide a static factory method that returns the impl

river oracle
#

idk factory pattern šŸ¤·ā€ā™‚ļø I've never used it can you explain

ivory sleet
#

this way, the user gets facade-d with a creation function

#

u decouple instantiation from creation of an object

#

read this

#

think it talks about it

river oracle
#

so if I'm understanding this right do I just say fuck it
expose, core, and api. and in core put a static factory method

ivory sleet
#

na I dont mean u should expose core

#

I just say u can ship it in the same module as api

river oracle
#

API is compeltely isolated atm

#

?paste

undone axleBOT
river oracle
ivory sleet
#

expose means =~ user has to explicitly depend on said class at compile time by importing classpath

river oracle
ivory sleet
#

depends

river oracle
#

not all of them, well most of them depending on use case

ivory sleet
#

if u have a large project with miscellaneous library functionalities

#

u might wanna split those functionalities up into modules rather

#

like 1 module for database stuff, 1 module for lets say permission stuff

#

etc

#

anyway y2k

#

sometimes u have to compromise design for usability

river oracle
#

My project is rather specific to 1 goal, make database use easier. Core impl, object mappers.
Database providers contains submodules that implement the Database API inorder to standardize its implementation accross providers

#

the main goal would be to make it very easy for the user to connect to a database platform without having to learn an entire huge library, rather use go to my DatabaseType enum and select a type and boom its ready.

#

I could expose core, it wouldn't have many adverse affects outside of providing direct access to ObjectMapper, and a singular manager class that could just be used instead of the main API class

ivory sleet
#

that sounds like it could done in 1 module

#

and then u can probably have more modules for different database impls

tardy delta
#

oeh hello conclure

ivory sleet
#

hai

river oracle
#

than dist that

ivory sleet
#

ye

#

I mean there is no perfect structure

#

remember that

river oracle
#

I have a question about gradle though

ivory sleet
#

yea

thin frost
#

How to prevent ghasts from despawning in overworld? I wanna spawn em by code

river oracle
# ivory sleet yea

whats the main difference between api and implementation

    api project(':api')
    implementation project(':core') 
    implementation project(':database-providers')
    implementation project(':database-providers:mongodb')
    implementation project(':database-providers:nitrite')
ivory sleet
#

oo

#

api is transitive

river oracle
#

api too my knowledge just ensure transitivity vs implementation not ensuring that

ivory sleet
#

yes

#

implementation = runtimeOnly + compileOnly

#

api = runtimeOnly + compileOnly + transitive

river oracle
#

so would it be logical to have it setup like I do

#

api is transitive and all other modules aren't

ivory sleet
#

uh sure

river oracle
#

or does it ultimately not matter

ivory sleet
#

I like to avoid transitivity and let the dependency user declare it

#

if needed

#

but it hugely depends on what dependency im writing

river oracle
#

cuz wouldn't that just be cyclic dependency

median trench
#

Why does Player#sendBlockDamage flicker? Shouldn't it actually work just like the ClientboundBlockDestructionPacket packet?

ivory sleet
#

think so?

#

I mean in worst case let the user just call the impl

#

like they can still work around making their structure SOLID

#

like I assume my api users arent gonna be braindead

river oracle
#

I just assume everyone is braindead

ivory sleet
#

even if I lets say provide

interface EpicDatabase {

}

class StandardImplEpicDatabase implement thatthing{

}

class SOmeOtherCustoModuleDatabseImplƶ implement alsothatthing {

}
#

I might have a static factory for the standard impl

#

but like

#

for the other impl

#

that may not even be present

#

id let the user call that, and instead just document that it exists if u use that module lol

#

I might provide a static factory to again decouple instantiation from creation

river oracle
#

yeah I'm going to refactor my design to just be better

#

moving a lot of uneeded crap out of core into api than setting up the static factory as you said

ivory sleet
#

ye

#

well do what u think is best, assume the user knows java intermediately+ , but doesnt know ur code

river oracle
ivory sleet
#

dist ?

river oracle
#

e.g. dist package that shadows all of your sections

#

and then you can depend on instead of depending on each module individually

ivory sleet
#

ah I mean u can

#

sometimes ppl do it

#

but in gradle

#

just create a function

#

that does it

#

to adhere to DRY principle

river oracle
#

?paste

undone axleBOT
river oracle
#

is this effective? idk much gradle lol

ivory sleet
#

java.sourceCompatibility = JavaVersion.VERSION_17

#

yikes

#

else mye

#

prov fine

river oracle
ivory sleet
#

the chaintool

#

just better

#

toolchain*

river oracle
#

idk what that is lmao

river oracle
#

ahh ic

ivory sleet
#

obv gradle groovy is a sin

#

but ye

river oracle
#

:O

#

i don't feel like switching lmao

#

I'm weird I'm a big maven guy

ivory sleet
#

dw

#

its fine

#

altho sinful

river oracle
#

I only switched to gradle to learn it :P

quiet ice
#

Though honestly - groovy isn't that bad. The only issue is that the bytecode it generates is undeniably unreadable

fallow latch
#

is it CraftZombie?

quiet ice
#

1.11
Ouch, that is pre-mojmap

fallow latch
#

oh

river oracle
fallow latch
quiet ice
#

defo not

#

Try ZombieEntity

fallow latch
quiet ice
#

Ideally we'd use that mappings comparision ... but I don't have the link at hand

#

So you'd want net.minecraft.world.entity.monster.Zombie

fallow latch
#

wait

#

i dont have that

#

there is only net.minecraft.world.entity.monster.Zombie

#

wait

#

i am blind sorry

quiet ice
#

was about to say

fallow latch
#

šŸ¤¦ā€ā™‚ļø

thin frost
#

Hey guys, two questions - how can I make a arrow I spawn from code be able to go through the original shooting skeleton? The body blocks the projectile so it behaves oddly...

quiet ice
#

Spawn the arrow a bit towards the front

thin frost
#

Thanks!

#

And second is, how can I prevent Ghats from being despawned in my world? I can spawn them by code, but the server appears to be cleaning them up automagically.

quiet ice
#

?jd-s

undone axleBOT
thin frost
#

OK thanks I'll give this a try

#

@quiet ice even though I spawn the arrow infront of the skelly, it appears to be hitting something hmm...

#

Ah hard to capture in an image haha

quiet ice
#

by how much infront do you spawn them? What is the velocity vector?

thin frost
#

The velocity vector is the velocity of the original arrow shot. My code is spawning duplicates of that. The spread can be seen in the image, which seems to be a bit much, also angle is behaving oddly like arrow is bouncing of some invisible collider.

#

Code: private void shootLater(EntityShootBowEvent event, Vector velocity)
{
Location spawnLocation = event.getEntity().getEyeLocation();
spawnLocation.add(spawnLocation.getDirection().multiply(2));

    Arrow arrow = event.getEntity().getWorld().spawn(spawnLocation, Arrow.class);
    arrow.setColor(Color.RED);
    arrow.setDamage(1);
    arrow.setKnockbackStrength(5);
    arrow.setShooter(event.getEntity());
    arrow.setVelocity(velocity);
    arrow.setBounce(false);
    //arrowOne.setVelocity(arrow.getVelocity().rotateAroundY(Math.toRadians(35)));
}
quiet ice
#

Try to do spawnLocation.add(spawnLocation.getDirection().normalize()) instead

#

Also since when does spigot use JOML?

young knoll
#

Since 1.19.4

#

It is used for display entities transformations

quiet ice
#

ah

thin frost
quiet ice
#

no. It'd force it to be a distance of 1 block

thin frost
#

Yes exactly but alright I'll try it

young knoll
#

I wonder if the look vector for an entities has a length of 0

thin frost
#

No, my look vector places the arrow further infront.

quiet ice
#

Yeah I wonder that too...

#

Using the velocity vector would make more sense

young knoll
#

Entity velocity does not relate to where they are looking

quiet ice
#

but it has been ages since I last touched anything spigot

thin frost
#

Using the direction vector and applying that to the eye location correctly positions the arrows further from the skelly. But it's still like in 1/2 of the extra spawned arrows they hit the a invisible collider.

quiet ice
#

Try to debug the velocity vector then - having a small velocity might produce such issues

#

could also be that it collides with the original arrow but that'd be cursed

thin frost
#

Yeah the latter might be it... damn

#

I just wanted to make my skellies more fearsome by "spraying" arrows on 1s intervals 😦

tardy delta
#

holy shit just found out this exists

quiet ice
#

that existed for a while now

tardy delta
#

looks like you can work directly in gh

chrome beacon
#

Yeah

tardy delta
#

i never seem to find out new things šŸ’€

thin frost
thin frost
chrome beacon
tardy delta
#

oeh extensions

thin frost
tardy delta
#

press . on a home page

thin frost
#

Ah cool thanks

remote swallow
#

@river oracle can now code in his browser

tardy delta
#

now figuring out where i see the changes files

young knoll
#

That's pretty cool

#

I assume no code Intelisense though

tardy delta
#

the shitty vsc as usual

young knoll
#

Better than nothing

runic edge
#

Hey, I am currently coding a Friends System and got a bug with Chat Serialization. The left clickable message lost its color code any Ideas why?

tardy delta
#

?code

#

ah thats not a thing, anyways show code

remote swallow
#

?nocode fourteen

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.

runic edge
#

Wait a second šŸ™‚ I cant post pictures

#

IChatBaseComponent chat = IChatBaseComponent.ChatSerializer.a( "{"text":"" + Main.prefix + "§a" + p.getName() + " §7hat dir eine Freundschaftsanfrage gesendet."," +
""extra":[{"text":" §a[Annehmen] ","hoverEvent":{"action":"show_text"," +
" "value":"§aFreundschaftsanfrage annehmen"},"clickEvent":{"action":"run_command","value":"/friend accept " + p.getName() + ""}}," +
"{"text":"§c[Ablehnen]","hoverEvent":{"action":"show_text","value":"§cFreundschaftsanfrage ablehnen"},"clickEvent":{"action":"run_command","value":"/friend deny " + p.getName() + ""}}]}");
PacketPlayOutChat packet = new PacketPlayOutChat(chat);
((CraftPlayer) t).getHandle().playerConnection.sendPacket(packet);

tardy delta
#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
remote swallow
#

any reason for using nms for that? instead of bungee components

tardy delta
#

why are you using mc internals tho

chrome beacon
#

Great we all wrote that at the same time

tardy delta
runic edge
runic edge
tardy delta
#

i definetely didnt paste the whole mc worldgen files in there, suffer gh

#

spaghetti?

runic edge
#

TextComponent message = new TextComponent( "Test :3" );
message.setClickEvent( new ClickEvent( ClickEvent.Action.OPEN_URL, "http://spigotmc.org" ) );
message.setHoverEvent( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Besuche SpigotMC.org!").create() ) );
p.sendMessage( message ); <-- message is underlined red

I used this example but "message" is wrong

tardy delta
#

p.spigot().sendMessage(messga)

runic edge
#

oh thanks

runic edge
#

like one message where you can accept a request and another where you can deny it

tardy delta
#

different as in two clickable things on the same line?

runic edge
#

yes

#

like this: "Text [clickable1] [clickable2]"

tardy delta
#

ive done smth similar back in the days

#

should be sending smth like [accept | decline] with accept green and decline red

#

remember that event() only applies an event on the previous action

runic edge
#

Thank you very much I will try this really quick

runic edge
tardy delta
#

it just delegates to player.spigot().sendMessage

runic edge
#

oh okay

fallow latch
chrome beacon
#

You probably want to make your own goals

fallow latch
#

i did find two method called registerGoals and addBehaviourGoals, am i suppose to override these two?

chrome beacon
#

Just registerGoals

#

but do check I might have forgotten

echo basalt
#

just look at the code itself

fallow latch
#

ok thank you, and i shouldnt call super().registerGoals if i dont want the default pathfinding right?

quiet ice
#

most likely

jagged bobcat
#

if I want to use reflections for a method and the method is (code) what do I put for K value? ```java
get(@Nullable K key)

river oracle
jagged bobcat
#

ty

wise mesa
#

is there an easy way to change the max durability of an item

young knoll
#

No

#

You need to make your own durability system

wise mesa
#

ugh

young knoll
#

Thankfully it’s fairly easy

#

Just pdc and like 2 listeners

wise mesa
#

does durability go down by 1 every time an item is used

#

for regular ones

#

or wait

#

nevermind does the event tell you how much durability it would've lost

young knoll
#

Yes

#

And then the mending event for mending

wise mesa
#

ah

jagged bobcat
wise mesa
#

how do I set a loot table

#

Server has a getLootTable method but not a setLootTable method

tardy delta
#

caught myself in 4k bruh

young knoll
#

What do you mean set a loot table

#

Like override a vanilla one

wise mesa
#

no want to add a new one

#

like how you could in a datapack

#

for my custom structures

young knoll
#

Then you deploy a datapack

#

Spigot does not let you make new LootTables

wise mesa
#

but I'd like to make them at runtime

#

that's unfortunate

ancient plank
#

Durability gives me flashbacks

young knoll
#

You can like

wise mesa
#

we have custom items on our server that would be really difficult to do in a file

young knoll
#

Generate a datapack at runtime and tell the game to load it

wise mesa
#

maybe

young knoll
#

Keep in mind only some datapack features can be hotloaded

shadow night
#

Using datapacks to make a plugin work sounds like pain

tall furnace
#

Hey guys, any way an item can be registered with Spigot so that it can appear in the classic /give command? Or so that it shows up in the creative inventory?

wise mesa
#

very difficult

#

i just made my own /rgive command

tall furnace
#

Yeah, wanting to avoid that

wise mesa
#

that lets you get custom items in the same fashion

tall furnace
#

I could probably also replace the entire creative inventory with a custom one but that would be a colossal pain

young knoll
#

You cannot modify the creative inventory

#

It is client side

wise mesa
#

you could use one of the lines in that template page thing

#

but that's a manual thing

shadow night
young knoll
#

Well, it might be less client side now since it has some datapack features

#

But afaik the server still can’t add shit to it

wise mesa
#

works across different plugins too

tardy delta
#

when you dont know what your own math does šŸ’€

wise mesa
tardy delta
#

oh

wise mesa
#

and then gives them knockback based on the sine and cosine of that

#

im pretty sure

tardy delta
#

i dont know math

jagged bobcat
#

good field name "somevalue"

wise mesa
#

radians = 2 pi * degrees / 360

#

iirc

#

i should know i literally just took calculus

#

we don't really have to convert ever though

wise mesa
#

so much effort though

tardy delta
#

just disable the update check šŸ¤“

#

aah more maths

#

couldnt figure out how mojang does stuff

young knoll
#

It’s possible they can’t wither

normal thicket
#

Lol leave it like that it is masterpiece

#

||jk||

round finch
#

Row -1 wtf

#

It feels so wrong
But idk anything about that code

grim oak
#

Hi, does anyone know what all the triggers are for the PlayerHarvestBlockEvent. I want to check if a player harvests a crop to level up a 'farming skill' so it breaks the logic if there are non-crops which can be 'harvested'.

jagged bobcat
#

1 sec checking nms

young knoll
#

Iirc that’s only for sweet berry bushes

#

Harvesting crops is just a block break event

jagged bobcat
#

Intellij crashes when loading welp

tardy delta
#

not really working all the times but ye

young knoll
#

50% of the time it works every time

tardy delta
#

well it only works sometimes but i have to click the recipe first and capture the packet cuz i cant figure out what the player wants to craft now

dense valley
#

let's say i make 5 of these messages that are gonna be in the chat when someone tp, how can i make it so that, when someone tps, the plugin RANDOMLY selects one of the 5 messages and sends it to the chat? the messages are randomly selected everytime someone tp's and cannot be the same 2 times in a row

young knoll
#

How are they stored

tardy delta
#

Random?

#

messageList.get(random.nextInt(messageList.size()))

young knoll
#

Yep for a list that works

#

But doesn’t cover the no same message twice in a row

#

Granted you could simply store the last message and constantly reroll if the last and the chosen message are the same

tardy delta
#

^^

young knoll
#

Or store the last index rather than the message and do the same

dense valley
dense valley
tardy delta
#

that returns a random message

dense valley
#

i was using a mouse to write šŸ’€

dense valley
tardy delta
#

well you have to send it obvioudly

#

and i hope you know whaat List#get returns

#

dont even know where your messages are supposed to come from

dense valley
#

bro

#

can you answer the fucking question?

#

now i am being mean and you prolly wont

tardy delta
#

at the here

dense valley
#

but i asked 3 times

#

ok thanks

#

it only gives me red

#

errors

tardy delta
#

well where do your messages come from

dense valley
#

wdym

tardy delta
#

you said you wanted to pick a random message, where do they come from?

wise mesa
#

do you have a list of messages

dense valley
#

a list of messages

#

i can't just put

p.sendMessage(" ")
p.sendMessage(" ")
p.sendMessage(" ")

#

that is not a list

#

so how do i make it

wise mesa
#

maybe you should consider learning some basic java first?

#

but if you really must know

#

or no just google how do I make a list in java

#

that will do you wonders

round finch
#

learn programming concepts

young knoll
#

An array works too

wise mesa
#

but ideally you'd get a list from the config here

round finch
#

do you mean looping though list?

wise mesa
dense valley
#

but now i completely forgot

#

EVERYTHINH

young knoll
#

Real

#

Todd Howard is here

dense valley
#

CoemsšŸ¤‘

round finch
#

yea x for doubt and notch is my uncle

#

study some programing practices and you will be improving ā™”

#

nothing bad meant here ^^

dense valley
#

ok

#

i am not gonan get angry

#

just a little irriteded

#

idk if i spelt that right

dense valley
#

in 2021

round finch
#

jr dev?

echo basalt
#

I've done a commission for a microsoft dev before

dense valley
quiet ice
#

soo... did you do their homework or what?

dense valley
#

i worked there

dense valley
#

fucking god

echo basalt
#

probably scrubbling floors

dense valley
#

come on

echo basalt
#

man had weird requirements

#

like support for chinese characters

young knoll
#

I know it was some random employee

quiet ice
#

honestly that one is understandable

young knoll
#

But I like to imagine it was bill gates

echo basalt
dense valley
#

haha

echo basalt
#

??

#

you're literally a clown what you on about

quiet ice
#

geolykt.exe stopped working

dense valley
dense valley
#

is it so hard to belive that after 2 years somebody forgets things?

quiet ice
#

yes

echo basalt
#

yes

dense valley
#

how

young knoll
#

If you forget even the basics of collections after 2 years of not programming

rough ibex
#

that is one thing that's hard to believe, yes

quiet ice
#

I'd still be able to reasonably continue the projects I stopped working on 3 years ago

echo basalt
#

I used to code when I was a literal toddler

rough ibex
echo basalt
#

then took a break to be an actual child

young knoll
#

You may have early onset alzheimer's

echo basalt
#

when I got to java I already had the bases of things

#

I knew how to use collections and all

young knoll
#

2 years is not that long

dense valley
quiet ice
echo basalt
#

Had it been like 5 years since I last coded? sure!

dense valley
echo basalt
#

did I know how to use a for loop? of course

young knoll
#

2 years is only a single covid lockdown

rough ibex
#

if you've been actually learning, the concepts stick with you

dense valley
echo basalt
# dense valley not true

are you literally trying to gaslight me and say that my life experience is not real because it doesn't match yours

quiet ice
#

Yeah, time flies astonishingly quickly once you think about it

rough ibex
#

maybe not specific language ticks

echo basalt
#

then moved into C

round finch
echo basalt
#

I made bots for shitty flash games

dense valley
#

BRO

dense valley
rough ibex
#

gaslight^2

echo basalt
#

get clowned

quiet ice
#

If anything we are trying to gaslight you

dense valley
rough ibex
#

what

echo basalt
#

doxx me if you can

quiet ice
#

we saw that

echo basalt
dense valley
round finch
#

./undoxx

dense valley
echo basalt
#

I dare you

rough ibex
#

ctrl shift z

quiet ice
young knoll
#

Has anyone ever worked at both microsoft and valve in their lifetime

#

I wonder

echo basalt
#

probably some community manager

#

or marketing associate or whatever

dense valley
round finch
#

yeah in my second life i were working for all the big tech companies

echo basalt
round finch
#

these bs stories omg haha

young knoll
#

Like

dense valley
echo basalt
#

(it's drawn and not taken from an anime clown_2 )

echo basalt
#

did I stutter

#

I'll give you 100 bucks if you find the episode

dense valley
quiet ice
round finch
#

ay yo free money?

echo basalt
#

nice try

quiet ice
#

I was kidding. I don't think you can get anything useful out of whois requests anyways these days

dense valley
#

this is my info

round finch
#

question can you really be doxxed if you dox yourself?

dense valley
#

delete it rn

rough ibex
#

what

quiet ice
#

Uhm. Who is going to ping Choco?

dense valley
echo basalt
rough ibex
dense valley
echo basalt
#

only fools ping choco

rough ibex
#

dox yourself before it happens anyway

dense valley
quiet ice
young knoll
#

Wise men say

#

Only fools ping choco

#

But I can't help

river oracle
#

what is going on here

young knoll
#

@worldly ingoting

round finch
#

@worldly ingot_fake

river oracle
#

I see a lack of bannable offenses going on

echo basalt
round finch
#

oh no

river oracle
#

poor Choco

round finch
#

it is still pinged him

quiet ice
round finch
#

wtf discord

river oracle
young knoll
round finch
#

go fick urself discord

young knoll
#

Clears throat

#

S e x

echo basalt
#

you can say go fuck yourself

#

it's not bannable

round finch
# young knoll S e x

AYO
#vtuber #envtuber #minecraft

───────────────────────────

🐾 SOCIALS 🐾

🐦 āžœ https://twitter.com/obkatiekat
šŸŽ® āžœ https://twitch.tv/obkatiekat
šŸŽ„ āžœ http://youtube.com/obkatiekat
šŸ—Øļø āžœ http://discord.gg/obkatiekat
šŸ  āžœ http://linktr.ee/obkatiekat

šŸŽØ#OBKArt || šŸŽ¬#OBKlips

Businessāœ‰ļø āžœ obkatiekat@mythictalent.com

───────────────────────────

🐾 JOIN M...

ā–¶ Play video
#

i said nothing

quiet ice
#

but what should the children here think about it?

quiet ice
#

that was the shit back then

echo basalt
round finch
#

ah - the jokes of minecraft development
update format

echo basalt
#

We don't have 9 year olds here

quiet ice
#

except perhaps some of the trolls in here

echo basalt
#

and honestly swearing is so normalized nowadays that they wouldn't care

round finch
#

9 year old using chatgpt to hide

dense valley
echo basalt
#

you have 6 year olds watching adult content

echo basalt
wet breach
river oracle
#

they tend to be annoying

echo basalt
#

but yeah 9 year olds tend to like

dense valley
# round finch 9 year old using chatgpt to hide

If someone is concerned that a 9-year-old is using ChatGPT to hide something, it might be appropriate to suggest that they talk to the child's parent or guardian to address the issue. It's important to ensure that children are using technology responsibly and safely.

young knoll
#

As if that has ever stopped someone

wet breach
echo basalt
#

pretend they're older in a very cringy way

wet breach
#

if this were true kids couldn't use netflix

echo basalt
#

well

rough ibex
#

they mean the discord T&C

dense valley
#

me when i have the iq of an electron

quiet ice
rough ibex
#

There's a condition you have to be 13+ to use discord

round finch
#

the internet development have definitely changes the next generations

dense valley
young knoll
#

You only need to be old enough to subtract 13 from the current year to use discord

rough ibex
#

no

wet breach
rough ibex
#

" you confirm that you’re at least 13 years old and meet the minimum age required by the laws in your country."

dense valley
rough ibex
#

not my problem

dense valley
#

prolly an ip grabber

rough ibex
#

uh huh; damn, you got me

terse ore
#

ip grbber yeah

wet breach
rough ibex
#

Hackerplan foiled again

dense valley
terse ore
#

they already know ur ip

echo basalt
round finch
#

bruh it is legit

dense valley
round finch
#

lol

rough ibex
#

there's an and in there

young knoll
#

You have to be 13 and meet the minimum age in your country

wet breach
round finch
echo basalt
dense valley
#

14

dense valley
echo basalt
#

I'm stating that discord in specific has TOS indicating that you need to be 13 to use their platform

rough ibex
#

also this is insanely off topic

echo basalt
#

I don't care about coppa

echo basalt
wet breach
dense valley
round finch
#

disrecord xd

quiet ice
terse ore
dense valley
#

we both are 14+

terse ore
#

you're literally connected to discord

dense valley
dense valley
#

you are saying the most dumb shit

echo basalt
wet breach
dense valley
quiet ice
#

Yes. But all the "think of the children!" laws combined make it kinda hard to use for a child

echo basalt
#

mans AI generated

wet breach
#

the only law that exists involves websites in regards to user accounts and the sorts or when it asks for personal information that in order to obtain such things without parental consent they have to be 13 or older, however if parental consent is obtained its fine as well

dense valley
# echo basalt mans AI generated

It depends on the context of the statement, but here are a few possible replies:

"Yes, I'm an AI language model designed to simulate human-like responses. How can I assist you?"
"That's correct! I'm ChatGPT, an AI language model developed by OpenAI. How can I help you today?"
"You got me! I'm an AI language model created by OpenAI. But don't worry, I'm here to provide helpful and informative responses. What can I do for you?"

wet breach
round finch
#

that man is developed from chatgpt šŸ˜‚

quiet ice
#

Like de-jure there are still parental consent and other regulations so that children can use the internet - but companies will just be lazy and not care about that parental law stuff and say that children universally are banned

echo basalt
quiet ice
#

So real children use IRC, which does not have stupid T&Cs

wet breach
round finch
#

tell chatgpt you want some b**chs

young knoll
#

I think one state wanted to prevent children from using social media at all

echo basalt
#

I agree

#

get em out of here

young knoll
#

I wonder if social media would enforce that or just ban that entire state from using it XD

dense valley
echo basalt
#

there are like 2 states that are mandating ID verification to watch adult content

dense valley
#

or at least in my country

round finch
rough ibex
#

No, not 4chan

dense valley
#

not having anything to do with 4chan

rough ibex
#

probably youtube shovelvideos

young knoll
#

I can tell you which is the easiest

echo basalt
#

the adult sites are following stance 2

young knoll
#

Impressive

#

I would have went with 3

round finch
#

Yeet em into space!

#

like portal 2

young knoll
#

Send em to the moon

dense valley
#

yall

#

porn is bad

#

but

quiet ice
#

Or ... burn their house down.

round finch
#

SSSPPPAAACCEEE

dense valley
#

like

quiet ice
#

watch your mouth

young knoll
#

I'M GOING TO HAVE MY ENGINEERS INVENT A COMBUSTABLE LEMON THAT BURNS YOUR HOUSE DOWN

rough ibex
#

oh boy

round finch
dense valley
round finch
#

my guy

dense valley
quiet ice
dense valley
#

yall

#

i'm gettin a low taper

round finch
tardy delta
#

šŸ¤”

dense valley
round finch
#

ohh he changed it

dense valley
#

don't want skinny sides but since i am making a low taper cut some of the sides off

#

a lot

round finch
#

coward

dense valley
#

i mean

#

cut my ear off too

rough ibex
#

why is this conversation still happening

young knoll
dense valley
rough ibex
#

ignore and wait the topic to change

#

luigi board

round finch
#

@dense valley you like creepy stuff like fnaf?

round finch
#

you seem to have some laying somewhere to quickly post

#

conclusion

dense valley
#

what you talking about

dense valley
round finch
#

šŸ•µļø deduction

#

my guy

dense valley
#

what the fuck

#

nah imma go odd

#

nah

#

imma keep programming

#

nah

round finch
#

take care

dense valley
#

imma set up a faucet server to tst my pulgin

echo basalt
#

?whereami

dense valley
#

OH FUCK

#

I MWNT

#

Spigot

round finch
#

spigot real life edition

wise mesa
#

with the fawe api

#

is there a way to run a callback after its done pasting a schematic

#

i understand how to load and paste a schematic with the regular worldedit api

#

but since fawe does it over a couple ticks I'd like to know when its done

echo basalt
#

uhh

#

Clipboard#paste should be a blocking method

#

that you can call async

wise mesa
#

ohhhhh

#

that'll work

dense valley
#

YALL

#

I CAN'T MAKE A FUCKING FILE BAT

#

BAT FILE*

tender shard
#

WHY NOT

round finch
#

skill issue

dense valley
tender shard
#

I CAN DO IT JUST FINE

dense valley
tender shard
#

STOP SCREAMING AT ME

young knoll
#

I LIKE PIE

dense valley
#

Chronically online

round finch
#

I HEAR NO SCREEAMING?

quiet ice
#

chmod 755 to the rescue šŸ˜Ž

rough ibex
#

I REALLY WANT TO BUY A SCENTED CANDLE RIGHT NOW

dense valley
#

HOLD ON

#

YOU A FEMBOY?

round finch
#

WHY PEOPLE SO QUIET?

tender shard
young knoll
#

HELP PLEASE WHAT THE FUCK IS KEYBOARD

quiet ice
#

Does cafebabe not punish people for capslock anymore?

dense valley
round finch
#

bruh u got schooled

tender shard
#

sure

quiet ice
#

mfnalex doing the worst mistake of their life

tender shard
#

I'm just playing stray

dense valley
#

had to stop cuz i might have gone to jail (in game obv just trolling, a joke, i do not support any criminal activity, harrasment, sexual harrasment, anything that is against any law of the constitution in general)

#

(idk what to say)

echo basalt
#

you can just be quiet

round finch
#

detective ready to arrest

wise mesa
#

so anyways

#

@tender shard slight bug in armor equip event

tender shard
#

elaborate please

wise mesa
#

sorry currently typing

#

newly in 1.19.4 you can right click with a piece of armor to replace the one you're currently wearing

#

as opposed to before you could only do it if you weren't wearing anything

#

and if you do that your event doesn't run

tender shard
#

ah ok thx, open a github issue please so I don't forget (or pull request ofc, if you got time šŸ˜› )

wise mesa
#

no problem

young knoll
#

Spigot armor event when

wise mesa
#

I'll definitely make an issue, might even pr if I feel up to it

worldly ingot
wise mesa
#

its certainly not an urgent issue

young knoll
#

I knew we had one

wise mesa
#

we have the issue marked as low priority on our plugin lol

young knoll
#

I was hoping it wasn't stuck in draft hell

wise mesa
#

and I just kept forgetting to mention it

#

are you able to make issues on forked repos?

#

@tender shard the option is just not there lol

quiet ice
#

You are able to - but the forker needs to set the option manually

wise mesa
#

I added /issues to the url and it just took me to the pull requests page

#

ohhhhh

quiet ice
#

By default issues cannot be created

wise mesa
#

well hopefully alex will fix that

tender shard
#

found it

#

enabled it

wise mesa
#

appreciate

young knoll
remote swallow
#

coll

#

why dont you make a new one

worldly ingot
#

Well Diamond isn't dead, just busy is all lol

young knoll
#

That's why

echo basalt
#

diamondxr?

worldly ingot
#

DiamondDagger

opal juniper
#

i guess it does still look good, why is it not merged?

#

i guess cause merge conflicts, can we get this rebased?

young knoll
#

I would like to see it merged too

#

But it may need an update for the same reason as the lib

worldly ingot
#

Bukkit seems fine (just adds an event class and doc comment), but yeah the patches need updating

#

Just not sure how available Diamond is as of late

young knoll
#

Shame others can’t really modify it

worldly ingot
#

I feel like I have commit access to his Bukkit & CraftBukkit repos

#

I worked with him on a few other PRs a long while ago

#

Yeah I do

young knoll
#

I would very much like a good reliable armor event for armor effects and whatnot

#

Rather than what I currently do which is check via a timer

west oxide
#

hello, i found this code on the spigot source code

if (entity != null) {
            double d0 = entity.locX - this.locX;

            double d1;

            for (
              d1 = entity.locZ - this.locZ;
              d0 * d0 + d1 * d1 < 1.0E-4D;
              d1 = (Math.random() - Math.random()) * 0.01D
            ) {
              d0 = (Math.random() - Math.random()) * 0.01D;
            }

            this.aw =
              (float) (
                MathHelper.b(d1, d0) *
                180.0D /
                3.1415927410125732D -
                (double) this.yaw
              );
            this.a(entity, f, d0, d1);
          } else {
            this.aw = (float) ((int) (Math.random() * 2.0D) * 180);
          }```
#

that i believe is responsavble for the kb stuff

#

can someone tell me what the aw variable is for pls

#

i am trying to make the kb not random

young knoll
#

That looks like minecraft source

#

Not spigot

west oxide
#

am stupid

#

yes it is

#

but do you know what the aw variable is for ?

#

or how ican make the kb nor random

young knoll
#

I would just completely override it with your own

#

And then fine tune it

rough ibex
#

likely converting it to radians

west oxide
#

wdym

young knoll
#

I don’t think mappings cover local variables

#

Do they?

chrome beacon
#

I believe that's 1.8 code

west oxide
#

yes

chrome beacon
#

So no mojmaps available either way

west oxide
#

i'll look further and try to debug, thanks for the support

tranquil dome
#

If a plugin is altering the death messages on PlayerDeathEvent, how do I ensure I get the changed death message when my plugin handles the PlayerDeathEvent?

young knoll
#

Make sure you listen after

#

So you need to be on a higher priority

#

Or loaded after that plugin (I think?)

hazy parrot
#

there is monitor i think

#

that is executed last

worldly ingot
#

As the name implies, don't mutate anything in the event though

#

It's for... well... monitoring

young knoll
#

Does load order actually effect listener order?

#

I think it does

tranquil dome
#

I am not mutating anything. I just need to get the death message after it's changed

worldly ingot
#

Then yeah, MONITOR is fine

tranquil dome
#

alright thanks

young knoll
#

When will spigot enforce no mutation on monitor priority

#

Smh my head