#help-development

1 messages · Page 1247 of 1

sly topaz
#

wasn't there a key to open advancements tab as well or am I crazy

smoky anchor
#

default L, but I don't think there's an event for that

coral sparrow
#

What about mod

smoky anchor
#

A client mod can do anything

sly topaz
#

I mean, you could do the flying by looking part really, you'd just push the player

#

the thing you wouldn't be able to do is bind the action to a specific key like G, but you could bind it to one or multiple actions like crouching and swapping hands or something of the like

smoky anchor
#

would not look good, ping exists

sly topaz
#

if they do it at normal flying speed it should be fine

sly topaz
young knoll
#

Normally double jump is done by allowing the player to fly and using the toggle flight event

#

Disable flying, yeet the player, re-enable flying when they land

smoky anchor
#

Can you not use the PlayerInputEvent now ? (would require you to detect double jump yourself)

#

would avoid the temporary flight due to lag

young knoll
#

Yeah you could

coral sparrow
#

What about the Black hotbar with cooldown and countdown

blazing ocean
#

resource pack

smoky anchor
#

Font magic

young knoll
#

Yay font magic

sly topaz
#

it is just a resource pack there I believe, no font magic

coral sparrow
blazing ocean
#

that is font magic

sly topaz
#

isn't that just adding a specific font

blazing ocean
#

and negative spacing

#

so: font magic

sly topaz
#

but it is on the same place as action bar no?

smoky anchor
#

TLDR: custom font (font magic) and action bar

coral sparrow
#

Yeah but yall forgot about the cooldown

smoky anchor
#

You gotta do that yourself buddy

sly topaz
#

a cooldown is a cooldown, it's a pretty self-explanatory concept

coral sparrow
smoky anchor
#

There's no magical "show cooldown above hotbar with specific font" function in the API

sly topaz
#

API so lacking smh

blazing ocean
#

my game engine has this

coral sparrow
#

I think i should switch to mods

blazing ocean
#

not neccessarily easier

sly topaz
#

mods mean every client would need it to join your server

coral sparrow
#

Yeah i am gonna shoot myself into space

young knoll
#

Ur a nerd

blazing ocean
#

no u

sly topaz
#

I need a single method that does exactly what I want

#

why do API makers not think about me!!!

blazing ocean
#

lemme just get an updated recording

sly topaz
#

should've put a seizure warning

young knoll
#

What was that on tick 390

sly topaz
#

that text movement made me dizzy

blazing ocean
young knoll
#

Don't think I didn't see it

blazing ocean
#

I honestly have zero clue

young knoll
#

0/10 unusable

blazing ocean
#

it doesn't happen when the current tick layer is not displayed

#

sooo ????

sly topaz
#

rad now implement built-in reduced movement mode for accessiblity™️

#

otherwise unusable

blazing ocean
#

I mean

#

you can just have it redraw every 5 ticks instead

sly topaz
#

yeah but OSes usually force it down your throat as long as you have the option enabled

blazing ocean
#

the reduced motion would be up to the end user to implement

#

because I'm not forcing that impl

sly topaz
#

Imagine just adding a 10 tick delay to every frame

#

and having the option enabled by default

#

would drive some people insane

blazing ocean
#

literal 2fps

young knoll
#

Yours is only 20 fps smh

#

You gotta set the servers tick rate to at least 60

jagged thicket
#

it really is hard on the eyes

#

any way to smooth it out?

blazing ocean
#

there is not

blazing ocean
young knoll
#

there isn ot

#

Do 60 tps

blazing ocean
#

I'm rendering it on every client tick end btw

jagged thicket
#

why not slow it down

#

like move it slowly so it doesn't hurt the eyes

blazing ocean
#

2fps is beautiful

jagged thicket
#

yeah this is good

#

jus make this the default one

blazing ocean
#

what about 0.5fps

#

(2spf)

jagged thicket
#

no, this is slow enough

blazing ocean
#

well, somewhat at least

#

sine wave moment

#

I wanna try something that I haven't actually tried yet, what if I just never return redraw

#

okay it will be rendered once

#

the nice thing about my system is that you can just add multiple render layers and they will just stack: ```kt
public val OtherLayer: RenderLayer = buildRenderLayer {
add {
content(-50) {
append("bye, world!")
font(Fonts.BeaverOffsets[-10.0]!!)
}
}
}

player.addRenderable(testRenderLayer(Bukkit.getCurrentTick()))
delay(1.seconds)
player.addRenderable(OtherLayer)

smoky oak
#

wait what you can have more than one line of text on that???

#

im stealing this

#

how does this work internally anyway?

blazing ocean
#

font magic

smoky oak
#

does it require a resource pack?

blazing ocean
#

yes

smoky oak
#

ah

#

i try to avoid that. well, there was a chance and it got dashed lol

old stone
blazing ocean
old stone
#

nic

quaint mantle
#

how do I hide a player from the tab list?

#

I tried doing player.setPlayerListName(null); but it still shows up.

blazing ocean
#

on spigot you'd have to use packets

quaint mantle
#

how do i access packets?

blazing ocean
#

on <unnamed fork> you have Player#unlistPlayer

#

either NMS, packetevents or protocollib

#

?nms

quaint mantle
#

what is the fork?

blazing ocean
quaint mantle
#

ah.

#

I have never used NMS. This might be the first time.

#

I did use build tools to install the appropriate minecraft version with the command in that post.

#
plugins {
    id 'java'
    id "io.github.patrick.remapper" version "1.4.2"
}

repositories {
    mavenCentral()
    maven {
        name = "spigotmc-repo"
        url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
    }
    maven {
        name = "sonatype"
        url = "https://oss.sonatype.org/content/groups/public/"
    }
    mavenLocal()
}

tasks {
    remap {
        version.set("1.21.1")
    }
}```
#

does this look right?

