#help-development

1 messages · Page 1865 of 1

waxen plinth
#

Mine is looking code 😎

ivory sleet
#

oh lol

fathom cobalt
#

Nozemi yours isn’t bad but the comment is redundant, it could be just extracted to its own method where the name of the method is explanatory such that it can express your intent of the code
yeah, I just added it to clarify for those who aren't familiar with Kotlin

ivory sleet
#

Ah alright

paper viper
#

you should only add comments when you fail to express yourself codewise

waxen plinth
#

@dense heath still participating?

paper viper
#

Hurry up

dense heath
ivory sleet
#

6 min left

waxen plinth
#

Oh ok

fathom cobalt
#

but yeah, my idea is to implement something similar to what you have @waxen plinth, with your command files and what not

waxen plinth
#

You could use mine 👀

#

It's mature and stable and Blockchain and tech stack + many other buzzwords

fathom cobalt
#

but what if I want to do more? 😮

waxen plinth
#

Like what

fathom cobalt
#

it's open source fwiw, so I guess that could be done

waxen plinth
#

It has a pretty huge feature set

fathom cobalt
#

idk, it's also nice for the sake of learning to implement my own

ivory sleet
#

Red is there a highlighting color plugin on idea for your command file format thingy?

waxen plinth
#

Yes

fathom cobalt
#

if I implement my own doesn't mean I have to use it

waxen plinth
#

For intellij

ivory sleet
#

That’s very delightful to hear

fathom cobalt
#
---
- name: "command_name"
  description: "This is a testing command."
  actions:
    - name: "test"
      type: "send_message"
      arguments:
        - name: "message"
          type: "PLAIN_TEXT"
          value: "Message content. "
        - name: "message_additional"
          type: "PLAIN_TEXT"
          value: "More message?"
    - name: "test2"
      type: "send_message"
      arguments:
        - name: "message"
          type: "PLAIN_TEXT"
          value: "- New message?"

