#help-development

1 messages · Page 1167 of 1

smoky anchor
#

I think that is now on a different component

chrome beacon
#

It was moved to the consumable component

#

Which I don't see API for?

smoky anchor
#

Just disables the custom ticking behavior, makes the entities tick every.. tick

hushed spindle
short drift
chrome beacon
smoky anchor
#

And fix the spigot bug

wary harness
#

is there a way to modify how many items can you put in Bundle so it is not limited to one stack amount

#

I don't see any method in BundleMeta.class

short drift
#

I'm looking through the API and I don't think spawnFallingBlock has any constructors which accept a Consumer. There's one which accepts byte data, but .. ?

#

Oh, hm. Maybe like this?

var fallingBlock = Objects.requireNonNull(location.getWorld()).spawn(location, FallingBlock.class, consumer);
chrome beacon
#

yeah like that

grim hound
#

after literally just this

pure dagger
#

it should return true if block was bonemealed

#

it doesnt

#

dont know why

lilac dagger
#

that was ages ago

#

debug the return value

#

see what material comes up

#

see if it's a block or a block state

lilac dagger
#

the packet shows huge

#

is the password 4.7k characters or something

pure dagger
lilac dagger
#

ah i missread

#

it's a boolean

pure dagger
#

yea

lilac dagger
#

that's very weird

grim hound
#

I've never done really databases

#

but this ain't supposed to happen

pure dagger
lilac dagger
#

i'm sure your way works, but you can use properties to declare username and password

#

public MySQL(MySQLData data, Properties properties) throws SQLException {
super(DriverManager.getConnection("jdbc:mysql://" + data.getHost() + ":" + data.getPort() + "/" + data.getDatabase(), properties));
}

#

Properties properties

#

Properties properties = new Properties();
properties.setProperty("user", data.getUser());
properties.setProperty("password", data.getPassword());

#

your way should work as well tho

#

i use properties because i can allow the end user control over them

short drift
#

I don't know what is going on, but that messed up my whole server.