#
java -jar BuildTools.jar --rev 1.21.1 --remapped
pause```
#

./gradlew.bat remap

#

I don't see anything though, when I hit shift twice and search for an NMS class like CraftPlayer.

blazing ocean
#

I think you still have to add the dependency, idk tho, never used that plugin

coral sparrow
#

Can i ask anyone if it will work in dm.cuz it wont fit

eternal oxide
#

?paste

undone axleBOT
eternal oxide
#

?paste

undone axleBOT
eternal oxide
#

also, you asked no question

coral sparrow
#

?paste

undone axleBOT
blazing ocean
#

?paste

undone axleBOT
coral sparrow
#

It made my plugin longer

blazing ocean
coral sparrow
coral sparrow
#

Then the normal text

#

DangerWarning:
colouredName: <red><b>Danger Warning
description: Click to activate & sense nearby enemy players.
skin:
value: eyJ0aW1lc3RhbXAiOjE0OTk5MjM1MTUzOTEsInByb2ZpbGVJZCI6IjQzYTgzNzNkNjQyOTQ1MTBhOWFhYjMwZjViM2NlYmIzIiwicHJvZmlsZU5hbWUiOiJTa3VsbENsaWVudFNraW42Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9iNWE1M2E0NGZkN2JjNGI0ZDdiYTI2Yzc0ODQ4YjVlNDQzODkyNWNmM2Q4YzdiNGI4ZDQzMTFlOGI2ZmEifX19
signature: KsSv8po6QPyiJ5GsRSXxtX8G9riMnUc0/M7HFICxOp6jMXwyy7XzOokjt5McwtKimmi0gX8a11QdBI8FOYEh8OpD6g6oR9537INdANP0rIMT5CX3gOT73ko6z9vDuv9EUp2S2iqKIi1LZOIVwtG0Jsy9TBPk/YBnEAXkpskPbdjFm3SgnLJaolOYsven+j+Aeuthf7H0y0xwysgwg8c6HmXy9Li9A2k3EtGKrd+kOrAt2fyurTlOls4Kc5QDz+n8TMZBpmyD/2AhM0E5n0PsVWqp2eDkHyG7fWUIZuIMFkupho5Q3Ys0RpHMx2tEnoeyUmI9kGOy1ZTRYfvodbHVdjVw9KVBU9QyWVrjxeb62HqE7SuDWz9NwdHP5I+Uv9Xph++YdI5Ka2o3KACcEojnWUdx7r2p2nDrk1T+GqPQprsnCFsQDP9XLG7TsexTFDmRi4ZrkPjA2j7g+tz9MxqggrXVz0fw8CxhANsJ/E0XhfkhZXSIZqKQX26aQlwUbetn9ZooSObNJOp6o/GN+k7y9jYnuIIUVrIvlJfYyzYJcuca3LiIzWU0r0bd4H0ZU4yDQeGmyFGNm9FUeQbAhqUAco0kyMBsSIgqSyNBhodGcymGzcGXouscj/zPcURCy4nECmp9zOxtaqpENdiFVxxnmA93gMpI2ICKZQcGyjpFqYw=
skills:
dangerSense:
skill: CUSTOM
trigger:
type: RIGHT_CLICK # The player must activate it manually.
conditions:
cooldown:
type: COOLDOWN
mode: SELF
cooldown: 300 # 5-minute cooldown (300 seconds).
effects:
detectEnemy:
type: ENTITY
mode: OTHER

#

entityTypes:
- PLAYER
radius: 15 # Detects enemy players in a 15-block range.
glow:
type: GLOW
mode: OTHER
duration: 5 # Enemy player glows for 5 seconds.
warning:
type: TITLE
mode: SELF
title: "&cEnemy Player Detected!"
subtitle: "&7Stay alert!"
fadeIn: 5
stay: 40
fadeOut: 10
sound:
type: SOUND
mode: SELF
sound: ENTITY_ENDERMAN_SCREAM
volume: 1
pitch: 1
actionBar:
type: ACTIONBAR
mode: SELF
message: "&4⚠ Enemy Nearby! Stay Ready!"

eternal oxide
#

Try asking an actual question as I'm sure you are in the wrong channel

coral sparrow
eternal oxide
#

for Spigot plugin devs

#

are you wrting a Spigot plugin?

coral sparrow
#

Yeah

#

Somthing like that

#

I want it to be for one guy who asked about this thing almost same but else powers

eternal oxide
#

what?

#

none of what you posted is Java nor Kotlin

#

So not writing a plugin

coral sparrow
#

Oh

eternal oxide
#

you need to get help from whatever plugin you are trying to configure

coral sparrow
proven kite
#

is there any way to replace this word in every class I have?

eternal oxide
#

Notepad++ search replace in files

proven kite
#

what?

#

wait like listen

#

basically I got a lot of classes from my old plugin

#

that didnt work and I copiedd most of it

#

and the paths are wrong

#

so can I replce this specific word

eternal oxide
#

then refactor

proven kite
#

with a different one? with few clicks?

proven kite
glad matrix
#

[15:01:56 ERROR]: Could not load 'plugins/ClansAndConquests-1.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.19
at org.bukkit.craftbukkit.v1_16_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:290) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:305) ~[patched_1.16.1.jar:git-Paper-138]
at org.bukkit.craftbukkit.v1_16_R1.CraftServer.loadPlugins(CraftServer.java:388) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.DedicatedServer.init(DedicatedServer.java:208) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:941) ~[patched_1.16.1.jar:git-Paper-138]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Paper-138]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_432]

proven kite
eternal oxide
#

you are running on 1.16 so change teh API version in your plugin.yml to 1.16

glad matrix
#

oh

#

ops

proven kite
#

its ctrl + shift + r

#

to replace stuff

eternal oxide
#

refactor replacing references

#

or use a simple text editor like NP++ and replaceAll

glad matrix
#

[15:06:26 ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'ClansAndConquests-1.0.jar' in folder 'plugins'

blazing ocean
proven kite
proven kite
glad matrix
#

[15:06:26 ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'ClansAndConquests-1.0.jar' in folder 'plugins'
someone know y?|

eternal oxide
#

not from just that

robust nymph
#

Still couldn't fix, I installed bungeecord according to the wiki

proven kite
#

@glad matrix

#

ur server is 1.16 and ur using a 1.19 plugin right?

glad matrix
#

this is new error

#

but i think i know y

eternal oxide
#

you've seen that error before when you wrote your other plugin

glad matrix
#

ye

#

its

#

something in the yml

#

i try to fix

chrome beacon
#

Did you read that error

eternal oxide
#

A plugin written for 1.19 will not run on a 1.16 server

glad matrix
eternal oxide
#

there is no config.yml in that plugin jar

worldly ingot
#

I don't want to dissuade you from making plugins, but if you're having recurring issues of various bits and pieces of your plugin not being exported correctly (your main class, your plugin.yml, your config.yml), you should maybe do some research and experimenting with your build system or export process to make sure you have these components every single time you export

#

Your build system is the one tool with which you should be most familiar because without it you don't have a plugin to use

orchid iron
#

how can i spawn a warden and immediately trigger the despawn animation (with code)?

grim hound
#

Is there a core shaders tutorial?

slender elbow
#

yes

#

Google seems to yield several results on that topic

grim hound
#

Why does a google search return better videos on that than a youtube search?

#

The mystery prevails

blazing ocean
#

because people don't make video tutorials about everything

#

core shaders are a very advanced topic, you're required to read a lot and know maths

remote swallow
#

HEYS GUYS BACK TODAY WITH A VIDEO ABOUT CORE SHADERS

#

-# 60 hour long video

blazing ocean
#

heys

grim hound
remote swallow
#

do you not know how to read

blazing ocean
#

AI will not be of any help

#

at all

grim hound
blazing ocean
#

then do something else

grim hound
#

No

#

Gonna learn this

blazing ocean
#

yea glhf with that

#

(you will not have fun)

slender elbow
#

gonna learn this
i do not know how to think

my prediction is that you are not going to learn it :kekw:

blazing ocean
#

nah nah of course they will

#

just stop thinking and start writing

grim hound
#

Muscle memory

#

No thought necessary

#

Put 1, see changes, revert

blazing ocean
#

average rendering experience

grim hound
#

Always learned like this

slender elbow
#

that doesn't sound like learning

blazing ocean
#

hm seems weird
ask chatgpt to fix it
even weirder
use other llm
repeat

grim hound
#

Actually experiencing things rather than just reading theory works better for me

#

Read theory
See in action

#

No theory?
Random values, go

slender elbow
#

crazy idea, but what if you read the "theory" on how things actually work so you know what to expect, and then play around so you know what to make and how to make it?

grim hound
#

I'm not good with words

slender elbow
#

including the reading part?

#

impressive

grim hound
#

It's an ambiguous statement

slender elbow
#

incorporating knowledge

eager hawk
#

What's the easiest way to add a plugin prefix to all console messages?

chrome beacon
#

Use the plugin logger and not sys out

eager hawk
#

Bcs right now I'm using "[" + this.getClass().getSimpleName() + "] " which seems dumb to me

#

Oh ok I'll check it out!

eager hawk
chrome beacon
#

yes

#

assming you're in the JavaPlugin class

#

or the one extending it rather

eager hawk
#

Yup

#

log(Level level, String msg) what should be in level?

chrome beacon
#

The type of message it is

#

info warning error etc

eager hawk
#

Ohh I see it now amazing

#

Tysm!

manic delta
#

what is love, baby dont hurt me

lean pumice
#

how of you can give me the packet mapping of 1.17.1?

blazing ocean
#

?mappings

undone axleBOT
lean pumice
blazing ocean
#

oh shit they changed the slug now, it's just JE protocol

#

@young knoll time to fix ?protocol

worldly ingot
#

Oh it got merged now? Finally lol

remote swallow
#

HELL YEAH NEW MINECRAFT ANIMATION

young knoll
#

?protocol

undone axleBOT
lean pumice
blazing ocean
#

so check the entity metadata page for july 2021

chrome beacon
#

^^

tidal fog
#

im having a real hard time understanding on what to actually do, i understand i need to connect to the tcp port ive done that

start a handshake so send the
handshake packet, what is it actually that i need to send?

packet format
varint with the length, "Length of Packet ID + Data", so this would be amount of bytes? bits?
varint with protocol id so 769? since 1.21.4
byte[] with the handshake stuff?

varint with the version number
string with the ip
unsigned short with the port
VarInt Enum (so 1/2/3?) what would i chose? currently i just want to check if the server is alive

#

this is in c# btw

chrome beacon
chrome beacon
#

I wasn't trying to sound rude, but I guess it did come off that way

#

Sorry about that

tidal fog
#

wooow im gonna cry myself to sleep tonight so hard ):

#

ty for your time tho

#

so protocol id would be 0x00?

chrome beacon
#

yes

quaint mantle
#

hi!

#

I am having some problems with PlayerInfo packet. I am trying to listen for a playerInfo packet being sent to the client of the ADD_PLAYER type. But it seems to be returning null.

chrome beacon
#

?nocode

undone axleBOT
#

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

umbral ridge
#

i was about to send that

chrome beacon
#

?paste

undone axleBOT
quaint mantle
#
@Override
            public void onPacketSending(PacketEvent event) {
                var packet = event.getPacket();

                var action = packet.getPlayerInfoAction().read(0);
                if (action != EnumWrappers.PlayerInfoAction.ADD_PLAYER) {
                    return;
                }

                event.getPlayer().sendMessage("test!!!!!");

                var playerAddedUUID = packet.getUUIDs().read(0);
                var playerAdded = Bukkit.getPlayer(playerAddedUUID);

                if (hasEffect(playerAdded)) {
                    event.setCancelled(true);
                }
            }```