- name: "command_name2"
  description: "This is a command that will broadcast a message."
  actions:
    - name: "broadcast"
      type: "broadcast_message"
      arguments:
        # Broadcast a message
        - name: "message" # Can be whatever really, it's for placeholder targeting.
          type: ""```
waxen plinth
#

Isn't it?

fathom cobalt
#

I did this for testing purposes 😛

waxen plinth
#

I didn't even make it

#

That's what's even better

ivory sleet
#

Oo even greater

#

Yeah

waxen plinth
#

Someone else made it

ivory sleet
#

Haha free stonks

ivory sleet
fathom cobalt
#

this is just a proof of concept though

young knoll
#

I don't like how you do arrays

fathom cobalt
ivory sleet
#

Like nothing personal, but yaml specs are just too diverse

young knoll
#

It's a scripting language for spigot

waxen plinth
#

It's a shitty scripting language for plugins

fathom cobalt
#

I was planning to make my plugin able to load .class files from plugin directory tbh

paper viper
waxen plinth
#

Yeah

fathom cobalt
#

whether it's any good or cool in use is another story

waxen plinth
#

I have a library that helps with parsing though

fathom cobalt
waxen plinth
#

If you want to make your own format

ivory sleet
#

Ah jackson is nice

#

Altho moshi:3

paper viper
#

Jackson is fast too

#

right

#

faster than gson

fathom cobalt
#

yeah

#

gson is terrible

#

fucking hate that

waxen plinth
#

Yeah but gson isn't really about speed

paper viper
#

mhm

ivory sleet
#

Just don’t use json simple and it’s pog

paper viper
#

Gson is simple

#

well tbh

#

all the json libs are

#

But

#

Lol

fathom cobalt
#

Jackson is simpler imo

ivory sleet
#

I use moshi, it’s perfect

#

Gson but on steroids

waxen plinth
#

Bk better hurry up

quaint mantle
#

for FileConfiguration what would be the best way to delete a value / location in it? just by setting it to an empty string or what

waxen plinth
#

Set it to null

ivory sleet
#

Times out

waxen plinth
#

It removes it

#

Damn

quaint mantle
ivory sleet
#

@dense heath got something for us?

#

(No shame on you if you don’t)

waxen plinth
#

I have another challenge ready for the next round, or someone else can suggest one

paper viper
#

make google

dense heath
#

Just started writing code, had to grab some of my old code lol

young knoll
#

You want painful YAML script?

fathom cobalt
#

but yeah, I can definitely manually register event listeners and commands, but I'd like to have my plugin base class automatically do it

young knoll
#
abilities:
  - triggers: TICK
    effects:
      - ITEM_COOLDOWN(user,shield,1200)

  - triggers: ORIGIN_ADDED
    effects:
      - 'ADD_ATTRIBUTE(user,so:shell_armor,generic_armor,add_number,4)'
      - 'ADD_ATTRIBUTE(user,so:no_legs,generic_movement_speed,add_scalar,-0.2)'

  - triggers: HAND_ITEM_SWAPPED
    conditions:
      - IS_SNEAKING(user)
    effects:
      - SHELL_SHIELD(user)

  - triggers: ORIGIN_REMOVED
    effects:
      - SHELL_SHIELD(user)
      - 'REMOVE_ATTRIBUTE(user,so:shell_armor,generic_armor)'
      - 'REMOVE_ATTRIBUTE(user,so:no_legs,generic_movement_speed)'
      - ITEM_COOLDOWN(user,shield,0)

  - triggers: ENTITY_TARGET
    conditions:
      - TARGET_REASON(closest_player)
      - ENTITY_TYPE(opponent,shulker)
    effects:
      - CANCEL_EVENT()
#

Enjoy

fathom cobalt
#

damn 😛

ivory sleet
#

Looks scrumptious

waxen plinth
#

oh god

#

It's python but even worse somehow

paper viper
#

You know, I want a file format which doesn't use indentations, but also doesn't have so many curly brackets its hard to keep track of

#

and also doesnt use - on every new line

waxen plinth
#

Lisp

paper viper
#

cause thats ugly af

#

Lol

young knoll
#

Yeah but python is interpreted

ivory sleet
#

Believe toml might be your answer

paper viper
#

I was thinking that too

#

or even a .properties is enough

#

sometimes

ivory sleet
#

Cant hocon specialize in a various amount of identifiers

fathom cobalt
#

HOCON or TOML, but if it's really simple, regular properties will do the job

waxen plinth
#

Noz, up for another round?

fathom cobalt
#

is there really any point? 😛 I need to work out my library before

#

will be more fun when I've developed my library more

waxen plinth
#

Mmk

ivory sleet
#

You could decide to not make a command

waxen plinth
#

If you wanna make your own format

#

I have a library for that too 👀

ivory sleet
#

a library for not command

#

🌝

waxen plinth
#

A library for making parsers

ivory sleet
#

Ah

fathom cobalt
#

nice

paper viper
#

You know, i want a gui library which uses files

waxen plinth
#

Here's the format for json

paper viper
#

IF-Gui uses xml

#

pain in the ass

ivory sleet
#

Like a lite declarative format

paper viper
#

Mhm

waxen plinth
paper viper
#

cause like a mask is not fun for gui, its messy

#

and everything

waxen plinth
#

I wrote a JSON parser in <70 lines with this

young knoll
fathom cobalt
ivory sleet
fathom cobalt
#

would end up being plugin(s) for my plugin lol

waxen plinth
#

Hmmmm

ivory sleet
#

but for writing, I’d say terrible

paper viper
#

i hate how some server providers have a "configuration files" tab and it only shows files ending with .yml

#

so annoying

ivory sleet
#

Oh yeah

#

Lol

fathom cobalt
#

rofl

#

I just host on a blank VPS, much better

ivory sleet
fathom cobalt
#

full control myself

waxen plinth
#

Hi md

sullen marlin
#

Redlex seems pretty impressive

waxen plinth
#

Thank you

#

It's really not as complicated as it would seem though

sullen marlin
#

Much more advanced than the average thing you see around here

paper viper
#

lol

waxen plinth
#

Well to be fair

#

The average thing you see around here is an NPE with "help pls how do i fix eror"

young knoll
#

heh

fathom cobalt
#

what about array index out of bounds? 😛

hasty prawn
#

Well I'd argue RedLex is indeed much more advanced than that peepoGiggles

waxen plinth
#

lol

#

One would hope

ivory sleet
quaint mantle
#

is there a way to save custom ints to a player via persistentdatacontainer or can i save data to their user.dat file? or no

waxen plinth
#

Yes

#

?pdc

quaint mantle
#

k ty

ivory sleet
#

PersistentDataType.INT or smtng should do the trick

young knoll
#

Integer

ivory sleet
#

(Might be INTEGER)

#

Yeah

quaint mantle
#

i thought you could just didnt see it in javadocs entity.player

waxen plinth
young knoll
waxen plinth
#

It's tough because I understand that many people want to use spigot as a way to learn java

young knoll
#

Or like, a VS code addon

waxen plinth
#

But while it can be a good motivator by giving more interesting projects

#

It's not exactly the best way to learn java, it's like jumping in the deep end

young knoll
#

I can attest to that

waxen plinth
#

And that can make it frustrating to help people

ivory sleet
#

I just feel like people become way too reliant on help channels like these ones before they’ve even tried for themselves

waxen plinth
#

Help vampires

ivory sleet
waxen plinth
#

Term I learned recently and have been using super often ever since

ivory sleet
#

Vampires?

ivory sleet
#

🥲

waxen plinth
# ivory sleet Vampires?

Help vampires, people who rely far too heavily on help/support channels and basically use them to outsource their work rather than learning

ivory sleet
#

Ah nice term

#

A fine addition to my collection

fathom cobalt
ivory sleet
#

🥴

waxen plinth
#

Entitlement is a terrible thing to have when asking for help

hasty prawn
#

Whenever I ask for help I just always remember that I'm the dumbass in the conversation

dense heath
#

Pretty sure I'm done with my submission

dense heath
#

Would someone like to test for me? I don't have the latest stuff on my partition

fathom cobalt
#

here it is

ivory sleet
#

Let’s have a look bk

#

No worries if it doesn’t work, I’ll merely look at the code as is

waxen plinth
#

Yeah let's see it

dense heath
#

Ah shit, can't upload files here

#

Grabbing a file uploader, one sec

ivory sleet
#

?paste

undone axleBOT
ivory sleet
dense heath
#

Little bit bigger than that will allow for lol

ivory sleet
#

Oh

waxen plinth
#

wat

hasty prawn
#

Then you already lost

ivory sleet
#

Interesting

waxen plinth
#

It's just a smite command lol

ivory sleet
#

Hit or miss

dense heath
#

You'll get it when you see it lol

waxen plinth
#

Oh boy

ivory sleet
#

🌝

hasty prawn
#

Gonna be in binary

waxen plinth
#

AbstractSmiteCommandFactoryController

dense heath
#

Whoops! Forgot the plugin.yml :)

waxen plinth
#

Do we really need that

dense heath
#

Well, if you say so!

paper viper
#

we dont care about plugin.yml lmfao

#

just give us code

ivory sleet
#

Yeah we are not gonna test your plugin in an integrated way

waxen plinth
#

^

paper viper
#

mhm

dense heath
#

Oh so should I get rid of the unit tests, then?

waxen plinth
#

We're just here to review the code itself

paper viper
#

just

#

give

#

us

#

the

#

code

ivory sleet
#

you did unit tests?

paper viper
#

Lmfao

ivory sleet
#

Send them tho

dense heath
fathom cobalt
#

paste your code in code blocks in Discord, they shouldn't be so long, right?

ivory sleet
#

Lol alright

dense heath
ivory sleet
#

But we’ll if you did tdd then unit tests should be submitted also (:

waxen plinth
#

Second challenge when

dense heath
#

Going to put it in a repo!

paper viper
#

dude

ivory sleet
#

Red I can do one tomorrow

#

Let’s do an economy command interface then (: a bit more challenging and time consuming

waxen plinth
#

It's a simple one 🥺

#

Oh?

ivory sleet
#

Yeah

#

I’ll use cloud

waxen plinth
#

Well I have covid and am stuck in one room on my phone lol

ivory sleet
#

oof

waxen plinth
#

Dunno how well I'll be able to do

#

But I can try

ivory sleet
#

Okay maybe not then

fathom cobalt
#

why don't you have a PC in your room? 🥺

#

sounds awful ngl

waxen plinth
#

I'm visiting my girlfriend

fathom cobalt
#

oh

waxen plinth
#

Got covid probably from the plane

ivory sleet
#

That sucks

hasty prawn
#

:(

waxen plinth
#

Annoying because I took every precaution and the other people were so nonchalant about it

ivory sleet
#

Damn anti vacc people

waxen plinth
#

I have my booster and wore a really high quality single use mask and never once took it off to eat or drink for 10 hours

fathom cobalt
#

people generally seem to have forgotten all about covid by now lmfao

waxen plinth
#

Lots of other people were just taking off their masks willy nilly

#

Yeah honestly covid's a bitch when you're boosted

#

It's the confinement that sucks

paper viper
#

double mask

waxen plinth
#

All I'm really feeling is a mild runny nose and sore throat

ivory sleet
paper viper
#

my friend was legit considering triple masking

hasty prawn
#

Why

ivory sleet
#

Lol tf

waxen plinth
#

Well my mask is effectively n97

paper viper
#

I was double masking after a classmate near me started coughing shit everywhere

ivory sleet
hasty prawn
#

^

waxen plinth
#

Dude there was a guy on my first flight that was coughing up a storm next to me

sullen marlin
#

We've had more covid cases in the last 3 days than the entire pandemic lol

waxen plinth
#

Was probably that guy that gave it to me

#

God damn md

dense heath
waxen plinth
paper viper
# hasty prawn Why

its cause she usually double masks. And after omicron variant shes like yep im gonna consider it

waxen plinth
#

I'm sure I'll be alright

sullen marlin
#

Has anyone had it twice?

waxen plinth
#

Just hoping I didn't infect anyone else and can get home in time

sullen marlin
#

Wouldn't mind just getting it when convenient and be done with it lol

paper viper
#

you could probably have it twice, except the second time it would be significantly more mild

waxen plinth
young knoll
#

Yes, people have had it many times

hasty prawn
#

I've managed to avoid it completely fortunately Prayge

paper viper
#

you think covid will be gone after 3 years?

sullen marlin
paper viper
#

or is merica still gonna be full of karens

fathom cobalt
waxen plinth
#

At this point it's just going to replace the flu

paper viper
#

i hate my life lmao. im going through this while in highschool and growing up will be shitty lol

sullen marlin
#

For context, we've had so little covid that 3 weeks ago was the first time I personally knew someone that got it

paper viper
#

but at least its a good story to tell

fathom cobalt
#

we've had ton of covid in Norway lol

sullen marlin
#

Australia

dense heath
fathom cobalt
#

ahh

ivory sleet
# dense heath https://github.com/randogai/smite

Interesting but first of all, what’s up with the //TODO document

Secondly, those boolean fields which switch the state on text decorations could simply be a set of Enum constants

Thirdly, you do not need a factory for everything

#

And a decorator inclusively

waxen plinth
ivory sleet
#

Use the patterns when you’re in need of it

waxen plinth
#

This is all we really needed

sullen marlin
#

Not having a factoryfactory smh

young knoll
paper viper
#

yikes

ivory sleet
#

That function could be extracted into smaller functions as that function clearly does more than one thing bk but not bad

dense heath
#

If you don't have a factory builder you're doing it wrong

fathom cobalt
sullen marlin
dense heath
ivory sleet
#

Also this looks a bit too compact, it took me some seconds to figure out what’s going on here

young knoll
#

A custom format might be good

ivory sleet
#

So maybe don’t bulk logic like that

paper viper
#

always split the conditional logic into a method too

dense heath
paper viper
#

are you sure you are 10 years java dev man?

young knoll
#

I want to avoid scripting langs as that will take away from it being compiled

ivory sleet
#

Yes bk I understood the intent of the code

waxen plinth
#

Yeah this is really overengineered

ivory sleet
#

But it took my more than twice as long to figure out what it did as opposed to the rest of the code

waxen plinth
#

Smite plugin boutta have an RCE

ivory sleet
#

But yeah bk not gonna say it’s bad

dense heath
waxen plinth
#

bk

dense heath
#

It achieved the task in the most complicated way possible

paper viper
#

10 years, and u produced this code

waxen plinth
#

The whole point was to showcase clean code

ivory sleet
#

You’ve done an over engineered design however it is adequate to say it’s quite future proof and extendable so I’m not blaming you

dense heath
waxen plinth
#

🙃

hasty prawn
#

That was the point

fathom cobalt
dense heath
paper viper
#

age literally doesnt matter

ivory sleet
#

In conclusion I’d rate the following:
Red first
bk and nozemi shared second

dense heath
waxen plinth
#

Kinda unfair but I guess that was the point all along lmao

paper viper
#

Yeah

ivory sleet
#

Yeah true red

dense heath
#

DI for one constructor giving me the me-mes

ivory sleet
fathom cobalt
#

at least mine was way easier to read though, imo anyway

dense heath
paper viper
#

i think you should watch uncle bob

ivory sleet
fathom cobalt
#

ahh

hasty prawn
#

Someone should join future competitions using pure Bukkit Command API

fathom cobalt
#

on my server I don't really have console access anyway

waxen plinth
#

Do it

#

Be the change you wish to see

dense heath
#

Mine is basically the Bukkit Command API with a lot of extra steps lmao

paper viper
ivory sleet
#

Nozemi no worries I don’t think you showed your full capability given the minimal code you so produced

fathom cobalt
#

yeah, I just implemented it the way I'd personally use it 😛

#

also while we were talking about parsing custom formats, it reminded me of advent of code

#

day 10, was a nightmare

ivory sleet
#

Didn’t do aoc 😅

fathom cobalt
#

just look at this problem rofl

#

was so annoying to figure it out

paper viper
#

you cant brute force it

#

?

ivory sleet
#

Looks appalling

fathom cobalt
#

when I understood how to manually do it, writing the code was easy fwiw

#

but understanding how I was supposed to solve it was a bitch at first

paper viper
#

i remember i had to do a usaco problem where u cant brute force it

dense heath
#

Recursive descent parsing would annihilate this problem

fathom cobalt
#

this was my solution

#

don't think I ever bothered to go back and clean it up

sullen marlin
#

Seems long af

#

I did AoC one year

unreal quartz
fathom cobalt
#

did you finish 1-25, md_5?

sullen marlin
#

Dunno let me see

fathom cobalt
dense heath
# waxen plinth wat

From what I briefly read, a simple recursive algorithm would easily solve this

waxen plinth
#

What was the challenge?

paper viper
#

i was asking

#

the question

unreal quartz
fathom cobalt
#

that's what I heard

paper viper
#

it was a nightmare to debug

fathom cobalt
#

but yeah, some of the answers won't fit in an int, so bruteforcing the answer would be bad

#

but bruteforcing the solution can be a good option a lot of the time

dense heath
waxen plinth
#

Oh I see

#

That does seem pretty annoying

unreal quartz
#

I remember one of the days it was quicker to just do it by hand

fathom cobalt
sullen marlin
#

2017, got a few top 100s

fathom cobalt
#

nice

#

this year I stopped at day 12, it fucked me

#

fucking pathfinding with extra conditions

paper viper
#

i did all 25 last year each day

#

this year i did the first one, then i didnt have time

#

for the other ones

unreal quartz
#

AoC releases at 5am for me which is annoying

fathom cobalt
#

I did a few last year, but then I couldn't be arsed to read all the long problem descriptions

fathom cobalt
#

didn't care about that though, I just wanted to complete it

waxen plinth
#

I mean the answer is always an integer

#

You could just do a binary search

unreal quartz
#

I don't care about the public leaderboard but I was competing against people from my uni

waxen plinth
#

Answer always fits in a 64 bit int, right?

fathom cobalt
#

I also wrote unit tests and used example data from the problem descriptions, got it working... fed it my own input data, and it didn't work after all

waxen plinth
#

So you'll always be able to solve within 64 minutes 🥲

paper viper
#

Lol

fathom cobalt
#

Your puzzle answer was 1609314870967.

waxen plinth
#

Relatable

fathom cobalt
#

thankfully you don't (usually) need any libraries for big numbers

#

as far as I know longs are enough

waxen plinth
#

BigInteger?

fathom cobalt
#

BigInteger should be enough too

#

yeah

waxen plinth
#

No library needed

#

When would you ever need something bigger than that

fathom cobalt
#

no idea

#

big number libraries are probably for other languages

#

I just heard it being mentioned

waxen plinth
#

Big number library for python

fathom cobalt
#

probably

#

a lot of people like to do aoc in python

unreal quartz
#

longs were fine this year

#

yeah I see people using numpy and all that shit

fathom cobalt
#

and every time I see a python solution, I'm like "what the heck am I looking at?"

waxen plinth
#

What does numpy even do

unreal quartz
#

but it kinda ruins it if all you do is import djikstra

waxen plinth
#

import brain

young knoll
#

numpy does cursed stuff with arrays

#

You like dividing arrays by other arrays?

waxen plinth
#

How does that even work

buoyant viper
#

import djungelskog

waxen plinth
#

import bergentruckung

sullen marlin
#

blahaj

unreal quartz
#

well its for manipulating stuff like matrices

waxen plinth
#

Oh

#

I see

#

When will aoc need a JSON parser

#

Someday...

#

🥲

young knoll
unreal quartz
#

lmao

sullen marlin
paper viper
#

baby

fathom cobalt
#

this is what I've made with my library so far (just a very simple plugin for now) 😛

waxen plinth
#

Very cool

buoyant viper
waxen plinth
#

Ok what is blahaj

#

I must be out of the loop

young knoll
#

Stuffed shark from Ikea

#

Also a trans icon

fathom cobalt
#
class ToggleFlagCommand(
    override val name: String = "toggleflag",
    override val description: String = "Toggle a flag for your account.",
    override val aliases: List<String> = listOf("toggle-flag")
) : PluginCommand() {

    override fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<out String>): Boolean {
        if (sender !is Player) return true
        if (args.isEmpty()) {
            sender.sendMessage("You need to specify a flag.")
            return true
        }

        val flag = flagManager().findFlag(args[0])
        if (flag == null) {
            sender.sendMessage("Couldn't find flag '${args[0]}'.")
            return true
        }

        when (sender.hasFlag(flag)) {
            true -> sender.removeFlag(flag)
            false -> sender.addFlag(flag)
        }

        sender.buildMessage(DefaultTranslations.FLAG_TOGGLE_COMMAND_SUCCESS)
            .addPlaceholderValue("flag_name", TextComponent(flag.identifier))
            .send()
        return true
    }
}```
young knoll
#