[18:42:06] [Server thread/WARN]: UUID of added entity already exists: EntityFallingBlock['Falling Air'/4590, l='ServerLevel[Kuumaa]', x=896.50, y=-32.00, z=-570.50

I'm getting a lot of these errors and it's super laggy.

#

Here's what I tried to do.

lilac dagger
#

it seems you added an entity using the same uuid

short drift
#

At line 246.

short drift
#

I'm not sure where that happens or why.

#

The other spawn method didn't have this problem.

lilac dagger
#

instead of bukkit runnable you can use Bukkit.getscheduler run task plugin () -> {//your code here}

#

it's cleaner

short drift
#

will that fix the issue? if so, why?

lilac dagger
#

no, that won't solve the issue

#

but seeing how clean your code is i thought to help you a bit here lol

lilac dagger
#

i think you're going over the same block twice

#

spawin the entity only once per block

lilac dagger
pure dagger
#

xD, dont use pseudocode if you are talking about the syntax

lilac dagger
#

the correct format is like:

Bukkit.getScheduler().runTask(plugin_instance, () -> {
//Your code here
});

short drift
lilac dagger
#

well, you've wrote this

#

you an decypher it better than someone who gives you a possible fix no?

#

but i think your neighbouring algorithm goes twice over

#

or more than twice

#

not sure

short drift
lilac dagger
#

without trying to change your algorithm a fix is to use a set that has the blocks you already looked at

#

if (checkedblocks.add(block) ) {
//spawn falling block
}

#

it'll be false if the block is already in the set

magic beacon
#

What’s prob the best place to learn Java to code Minecraft plugins? People here? Website?

short drift
lilac dagger
#

show code

lilac dagger
#

i hope your set doesn't get reset every time

short drift
#

I don't know why it even tries to run several times.

lilac dagger
#

use Block instead of Location

#

and now that i look i see you have a List of blocks

#

you can use it instead of the list

#

Set<Block> and initiate it as new LinkedHashSet<>()

#

this will keep the order of the list as you add blocks to it

#

and also have the property of being a set

short drift
#

@lilac daggerI'm having hard time following what you're saying. Your sentences seem to be contradicting each other. Can you elaborate a bit on what you mean by all that?

#

Tracking blocks instead of location seems to work. I made a mistake there.

#

But all that stuff about the list of blocks and set and linkedhashset, that I didn't understand.

lilac dagger
#

i haven't contradicted myself

#

private void tryMakeBlocksFall(List<Block> blocks) {

#

here a set

#

instead of list

#

you don't need both here

#

and also don't use locations

#

you're getting new locations every time you call a get location

#

it'll never equal

#

a block instead will be the same for as long as the chunk is loaded

short drift
#

I'm not that great with all these weird Java collections. I'm more familiar with C# 😓 but I'll try to replace all the List<Block> with Set<Block> if you think it's better.

#

Except I can't. They can't be sorted.

#

And I don't really see what the benefit is.

lilac dagger
#

if you're sorting then use a list

#

remove checked blocks

short drift
#

But at least the core issue now seems to be fixed. Thank you so much for helping.

lilac dagger
#

and use block instead of location

#

and you don't need to remove blocks

#

you're giving it a new list every time

#

and if you don't remove while looping a list of blocks

#

you don't have to do it a tick later either

#

it can be done at the same time

short drift
#

The 1 tick delay, if I remember correctly, is to correct an issue where the blocks were falling on top of each other and landing at the same time and some of them were removed by MC.

#

So if 3 blocks fall only 1-2 might make it.

lilac dagger
#

if that's the case just remove this anyway processingBlocks.remove(location);

#

the list is a throwaway

#

removing from it will only cause unnecesary resource usage

#

let the gc remove it

lilac dagger
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

brittle geyser
#

I changed world container directory in bukkit.yml and when i trying to get worlds with Bukkit#getWorld method it returns null

brittle geyser
pure dagger
#

so i wrote code (similar to this)

int times = 2;
for (int x = -range; x <= range; x++) {
            for (int z = -range; z <= range; z++) {

                Block nearby = block.getRelative(x, 0, z); 
                if (!(block.getBlockData() instanceof Ageable crop)) continue;
 
                if (crop.getAge() == crop.getMaximumAge()) continue;
                for (int i = 0;  i<times; i++) { 
                    nearby.applyBoneMeal(BlockFace.UP);
                }

            }
        }

we are iterating throug blocks in distance of "range" and "times" is the amount of times you apply bonemeal to each block, but when times = 2 or 1 it works fine, but when its more than 2, this happens - (image)

any ideas? i have no ideas, also what im trying to do is to bonemeal every block until its grown so its getAge() == getMaximumAge(), so i made for loop like this

for (int i = 0; crop.getAge() < crop.getMaximumAge() && i<times; i++) {
                    nearby.applyBoneMeal(BlockFace.UP);
                }

maybe its a bad solution?

proud badge
worldly ingot
#

Why don't you just... set the age? I don't understand the reason for bonemealing it an arbitrary amount of times

#

If you want the particles, you can play the effect for it

#

world.playEffect(blockLocation, Effect.BONE_MEAL_USE, 3) (the 3 is the amount of particles)

split tinsel
#

Why is my maven build button greyed out

proud badge
#

Whats the difference between BlockState and BlockData, like how do I know if a certain property of a block will be in the block state or the block data?

worldly ingot
#

BlockState = block entity, like a furnace. It has NBT data
BlockData = block states, e.g. the way it's facing, or whether or not it's lit, etc.

proud badge
#

Ah so blockstate is NBT

#

👍

worldly ingot
#

Yes :)

smoky anchor
#

ok
but who named those things
why does block state not hold.. block state
is it just that old ?

lilac dagger
#

i love BlockStates

#

best api ever

#

i wish there was a better way to get specific block states/blockdata without casting

#

but that's life with java

worldly ingot
#

"Block states" as referred to in vanilla didn't exist when Bukkit's BlockState was invented back in like 2011

lilac dagger
#

we wouldn't even know how they were named internally since everyting was obfuscated anyway

pure dagger
#

i can show you with bigger distance, its the same shape

#

cant figure it out

proud badge
pure dagger
#

not randomly

#

its a shape

#

i think that

#

you know its a loop in a loop

#

so when it reaches the middle block it stops?

#

now i think about it and thats probably it

#

but why

smoky anchor
#

Let's go caveman
Print out the x and y values

proud badge
#

have u tried crop.setage(crop.maxage)

pure dagger
#

x and z

smoky anchor
#

yes that

pure dagger
#

particles

smoky anchor
#

you can spawn them yourself

proud badge
#

yes

pure dagger
#

no, i wanna fix this solution

proud badge
#

ok

pure dagger
#

know why doesnt work

proud badge
#

Try it

pure dagger
#

i already did it

#

and printed their age

pure dagger
#

ok thats solution but i still wanna fix this one

proud badge
#

of the blocks not grown fully

pure dagger
#

i mean i printed relative cords

#

i can change it wait

proud badge
smoky anchor
#

this is wrong
I think ?

pure dagger
#

the thing is that if i apply bonemeal 2 times it works, if more, it doesnt, if there is more than 2 it only applies bonemeal till it reached middle block

pure dagger
smoky anchor
#

should be nearby not block

pure dagger
#

jesus..

#

thats why it stoppes after middle block

#

because middle block is fully grown then

#

and it chekcs the middle block alwayss 💀

#

imma try it

#

i mean change it

#

idk why i didnt realize

#

😭 thank you so much

pure dagger
#

100 is too much probably but..

#

yeah works

smoky anchor
#

or you could not waste precious processing power on useless loop and just "grow" the crops directly

pure dagger
#

umm

#

grow?

#

but i dont actually loop 100 times, its for safety, it probably will loop 2-3 times and end

smoky anchor
#

set the age to max age
and spawn particles manually

#

is what I mean

smoky anchor
pure dagger
#

why is it objectively bad?

proud badge
#

And bad code

nova notch
#

Idk the exact bone meal chance but what if you just get really unlucky

pure dagger
#

and.... its actually

#

probably bonemeal always grows plants

#

its just random how much

#

so in 100 times it will grow full

#

ill check

nova notch
#

either way, what the other guy said

#

wasted resources

young knoll
#

Wut

smoky anchor
#

You can get really unlucky with Beetroots haha

pure dagger
#

lol

nova notch
#

and trees I think?

smoky anchor
#

But your reluctance to change this simple thing scares me
Do not become a professional developer

pure dagger
young knoll
#

Yeah idk why some are random and others aren’t

pure dagger
#

i can change it, i was just asking

nova notch
#

obviously there's some cases where it's unavoidable but still

pure dagger
#

anyway

#

thanks for help steve

#

that was dumb

smoky anchor
#

👍

pliant topaz
#

i can kind of understand him tho, but the thing that matters is: you learned something new and can improve next time

#

only with inefficient code and errors (aka you learn something new after it) you can become a good developer, its a learning process we all have to go through :)

simple sentinel
#

Hii, how do I update a plugin by myself?

#

Is that the right chat?

pure dagger
chrome beacon
chrome beacon
sly topaz
young knoll
#

Simply always write perfect code like me

sly topaz
#

you can either be the bigger person, take a deep breath and try to figure out what they actually are trying to convey outside of the attitude given, or just ignore the comment and hope someone else answers in a more appropriate manner

simple sentinel
chrome beacon
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

sly topaz
#

oops, that's already linked there

#

whoever has access to the bot should change the link to the learn java course tho

young knoll
#

If only it were that easy

#

There’s not enough characters left :(

simple sentinel
worthy yarrow
#

Update can mean a lot of things

rough ibex
#

'update' isn't a switch you just flip

#

or a big 'UPGRADE today!' button

sly topaz
#

as said above, it isn't a straightforward process, the bigger the plugin the worse it'll be so bear that in mind

#

it is also annoying if they depend on overly specific behavior or if it mainly depended on server internals, but not the end of the world

simple sentinel
#

like 1.21.3

paper viper
#

Updating plugins can be very tedious

#

What plugin is it, is it open source?

worthy yarrow
# simple sentinel updating to a new version!

Take this into account then, when you’re using an api of some sort (obviously in this circumstance it’s spigot) and you need to update to a newer version of said api, that means perhaps a lot of the internal methods and workings and what not may have changed. Without learning java and attempting to implement versioning support you’re going to have a very hard time. It’d be very hard for you to understand the code as is not to mention what you’d have to do to backport a plugin for example

young knoll
#

I mean, spigot api is generally backwards compatible

#

NMS not so much

worthy yarrow
#

Generally yes, but that’s the issue is in those niche cases

remote swallow
worthy yarrow
#

And certainly not easy considering you’re raw dogging nms versioning support

young knoll
remote swallow
#

i dont think spigot is backwards compat

fading drift
#

its pretty compatible

#

im on 1.8 and all the methods are pretty much the same except for new stuff

#

backwards or fowards theyve done a good job

remote swallow
#

1.8 stuff works on 1.21 not 1.21 stuff works on 1.8

young knoll
#

Yes

#

That’s backwards compatibility

remote swallow
#

im pretty sure thats forward

#

21 bigger than 8

#

to go to 21 you go forward

young knoll
#

The Wii was backwards compatible with GameCube games

fading drift
#

"If something is backwards compatible, it will function with earlier versions of the product. Something will function with a later version of the product if it is forward compatible."

young knoll
#

“Forward compatibility or upward compatibility is a design characteristic that allows a system to accept input intended for a later version of itself.”

#

Spigot will not accept input for later versions of itself

#

If you try to use 1.20 api on 1.12, it will fail

remote swallow
#

i blame whoever came up with naming

young knoll
#

The new model item component makes me a bit sad

#

CustomModelData fails somewhat gracefully, if you have an item with custom model data but not the resource pack, it’ll just show the default item

#

If you have an item with the custom model component but not the resource pack, you get missing texture

#

But you don’t have to worry about custom model data conflicts, so it’s a pretty good trade off

kindred sentinel
young knoll
#

A fallback option would be nice

valid burrow
#

@remote swallow is it your birthday already :O

valid burrow
remote swallow
#

tyty

valid burrow
valid burrow
#

Ill go sleep now, hope you have a nice birthday :)

remote swallow
#

theres still another 23 hours and 25 minutes left of it

#

i have ages

valid burrow
rough ibex
#

DAM!

remote swallow
#

born on the same day someone tried to explode parliment like 400 years ago or smth

worthy yarrow
#

I'll blow you up

remote swallow
worthy yarrow
#

It’s gonna have to wait I broke my pinky toe

remote swallow
worthy yarrow
#

I'm not even kidding either it hurts 😦

#

And it's all purple and gross

remote swallow
#

Cut it off

worthy yarrow
#

No!!

buoyant viper
worthy yarrow
#

It might be idk how purple purple actually is

obtuse hedge
cosmic elk
#

does anyone know how i can set the durablity of an itemstack?

#

as far as i know theres no info online about this, and i look at the docs and its either not true or doesnt work

rough ibex
#

did you really google it

#

ItemMeta

cosmic elk
rough ibex
#

so what's the issue

#

what did you try

cosmic elk
#

item.setDurability((short) 1);

#

didnt seem to do anything as far as i know

rough ibex
#

okay and if you read the first search results

#

what do they say

cosmic elk
#

im reading through them right now, i didnt get these results on google

rough ibex
#

I somehow doubt that.

#

the first result should tell you what changed

#

and the docs tell you what's deprecated.

cosmic elk
buoyant viper
rough ibex
#

not itemstack

#

it moved

buoyant viper
rough ibex
buoyant viper
#

(i actually just use Startpage and sometimes Qwant)

cosmic elk
#

unless i did something wrong?

rough ibex
#

what version spigot API

buoyant viper
#

^

cosmic elk
#

how would i check that?

#

everything up until now has been up to date

rough ibex
#

maven or gradle?

cosmic elk
#

maven

rough ibex
#

look at pom.xml

#

under dependencies

cosmic elk
#

version says '1.21-R0.1-SNAPSHOT'

rough ibex
#

okay cool

#

why is setDamage red

buoyant viper
#

dumb question, does it still compile?

#

ignoring the obvious red hinting from ur IDE

#

because it could be invalid caches on the IDEs part, despite the method existing

cosmic elk
#

unfortunately didnt compile :/

#

it tried to catch the error

rough ibex
#

okay well what was that error

#

it's red for a reason

chrome beacon
#

Did you import the wrong Damageable

buoyant viper
#

TRUE

chrome beacon
#

There's two of them

buoyant viper
#

wish bukkit/spigot would differentiate besides the package sometimes

cosmic elk
#

i had no idea there was two of them

sly topaz
#

so why would they differentiate

buoyant viper
#

dont care didnt ask

#
  • im frolicking
#
  • im yearning
cosmic elk
#

thank you all btw (I was starting to bang my head against my monitor)

buoyant viper
tender shard
#

e.g. this lol

grim hound
#

Or do I need to register some driver for this to not happen?

orchid brook
#
if (currentTime - farmingBlock.getDestroyTime() >= 4000) {

    PacketContainer restorePacket = new PacketContainer(PacketType.Play.Server.BLOCK_CHANGE);
    Block block = farmingBlock.getBlock();
    int maxAge = ((Ageable) block.getBlockData()).getMaximumAge();

    WrappedBlockData restoreBlockType = WrappedBlockData.createData(block.getType(), (byte) maxAge);
    BlockPosition position = new BlockPosition(location.toVector());

    ...
    ...
}

Can someone help me ? When i have the maxAge variable in the createData methods, i got this log and a little lag:
[org.bukkit.craftbukkit.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!

rough ibex
#

what's your api-version

orchid brook
#

Oh yep api version i know

#

its was 1.20

#

sry

#

will try with 1.13

#

I have change api version to 1.13 in spigot.yml but i got the same warn

rough ibex
#

what

#

1.20 was correct

#

and you're sure this only happens when you have maxAge

orchid brook
#

let me check

#

ok so with
WrappedBlockData restoreBlockType = WrappedBlockData.createData(block.getType());
There is 0 warn and the crops respawn with the minimum age so

#

If i come back to

I got the warn, and the crops respawn with the maximum age (after the lag caused by the initializing legacy material....)

rough ibex
#

plib may be calling a legacy material then, upstream

#

yep


        private static WrappedBlockData createNewData(Material material, int data) {
            return new NewBlockData(FROM_LEGACY_DATA.invoke(null, material, (byte) data));
        }
#

find a different way

orchid brook
#

no way to fix this so ? until i use another lib ?

rough ibex
#

just a different method

#

the problem is youre setting legacy data

orchid brook
#

Ok nice i have found another way to do it

#

i don't know why im was doing that with protocolib actualy lol Player::;sendBlockChange(location, block) work great lol

rough ibex
#

👍

wet breach
floral drum
grim hound
#

But the error is thrown on getConnection

smoky anchor
#

I may not know SQL, but uuid = '%player's uuid%' does not look good.

#

as in you got 3x '

wet breach
# grim hound *It's a placeholder*

You should avoid using ' in place holders when it comes to queries also you should use the query builder methods if you do have them to avoid unintended side affects

#

That being said i think you should fix the query to see if that may have been causing your issue otherwise your issue is the server is returning a lot of records that exceeds the server config limit for a packet which only ways to fix is either limit what is returned or increase the limit in the config

quaint mantle
wet breach
quaint mantle
#

I think bro already uses prepared statements

wet breach
#

Ok but it will cause issues if its not replaced

#

You cant assume it will always replace

#

Mysql is picky about its quotes lol

#

But since they are having issues i think it is best to use process of elimination and make things proper

#

This way we know what is definitely not the problem and wont be a future problem

quaint mantle
#

Or use mongodb (bad ending)

wet breach
#

Lol. There is query builder methods to use place holders. Not that hard to change it. Currently two issues with it. If place holder value does not get replaced query is cut short because of the 'and sometimes mysql runs with it. Then we have the issue if place holder is replaced but its empty instead

#

Proper query builder avoids those things

grim hound
#

At DriverManager.getConnection

grim hound
#

It was added for show

wet breach
#
try {
            // The newInstance() call is a work around for some
            // broken Java implementations

            Class.forName("com.mysql.cj.jdbc.Driver").newInstance();
        } catch (Exception ex) {
            // handle the error
        }
#

This should register that you want to use mysql driver in case some other driver is trying to be used instead

grim hound
#

Ah thanks

#

Btw is there a lib that simplifies access to many different dbs?

wet breach
#

There probably is

#

But i wouldnt know of any off hand. I normally just make my own so that i can easily transform data from one to the other as well.

#

Like if a user wanted to export to another storage format for example

grim hound
wet breach
#

Wouldnt surprise me if one exists but sometimes you need to make your own since only you would know what data is actually necessary and what isnt

#

Or if you make use of primary and foreign keys you would know how that data is related

grim hound
#

The limit

quaint mantle
#

Db will give 10 rows instead of giving them all

#

I think the problem that users might have long records

quaint mantle
#

why u guys don't support hybrid (modds and plugins) servers?

young knoll
#

Because it’s software not made by us

#

And it’s a janky hack

quaint mantle
#

so someone told me that if you are going to open a modded server, i should do it with mods instead of plugins.

#

if i make a mod on the client side, can i force players to enter the server with that mod?

blazing ocean
#

you cannot force anyone to download a mod

quaint mantle
#

no i mean force join

#

players will download mod manual

blazing ocean
#

not really

#

it's still the client, they can control what they tell the server

quaint mantle
#

i just want the logins to be with my own client.

blazing ocean
#

You're always gonna be able to spoof that tho

quaint mantle
#

well, is there any way to do this? as i said i want them to log in with my own client so i can reduce the cheating a little bit

smoky anchor
#

I think a solution would be to have an actual account thing
Have your server (not the MC) send some kind of token to the client, the client then sends that token to the MC server and then the MC server can verify that you logged in with that mod ?
But this does not really belong here, go to Forge or Fabric discord server.

#

But sorry to tell you, if you have to ask this, whatever anti-cheat method you create will probably not be sufficient.

quaint mantle
#

well, what do you think is the best solution against cheats?

young knoll
#

You can always spoof communication from the client to the server

smoky anchor
#

But you can not spoof a token a remote server gives you
What I proposed is basically what MC used to do before MS accounts
You send the wrong token to MC server ? whoops, no entry for you.

quaint mantle
#

well ty guys

wet breach
#

make it so that the server doesn't rely on the client input, rather the client informs in what it wants to do but the server has ultimate say

#

however do note the more the server needs to do the more resources it will need

brittle dagger
#

I NEED

#

help

#

can anyone help me?

worthy yarrow
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

brittle dagger
#

i want to change material

#

in auction house

#

i cant images

smoky anchor
#

?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

brittle dagger
#

plugin name zacution house

smoky anchor
#

Are you developing a plugin ?

brittle dagger
#

na

smoky anchor
short drift
#

Amount of falling blocks in world Kuumaa: 39057

#

What can I do?

#

Why don't they disappear?

chrome beacon
#

if so they might not be ticking enough to land

short drift
#

Well. I added timer to remove the falling blocks.

#

And it does seem to work.

#

Although maybe a bit too fast.

#

And I don't understand what causes those physics, the blocks move back to where they started and then they fly off again.

#

Back and forth.

#

Is it about the entity activation range or something?

chrome beacon
#

probably

short drift
#

I tried setting it to the 0, but it resulted in horribly buggy and dangerous behavior.

#

Would increasing it make it better... ?

chrome beacon
#

Yeah or -1

#

(not sure if -1 actually works)

short drift
#

I'll give 8 a go.

chrome beacon
#

That's quite low

short drift
#

The default was 4.

chrome beacon
#

The default is 32 for mobs and entities

short drift
#

For misc.

chrome beacon
#

16 is default

#

for misc

short drift
#

Really? Hm. Okay.

chrome beacon
#

You've probably followed an "optimization" guide that told you to lower it for performance

short drift
#

Perhaps I did. I don't remember anymore.

glossy laurel
#

I got a source code for gradle

#

how do I compile it

#

(I use maven)

chrome beacon
#

gradlew build

glossy laurel
#

the exe file?

#

nvm

#

nvm

#

nvm

glossy laurel
chrome beacon
#

That's the command

glossy laurel
#

where

chrome beacon
#

in the project folder

glossy laurel
chrome beacon
#

yes those are the files that it will be using

glossy laurel
chrome beacon
#

yes

glossy laurel
#

is there no way to build it through intellij

chrome beacon
#

same as with maven

#

but gradle

glossy laurel
#

🤔

#

makes sense

#

lol

chrome beacon
#

Open the gradle tab on the right and find the build task

glossy laurel
#

wowzers, I did it

#

now where tf is the output

chrome beacon
#

in the build folder

#

build/libs/

glossy laurel
#

why does this source have imported stuff from packages that dont exist??!!

chrome beacon
#

You're probably missing a dependency or smth

glossy laurel
#

but its the same root

eternal oxide
#

why are you blanking part of teh package path?

#

also, why the heck is fastboard being relocated under .minecraft?

glossy laurel
#

no leaking 🫢

glossy laurel
eternal oxide
#

the import should be the normal import for fastboard. it will be remapped when shaded

glossy laurel
#

now in english

eternal oxide
#

fastboard is a dependency

glossy laurel
#

right

eternal oxide
#

it has a package path

#

the path you are using is one after relocation

glossy laurel
#

right

eternal oxide
#

you shoudl be using teh default fastboard package path in your code

#

when you build it will be remapped to yoru relocated path

glossy laurel
#

idfk which package its from

eternal oxide
#

fastboard

glossy laurel
#

right so uhm

#

idfk what im doing

eternal oxide
glossy laurel
#

right

#

so what do I do

#

rewrite the imports??

eternal oxide
#

yes

glossy laurel
#

hm

#

why tf does the source have it like this

eternal oxide
#

it looks like you are using decompiled code if yoru imports are remapped

glossy laurel
#

thats what Ive been thinking too

young knoll
#

why did they use .minecraft for their relocated packages

#

Instead of .libs or something sane

glossy laurel
#

its the default package

#

if ykwim

#

supposedly this isnt decompiled

#

so then tf is this

blazing ocean
lilac dagger
#

i just don't use packages

blazing ocean
#

😭

#

why even obfuscate

shadow night
#

Safe space

#

Ig

lilac dagger
#

it's my code, i can obfuscate it if i want

shadow night
#

Pretty sure bigger applications can save megabytes of space by obfuscating

lilac dagger
#

oh yeah definitely

#

this is the difference

#

and 500 kb on arcade

analog mantle
#

How can I serialize an ItemStack into a byte array?

pure dagger
#

why inventory click event is such a mess? why clicking in creative inventory is different, and is hotbar different inventory than the rest?

chrome beacon
#

Not sure what you mean by "hotbar is different than the rest"

#

as for the creative inventory that's just how it was programmed. The client has full control over items in their inventory when in creative mode

pure dagger
#

different inventory

#

i mean that

#

the hotbar is considered as different inventory than the other 27 slots

#

i mean when you shify click on item the item gets from hotbar to the other slots, its MOVE_TO_OTHER_INVENTORY

#

i think its a mess

chrome beacon
#

The shift clicking action is just called that

burnt dust
#

'bot_eq':
material: armor_boots
data: 1
priority: 1
slot: 37
display_name: "&aThis is a special stone"
lore:
view_requirement:
requirements:
bot_kontrol:
type: has item
slot: "36"
material: armor_boots
amount: 1
update_interval: 5
'bot_noeq':
material: BARRIER
data: 1
priority: 2
slot: 37
display_name: "&aThis is a special stone"
lore:
view_requirement:
requirements:
bot_kontrol_yok:
type: has item
slot: "36"
material: AIR
amount: 1
update_interval: 5
Why doesn't this code work? can you help

chrome beacon
#

That's a yml file

#

Not code

#

Move to #help-server and use a paste site instead of flooding the chat

#

?paste

undone axleBOT
burnt dust
#

ty

quaint mantle
#

Does 1.8 have PDC?

pure dagger
#

||i dont think so||

quaint mantle
#

Just making sure

#

Thank you

chrome beacon
#

It doesn't

blazing ocean
pure dagger
#

what do you do when you want to make item unique in <1.14 ?

worthy yarrow
#

Nbt

pure dagger
#

umm

#

okay i dont even know the difference

chrome beacon
#

You use nms to set the nbt

chrome beacon
#

and NBT is the data that's saved

pure dagger
#

oh okay

#

whats actually nms? i still dont know

#

okay ill better read that

tall dragon
#

short for net.minecraft.server

pure dagger
#

later

chrome beacon
#

some may even call the CraftBukkit stuff as nms

#

so it can be used as a broader term than it's origin

pure dagger
#

ummm its mojangs code? like the same but variables were called weird

chrome beacon
#

It's obfuscated yes

pure dagger
#

because its decoded or something i dont know

chrome beacon
#

but you can add mappings on top of it to reverse the method, field and class names

pure dagger
#

and you do stuff like b.a()

shadow night
worthy yarrow
#

We use spigot mappings

tall dragon
shadow night
chrome beacon
#

Just not Mojang ones

shadow night
tall dragon
#

well yea. i mean by mojang

chrome beacon
#

People have also been backporting yarn

chrome beacon
#

undo

#

turn a() to something more useful like doStuff()

shadow night
pure dagger
#

okayy

shadow night
#

I'm makign sploon with @blazing ocean but that'll take a while

pure dagger
#

do you know this?

chrome beacon
#

what about it

tall dragon
#

a very nice read ^

pure dagger
#

why dont register the inventory in "handleOpen" method, because you unregister it in "handleClose" method, so why not register in open method?

tall dragon
#

what if you want to open the menu twice?

pure dagger
#

but if it gets closed it gets unregistered

#

right?

#

or not right

chrome beacon
pure dagger
#

i thought it only exists only when player has it opened

chrome beacon
#

or well not directly but should be*

#

See this

pure dagger
#

yeah

#

im at this moment of reading

#

but why not in the method

tall dragon
#

well

#

if u continure to do the tutorial

#

pretty sure he changes this later

chrome beacon
#

^^ He does

tall dragon
#

prolly just for simplicity and explaination first

pure dagger
#

umm

#

okay so im right?

tall dragon
#

well yea

#

pretty much

pure dagger
#

thanks

#

so its also true that inventory only exists in the map while player has it opened

tall dragon
#

yes

#

that is true

pure dagger
#

okii

split tinsel
smoky anchor
#

?notworking

undone axleBOT
#

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

split tinsel
smoky anchor
#

and what is the "effect"

split tinsel
#

for example if i set dayLength to 48000, the daylight cycle should take twice as long to complete

#

but it doesnt

#
[18:28:32] [Server thread/INFO]: MrNameless666 issued server command: /rpgcalendar set 48000
[18:28:32] [Server thread/INFO]: Cancelled existing task for world world with task ID 23.
[18:28:32] [Server thread/INFO]: Scheduling task for world world with interval 2 and increment 1
[18:28:32] [Server thread/INFO]: World time now: 22882
[18:28:32] [Server thread/INFO]: World time now: 22886
[18:28:32] [Server thread/INFO]: World time now: 22889
[18:28:32] [Server thread/INFO]: World time now: 22892
[18:28:32] [Server thread/INFO]: World time now: 22895
[18:28:33] [Server thread/INFO]: World time now: 22898
[18:28:33] [Server thread/INFO]: World time now: 22901
[18:28:33] [Server thread/INFO]: World time now: 22904
[18:28:33] [Server thread/INFO]: World time now: 22907
eternal oxide
#

If I rmember there is a seperate setting for day/night cycle

#

it defines the transition period

split tinsel
#

Do Daylight Cycle is turned off, so nothing else should be affecting it

young knoll
#

What values are you getting for gcd

split tinsel
# young knoll What values are you getting for gcd
public long gcd(long n1, long n2) {
        if (n2 == 0) {
            return n1;
        }
        return gcd(n2, n1 % n2);
    }

gcd of 24000 and 48000 is 24000, so the time increment is 24000 / 24000 = 1
and the interval is 48000 / 24000 = 2, then thats put into a syncrepeating task, so every 2 ticks, increase the time in the world by 1 tick

young knoll
#

Are you sure those are the values you are getting

split tinsel
#

Yes, as in the code:

// Calculate the GCD of the day length and the default Minecraft day length (24000)
            long gcdValue = gcd(dayLength, 24000L);

            // Calculate interval and increment
            long interval = dayLength / gcdValue; // When to update the time
            long increment = 24000L / gcdValue;   // How much to increment the time

            getLogger().log(Level.INFO, "Scheduling task for world {0} with interval {1} and increment {2}",
                    new Object[]{world.getName(), interval, increment});
smoky anchor
#

I feel like you're overcomplicating this
Make a task that ticks every second
each tick it adds 1 to some counter
you divide that counter by the amount of ticks a day should have
multiply that by 24000 and set that to the current world time
I think that should be the math
That would also take care of days which have length of something other than multiples of 24000

split tinsel
#

So would it work with all values of day length, such as like 240, 28800, or 1728000

brittle dagger
#

What is placeholder api of kill aur votes

#

Can anyone tell me?

chrome beacon
#

Don't cross post

young knoll
#

You could also use a fixed interval of 1 and allow decimal increments

#

Then just floor it when setting the time

brittle dagger
#

@young knoll hlo sir

chrome beacon
#

I just told you to not ping random people

brittle dagger
chrome beacon
#

Have some patience

smoky anchor
glossy laurel
proper cobalt
#

im trying to set a leash from a player to an armorstand but it doesnt work

eternal oxide
proper cobalt
#

the armor stand is invisible, would that be the reason

brittle dagger
smoky anchor
quaint mantle
#
private void createWorld(String worldName) {
        gameWorld = Bukkit.createWorld(new WorldCreator(worldName));

    }
    private void teleportPlayersToGameWorld() {
        gameWorld = Bukkit.createWorld(new WorldCreator("world_2"));
        for (Player player : Bukkit.getOnlinePlayers()) {
            player.teleport(gameWorld.getSpawnLocation());
        }
    }

    private void deleteWorld(String worldName) {
        World world = Bukkit.getWorld(worldName);
        if (world != null) {
            Bukkit.unloadWorld(world, true); // Выгружаем мир
            File worldFolder = new File(Bukkit.getWorldContainer(), worldName);

            if (worldFolder.exists()) {
                boolean deleted = deleteFolder(worldFolder); // Удаляем папку мира
                if (deleted) {
                    getLogger().info("World " + worldName + " deleted.");
                } else {
                    getLogger().warning("Failed to delete world " + worldName + ".");
                }
            } else {
                getLogger().warning("World folder " + worldName + " does not exist.");
            }
        } else {
            getLogger().warning("World " + worldName + " not found.");
        }
    }

    private void teleportPlayersBack() {
        for (Player player : Bukkit.getOnlinePlayers()) {
            player.teleport(Bukkit.getWorld("world_2").getSpawnLocation()); // Телепортируем обратно в основной мир
        }
    }

    private boolean deleteFolder(File folder) {
        if (folder.isDirectory()) {
            File[] files = folder.listFiles();
            if (files != null) {
                for (File file : files) {
                    deleteFolder(file); // Рекурсивно удаляем все файлы и папки
                }
            }
        }
        return folder.delete(); // Удаляем саму папку или файл
    }

Can anyone help? I need to delete and create a new world after the end of the event, but for some reason it does not happen

proper cobalt
chrome beacon
#

hm

proper cobalt
#

well using getEntity, i get the armorstand

#

lemme try if it works if the armor stand isnt ivisbke

#

invisible

smoky anchor
#

Try it the other way around ?

young knoll
#

I’m not sure the game likes leashing armor stands

proper cobalt
#

na didnt work g

#

na idk

#

didnt even work with the

#

non invisible armorstand

#

maybe cuz there is no "leash holder"

smoky anchor
#

the invisibility has no effect

proper cobalt
#

needs to be created somehow?

young knoll
#

Try it with a different mob

#

Like idk a cow

proper cobalt
#

sn

#

one sec

#

na it doesnt work

#

but i think i might know why'

#

im putting an item in the players inv right after

#

would that cancel the leash

#

i want the player to hold the item and still have the lead

smoky anchor
#

?tas

undone axleBOT
smoky anchor
#

without the item
who knows

#

it may also just be broken

glossy laurel
#

guys, any tips on reading and modifying other plugins' source code?

smoky anchor
#

At runtime ?

glossy laurel
#

??

chrome beacon
#

I'll take that as a no

glossy laurel
#

yeah

proper cobalt
glossy laurel
#

and not

#

illegal stuff

proper cobalt
#

what u tryna modify

chrome beacon
glossy laurel
#

a plugin left over by another dev

proper cobalt
chrome beacon
glossy laurel
proud badge
#

decompiling aint illegal

glossy laurel
#

but theres a bunch of code

chrome beacon
#

Now take a look around and see what things do

glossy laurel
#

and I have like no clue what any of it does

#

its confusing af

glossy laurel
proper cobalt
#

u couldve worded ur original statement more clearly

smoky anchor
proper cobalt
#

1.19.4

proud badge
glossy laurel
proud badge
#

rip

#

Gotta figure it out on your own then

proper cobalt
#

whys bro angered 💀

#

1.19.4 is pretty new

glossy laurel
glossy laurel
#

so like any tips for figuring it out

smoky anchor
glossy laurel
#

or just "f around and find out"

proper cobalt
proud badge
proper cobalt
#

ah man id update but im not in control of that

#

in my situation

proud badge
#

rip

glossy laurel
proper cobalt
#

yh the server started development 2 yrs ago

#

were prob gonna be done by the start of next year

#

then we can slowly start updating

proper cobalt
#

after release

chrome beacon
smoky anchor
#

ah yes

quaint mantle
proper cobalt
#

noice

chrome beacon
quaint mantle
#

As planned, I teleport to another world and then back again.
But the world remains the same.

smoky anchor
proper cobalt
#

just a regular getter for the field

smoky anchor
#

Where you get the armorstand

#

please show it

#

the field probably then

proper cobalt
#

private @Nullable ArmorStand entity = null;

thats the field

#

annotated with @getter

scarlet gate
#

Are Sugarcane/Cactus's data types both classed as Ageable?

smoky anchor
#

And you just return the entity, nothing el-
ok lombok

proper cobalt
#

ye

smoky anchor
#

why is this a thing
oh the pain

proper cobalt
#

my bad bro

smoky anchor
#

huh

proper cobalt
#

na cuz im on 1.19.4

#

pain for no reason

#

my fault

smoky anchor
#

ah that's fine lol
no worry

#

do it a tick later

#

but armorstand does not work

proper cobalt
#

armorstand doesnt work?

#

thats the only one i need icl

#

actually i could use cow

#

and just turn off its ai

smoky anchor
#

ye, and leash it a tick later (for some reason)

proper cobalt
#

sn ill try it now thx

#

yeah it worked thats could sound @smoky anchor

#

now setting leash holder to null doesnt work ill delay that by a tick too ig

#

am i in an async thread? tf

smoky anchor
#

what

proper cobalt
#

bukkit api is just not doing anything bro

#

unless i call it in sync

#

nah bro

smoky anchor
#

well yes

proper cobalt
#

nah nah i just can unleash it

#

oh

#

im calling it on the player

#

prob have to call it on the cow

#

yea sick it works

smoky anchor
#

Ye, I checked and you can not leash ArmorStand even with NMS

proper cobalt
#

but its a living entity

#

its grand the cow does the job\

smoky anchor
#

But it's not "EntityInsient" or whatever I read

#

in NMS code

proper cobalt
#

ah

spark lake
#

Hello

#

Does anyone know if there is a newer version of the "NextMarket" plugin?

chrome beacon
#

also newer than what

proper cobalt
quartz merlin
#

This is sort of complex because I dont expect a lot of people here to fully understand the way fabricmc does packet codecs (yknow cause its spigotmc), but I am attempting to send a plugin message (custom payload packet) clientbound from a plugin. I have made a mod that interacts with the logical server and client by sharing packets (so the client can 'learn' info about a target block, being a chiseled bookshelf) and the server sends a packet detailing what itemstack the player is looking at.

I am trying to personally add functionality to my own server, where I have set up a plugin message listener to get the custom packets, and I can decipher the information, but when I attempt to send the packet with a serialized itemstack, it crashes. with the bytes supposedly being larger than expected (smth like 70 extra...) using the ItemStack#serializeAsBytes method

orchid trout
#

uzsiciaupk nevykeli

wide coyote
proper cobalt
#

na its calm i worked it out

#

if (player.getOpenInventory().getTopInventory().getHolder() instanceof CusotmGUI)

wide coyote
#

alr

rough ibex
#

CusotmGUI

young knoll
#

wtf IF uses inventory holder

#

Cancelled

chrome beacon
#

💀

kindred sentinel
#

Is it possible to add Inventory as PDC?

young knoll
#

Technically

chrome beacon
#

Just store the title and items

kindred sentinel
# young knoll Technically

It's better to add to pdc size, items, and title or convert inventory to bytes or something like that?

chrome beacon
#

keep it as is don't convert it to bytes

kindred sentinel
remote swallow
#

most™️ inventories should be per player

chrome beacon
quartz merlin
#

so anyone know how to fix extra bytes being read in a custom payload :)

kindred sentinel
#

or how?

chrome beacon
#

Not sure why you need a map with inventories to players

#

Inventories already store their viewers

remote swallow
#

im feeling xy here

chrome beacon
#

Yeah

#

?xy

undone axleBOT
remote swallow
#

what is the inventory showing and should all players only see 1 inventory and all modify that 1 inventory

kindred sentinel
remote swallow
#

does a player directly modify the inventory with moving items

kindred sentinel
#

yeah

remote swallow
#

so that would be a per player inventory

chrome beacon
#

A map <Location, Inventory> would make more sense

remote swallow
#

if ur saving it to pdc, is the inv a chest

chrome beacon
#

Location can be switched out for a record with block positions (ints)

kindred sentinel
remote swallow
#

so do what olivo said

#

location to inventory

kindred sentinel
#

That makes sense

sly topaz
#

hough I don't know what the proper way is supposed to be

remote swallow
#

you arent meant to use holder

sly topaz
#

you are meant to in Paper

remote swallow
#

in spigot atleast

sly topaz
#

nowadays you could probably use PDC, but eh

#

it used to be inventory views at some point but that changed and now there aren't really any interfaces that you can use to identify inventories, you just gotta track them out of band

remote swallow
#

have you not read the gui guide

#

?gui

sly topaz
#

that guide is tracking them out-of-band so it doesn't change what I said

#

I don't love that guide tbh, it is essentially "create your own inventory framework" which is eh

#

I guess it is better that people do it that way so they don't stumble upon themselves in the future

worthy pumice
#

is there any good way to use ^ ^ ^ instead of ~ ~ ~ while spawning particles? i had to do this:

Location playerLocation = player.getEyeLocation();
Vector playerRotation = playerLocation.getDirection();
if (!mcfpsPlayer.isZoom()) {
    Location caseParticleLocation = playerLocation.clone().add(playerRotation.clone().multiply(0.5));
    caseParticleLocation.setDirection(playerRotation);

    double forward = 0.0;
    double up = -0.1;
    double left = 0.4;

    Vector direction = playerRotation.clone();
    Vector upVector = new Vector(0, 1, 0);
    Vector leftVector = direction.clone().crossProduct(upVector).normalize();

    Vector relativePosition = direction.multiply(forward).add(upVector.multiply(up)).add(leftVector.multiply(left));
    caseParticleLocation.add(relativePosition);

    player.getWorld().spawnParticle(Particle.LAVA, caseParticleLocation, 1, 0, 0, 0, 0.1);
}
sly topaz
#

what was the difference between those again, directorionality?

worthy pumice
#

yeah

quartz merlin
#

ig ill just ask for basic help sending plugin messages... anyone?
i am sending the result of ItemStack#deserializeAsBytes however my client mod, expecting an item stack in its codec, cannot decode correctly

lilac dagger
#

Block is actually pretty good

#

It implements equals and hash

sly topaz
#

that's a crazy statement

#

blocks are tied to the world, so if the world unloads then the key dissapears

#

though I guess Location also is in a way

lilac dagger
#

If that's the case you can listen to chunk unload world unload and remove those accordingly from your map

tall dragon
#

doesnt location also implement equals & hashcode??

#

pretty sure it does

lilac dagger
#

But it's based on floats I think

tall dragon
#

no?

lilac dagger
#

Then I guess locations are safe too

tall dragon
#

only yaw and pitch are based on floats. because those are in fact. floats

lilac dagger
#

If the hash was on doubles then any change would just mess it up

solar adder
lilac dagger
#

Another point is that location is mutable while block is not

short drift
#

What's the best way to make a polar bear angry towards a player?

tall dragon
short drift
#
// Damege the mob and set damage source to the player.
entity.damage(0, nearestPlayer);

This didn't seem to work.

lilac dagger
past vector
#

In the spigot terms there is written that guns plugins will be rejected but yet there are many of them on spigot. Can i publish mine or not?

lilac dagger
#

but any change in any of the coord will give another hash no?

solar adder
#

same error

remote swallow
#

run buildtools in a new folder

past vector
#

use jdk 17

#

the newer ones don't work, dunno why

remote swallow
#

1.21.1 requires java 21. you most likely have an old build in that folder, use a new folder

blazing ocean
#

1.21.1 requires JDK 21 as ebic said

past vector
#

hmm, idk, i had issues with the newer jdks on 1.21 but dunno about 1.21.1 tbh

solar adder
#

I fixed it by using Zulu version of JDK 21

#

My version I had installed from dnf didn't work

blazing ocean
#

It was probably a JRE instead

solar adder
#

It's always I do all the re-search, trying hard for hours, and exactly the time I decide to ask for help I find solution.

#

it always happens

sly topaz
# worthy pumice is there any good way to use ^ ^ ^ instead of ~ ~ ~ while spawning particles? i ...

not really but you could make a method for it:

public static Location directionalOffset(Location location, double longitudinal, double lateral, double vertical) {
        var direction = location.getDirection(); // maybe clone this?
        var longitudOffset = direction.multiply(longitudinal);
        // cross onto the Y-axis to get the perpendicular vector
        var lateralOffset = direction.crossProduct(new Vector(0, 1, 0)).normalize().multiply(lateral);
        var verticalOffset = new Vector(0, vertical, 0);
        var totalOffset = longitudOffset.add(lateralOffset).add(verticalOffset);
        return location.clone().add(totalOffset);
}
deep herald
sly topaz
#

the server does that automatically

#

I believe you can configure the amount of time it takes in the spigot/bukkit config

deep herald
sly topaz
#

if you are experiencing frequent crashes then that's the bigger problem to tackle

sly topaz
#

crashes shouldn't happen

#

if they do, you got to find ways to prevent them

deep herald
#

bro can u just tell me if it does it every 15 mins?

chrome beacon
#

yes

deep herald
#

ok thats all i asked

#

thx

past vector
chrome beacon
#

although that's kind of pointless

#

Minecraft auto saves every 5 minutes already

sly topaz
#

it can be configured in the bukkit.yml, there's an autosave key

short drift
#

Do neutral mobs target the player in

@EventHandler public void onMobTargetingPlayer(EntityTargetLivingEntityEvent event) {}

this event?

#

If the player gets close etc.

#

Or is it only for attacking or following?

quartz merlin
#

uhm

sly topaz
#

there's no need to get rid of your whole server just to test plugins

sly topaz
#

however it is good to have a development environment that replicates production, if it can be helped

#

since you don't want to test faulty plugins on production

short drift
sly topaz
short drift
#

Is that enough?

chrome beacon
#

setting the target should work

sly topaz
#

don't know if it triggers the even upon targeting, but it's worth a try

#

ah right, you may want to set the angry at memory key if it is an entity with brains

#

don't know if setting the target handles that for you or not

short drift
#

But this is neutral mobs I'm talking about.

#

Not hostile.

sly topaz
#

only neutral mobs can be angry

#

otherwise they'd just be hostile

short drift
#

Yeah ... setting target for polar bear does nothing.

sly topaz
#

what about settting the memory key

short drift
#

I'm not familiar with that one.

#

Where can I find it?

sly topaz
#

polarBear.setMemory(MemoryKey.ANGRY_AT, player.getUniqueId())

short drift
#

Oh, that's pretty cool. What about Universal Anger? Would that work as well?

sly topaz
#

it may, I'm not sure how that works really

#

I would like to believe that is just a boolean that gets turned on and off depending on the AngerTime

short drift
#

There's time as well?

sly topaz
#

AngerTime is part of the NBT, unsure if the API exposes that

short drift
#

Hmm. So something like get the persistentDataContainer for the mob and create a nespacedkey for the anger time?

sly topaz
#

I mean, do you need the time-based property?

short drift
#

I don't know. If it were up to me I would like them to be outright hostile all the time.

sly topaz
#

then try setting universal anger to true

#

it's kinda annoying since for mobs with goals, you have to set the target but for mobs with brains, you'd have to set their memories

short drift
#

Well, one final attempt. Then I'm giving up.

lilac dagger
#

for anyone interested into making a mob do nothing use these

young knoll
#

Only for mobs that use brains :p

lilac dagger
#

of course

sly topaz
#

at least the brain system is way more understandable than pathfinder goals

#

wish they just revamped all entities to use brains already

blazing ocean
#

imagine having a brain

young knoll
#

Idk I don’t understand the brain system yet

merry cove
#

not 100% sure this is the right seciton. planing on releasing a premium plugin at spigot and want to know how you control prices etc. can you change price, what is the options relative to 'free' ?

blazing ocean
#

what

#

what the hell does "relative to free" mean

sly topaz
merry cove
#

Yes

sly topaz
#

if that's what you mean, I've never seen it done, don't know what the specific terms are on that though

blazing ocean
#

I highly doubt they will ever do that

sly topaz
#

there's a limit of like what, 50 bucks for a premium plugin though