quaint mantle
# chrome beacon ?nocode

yeah, I was looking through the stack trace and was getting that alongside the code. Sorry for the wait.

chrome beacon
#

send the stacktrace as well

#

Also I have a feeling that's not the right format of the packet

quaint mantle
#

?paste

undone axleBOT
quaint mantle
chrome beacon
#

Yeah that packet contains a list of PlayerInfoData

#

not uuids

quaint mantle
#

oh. How do I get that out? I've not really messed with packets much before.

chrome beacon
#

Should be a getter for them

quaint mantle
#

okay, I will try something with that.

#

wait, does this packet send more than one action at a time?

chrome beacon
#

yes

#

Well one action multiple players

#

Looks like it can be multiple actions as well but they all apply to every player in the list

quaint mantle
#
            
            @Override
            public void onPacketSending(PacketEvent event) {
                var packet = event.getPacket();

                var actionsList = packet.getPlayerInfoActions().read(0);
                event.getPlayer().sendMessage("{");
                actionsList.forEach(action -> {
                    event.getPlayer().sendMessage(action.name());
                });
                event.getPlayer().sendMessage("}\n");
             }```
quaint mantle
#

And that looks complex too, the screenshot I sent.

#

So, I am just running it on one test server with only my account being online.

#

The only way for it to have sent so many at the same time is if they all applied to me.

chrome beacon
#

Yeah

quaint mantle
#

oh my it includes a lot of important things, like initialising chat, player's gamemode, display name, etc.

chrome beacon
#

yes

quaint mantle
#

But I just wanna get rid of the ADD_PLAYER event, but if I simply do event.setCancelled(); all the rest gets lost too.

#

I only need them to not show up in the tab list.

#

which would mean I have to get all the events besides ADD_PLAYER, put them in a new packet and send it?

#

or wait, the actions collection is a Set. So, I could just get rid of the ADD_PLAYER from the collection and that should be it, right?

chrome beacon
#

No

#

Remove the player from the player data info list

#

Only cancel if it's then empty

#

Otherwise you'll mess things up for other players

quaint mantle
#

oh ok.

#
            @Override
            public void onPacketSending(PacketEvent event) {
                var packet = event.getPacket();

                var actionsSet = packet.getPlayerInfoActions().read(0);
                if (!actionsSet.contains(EnumWrappers.PlayerInfoAction.ADD_PLAYER)) {
                    return;
                }

                var playersAdded = packet.getPlayerInfoDataLists().read(0);

                playersAdded.forEach(playerAdded -> {
                    var bukkitPlayer = Bukkit.getPlayer(playerAdded.getProfileId());
                    if (hasEffect(bukkitPlayer)) {
                        actionsSet.remove(EnumWrappers.PlayerInfoAction.ADD_PLAYER);
                    }
                });
            }```
#

does this look right?

#

java.lang.NullPointerException: Cannot invoke "com.comphenix.protocol.wrappers.PlayerInfoData.getProfileId()" because "playerAdded" is null

#

okay, I am not even sure why that list contains null objects.

kindred valley
#

can somebody explain me this

#

i didnt understand

worldly ingot
#
public class MyPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        this.saveResource("myfile.yml", false);
    }

}

That's all. Then just have a file called myfile.yml in your project's resources directory

#
public class MyPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        this.saveResource("config.yml", false);
        this.saveDefaultConfig();
    }

}

The above two methods function similarly (not quite the same, but the way it saves files is the same)

manic delta
chrome beacon
#

You need to listen to both the click and drag events

manic delta
#

i think this is ok

#

ill try

blazing ocean
#

sendMessage { color("taking an item") }
confusion

manic delta
#