For some reason?

fathom cobalt
#

here is the command's code

waxen plinth
#

Lol

buoyant viper
#

kotlin grrrrr

fathom cobalt
#

it does support translation, so players can actually pick which language to view the server in

sullen marlin
waxen plinth
#

Minecraft bee also trans icon

buoyant viper
fathom cobalt
#

why do everyone hate kotlin? 😛

waxen plinth
#

Cause it bad

fathom cobalt
#

?

waxen plinth
#

Someone use the nokotlin sticker please

buoyant viper
#

scala >

sullen marlin
#

cause its impossible for any language to be better than java

waxen plinth
#

Except rust

fathom cobalt
#

why is Kotlin bad?

buoyant viper
#

rust bad

waxen plinth
#

Rust 😩 💦

buoyant viper
#

C >

waxen plinth
#

Am seriously going to

buoyant viper
#

u wont

waxen plinth
#

Don't doubt me

buoyant viper
#

i always live in doubt

young knoll
waxen plinth
#

brb gonna push you down the shower drain

young knoll
#

I'll have you know I am too tall to fit down there

#

But only just

waxen plinth
#

You have been warned

young knoll
#

So forever?

waxen plinth
#

Yeah lol

fathom cobalt
#

one of the major reasons I use Kotlin is for extension methods, they are very handy in Spigot plugin development