sendMessage() works too

#

but copilot suggest it lol

#

is for testing anyway

blazing ocean
#

what the hell does color("message") do

manic delta
#

i usually use sendMessage()

manic delta
blazing ocean
#

components in shambles

manic delta
blazing ocean
#

why

#

why would you run it through legacy and then mini

#

just use mini....

manic delta
#

just in case someone use &

#

i should implement a check that if someone uses & in the input

manic delta
jolly maple
#

Is it ok if I ask a question about AdventureAPI

#

HELP
I am currently trying to create a custom atlas using the minecraft font and the plugin that I'm refrencing to is using AdventureAPI's Component.font(key) to get a Key type and somehow use it to create a custom atlas like this... Can someone help me?

manic delta
#

what is that

#

💀

blazing ocean
#

you need to create a font

jolly maple
#

oh....

blazing ocean
#

then use that font's key

#

?paste pls

undone axleBOT
jolly maple
#

sry

#

This is the plugin im refrencing to

blazing ocean
#

yea you need to create a resource pack with font and then use that font

jolly maple
#

hm...

#

Is there a way to render it without actually including the font file?

blazing ocean
#

no

#

the client needs the font file, via a resource pack

jolly maple
#

like the image

#

im making a plugin

#

that creates the atlas for a resourcepack

blazing ocean
#

I mean you need the bitmap somewhere

#

You can of course generate it

jolly maple
#

btw how do I load the mc font?

blazing ocean
#

elaborate

#

wdym by "load"

jolly maple
#

so I want to create

#

an atlas using the minecraft font

#

so I have to fetch the mc font

#

and use it to create a bitmap image

#

and save it as a png for the resource pack

#

but I don't know how to obtain the font file

blazing ocean
#

You write it or you can generate it using packed

jolly maple
#

I found a plugin somehow using Component.text's .font(key) method

blazing ocean
#

#font just takes in the resource location of the font

quaint mantle
#

uh, does anybody know how the player_info_update packet works? I just got back to looking at it, and I am still legitimately lost about what the heck it is doing.

#

I have this collection I am maintaining of players that should not appear in the tab list. So, when one of them joins, I am going to listen for the ADD_PLAYER event and cancel if it contains a player within the collection. But the problem is, it contains several actions and players, and I am not sure how any of that works.

rotund ravine
#

Did u look at the protocol?

quaint mantle
#

on the wiki? Yeah I have been looking at it.

#

or do you mean something else?

pliant fog
#

Hi, i'm trying to retrieve a player's netty channel in multiple versions, do someone know a good way to get the fields or the methods to get it ?

sullen marlin
#

?xy

undone axleBOT
pliant fog
blazing ocean
#

look at how packetevents does it then ig

pliant fog
#

?? didn't understand sorry, the thing is I achieved to get want i wanted working in 1.18, but the methods are not the same between version. return ((CraftPlayer) player).getHandle().b.a.m;

right now I have not proper method other than testing every method to find the right one atm.

kind hatch
#

?mappings

undone axleBOT
sullen marlin
#

?xy

undone axleBOT
jolly forum
manic delta
#

print the block type before the condition

jolly forum
jolly forum
#

but this is the fire block

sly topaz
jolly forum
sly topaz
jolly forum
sly topaz
#

well, that'd be the igniting block

worthy yarrow
jolly maple
#

Hello, I am currently trying to detect if a player is pressing left click without letting it go using nms by accessing ServerGamePacketListenerImpl and I did access it though but I don't know where to find the left click boolean...
Is there a document for nms?

thorn isle
#

for nms, no, but for the protocol yes

sullen marlin
#

why not just getItemInUse() API method?

#

oh that's right click

#

I dont think there's anything in the protocol for "keep pressing left"

thorn isle
#

there's a blockdamaged event or something iirc that fires when you dig blocks

#

but that's also the only case in which the client reports "keep pressing left"; doing it on air or on entities will just send one interact packet telling the server that something was left clicked

#

are you the guy who was trying to make a gun plugin where you shoot by holding down left click?

dawn flower
#

is EntityShootBowEvent#getConsumable just the arrow

worldly ingot
#

Yes

thorn isle
#

yeah well

#

it doesn't seem like anyone here knows if that's even possible

chrome beacon
#

As mentioned the client won't send that information

#

So you'd need to use something like a block they can break

sly topaz
#

can't you just put an interact entity in front of them at all times

thorn isle
#

that only works for right click

sly topaz
thorn isle
#

sure, but there's no way to know whether the button is still being held

#

the client will only send one attack per you pressing the button down

sly topaz
#

now you'd only have to deal with the fact that the hitting animation would continuously play while you are holding, probably something fixeable with a resource pack or something

thorn isle
#

each click is one attack; holding left click doesn't auto-attack

#

how you describe it is how it works for right clicks, which is why it was noted that the interaction entity trick only works for right clicks

jolly maple
thorn isle
#

yes, as we told you last time, it doesn't

#

with the sole exception of when you mine blocks

#

and i suppose the input packet now communicates wasd/jump/sneak button presses

#

but no such thing for lmb or rmb

jolly maple
#

ok...

sly topaz
#

?services

undone axleBOT
blazing ocean
#

stop crossposting

#

we do not care, go to services if you want something

echo basalt
#

sup rad

blazing ocean
#

hi illusion

echo basalt
#

speaking of servers when was the last time you saw something recent of mine 👀

sly topaz
#

I always wonder how people do not know better than to crosspost

blazing ocean
#

a while ago probably

echo basalt
#

down to hop on vc and have me violate another nda?

sly topaz
#

like, unless they're really young, they must have been told in a discord server before

blazing ocean
echo basalt
#

ight

eager hawk
#

What's the exact difference between the Default Config File and the Custom Config File? Bcs from what I've read you can set and get properties with either of them?

sly topaz
#

and a custom config would be anything else

thorn isle
#

there is no intrinsic difference, the default config file is just a convenience thing

sly topaz
#

the only difference is that default config has the convenience methods for saving and getting

#

beat me to it

thorn isle
#

the other convenience thing about it is that the embedded config.yml resource in the jar is automatically used as config defaults

#

though usually this causes more issues than convenience

eager hawk
#

So I can also just use the default config?

sly topaz
#

if you want, yes

thorn isle
#

i.e. "i fucking removed this config line, why does it say it's still there" because it's being pulled from the defaults

eager hawk
#

Alr ty guys

sly topaz
#

I wish someone made a Cloud vs CommandAPI comparison

eager hawk
#

So when I add smth new to the config, do I use saveConfig or always saveDefaultConfig?

#

I suppose the 2nd one?

thorn isle
#

saveconfig will overwrite any changes made to the file, you generally don't want to use it

#

savedefaultconfig checks if the file exists and extract the default config from the jar if it doesn't; it also loads the existing config if present

eager hawk
#

Alr, so basically my code should look like this (for example)

parkour.getConfig().set("parkour-name", name)
parkour.saveDefaultConfig();

Am I right?

sly topaz
eager hawk
#

Ive read it

#

But there it says saveConfig()

sly topaz
#