waxen plinth
#

Extension methods 🤢

#

Traits 😍

fathom cobalt
#

not sure what traits are tbh

waxen plinth
#

Like interfaces but better

buoyant viper
#

scala my beloved

unreal quartz
#

kotlin has the sexiest collection manipulation I have seen in a language

ivory sleet
waxen plinth
#

Coroutines < goroutines

fathom cobalt
waxen plinth
#

Go sucks but goroutines is an iconic name

fathom cobalt
#

also I don't really know coroutines at all (yet)

buoyant viper
#

id love jvm languages a little more if i didnt need to include their runtime in my project

waxen plinth
#

2mb jar for empty kotlin project 👌

ivory sleet
fathom cobalt
#

yeah, I know

#

I know the concept of it

#

I just don't know the implementation

ivory sleet
#

Hmm alr

waxen plinth
#

Always remember that Lua did it first

ivory sleet
waxen plinth
#

(lua was actually the first programming language ever created)

fathom cobalt
buoyant viper
#

it matters to me

fathom cobalt
#

why?

waxen plinth
#

(lua is now the 43rd programming language ever created)

ivory sleet
#

Gonna go sleep noe so gonight yall

fathom cobalt
#

good night!

waxen plinth
#

Goodnight conclure my love

buoyant viper
#

it feels gross knowing i couldve saved an MB or 2 by just using the native language

young knoll
#

😳

buoyant viper
#

i lived on very tight drive space for a few years so unnecessary things like that just bug me

fathom cobalt
#

fair enough

#

I have about 18TB of space to waste for my Minecraft server so 😂

#

tbf I wouldn't really use a lot of it for MC

buoyant viper
#

if i installed a game like gta v id have no disk space on that machine anymore

#

xd

fathom cobalt
#

rip

buoyant viper
#

it had like 120gb total

fathom cobalt
#

I have like 3TB of storage on my PC

#

2x m.2 SSDs and 1x SATA SSD

buoyant viper
#

ye my new systems have storage in the TB but i still live like im on a space budget ig lol

fathom cobalt
#

PTSD 😂

buoyant viper
#

basically

modest shard
#

do i need to make a new class for every single command i make for a plugin (eclipse ide btw) but under the same commands pakcge?

buoyant viper
#

post traumatic storage disorder

young knoll
#

You don't need to

sullen marlin
#

you can structure it however you like

modest shard
#

but highly recommended ig

#

how would it work if there wasnt a new class for each command? where would they type the onCommand stuff anyways

fathom cobalt
buoyant viper
#

in one commandexecutor and then u check like

#

command name or something

#

id guess

fathom cobalt
#

iirc there are tutorials for doing just this

#

it was the first way I learned to do it lol

modest shard
#

so do u guys think u should just stick with making a new class for every command

fathom cobalt
#

like I said, it depends

#

but chances are your commands are big enough to justify being contained in their own classes

modest shard
#

what cases would mean that they could occupy the same class

fathom cobalt
#

for really small commands I guess

#

I don't remember exactly how you tie them to a command name, it would become sub commands of another command I think

modest shard
#

wouldnt it still be better to just make a new class still? for organization's sake and also to make tweaks to the code easier

fathom cobalt
#

I would personally just have separate classes

modest shard
#

like for access maybe i could add a method to pass info or maybe by making some things public

fathom cobalt
#

at least I can't think of any specific scenarios I wouldn't

modest shard
#

ok

#

thanks

fathom cobalt
#

there are plugin libraries out there though, that will help with command implementations

fathom cobalt
#

this one for example

#

not sure of other libraries, and not sure there are other libraries that solves it in a nice way

modest shard
#

👍

waxen plinth
#

Damn he recommended mine

#

Thanks man

#

Ramen, if you need help using it, check out the wiki, DM me or join my support discord

modest shard
#

alr thanks

waxen plinth
#

Generally commands are not actually large enough to take up an entire class on their own when you take away all the logic of conversions, tab completions, permission checks, sender checks, etc

#

Then you're just left with the raw logic of the command's actual execution, which is usually pretty small

modest shard
#

im trying to make a plugin that works with buycraft, how do these plugins work

waxen plinth
#

You can hook into their api

fathom cobalt
# waxen plinth Thanks man

np, it is a good library, and I'd probably personally use it as well if I developed plugins for the sake of feature gaps and not learning purposes 😛

waxen plinth
#

Understandable

modest shard
#

all i know is that the buycraft runs the commands onto the server

modest shard
#

what cases would u need to make them in the same class

waxen plinth
#

Commands?

#

I do it all the time

#

Because usually the logic is pretty small when you abstract away the boilerplate

waxen plinth
#

Let's pit the command libraries against each other to see which is cleaner

static ingot
#

ok lol

waxen plinth
#

A command /chance <chance> <command>

#

Chance is a double 0-100

#

Command is a string for the rest of the arguments rolled into one

#

It has a chance% chance to run the given command from console

#

Simple enough right?

#

Feel free to suggest your own if you have a better one

static ingot
#

i just said acf is a commonly used command framework. they mentioned not knowing any other ones.
i dunno why you're going out of your way to show off your lib n make a big deal of supposedly how much better it is to me

waxen plinth
#

Yeah I enjoy comparing

#

I know acf is common and have recommended it before

#

I'm bored and in quarantine with nothing better to do if that helps answer your question

fathom cobalt
#

I for one like to see comparisons

waxen plinth
#

I don't mean to come across as showoffy

fathom cobalt
#

I know

static ingot
fathom cobalt
#

so simply move on, no need to be rude about it

static ingot
#

not that i'm mad about that at this point either since it was a misunderstanding

waxen plinth
#

I thought you were game cause you said "ok lol"

static ingot
#

oi, i'm just irritated that you're on my case now. i say somethin here not even once a week, so the last thing i'm looking for is drama in the dev help section

#

eh

waxen plinth
#

What drama?

static ingot
fathom cobalt
#

yeah, nobody likes drama in help sections 😛 the case is closed and we can probably safely move on

hardy swan
#

Drama keeps the channel lively

static ingot
#

doesn't keep my sanity intact tho

hardy swan
#

*as long as you are not the main characters

modest shard
#

oh hi einKnuffy hello

hardy swan
#

I just realise how powerful PlayerStatisticIncrementEvent can be. Even though it is not a very ideal practice to listen in to statistic events, and that you can't cancel the related actions performed, but spigot's api is pretty limited otherwise

young knoll
#

Its good for detecting jumps

waxen plinth
#

Though that can be spoofed

hardy swan
#

I just used it to detect ringing of bells

young knoll
#

Jumping can always be spoofed

unreal quartz
#

tf did I just read

fathom cobalt
#

entertainment

hardy swan
waxen plinth
#

How not

static ingot
#

framework

#

w/e

waxen plinth
#

Framework vs library

#

Just a matter of scale if you ask me

static ingot
#

not at all

hardy swan
#

A matter of control flow

#

Or rather who is in charge of it

#

Forgot the phrase

static ingot
#

inversion of control

waxen plinth
#

I just think of a library as a tool you can use in your code

hardy swan
#

Ah yes

waxen plinth
#

What makes something a framework?

hardy swan
#

When the framework is the one in charge of control flow

waxen plinth
#

Hm

hardy swan
#

Like ACF has annotations to create some kind of a control flow, you are just using it, not building on top of it

waxen plinth
#

I see

#

I have noticed that certain types of abstractions can't really be built on top of

#

Libraries can always be wrapped but I guess you can't really wrap a framework

quaint mantle
#

Well, java collections is a framework too..

hardy swan
#

That one i am not really comfortable with tbh

#

It is used like a library

drifting vault
#

is there a way to block players from left clicking a noteblock but allow them to mine it? cancelling the playerinteractevent works for the first time but doesnt after the next attempt

hardy swan
#

That means allow the interaction only when they are using the correct tools?

buoyant viper
#

cant u mine it with anything and itll drop

drifting vault
#

well i want them to be able to break the block, just not interact with it

hardy swan
#

Oh nvm i got it

#

You dont want them to play the noteblock

#

That's it

drifting vault
#

yes

hardy swan
#

But not sure if that existed for previous versions

buoyant viper
#

if ur not on latest what r u doing with ur life?

drifting vault
#

its on 1.17

#

That did it

hardy swan
#

My only concern is if it will cancel note playing on right click too

buoyant viper
hardy swan
#

So sad, cant set instrument

drifting vault
#

its what we want

hardy swan
#

That could be useful af for custom blocks

drifting vault
#

were doing something similar to how origin realms does their custom blocks

hardy swan
#

Ahh, just when i say custom blocks lol

drifting vault
#

now for the shulker box under the note block. shulker blocks cause block updates which update the noteblock too

hardy swan
#