well, that wiki explains everything you should have to know about configs

eager hawk
#

Yeah but there it uses saveConfig() and vcs just said that you don't want to use it

sly topaz
#

well, it depends on what you use the configuration for

#

if you set values at runtime, you'd ultimately have to use saveConfig

eager hawk
#

Storing parkour names, start / end block locations

#

And time scores of the parkour run

sly topaz
#

that sounds like setting values at runtime

#

saveDefaultConfig won't write to the file once it's already in your plugin's folder, aka it will only write once

#

saveConfig will write every time you call it, regardless of whether there are changes or not

eager hawk
#

Oh ok, so I just need to run saveDefaultConfig when starting my plugin, but all the other times I need saveConfig

#

When adding new properties to the config

sly topaz
#

yes, but be aware that using saveConfig essentially makes the configuration well, not "manually configurable"

eager hawk
#

Yea yea that's ok, I don't want to users to modify the config manually, only using commands

sly topaz
#

unless you make sure to read the values whoever edited the file before calling saveConfig

eager hawk
#

Amazing that's very clear, thank you!

thorn isle
#

or no that's not right

#

there's one thing that'd be worse; editable only via an ingame chest gui

#

i will PERSONALLY set fire to your entire city if you do this

sly topaz
#

I mean, locations aren't something you want to manually input anyway

eager hawk
#

Yea exactly xp

#

Would be weird if people would manually change locations

#

Easier to use /parkour setspawn for example

thorn isle
#

setting locations is fine, but editing e.g. strings or numbers via commands or a gui is absolute ass

sly topaz
#

that I can agree

#

even with the anvil GUI or chat, it is just ass to not be able to edit them in bulk if necessary

eager hawk
#

It's my first time working with configs tbf, I'm well known with Java, but Spigot is like pretty new for me (my first week rn)

#

So I don't rlly know how to work with configs that are manually editable yet

#

I've made a working warp plugin, home plugin, basic craft gui plugin, and trying to make a simple parkour plugin rn

#

Just for learning and experiencing

sly topaz
#

that's good, you'll eventually get the hang of it if you keep playing around with the API

eager hawk
#

But I don't think the Spigot page handles manual config editing, correct me if I'm wrong tho

sly topaz
eager hawk
#

I suppose I'll also need to add a /reload command then after someone manually edits it?

#

like /parkour reload

sly topaz
#

yeah, which would essentially just call reloadConfig

eager hawk
#

I understand alr, thanks :)

robust helm
#

in a gui, how should i keep track of actions(Consumer<InventoryClickEvent>) assigned to itemstacks? Should i use pdc for identifying them?

sly topaz
robust helm
#

just not rlly ideal to modify the items if someone would maybe want to give the item to the player on click

#

not my problem tho 🤷‍♂️

sly topaz
#

I mean, you provide the inventory click event itself on the consumer so they may as well match the item themselves at that point

robust helm
#

as of rn im not offering that lower abstraction

#

is it rlly needed?

#

eh ig i should

#

btw where should i register the inventoryclick listener

#

i was going to use one listener object for each gui object, and just register it with a static plugin variable in the constructor

sly topaz
#

I mean, I can't answer those questions for you, it all depends on how you want to use your abstraction

jolly forum
drowsy helm
#

if you want it to a specific itemstack that may move around just use pdc with a uuid

icy kelp
#

Hey I want to change version of my plugin but I'm getting an error

cinder abyss
#

Hello, is there an event for when two dropped items combine ?

young knoll
cinder abyss
#

okay thanks 😄

icy kelp
blazing ocean
#

did you reload maven

icy kelp
#

oh thx it worked

#

em it gave me like a 100 errors

#

31*

#

so how can I fix it?

chrome beacon
#

If reloading maven didn't give any errors

#

invalidate caches

#

(under the File dropdown)

#

also make sure you have a Java 21 jdk

blazing ocean
#

and make sure you have the repo added

icy kelp
#

I'm just trying if it works on 1.21 ( the original version of project )

blazing ocean
#

make sure the command is added to your plugin.yml

icy kelp
#

yeah it is

#

for now I don't have any errors about my plugin on 1.21

#

bruh, I don't know if thats paper error or mine

blazing ocean
#

?whereami

icy kelp
#

so I can't use spigot plugin on a paper server/

eternal night
#

Well, technically you can use spigot plugins unless you use API added by spigot after December (paper hardforked there)

#

the whereami is more of a "if this is a paper bug, ask paper"

icy kelp
#

I'm learning for now java and also spigot development, I've tried to make own GUI ala-library

#

in a one script

eternal night
#

Well if you wanna do spigot development, then you ought to also run spigot I think

icy kelp
#

yeah i'm doing that

#

I mean I'm changing

#