Isnt that part of redstone

drifting vault
#

the shulkerbox updating noteblock?

hardy swan
#

Updating or playing?

drifting vault
#

update

#

its resetting the block data

hardy swan
#

Oh didnt know it does that

#

F

drifting vault
#

well observers detect when a shulker box open

#

at first i tried storing the data in a hashmap and restoring it whenever interacting with a shulker box under a noteblock but whenever it closes it does same thing

#

i even attempted to cancel interact event and opening the inventory but it still acts as if i opened the shulker box

hardy swan
#

Maybe you can ask LoneDev on how he does it lol

drifting vault
#
event.setCancelled(true);
Container shulker = (Container) block.getState();
event.getPlayer().openInventory(shulker.getInventory());
#

does what?

hardy swan
#

Nothing, he has this ItemsAdder plugin

#

That uses noteblocks for custom blocks too iirc

young knoll
#

You can stop the update with the BlockPhysicsEvent

hardy swan
#

But what if you want the block to act like a normal block

#

Like getting powered by redstone

drifting vault
#

it works but the piston pushing the block and the shulker box still update it

gentle oriole
#

what is considered a vehicle??

#

minecarts? horses?

hardy swan
#

Yes

#

Anything you can ride by default

drifting vault
#

how do i get a blocks new location after it being pushed by a piston?

hardy swan
drifting vault
#

unless im using the wrong method, but it displays the old location

hardy swan
#

Yea, plus one in blockface direction

#

Those blocks are before push

drifting vault
#

ive been thinking of that but i dont know how to go about it

hardy swan
#

Block.getRelative(BlockFace)

#

The blockface comes from your event's getDirection

drifting vault
#

yea, im trying somethng

wet breach
#

Well you should have a reference to the blocks you are keeping track of. In that Event you can grab a list of blocks and then compare if any match the block you are tracking. If a block matches, grab the direction the piston is facing then +1 on the location of the block you are tracking. 🙂

#

@drifting vault

earnest fiber
#

Storing player-specific data

drifting vault
#

I figured it out

#

idk if its good

#

or efficient enough

#

but this is what i have

@EventHandler
    public void onPush(BlockPistonExtendEvent event) {
        BlockFace direction = event.getDirection();
        for (Block block : event.getBlocks()) {
            Location nLoc = block.getRelative(direction).getLocation();
            dataMap.put(block, block.getBlockData());
            Bukkit.getScheduler().runTask(BedAdditions.getPlugin(), () -> {
                nLoc.getBlock().setBlockData(dataMap.get(block));
                dataMap.remove(block);
            });
        }
    }
#
    private final HashMap<Block, BlockData> dataMap = new HashMap<>();
#

and i did the same with the retract event

vague oracle
#

Could you just put the scheduler outside the for loop, therefore only running 1 task.

drifting vault
#

it just does what it did before

#

if the scheduler was in the loop itll change the block soon as it has been pushed

#

for some reason it has to update the block after it has been pushed

vague oracle
#

make it a delayed task?

drifting vault
#

delayed or run later

young knoll
#

runTaskLater

#

Technically you can just use runTask if you only want a 1 tick delay

drifting vault
#

what about async?

faint sage
#

wow you had a bytecode chat and didn't tag me

#

😔

wet breach
#

why do you need to update all the blocks from the list of blocks from the event? and because it is a loop, you are creating tasks for every single block pushed by the piston o.O Don't think this is what you are intending?

drifting vault
#

im wanting to only update the note blocks

wet breach
#

then your loop needs to be changed to check if any blocks in the list are note blocks

#

otherwise you are unnecessarily creating tasks and looping for no reason if none of them are

drifting vault
#
for (Block block : event.getBlocks()) {
            if (block.getType() == Material.NOTE_BLOCK) {
                Block nBLock = block.getRelative(direction).getLocation().getBlock();
                dataMap.put(block, block.getBlockData());
                Bukkit.getScheduler().runTask(BedAdditions.getPlugin(), () -> {
                    nBLock.setBlockData(dataMap.get(block));
                    dataMap.remove(block);
                });
            }
#

i changed it not long ago

#

is this not efficient?

#

for some reason it doesnt update the block if not in the scheduler

wet breach
#

and what needs to happen with the noteblocks?

drifting vault
#

keep its block data

#

the data updates when pushed with a piston

wet breach
#

it doesn't keep its data if it gets pushed?

drifting vault
#

well i dont want the instrument to change

wet breach
#

ah got it

drifting vault
#

origin realms method of custom blocks

wet breach
#

then the best way to get the new location is to get the piston block direction and then grab the block at the new location, which you should only need to +1 from the location of the old reference which would be the block from the event. I don't think I am making this easy to understand XD

quaint mantle
#

wonder if use a iterable or using a for loop would better?

wet breach
#

well need the event to complete

quaint mantle
#

while (iterator.hasNext()) or for (? monkey : setOfSomething)

drifting vault
#

thats kinda what i did here

 Block nBLock = block.getRelative(direction).getLocation().getBlock();
#

new block

wet breach
#

only thing needed from the event is to check if any blocks are note blocks, if they are grab their data/instance reference, schedule a task a tick or two later to update the block after it is pushed in the new location

#

the getLocation() doesn't automatically shift the location

drifting vault
#

get the block relative to the pistons direction location

quaint mantle
#

does anyone have a good resource for fireworks

wet breach
drifting vault
#

please

quaint mantle
#

Unless you modify the collection while iterating

vale ember
#

spigot don't have any mappings for 1.18?

sage patio
#

This event calls when item in hand is Air ?

quaint mantle
quaint mantle
vale ember
#

then why every nbt method is one letter bs

#

though on 1.17 it is ok

quaint mantle
vale ember
quaint mantle
vale ember
sage patio
lost matrix
# vale ember 😭

I switched from maven to gradle and am currently using the userdev gradle plugin.
Very pleased so far. Its really neat to just read the NMS code as Mojang has written it with descriptive naming etc.

lost matrix
#

If you want i can share a quick setup

vale ember
#

yep

lost matrix
vale ember
#

thanks, ill try it

quaint mantle
#

Hey, is there any better way to utilize futures?

requireClan(player).thenComposeSync(clan -> {
            if(clan == null) return nullFuture();
            ClanMember member = getMember(clan, player);

            if(!checkPermission(player, member, ClanPermission.SET_DISPLAY_NAME)) return nullFuture();

            return clanManager.editClan(clan, editor -> editor.setDisplayName(displayName));
        }).thenAcceptSync(c -> {
            if(c != null) player.sendMessage(messages.commands().displayNameSet().with("name", displayName));
        });
#

nullFuture basically returns CompletableFuture.completedFuture(null)

quaint mantle
#

hey guys some trouble im running into with pandas

#

for some reason i cant get its custom name to show up

#

also, how do i give it a brown colour and a bamboo stick in its mouth?

eternal oxide
quaint mantle
#
        Panda panda = (Panda) new NMSPanda(location);
        panda.setMainGene(Panda.Gene.BROWN);
        panda.setCustomNameVisible(true);
        panda.setCustomName(ChatColor.AQUA + ChatColor.BOLD.toString() + "Pandie");
#

thisd idnt work for me

gentle oriole
#

how do I put/get a hashmap in config?

#

do I have to convert them into a list hashmap?

graceful turret
#

i think u have to split all hashmap and write it line by line

#

you can storage arraylist

#

but hashmap not

eternal oxide
#

You can put a map as a map

dense heath
gentle oriole
#

whats the difference from .setDefaults() to .set() and .getDefaults() to .get()

eternal oxide
#

getDefaults() gets the boolean status of defaults (if applied).

#

setDefaults(config) applies a config file as default values

#

set assigns a value to a path, or clears it if null

#

get retrieves the value at a given path

gentle oriole
eternal oxide
#

not anything

gentle oriole
#

data types?

eternal oxide
#

an object or null

quaint mantle
#

how do you get NMS entities to persist again?

#

i thought this.persist = true would work but i tp'd away and it did not

quaint mantle
wet breach
#

not sure

quaint mantle
#

ill check

#

persist kind of works but it loses AI

#

wonder if its the same

#

it does not, funnily enough wandering traders are fine

#

this.setDespawnDelay(0); by doing this inNMS

#

is there a reason villager mobs would persist their AI and not despawn but pandas dont?

sage patio
#

If this is deprecated, what else I can do ?

quaint mantle
sage patio
#

yea thanks

quaint mantle
#

as for my issue i think maybe adding some sort of nbt tag would work or help

#

if anyone knows how to persist nms entities + their behaviour through going far away lmk pls

quaint mantle
#

tbh idek where to find deprecation notes

sage patio
#

I'm trying to create something like "Warzone Sliding" this is my code and this is the result

        Player player = event.getPlayer();
        Location location = player.getLocation();
        Vector vector = location.getDirection();
        ArmorStand armorStand = location.getWorld().spawn(location, ArmorStand.class);

        armorStand.setVisible(false);
        armorStand.addPassenger(player);

        BukkitTask runnable = new BukkitRunnable() {
            int count = 0;
            @Override
            public void run() {
                if (count == 20) { cancel(); }
                vector.multiply(5);
                location.add(vector);
                armorStand.teleport(location);
                count ++;
            }
        }.runTaskTimerAsynchronously(Main.getInstance(), 1, 2);

        armorStand.removePassenger(player);
        armorStand.remove();
#

PlayerSwapHandItemsEvent, happens when i press F

quaint mantle
#

what's warzone sliding

#

if you dont mind me asking

#

should be using velocities for this i think

#

much smoother

sage patio
quaint mantle
#

whya re you moving vertically there

#

oh and you want an animation where their bum is on the ground?

#

thats why you want them to ride

chrome beacon
#

Also that BukkitRunnable should be sync

quaint mantle
#

olivo

#

i have a question

chrome beacon
#

Sure

quaint mantle
#
    public void addAdditionalSaveData(CompoundTag nbttagcompound) {
        super.addAdditionalSaveData(nbttagcompound);
        Bukkit.getServer().broadcastMessage("y1");
        nbttagcompound.putString("MainGene", this.getMainGene().getName());
        nbttagcompound.putString("HiddenGene", this.getHiddenGene().getName());
    }

    public void readAdditionalSaveData(CompoundTag nbttagcompound) {
        super.readAdditionalSaveData(nbttagcompound);
        Bukkit.getServer().broadcastMessage("x1");
        this.goalSelector.removeAllGoals();
        this.setMainGene(Panda.Gene.byName(nbttagcompound.getString("MainGene")));
        this.setHiddenGene(Panda.Gene.byName(nbttagcompound.getString("HiddenGene")));
        this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Player.class, 8.0F));
    }
quaint mantle
#

im trying to get my panda's behaviour to persist

#

but when it despawns it becomes a normal panda

#

so "y1" prints

#

but "x1" doesnt

#

im trying everything but just cant get it to work

chrome beacon
sage patio
quaint mantle
#
public class NMSPanda extends Panda {

    public NMSPanda(Location loc) {
        super(EntityType.PANDA, ((CraftWorld) loc.getWorld()).getHandle());
        Level craftWorld = ((CraftWorld) loc.getWorld()).getHandle();
        this.goalSelector.removeAllGoals();
        this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Player.class, 8.0F));
        this.setPos(loc.getX(), loc.getY(), loc.getZ());
        System.out.println(isPersistenceRequired() + " is1");
        this.setPersistenceRequired(true);
        System.out.println(isPersistenceRequired() + " is2");
        craftWorld.getWorld().addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
    }

    public void travel(Vec3 vec3){

    }

    public boolean hurt(DamageSource damagesource, float f){
        return false;
    }
    

    public void playAmbientSound() {
    }

    public void addAdditionalSaveData(CompoundTag nbttagcompound) {
        super.addAdditionalSaveData(nbttagcompound);
        Bukkit.getServer().broadcastMessage("y1");
        nbttagcompound.putString("MainGene", this.getMainGene().getName());
        nbttagcompound.putString("HiddenGene", this.getHiddenGene().getName());
    }

    public void readAdditionalSaveData(CompoundTag nbttagcompound) {
        super.readAdditionalSaveData(nbttagcompound);
        Bukkit.getServer().broadcastMessage("x1");
        this.goalSelector.removeAllGoals();
        this.setMainGene(Panda.Gene.byName(nbttagcompound.getString("MainGene")));
        this.setHiddenGene(Panda.Gene.byName(nbttagcompound.getString("HiddenGene")));
        this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Player.class, 8.0F));
    }

}
quaint mantle
#

gimme a sec

chrome beacon
#

Could you make the armor plates be on top of the hearts like armor

quaint mantle
#

true!^

#

haha ive doneit for u @sage patio

sage patio
#

:D thanks

quaint mantle
#

lemme post

quaint mantle
#

well

#

its KIND of

#

done

rough drift
#

So i am making my plugin in kotlin, and i needed to evaluate some code, so i found the ScripteEngineManager and i am using it with the js engine, the only problem is that whilst it works when testing in intelli, whenever i put it on the server it does not work (no engines are present), what could be causing that?

chrome beacon
#

No script engine is present in newer versions

#

You will have to include it yourself