but I need a help with my code, ```java
package org.Cheeseserowy.pluginCheese.Commands;

import org.Cheeseserowy.pluginCheese.Listeners.GUI;
import org.Cheeseserowy.pluginCheese.Objects.Utility;
import org.bukkit.Bukkit;
import org.bukkit.Sound;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryOpenEvent;
import org.bukkit.inventory.Inventory;

public class Piano extends GUI implements CommandExecutor, GUI.inventoryHandler {

@Override
public void onClick(InventoryClickEvent event) {
    int slot = event.getSlot();
    Player player = (Player) event.getWhoClicked();
    float pitch = 0.5f + slot * 0.1f;
    player.playSound(player.getEyeLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1f, pitch);
}

@Override
public void onOpen(InventoryOpenEvent event) {
    Player player = (Player) event.getPlayer();
    player.sendMessage(Utility.convertColors("&aPomyślnie otworzyłeś pianino."));
}

@Override
public void onClose(InventoryCloseEvent event) {
    Player player = (Player) event.getPlayer();
    player.sendMessage(Utility.convertColors("&cPomyślnie zamknełeś pianino."));
}

@Override
public boolean onCommand(CommandSender sender, Command command, String s, String[] strings) {
    if (sender instanceof Player) {
        Piano piano = new Piano();
        Inventory inv = Bukkit.createInventory(null, 9, Utility.convertColors("&aPianino"));
        this.registerInventory(inv, piano);

        ((Player) sender).openInventory(inv);
    }
    return false;
}

}

#

I don't know why it doesn't override onClick, onOpen and onClose event

sly topaz
#

I mean, it is overriding them

#

but they aren't annotated as @EventHandler nor the class is marked as Listener so that wouldn't work

#

Ig if GUI.inventoryHandler (use UpperCamelCase for class names pretty please) implements Listener then the last part doesn't matter

sly topaz
#

oh nvm I didn't read the attachment

#

but you are overriding the wrong things

#

I think you meant to override the handle methods but you ended up overriding the event handlers

#

I am honestly not sure what that interface is for tbh

icy kelp
#

?gui

sly topaz
#

ah, I get it now, that's the design in that one spigot tutorial

#

was about to say, yeah

icy kelp
#

But I'm trying to make it in one class

chrome beacon
#

why though

icy kelp
#

Idk

sly topaz
#

did you register the GUI listener?

#

if you didn't then that's your issue most likely

icy kelp
#

thx

#

oh no wait I did

#

should I for the piano too? but it isn't a Listener

#
@Override
    public void onEnable() {
        GUI gui = new GUI();
        Bukkit.getPluginManager().registerEvents(gui, this);

        getCommand("piano").setExecutor(new Piano());
    }

sly topaz
#

you aren't registering Piano anywhere

#

you need to use your GUI#registerInventory method

icy kelp
sly topaz
#

yes but Piano is also a inventoryHandler

#

this is why you'd prefer different classes for it, mixing up responsibilities like that just makes things confusing

robust helm
#

your current code will open a shared gui for all players who execute the command i think

robust helm
#

ur only calling "new Piano()" once

sly topaz
#

nah, they instantiate a new object on the command handler

robust helm
#

nvm

sly topaz
#

it holds unncessary command handler information but welp

#

everything looks fine honestly, not sure where the issue is

icy kelp
#

that will be good?

sly topaz
#

ah wait, I see where the issue is now

icy kelp
#

and I'm going to fix the errors

sly topaz
#

your Piano class is extending GUI

icy kelp
#

yeah

sly topaz
#

but you aren't registering Piano as a listener

#

your inheritance tree is really messed up, I'd recommend separating those into different classes

icy kelp
#

yeah but this tutorial is not logic for me, I don't even know what I should seperate

sly topaz
#

well, the command logic from the inventory logic

#

and your Piano class shouldn't extend GUI but pass a GUI object onto it via dependency injection (aka passing it as a parameter in your constructor)

fallow saffron
#

Who still creates 1.8.x plugins here

wraith oasis
#

Hello

eternal oxide
#

It lifts

fallow saffron
#

Hmm don't know why my skull item textures randomly disappear

#

Don't know if it's because of serializing the inventory or the nbttag list

#

Anyone have a clue what's going on?

sly topaz
# icy kelp why the hell java is so hard

GUI.java

public class GUI implements Listener {

    public interface InventoryHandler { // UpperCamelCase!!
        public void onClick(InventoryClickEvent event);

        public void onOpen(InventoryOpenEvent event);

        public void onClose(InventoryCloseEvent event);
  }
// ... rest of the logic is fine

Piano.java

public class Piano implements CommandExecutor {
  private final GUI guiManager;

  public Piano(GUI guiManager) {
    this.guiManager = guiManager;
  }

  private class PianoGUI implements GUI.InventoryHandler {
     // inventory logic here
     public static PianoGUI open(Player target) {
         target.openInventory(MenuType.GENERIC_9x6.create(target, Utility.convertColors("&aPianino"))); // you could do something with the view here
         return new PianoGUI();
     }
  }

  @Override
  public void onCommand(...) {
    if (sender instanceof Player player) {
        guiManager.registerInventory(PianoGUI.open(player));
        return true;
    }
    return false;
}

main class:

@Override
public void onEnable() {
  GUI gui = new GUI();
  Bukkit.getPluginManager().registerEvents(gui, this);
  getCommand("piano").setExecutor(new Piano(gui));
}
#

that's essentially how you do it

#

it isn't complete but it serves you as example

blazing ocean
sly topaz
blazing ocean
#

a worse name

robust helm
#

where should i register guis? I have a gui registry and a guiListeners class that calls the overriden functions in the guis from guiregistry

blazing ocean
#

I mean do they need to be registered anywhere?

#

If you're talking about the events you could just track it once it opens

robust helm
#

do one method that opens it and registers it?

blazing ocean
#

Put them into some tracker on open

#

Then remove them once they close

robust helm
#

so like
Gui gui = new PianoGui()
guiRegistry.register(gui);
player.openInventory(gui.getInventory())?

#

and registry over DI

blazing ocean
#

I'd just make an opening method

robust helm
#

static

blazing ocean
#

But why do you need a GUI registry?

robust helm
#

events

blazing ocean
#

Well that's not what you use a registry for

#

You're talking about some kind of manager or tracker

robust helm
#

yea tracker ig

#

something thatlets me call all Gui#onClick of the clicked inventory's gui

grim hound
blazing ocean
#

reload gradle

grim hound
#

ah yeah works

sly topaz
#

just use slots like someone suggested here

robust helm
#

damn

#

well ig slots arent bad either

#

ill do that

grim hound
#

can you like

#

host a website on the very same machine the minecraft server is running

eternal night
#

sure?

grim hound
#

I mean like

blazing ocean
#

Yes

#

And on the same port if you're asking that

grim hound
#

75.13.32.23:678 type of ip

eternal night
#

what

grim hound
eternal night
#

how is IP related to that

blazing ocean
#

wha

grim hound
eternal night
#

??

grim hound
#

like no DNS needed

#

uh

chrome beacon
#

Yes you don't need a domain

grim hound
#

ah okay

#

thanks

eternal night
#

Do note that ssl is kinda annoying for plain ips

grim hound
#

is it not possible to make it secure?

eternal night
#

Well, you need to find a certificate auth that cares to issue you a cert for a bare ip

#

lets encrypt iirc does not

grim hound
#

will normal clients not connect to websites without a certificate?

eternal night
#

depends on what you consider a normal client

grim hound
#

typical browser

chrome beacon
#

You can visit a website with http

eternal night
#

Yea

grim hound
#

uh lets say, chrome

chrome beacon
#

It doesn't need to be secure nor https

grim hound
weak wasp
#

You should really register a domain. There are free ones all over the place like freenom or no-ip

eternal night
#

for it to be https you need an tls certificate from an authority like lets encrypt

#

So if you wanna use https, find a tls cert authority that issues tls certs to bare ip addresses

#

It just isn't as common given that ips can change a lot more often than domains do.

chrome beacon
#

and get ready for that to cost more than just getting a domain

grim hound
#

okay, will see

#

(gonna prolly use bare ip for a while)

eternal night
#

(domains are literally like, less than a dollar at some providers)

jagged thicket
#

you can get free domains i think from freenom

grim hound
#

do they have APIs for that?

chrome beacon
#

Why do you need an API?

weak wasp
#

You can always issue your own certs with something like OpenSSL, but getting them set up correctly is pretty much an industry secret

grim hound
#

um

chrome beacon
#

???

grim hound
#

like hosting a website

#

on the same machine as the server

#

...with a plugin

chrome beacon
#

for what purpose

grim hound
#

uhhh

#

don't worry about it

chrome beacon
#

Then let the users handle that part

grim hound
#

I just might, yeah

slender elbow
fading dew
#

Hey I'm the developer of a ChestLocker plugin. I'm fighting this issue atm: https://github.com/earomc/chestlocker/issues/5

My problem is, that I rely on the API in the Lockable interface. The setLock(String) method was deprecated in newer Spigot versions. Not only is it deprecated, it seems to not work correctly anymore. The new alternative is an experimental API "setLockItem" which takes in an ItemStack. However my plugin checks which String / which password locked the container. But there is no alternative "getLockItem" method. Assuming it is still in development I thought of another approach:

Setting the chest's NBT data manually. However I don't know how to do that.

So I have two questions:

  1. How do I set NBT data manually?
  2. Where can I track the progress of the Lockable API so I can adapt my plugin to that as soon that is released.
GitHub

My friends, I am having a terrible issue as I did not perform a back before I did this and locked my precious metals without testing the unlock first. I created the sword with my password "123...

eternal night
#

I would probably just move over to PDC here

jolly maple
hazy parrot
weak wasp
#

I'm not sure if Extended Verification is still a thing (gave a green background in the SSL bar). You used to have to link to a Certificate Revocation List, but anyone could edit the cert to link to an empty file (no revoked certificates) and bypass if the issuer had indeed revoked their cert.

warm mica
#

I'd just enforce people to use a reverse proxy

sly topaz
#

if you can enforce people to do things, then it doesn't matter whether you have a cert or not

#

but a self-signed cert for some random IP is never going to get accepted by any certificate authority known to man

whole vector
#

yooo so I don't know if anyone has answers regarding this or even remembers this plugin but anyone remember
EASYNICK
I just looked it up to try and find it I found all the stuff from 3 years ago and a LINK from spigot saying "EasyNick is malware" can anyone explain what the HAPPEND TO it and why and WHAT Malware BECAUSE I am like freaking out a lil because I HAD THAT Plugin in use IN THE PAST LIKE YEAH

eternal night
#

THE only THING I found was a GITHUB repository BUT THAT ONE is archived. THERE is ALSO AN EASYNICK plugin ON SPIGOT, it seems to be in GERAMN THO

remote swallow
#

IS GERMAN allowd on the spigot MC MARKETPLACE

blazing ocean
#

I Would HOPE it is ALLOWED

wraith oasis
#

hello, could someone help me make a ghost block visible to only 1 player using protocollib, it'd be falling block, i just dont know how to strat, and then if someone could tell me how to teleport it to coordinates

wraith oasis
#

i just tried and i have no idea

smoky anchor
wraith oasis
#

like a preview of a structure what is about to be placed

#

like you know in rust

#

i just dont understand protocollib

smoky anchor
#

What version are you on ?

wraith oasis
#

1.21

#

java 17

smoky anchor
#

Great, use block display entity

wraith oasis
#

why not falling_block?

smoky anchor
#

With glowing ?

wraith oasis
#

yea like border

#

smth like this

#

i saw it on youtube

smoky anchor
#

idk what you mean by "border"

wraith oasis
#

yea glowing

smoky anchor
#

I mean, try that. I do not know.

#

And I suggest block display as those are the most performant thing you can use

smoky anchor
#

It's a technical entity, used purely for visuals

#

so no

#

My approach would be to make all block displays ride just one entity. You can then move only this entity however you want.
You can probably use something like Player#hideEntity for the "visible to only one player" part

wraith oasis
wraith oasis
smoky anchor
#

of what

wraith oasis
#

so i'd need to have many entities that are being rided

#

ig

smoky anchor
#

25 is the answer

wraith oasis
#

yea

#

so how could i make all ride 1 entity

smoky anchor
#

no, you have one root entity
you make all the displays ride that single entity
then for each of those entities, you change the transformation matrix (translate part) so the block is visually in the correct place

wraith oasis
#

hm

smoky anchor
#

Might wanna play with the visual box value (or whatever it's called) so you can ensure you can see all of them

smoky anchor
#

All of what I said is possible with the Spigot API

wraith oasis
wraith oasis
#

@smoky anchor check dms pls

smoky anchor
#

no

#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

smoky anchor
#

?paste

undone axleBOT
wraith oasis
#

it says Rate limited

#

lol

smoky anchor
#

well I can't help with that
And I do not provide help in DMs unless you ask before and I agree

smoky anchor
#

No you didn't, you just DMd me out of nowhere
But in any case, if I understood your issue correctly. Try turning off your shaders.

wraith oasis
wraith oasis
tall furnace
#

Why are map renderers such a pain to work with?

wraith oasis
#

shaders doesnt matter, turned them off and same thing, idk why would they interfere here

smoky anchor
smoky anchor
wraith oasis
#

and it weirdly rotates

#

idk please help mate

smoky anchor
#

Well, first of all.
Location blockLocation = location.clone().add(x, 0, z);
Anything related to this variable is pointless. You will set the passanger anyways so the position of the BlockDisplay is ultimately meaningless. Simply spawn it at the same position as your root entity.

wraith oasis
#

hm

#

yea

#

my bad

smoky anchor
#

nitpics:
your package name does not conform to the java conventionspl.abudabii.rustedCore.Utilities;
Bukkit.getPluginManager().getPlugin("YourPluginName") bad, at least rename your plugin correctly

wraith oasis
#

wym

#

com.?

smoky anchor
#

Can you describe the images. I don't know what means what.
I understand you want literally just a platform of glass blocks and that is clearly not happening. But I am missing context of what changes between each.

wraith oasis
#

like in rust

#

wait

smoky anchor
#

idc about rust

wraith oasis
#

but rust ~= blocks

#

xD

#

wait

#

let me get you example

smoky anchor
#

I know how that feature looks

wraith oasis
#

like this

smoky anchor
#

So, when you create the preview, without running the updatePreview method. Is it correct ?

wraith oasis
#

and then i'd want to snap it to each other

smoky anchor
wraith oasis
#

and it calls the structure preview functions

smoky anchor
#

(it's great that it has comments, but it's in POLISH and I can't read that LOL)

wraith oasis
#

rip

smoky anchor
#

Damn, that's a lot of static

smoky anchor
#

no, it's no problem

#

private static final Map<UUID, Boolean> isInBuildingMode = new HashMap<>();
Why have a map of booleans. Simply a Set of UUIDs would be enough. If UUID is not in set, player is not in building mode.

wraith oasis
#

there

#

english version

smoky anchor
#

Are you ChatGPT-ing this ?

wraith oasis
#

:c

smoky anchor
#

🤦‍♂️

wraith oasis
smoky anchor
#

Can you comment out your updatePreviewLocation ?
Only spawn the preview and do nothing else with it.
I wanna eliminate a variable in debugging this.

#

But I don't really see how/why it's broken

wraith oasis
#

i got verified 😎

smoky anchor
#

kewl

wraith oasis
#

and blocks stay in place as they stayed

smoky anchor
#

Are they in the correct positions ?

#

Basically I wanna know if just the teleport code breaks this

wraith oasis
#

display blocks aren't getting teleported

smoky anchor
smoky anchor
wraith oasis
smoky anchor
#

image please

wraith oasis
#

where i look

#

it like rotates there

#

i mean not constantly

#

just once when it gets spawned

#

and it stays

smoky anchor
#

That blue line worries me

kind hatch
#

That's the F3 debug

smoky anchor
#

// Armor Stand jako pasażer Block Display
blockDisplay.addPassenger(rootEntity);

#

That is wrong

kind hatch
#

Shows rotation/looking angle

smoky anchor
smoky anchor
smoky anchor
wraith oasis
wraith oasis
smoky anchor
#

Idk

kind hatch
#

Are you trying to add the blockDisplay as a passenger or vice versa?

kind hatch
#

You have it backwards then.

#

rootEntity.addPassenger(blockDisplay)

wraith oasis
viscid carbon
#

javaFX or Jframe?

wraith oasis
#

because i think display blocks rotate where armor stand looks

smoky anchor
#

Just use.... a display entity

#

and do not rotate where it looks ?

smoky anchor
thorn isle
#

riding should work, although one downside to it is that you lose out on the teleport interpolation feature of display entities

#

that should probably be okay for most things though

smoky anchor
#

You can use the.. teleport interpolation
Which should work.
You're surely talking about transformation interpolation

thorn isle
#

no, specifically the transformation interpolation will work even when riding

#

but you can't teleport an entity that's riding, so there's nothing to teleport interpolate

#

or, well, you can, but then it's no longer riding anything

smoky anchor
#

oh like that
that's not a problem in this case

#

and ye, normal interpolation will work anyways, sorry

wraith oasis
#

how much to pay for someone to make me this system?

smoky anchor
undone axleBOT
thorn isle
#

it will use the root entity's teleport/movement interpolation which is good enough for most cases

wraith oasis
#

yea but like around what price range?

smoky anchor
#

But like just learn Java instead of using Gen-AI lol

kind hatch
viscid carbon
thorn isle
#

dunno, i didn't read any of the leading up conversation

#

something something bunch of block displays

smoky anchor
blazing ocean
#

compose native :)

naive knoll
#

what is the best way to show some text above player nametag in minecraft 1.8.8?

rough drift
naive knoll
warm mica
rough drift
warm mica
rough drift
#

armorstands are synced every 3 ticks and use smoothing for the teleport

rough drift
naive knoll
warm mica
rough drift
thorn isle
#

if you mount the armorstand on the player the player will be unable to teleport

rough drift
thorn isle
#

a player can't teleport if an entity is riding the player

#

try it if you don't believe me

rough drift
#

which version

warm mica
#

I think its the other way around

rough drift
#

^

thorn isle
#

no, it's when an entity rides the player

rough drift
thorn isle
#

yes

rough drift
#

sit in a boat, try to pearl away, won't work

naive knoll
#

i think about doing this all with packet, because if i put armor stand as passenger player can't hit block above himself

rough drift
#

I guess no vcs2 is right actually, I forgot

thorn isle
#

also yes, but you also can't teleport if the boat is riding you

rough drift
#

I was the one to make the PR to allow it, I forgot about it and it is not finished lol

naive knoll
thorn isle
#

i had to resort to copious amounts of protocol fucknuggetry to get over-the-head player healthbars to work

#

it does work but it's hideous and fragile and if you mistime the packets the client state gets bricked and they'll have to relog before they can place blocks/chat

#

alternatively patch the server to allow teleportation whilst having passengers, which is apparently a popular approach by server owners, but not really something you can do as a public plugin developer

#

"to run my plugin you need to run the server with ignite wrapper and have it apply this mixin"

#

🤡

naive knoll
#

do you know if i need send PacketPlayOutAttachEntity once or more times?

urban cloak
#

i believe its isMarker()

thorn isle
#

that also makes the client not do any predictions for it and iirc makes it unable to ride entities, but i could be wrong

sly topaz
#

you can make it ride entities just fine as marker

#

I don't know what predictions you're thinking of, but in 1.8.8 there wasn't anything of the sort anyway

#

the only issue with armor stand would be the fact that you can't have multi-line names so you'd have to mount one for the nametag and other for whatever else you want to display

#

you can probably use this

#

it mentions the pro and cons of each approach here too, convenient

young knoll
#

That’s not really relevant in modern versions

sly topaz
#

they're using 1.8.8

young knoll
#

Skill issue

sly topaz
#

we'd just recommend mounted text displays if it was a recent version, I forgot how much of a pain in the ass these things were before

red bolt
#

alr I need help brainstorming!

#

I'm trying to do the impossible and make an isometric view plugin

#

the main problem I have right now is freezing the player and getting their movement at the same time

sly topaz
#

cancelling the player movement should still trigger an input event, no?

#

the usual way people go about it is making the player spectate an entity that cannot move though, or so I believe

red bolt
#

nope

red bolt
sly topaz
#

are you sure the PlayerInputEvent isn't called?

red bolt
#

is that an event?

sly topaz
#

it is

red bolt
#

since what version?

sly topaz
#

pretty recently, 1.20.6 or so

urban cloak
#

i thought thats only called when riding an entity

red bolt
#

ah makes sense why I couldn't find anything around it. I'l check it out thx

red bolt
sly topaz
red bolt
#

wait does playerinputevent get triggered by any keypress?

sly topaz
#

just the movement ones

red bolt
#

ah ok cool

sly topaz
#

forward, backwards, left, right, jump, sneak and sprint I believe

red bolt
#

ohh nice

#

is this part of the event or seperate?

sly topaz
#

separate, that just gets the last Input sent by the player

red bolt
#

so whats the diference then?

sly topaz
#

nothing really, perhaps the events is more "immediate" but I doubt it tbh

#

it just depends on how you want to go about it

red bolt
#

huh alr I'll look more into it but this might have just revived my idea 😂

thorn isle
# sly topaz you can make it ride entities just fine as marker

last i tried this, it was "mounted" and the client did receive the packet, but the marker armorstand remained where it was and didn't move with the mounted entity; similarly marker armorstands don't seem to respect velocity/movement and can only be moved by being teleported

red bolt
#

nope I think that getCurrentInput is how you get the input from the event

sly topaz
sly topaz
#

though I do believe people had some issues around marker armor stands where the entity would stop moving once the chunk unloaded, but in the case of client-side entities, the entity would outright be despawned anyway

thorn isle
#

i only tested it once when going through my "how the fuck do i make this work" checklist, and at a glance i didn't see any issue with my implementation, but i didn't experiment with it very thoroughly

#

i vaguely remember first setting it up with a regular armor stand; and it worked

#

then i switched on the "is marker" flag on the armor stand; and it broke

sly topaz
#

the other issue with using a marker is that since it makes the hitbox smaller, you need like 6 marker armor stands to make another line which is crazy

red bolt
#

so for my plugin I'm trying to make a "new gamemode" but the only way I could figure out was by checking every time a player moved then going through each player and checking if they had the custom gamemode tag and then handling them from there

Just feels inefficient

#

the players gamemode is stored in a custom yml file

urban cloak
#

well i would make the GamemodeManager a static field somewhere

sly topaz
#

creating whatever that manager object is every time the player moves is definitely not a good idea

urban cloak
#

and you could probably just set the fly and walk speed onnly when the gamemode changes

sly topaz
#

I would just use a hashmap and dump their mode in whatever form of storage you prefer when the server closes or the player leaves

#

and also yeah, only change their speed when their gamemode changes

#

you may also want to check whether they moved their head vs their actual location, as the mvoe event is triggered for both

thorn isle
#

use enums for constants instead of comparing strings

red bolt
#

but if the playerinputevent thing works I wont need the flyspeed thing as I will just make them spectate an armorstand

#

nor the movement cancel

#

but I still need some sort of loop