quaint mantle
#
    public void test(Player player){
        Item item = player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.STONE_PRESSURE_PLATE));
        item.addPassenger(player);
        int time = 5990;
        item.setPickupDelay(time);
        item.setTicksLived(time);
        Vector tosend = player.getEyeLocation().getDirection().normalize().multiply(4);
        tosend.setY(0);
        item.setVelocity(tosend);
    }
``` @sage patio
rough drift
quaint mantle
#

theres an animation cancel where they can get off the pressureplate to make it faster and save time, you can make a runnable to force them on it 24/7 but i think its fine

#

you could also make the entity they ride a falling block however i think for this purpose its fine

quaint mantle
#

actually

#

set the y to -1

#

let me see

sage patio
#

lol 1.12

#

😁

quaint mantle
#

oh

#

same same

chrome beacon
quaint mantle
#

    public void test(Player player){
        Item item = player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.STONE_PRESSURE_PLATE));
        item.addPassenger(player);
        int time = 5990;
        item.setPickupDelay(time);
        item.setTicksLived(time);
        Vector tosend = player.getEyeLocation().getDirection().normalize().multiply(4);
        tosend.setY(-100);
        item.setVelocity(tosend);
    }
#

this works better @sage patio

rough drift
quaint mantle
#

enjoy

sage patio
#

thanks

quaint mantle
#

by the way @sage patio do you understand why i made it setTicksLived(5990)?

#

do u know how ticks work and stuff

#

20 ticks = 1 second

#

items despawn at 6000 ticks

#

so this exists for half a second

#

means u dont need a scheduler

sage patio
#

ow

#

yea I know stuffs about ticks

quaint mantle
#

easy

#

enjoy bro, keep it up your stuff looks sick

quaint mantle
#

on to my panda

#

i will fix him..

rough drift
#

finally, a plugin smaller than 2MB

quaint mantle
#

@chrome beacon is there a way to make the travel method always act as intended

    public void travel(Vec3 vec3){

    }

this is what i want on load/reload of the nbt tag

#

turns out removing pathfinders isnt enough

sage patio
#

@quaint mantle it works so nice and ty, but there is 2 problem
its very fast, and player should press Shift for onmount

quaint mantle
#

i dont mind waht the pathfinders are i just need him to not move/take damage

sage patio
#

removePassenger ?

quaint mantle
#

u can do that

#

try it

#

it works

chrome beacon
quaint mantle
#

you go there for quests

#

my shopkeepers are wandering traders and their behaviour persists

#

this however does not

#

i have them not move/take damage

sage patio
#

I just added this 2 line

quaint mantle
#

@sage patio

    public void test(Player player){
        Item item = player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.STONE_PRESSURE_PLATE));
        item.addPassenger(player);
        int time = 5990;
        item.setPickupDelay(time);
        item.setTicksLived(time);
        Vector tosend = player.getEyeLocation().getDirection().normalize().multiply(1);
        if(!item.isOnGround())tosend.setY(.2);
        item.setVelocity(tosend);
    }
quaint mantle
#

you dont really need to handle the despawn

rough drift
sage patio
quaint mantle
#

this will

chrome beacon
sage patio
#

ow

quaint mantle
# sage patio ow

    public void test(Player player){
        Item item = player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.STONE_PRESSURE_PLATE));
        item.addPassenger(player);
        int time = 5990;
        item.setPickupDelay(time);
        item.setTicksLived(time);
        Vector tosend = player.getEyeLocation().getDirection().normalize().multiply(1);
        if(!item.isOnGround())tosend.setY(.15);
        item.setVelocity(tosend);
    }
#

this is the final one

sage patio
#

ok lemme check

quaint mantle
#

@sage patio when an item despawns, the player will be removed

#

try it out

#

trust me

#

you dont need to worry

sage patio
#

I need a auto dismount too

#

afk for ~10 min

quaint mantle
#

i cant upload videos but it works

#

@chrome beacon im thinking the loading of the nbt tag might not work bc its not considered the same nms entity

#

idk

#

are you talking about preventing players from seeing already loaded chubks

#

chunks

#

i would think canceling the event like they said would work

#

let me see

#

Direct Known Subclasses:
ChunkLoadEvent, ChunkPopulateEvent, ChunkUnloadEvent, EntitiesLoadEvent, EntitiesUnloadEvent

#

of ChunkEvent

#

so the last reply here

#

idk if this was the one sent in ur post you just made

#

but basically i think it may mean to intercept the ChunkPopulate or Load Event and do smth to make the chunk void

#

if it matches what you want

#

hopefully that helps @spare magnet otherwise maybe someone else might know more

sage patio
#

@quaint mantle this is better

#

and unmounts after 15 ticks

quaint mantle
sage patio
#

thanks for your help

quaint mantle
#

you don’t need a scheduler

sage patio
quaint mantle
#

get rid of the scheduler and show me a video

sage patio
#

actually does, but takes too long

quaint mantle
#

unless 1.12 is different

#

how quick do you want it

sage patio
#

after slide

#

when sliding is done and player stops moving

quaint mantle
#

ok soo make it

#

wait

#

you set time to 1200

#

make time 5980

sage patio
#

ok

quaint mantle
#

5990**

#

sorry

#

or 5985 for you 15 ticks

#

and remove your scheduler

sage patio
quaint mantle
#

it will work i promise

sage patio
#

umm ok lemme try

quaint mantle
#

when an item despawns it will get removed and player will demount

sage patio
#

lemme record a video for you

opal juniper
#

I recommend using a packet listener to stop the chunk packets from being sent to the clients, granted there is no real way as far as i know to stop the chunks generating this without changing the code of your server with patches. This sort of manipulation gets quite messy though

quaint mantle
#

ok

sage patio
#

this is the code, lemme record

opal juniper
#

wait actually just use a custom terrain generator

sage patio
opal juniper
#

oh wait no

#

that would only work on paper

sage patio
# sage patio

@quaint mantle this is without the runnable, now lemme record a new video this my runnable

quaint mantle
#

@xii69#2344 pressing shift how many times? also that’s odd i guess 1.12 is different. have you considered upgrading?

sage patio
opal juniper
#

its only gonna be a few chunks, and if you just put a world border there there wont be any ticking entities

#

ok so its easy then

#

make a custom generator

#

and if the chunk coords are not the desired ones

quaint mantle
#

what is a custom generator

opal juniper
#

return void

#

otherwise use the default

opal juniper
#

there is no way to stop this

#

just set teh renderdistance low or something to minimise it

#

well

#

just look for where the chunkloadevent is called

quaint mantle
#

@opal juniper do you know how to make NMS entities persist through going far away