#help-development

1 messages Β· Page 1618 of 1

lost matrix
#

Do you use maven?

crystal pike
#

yes

lost matrix
#

Configure your maven compiler plugin to use a newer java version

lost matrix
# crystal pike yes
  <properties>
    <java.version>16</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
crystal pike
#

Oh right, completely missing the maven compiler plugin

#

lol

lost matrix
crystal pike
lost matrix
#

Yes

#

It lets you create new clean projects like this

crystal pike
#

ahh

gleaming grove
#

yea but Minecraft dev plugin set Java version as 1.8 for my 1.17.1 project

#

or i missed something while creating project?

lost matrix
#

It also uses the wrong import for some stuff in 1.17. Probably just a bug.

crimson scarab
#

anybody know how to only get a single part of a collection

lost matrix
gleaming grove
#

List<Foo> newList = srcCollection.stream().collect(toList()); or iterate

crimson scarab
#

to contex is that i cant compare to itemstacks which are identically but are yet returning different so im testing full armour bonuses using the generic.armor attribute

lost matrix
crimson scarab
#
        Collection<AttributeModifier> attributeModifiers = player.getInventory().getHelmet().getItemMeta().getAttributeModifiers(Attribute.GENERIC_ARMOR);
        System.out.println(attributeModifiers);
lost matrix
crimson scarab
#
    public ItemStack NeptuneBoots() {
        ItemStack NB = new ItemStack(Material.LEATHER_BOOTS);
        LeatherArmorMeta meta = (LeatherArmorMeta) NB.getItemMeta();
        assert meta != null;
        meta.setColor(Color.fromRGB(0, 87, 123));
        meta.setUnbreakable(true);
        meta.setDisplayName(ChatColor.LIGHT_PURPLE + "Neptune's Boots");
        meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
        meta.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
        meta.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4, false);
        meta.addEnchant(Enchantment.THORNS, 3, false);
        meta.addEnchant(Enchantment.PROTECTION_FALL, 4, false);
        meta.addAttributeModifier(Attribute.GENERIC_ARMOR, new AttributeModifier("generic.armor", 6.25, AttributeModifier.Operation.ADD_NUMBER));
        ArrayList<String> lore = new ArrayList<>();
        lore.add("");
        lore.add(ChatColor.GOLD + "Full Set Bonus: Oceanborn");
        lore.add(ChatColor.GRAY + "While in water or during rain,");
        lore.add(ChatColor.GRAY + "increase attack damage along with");
        lore.add(ChatColor.GRAY + "movement speed by 50%.");
        lore.add("");
        lore.add(ChatColor.LIGHT_PURPLE + "" + ChatColor.BOLD + "MYTHIC BOOTS");
        meta.setLore(lore);
        NB.setItemMeta(meta);
        return NB;
    }
#

this is my item stack

lost matrix
#

If you want to create set bonuses then you should def use the PersistentDataContainer of the ItemStacks and nothing else.

torn shuttle
#

just to double check, it's not necessary to remove lazy metadata values right?

#

they don't stay loaded in memory?

lost matrix
#

lazy metadata values?

#

Example pls ^^

torn shuttle
#

new LazyMetadataValue(MetadataHandler.PLUGIN, LazyMetadataValue.CacheStrategy.NEVER_CACHE, eliteEntity::getLevel));

#

those

chrome beacon
#

That's a thing πŸ‘€

torn shuttle
#

yeah it's pretty old

#

I was considering just getting rid of them

lost matrix
#

Ah. No. They hold a SoftReference to their actual value.

torn shuttle
#

people don't even know they exist

lost matrix
#

But who uses (any) metadata in 2021 anyways?

torn shuttle
#

pretty much no one

#

persistent storage containers sort of killed it

#

I'll just yeet them out then, it doesn't seem worth maintaining at this stage

crimson scarab
lost matrix
#

PDC is superior in any way in this case.

#

You can also program agnostic and more object oriented. Ill give you an example.

lost matrix
# crimson scarab if you don't mind could you explain how would this be better

This way you can make everything a certain set item and change the attributes later as you which without having to change all your checks.

  private static final NamespacedKey NEPTUNE_KEY = NamespacedKey.minecraft("setbonus-neptune");

  public void applyNeptuneTag(final ItemStack itemStack) {
    final ItemMeta meta = itemStack.getItemMeta();
    final PersistentDataContainer container = meta.getPersistentDataContainer();
    container.set(NEPTUNE_KEY, PersistentDataType.INTEGER, 1);
    itemStack.setItemMeta(meta);
  }

  public boolean isNeptuneItem(final ItemStack itemStack) {
    if (itemStack == null) {
      return false;
    }
    final ItemMeta meta = itemStack.getItemMeta();
    if (meta == null) {
      return false;
    }
    final PersistentDataContainer container = meta.getPersistentDataContainer();
    return container.has(NEPTUNE_KEY, PersistentDataType.INTEGER);
  }

  public boolean hasNeptuneSet(final Player player) {
    for (final ItemStack armorItem : player.getInventory().getArmorContents()) {
      if (!this.isNeptuneItem(armorItem)) {
        return false;
      }
    }
    return true;
  }
unique halo
#

i have this particle

PacketPlayOutWorldParticles packetParticle = new PacketPlayOutWorldParticles(EnumParticle.FIREWORKS_SPARK, true, (float) l2.getX()+dx2, (float) l2.getY(), (float) l2.getZ()+dz2, 0,0,0 ,0, 0, 1 );

i dont know what value to change to make the particle play faster / last less time

#

i think its one of the last 6 values tho

lost matrix
#

Dont ever use packets for particles. It makes literally 0 sense as Spigot already sends Packets to specific players.

unique halo
#

how do i do it in 1.8 spigot

lost matrix
#

XD

#

Thats almost a decade old. Update.

unique halo
#

a ton of people enjoy 1.8 pvp mechanics, and use that version, so i'm using it for a server im making

lost matrix
#

Using ancient software. Go search in the spigot forum archives. You might find something from 7 years ago.

#

8% of the player base uses 1.8

unique halo
#

ok?

#

theres still a lot of people that like 1.8 pvp

lost matrix
#

Sure. But then just use it for pvp. I dont think developing software for such an old version is worth it.
Anyways. Try finding a method to spawn particles for a specific Player first.
Its either in the Player class or the World class.

unique halo
#

i already did tho, i wanna know how to change the speed of the firework particle, since when i spawn it, it stays there for a couple of seconds then dissapears

lost matrix
#

You cant keep a particle from disappearing.

unique halo
#

i want it to dissapear quicker

prime mountain
#

is there a plugin or just default way i can read from a text file. I guess write

lost matrix
#

You have a full blown programming language at your disposal. You can even read from a gif if you feel like it.

dense goblet
prime mountain
lost matrix
#

But reading a File with Kotlin is doable. There are tutorials on that matter for sure.

prime mountain
#

the problem is that all the information on building with gradle and the api support is incredibly vague and frusterating

dense goblet
#

Why are you using kotlin if all the guides are for java

prime mountain
#

any programming example is easy

#

they're the same thing just styled differently

lost matrix
#

gradle + Kotlin is a niche setup. You really need to know what to do if you want to jump into spigot development with that.

prime mountain
#

the problem is the api and the building which is just way too annoying to me

dense goblet
#

Then just use java :)

chrome beacon
#

And Maven most of us here use that instead of Gradle and more tutorials for it with spigot

dense goblet
#

Not that it's better than kotlin but you're gonna find it easier

#

Yea maven is much better than gradle in my experience

#

Or maybe just forge gradle sucks deep ass

prime mountain
#

How is it easier if its way way easier doing literally anything in Kotlin

chrome beacon
#

ForgeGradle doesn't change how Gradle works it just takes care of setting up a dev enviroment

dense goblet
#

But kinda forge everything sucks deep ass other than their pretty impressive deobfuscation of vanilla code

chrome beacon
#

Forge is quite neat

dense goblet
#

For me, forge was not fun to work with and spigot is fun to work with

hybrid spoke
chrome beacon
#

Forge is a bit messier to get started other than that it's quite similar in a few ways

dense goblet
#

Lots of it is confusing, poorly documented and much harder to find support

#

It's got better extensibility than spigot tho

prime mountain
chrome beacon
#

Oh and Forge and MMD discords can help if you get stuck

dense goblet
#

Yeah but there are forge-specific things that you gotta look through github repos from seven years ago to figure out

#

I found forge discord and forums toxic (from a spectator pov) but mod-specific discords were friendly

chrome beacon
#

Forge has had rewrites since 7 years ago

dense goblet
#

NuclearCraft's discord was great for 1.12 help

chrome beacon
#

1.16 Forge is a lot better to work with

dense goblet
#

I hope haha

chrome beacon
#

1.13 rewrite cleaned a lot of things up

#

Oh and Mojmaps are great

#

And ParchmentMC gives Javadocs and Params

dense goblet
#

Though what I was doing needed 1.12 mods (NC, GTCE) and the forge admins wanted to pretend 1.12 is dead and 1.15 was the new big thing

chrome beacon
#

1.15 is end of life now

dense goblet
#

I wanna try fabric at some point to compare

#

1.15 was a bit of a failed state

#

1.16 seems pretty solid

#

But hopefully 1.18 becomes the new long-term version

chrome beacon
#

They will drop 1.15 support in a month

#

1.16 is LTS atm

dense goblet
#

Yeah they did similar with 1.14

#

It was LTS for a solid 2 versions lol

chrome beacon
#

Many mods are moving to 1.16

#

And I probably haven't seen this many since 1.12

dense goblet
#

It's good cause playing 1.12 packs gets boring

#

1.16 feels fresh since I didn't really play vanilla so I was stuck on .12

dense goblet
ivory sleet
#

Guys chill

dense goblet
#

🀐

ivory sleet
#

@prime mountain if you seriously want to circlejerk about kotlin, this is not the place to say the least. At least keep the discussion civil if you do.

echo basalt
#

Yo conclure

#

Wanna get back to cursed code?

hardy swan
#

I just learnt today that Void is return of null, not for wrapping void

rigid hazel
ivory sleet
hybrid spoke
rigid hazel
#

How can I fix this?

hybrid spoke
#

check if the clicked slot were -999

#

or if the clicked item is not null

rigid hazel
#

Okay. Thanks. I will try.

rigid hazel
hybrid spoke
#

you check if the item in the clicked slot is not null

rigid hazel
#

if(event.getSlot() <= 4 && inventory.getItem(event.getSlot()) != null)

#

Isn't this what you mean?

hybrid spoke
#

if you would check if the event#getClickedItem is not null, you wouldnt have this error either

rigid hazel
#

Ah. Thanks. I'm dumb

hybrid spoke
#

also identifying the inventory by the title is worse

rigid hazel
hybrid spoke
#

and if your clickable items cant be moved i would identify them over the slots they are on instead over the displayname

hybrid spoke
hardy swan
#

Is this a GUI?

hardy swan
#

Where the items are meant to be unobtainable?

hybrid spoke
#

your naming conventions arent good either. check javas naming conventions

hybrid spoke
hardy swan
#

Even the item can extend itemstack and implement its own onclick handler

hybrid spoke
hardy swan
#

It is possible thru persistent data and reflection

#

Save the class name within the persistent data container lolol

hybrid spoke
hardy swan
#

Then Class.forName and instantiate it again

hybrid spoke
#

just.. no

hardy swan
#

Since no meta data is lost other then the fact that it is no longer extending ItemStack, we can use the constructor with ItemStack as argument

#

Unless someone uses two plugins of the same name and both using the same technique, and somehow saving it under the same namespaced key, but by then something else would have broken down before that

hybrid spoke
#

oh, you are serious about this?

hardy swan
#

Ya now im serious lol

#

I wasnt when I first said that

hybrid spoke
#

so, then it would be like: "hey guys, look at that" - "ew, go away ?learnjava"

torn shuttle
#

anyone with experience with world loading and unloading happen to know why I am getting this?

[05:55:03] [Paper RegionFile IO Thread/FATAL]: Failed to read chunk data for task: Task for world: 'em_hallosseum' at 2,5 poi: false, hash: 900610284
java.nio.channels.ClosedChannelException: null
    at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:156) ~[?:?]
    at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:790) ~[?:?]
    at net.minecraft.world.level.chunk.storage.RegionFile.getChunkDataInputStream(RegionFile.java:176) ~[patched_1.17.1.jar:git-Paper-100]
    at net.minecraft.world.level.chunk.storage.RegionFileStorage.read(RegionFileStorage.java:185) ~[?:?]
    at net.minecraft.world.level.chunk.storage.ChunkStorage.read(ChunkStorage.java:115) ~[?:?]
    at net.minecraft.server.level.ChunkMap.read(ChunkMap.java:1687) ~[patched_1.17.1.jar:git-Paper-100]
    at net.minecraft.server.level.ServerLevel$2.readData(ServerLevel.java:252) ~[?:?]
    at com.destroystokyo.paper.io.PaperFileIOThread$ChunkDataTask.run(PaperFileIOThread.java:508) ~[patched_1.17.1.jar:git-Paper-100]
    at com.destroystokyo.paper.io.QueueExecutorThread.pollTasks(QueueExecutorThread.java:105) ~[patched_1.17.1.jar:git-Paper-100]
    at com.destroystokyo.paper.io.QueueExecutorThread.run(QueueExecutorThread.java:38) ~[patched_1.17.1.jar:git-Paper-100]

I don't even really know where to start with this one

hybrid spoke
#

?paste please oh nvm its not that big

undone axleBOT
hardy swan
#

It sounds ugly at the start

#

But gui elements can be easily extendable

hybrid spoke
# hardy swan Just whats the problem with doing that

everything. why do you want to do that? using the PDC, okay, for what? reflections? very bad! you should never use reflections if you are not doing something big where you explicit need it(!). f.e. coding a framework.

also this has nothing to do with OOP then and is just an ugly way of overcomplicating. it would be extremely redundant since you could either just have a method for each ItemStack or even just do a handlerclass

grim ice
#

anyone has an idea of how can I make resourcepack forced plugins

#

not forced ig

#

soft depending on a resource pack

torn shuttle
hybrid spoke
torn shuttle
#

hm

#

I'm going to test for legit world corruption before reporting there then

solid glade
#

Turns out, I'm having way more trouble than I initially thought. I want to make it so when someone shifts, they get a certain potion effect, but currently I'm not even sure how to do that

#

the stuff i'm reading online is leaving me more confused than helped as well

hybrid spoke
#

listen for that

solid glade
#

I meant, as long as they're shifted, they get the potion effect, but once they unshift they don't get it anymore

#

toggle registers when they shift and unshift and that's it

#

mb explained it wrong at first

hybrid spoke
#

so store them somewhere

#

if they are in the collection at unsneak

#

remove them and the potion effect

solid glade
#

ooh

#

can't believe in the few hours I've spent working on this, I didn't think of that... lmfaoo

#

I'll try it out and get back to you lmfoa

hardy swan
prime mountain
dense goblet
#

For OOP functionality in GUIs there is an easier alternative which I use

hybrid spoke
# hardy swan where is the rule of reflection usage coming from? there must be a reason to not...

informative: https://stackoverflow.com/questions/42425906/is-java-reflection-bad-practice

crossversion nms "requires" reflections. in your case its completely possible without. its really not needed to have an own class with an event listener for each clickable item. and no, its not.

what has that got to do with webpage stuff now?

so you can make the hander/util/whateverclass f.e.

radiant oak
#

im trying to import a library into my project. how would i do so through gradlew

#

pls ping me if u think up anything

dense goblet
#

There are other ways to do it but point is you don't need reflection for OOP inventory guis

hybrid spoke
#

i would think of a functional interface here

hardy swan
#

Basically, what I am proposing is for something like this to be feasible, where GUIItem is an abstract class for other classes to inherit:

@EventHandler
public void onItemClick(InventoryClickEvent evt) {
    GUIItem clickedItem = GUIItem.fromItemStack(evt.getCurrentItem());
    if (clickedItem != null) {
        evt.setCancelled(true);
        clickedItem.onClickHandler(evt);
    }
}
hybrid spoke
#

which contains the code that the itemstack is supposed to do

dense goblet
#

CustomGUIButton[invSize] buttons;
In event:
if(buttons[clicked slot] != null)
buttons[clicked slot].onClick()

quaint mantle
#

?jd

hybrid spoke
hardy swan
hybrid spoke
#

and reflections seem totally unnecressary

hardy swan
#

or else how would you know which subclass to instantiate

#

all information about the instance class is lost

dense goblet
#

Yeah like it's a valid method but I don't see the advantages over for example what I described

hybrid spoke
#

but you could make f.e. a custom GUI which contains your GUIItems

hardy swan
#

the first thought that came to me since I suppose GUIs gonna implement InventoryHolder is that information about the items' instances will be lost

#

didn't think of creating a separate map

dense goblet
#

Yeah just have an addButton function that adds both your object to your array and the itemstack to the inventory

solid glade
#

πŸ˜„

#

Thanks

quaint mantle
#

how can i get a item player has currently in hand in 1.13 to 1.17

dense goblet
#

Something along those lines

solid glade
#

Is there a way to make it so, when you use performCommand to apply a potion effect, it doesn't say that it applied said potion effect to you in chat

quaint mantle
dense goblet
solid glade
#

i'm applying it through a command so you can't see the particles

#

is there a way to apply it directly without the particles

dense goblet
#

There should be an overload to the method right

solid glade
#

hm maybe let me try and see if i can get that to work

solid glade
#

Oohh

#

Thanks a bunch

rigid hazel
#

Code: this.essentials = (Essentials) this.getServer().getPluginManager().getPlugin("Essentials");

toxic mesa
#

So i've got a problem with an anticheat project im making (Yes I know there's plenty out there it's just cuz it's fun)
I've got a couple of fly checks ect. but when a player is launched because of slime blocks they trigger the fly checks. How would I be able to detect if a player is launched because of slime blocks? I was thinking in the direction of checking if any of the blocks around the player r slime blocks but doing that would probably be way too inefficient so I was wondering if any of you guys have a better solution

gleaming grove
#

maybe check out this class

marble granite
#

so, i am trying to use the worldedit api to get the region of a pasted schematic. i have this so far:

        System.out.println("ran!!!!!!!!!");
        EditSessionEvent e = (EditSessionEvent) event;
        System.out.println("ran2!!!!"); // gets printed just fine
        Region region = new CuboidRegion(e.getWorld(),e.getExtent().getMaximumPoint(), e.getExtent().getMinimumPoint());
        World world = Bukkit.getWorld(worldname);
        while(region.iterator().hasNext()){
            BlockVector3 block3d = region.iterator().next();
            Block block = world.getBlockAt(block3d.getX(), block3d.getY(),block3d.getZ());
            if (block.getType() == Material.AIR) continue;
            System.out.println(block.getType().name());
        }

but that times out the server so that leads me to think that e.getExtent().getMaximumPoint() and e.getExtent().getMinimumPoint() are not the top and minimum blocks of the region

#

so, how DO i get the region of a pasted schematic?

opal juniper
#

NNYa

#

Am having some issues with the pathfinder

#

ie it just does not find a path

#

😈

#

i removed the randomness

#

but still no worky

#

i couldn't find one

#

this was the issue

#

i didn't want to write one

#

but then i couldn't find one anywhere

hybrid spoke
opal juniper
#

Yep

#

its a real temperamental shite

quaint mantle
#

hey would i destroy block like this Block#setType(Material.AIR) in 1.13 to 1.17

#

im trying it and it doesnt work

spare prism
#

Why does this return null?: configManager.getClanWarMapsConfig().getDouble("Maps." + mapName + ".Bounds.1.X")
ConfigManager.java: https://pastebin.com/3xD4j2BB

opal juniper
#
Location{world=CraftWorld{name=world},x=100.0,y=88.0,z=86.0,pitch=0.0,yaw=0.0}
Location{world=CraftWorld{name=world},x=98.0,y=88.0,z=135.0,pitch=0.0,yaw=0.0}

i mean that is my start and finish positions, completely line of sight and it still doesn't find a route

#

suer

#

*sure

spare prism
hybrid spoke
opal juniper
#

well the PathController

#

but

#

i dont see why me changing how it gets called should break it

quaint mantle
hybrid spoke
#

i would have to see what exactly you changed

spare prism
# quaint mantle Any errors at loading?

Only this: java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.file.FileConfiguration.getDouble(String)" because the return value of "md.sintez.cloudclans.data.cofiguration.ConfigManager.getClanWarMapsConfig()" is null

opal juniper
#

oh wow

#

that looks cool

quaint mantle
#

i see

#

this method getClanWarMapsConfig() returns null

#

so your config is probably not loaded

spare prism
#

ik, why?

quaint mantle
#

show me how you load it

hybrid spoke
#

CloudClans.getInstance().saveResource("clanwarmaps.yml", false);

#

?

#

#createNewfile

hybrid spoke
#

#saveResource is to save a file which exists internally

quaint mantle
#

I mean in like main class

quaint mantle
grim ice
#

Hello,
I made a plugin where a specific item has fuel, and this fuel runs out every time a block gets destroyed using the specific item. How do I make that

#

I have an idea of using PCD

quaint mantle
grim ice
#

But the fuel will not be different for each person if I use my method

#

it will be the same for every one

quaint mantle
#

in the class u used the configManager.getClanWarMapsConfig().getDouble("Maps." + mapName + ".Bounds.1.X")

spare prism
quaint mantle
#

oh i see

#

so you have to get the ConfigManager from the CloudClans.getConfigManager() method

hybrid spoke
#

so it have to be always null

#

since you never reinitialize it

quaint mantle
#

bcz you are creating a new configmanager instance that is not loaded and any stuff

spare prism
#

so I have to keep it's instance in main class?

hybrid spoke
#

you have to use the instance which is in your mainclass

opal juniper
spare prism
#

got it, ty

opal juniper
#

its a video NNYa

#

a whole second?

#

ill just do a little bit

grim ice
#

can anyone help i want to make a charges system for an item

hybrid spoke
#

seems to me like its blocking itself

grim ice
#

O

#

right ty

opal juniper
#

takes a while

#

big file as well

#

it is set to remove the block 6 seconds after it is placed hence it gets destroyed after

hybrid spoke
#

yeah lmao blocking itself

opal juniper
hybrid spoke
#

do you compare the locations?

opal juniper
#

ye but there may be an issue with it

hybrid spoke
#

remember, it have to be the exact location to be reached.

opal juniper
#

let me change the equals function

hybrid spoke
#

didnt we do that the next location is always .5?

#

and your end location is .0?

opal juniper
#

nah i dont think the 0.5 is a thing

#

hang on

#

let me compare the BlockX/Y/Z

hybrid spoke
#

or could it be because the diamond block is blocking the way to the location?

opal juniper
#

oh

#

lmaoooo

#

yep it was that

#

i am GigaBrain

#

myeah

grim ice
#

int current = e.getPlayer().getPersistentDataContainer().get(new NamespacedKey(plugin, "drill"), PersistentDataType.INTEGER);
why Unboxing of 'e.getPlayer().getPersistentDataContainer().get(new NamespacedKey(plugin, "drill"), PersistentDataTyp...' may produce 'NullPointerException'

dense goblet
grim ice
#

oh so Integer

#

not int

#

ok

dense goblet
#

Yeah and then check if it's null before using it as a number

opal juniper
#

that came from nowhere

#

lmao

spiral dome
#

ya i saw that

#

dumas

opal juniper
#

lmao

torn shuttle
#

say it ain't so santa hitler

hybrid spoke
dense goblet
#

@grim ice btw if you're making a drill with fuel then you wanna store it on the item pdc not the player

torn shuttle
reef wind
#

yikes

torn shuttle
#

but who are you racist against santa?

#

I do

#

that's why I asked

#

then you're using rhetorical questions wrong

#

because that has an answer

#

it matters to me

hybrid spoke
torn shuttle
#

I feel like not only are you a racist but you're also a coward for not saying who you're racist against

opal juniper
#

he did

#

here

quaint mantle
#

Yea honestly who cares lol

torn shuttle
#

I care

opal juniper
torn shuttle
#

I feel like I'm repeating myself

opal juniper
#

@hybrid spoke i am amazing

#

i have fixed ur stupid PathController

hybrid spoke
#

he spins his wheel of fortune to determine his next hate target

hybrid spoke
opal juniper
#

no

#

no

#

you are mistaken

#

it wasn't broken

#

it was not working

dense goblet
#

If he's only racist towards non-0xFFFFFF people then does that mean he's cool with the polish

#

Paradoxically

opal juniper
#

too far

torn shuttle
#

that's where you draw the line jeff?

opal juniper
#

myeah

#

i must admit i have been hopping in and out

torn shuttle
#

that's like the french drawing the surrender line in belgium

dense goblet
#

The French have a well established surrender line

#

You can see it on most maps

torn shuttle
#

it's great that you're only tolerant towards intolerant people

#

very jreg of you

vivid temple
cloud wharf
#

You need to install it on your local repo

hybrid spoke
#

damn

#

NNYa got banned again

torn shuttle
#

well only his main account

opal juniper
#

yeah he still has his other 50

#

but still

#

he is very helpful

#

questionable ethics

#

but very helpful

grim ice
#

that will change the item for everyone

#

not just the player whos using the drill

torn shuttle
#

tbf nnya would instantly disappear if someone made this chat verified only

#

there's only so much patience people will have for spoofing multiple accounts on multiple levels

vivid temple
torn shuttle
#

there's a guide on how to use maven on the spigot docs

hybrid spoke
#

NNY is a nice guy as long as he doesn't post his racist comments

torn shuttle
#

once you have that down it applies everywhere

cloud wharf
#

Hope it helps you kipteam

torn shuttle
vivid temple
cloud wharf
#

Its because they dont have an repo for it, so you have to add it to your pc, which will only work on your machine, that's why you have to download the jar of it

vivid temple
#

okay

#

but what do i put in these?

cloud wharf
#

anything you want

vivid temple
#

oh

cloud wharf
#

but you also need mvn installed

#

you have some tutorials on youtube for that

#

just search " how to install mvn windows 10"

proud basin
hybrid spoke
proud basin
#

again… What did he do

proud basin
crude charm
#

but how can I recreate it

#

what is the most optimized way

proud basin
#

Im asking what it is

crude charm
#

yes

#

it is

proud basin
#

ok

crude charm
#

how can I recreate it?

hasty prawn
#

Probably the best way to do it would be to just have a set of blocks for each number, like the format, and then just set those blocks when that number needs to be drawn at a location

#

Then just have a timer every 1 second to redraw the changed numbers

hasty prawn
#

LMAO then what's your idea?

crude charm
#

thats like 320 numbers

hasty prawn
#

It's 10 numbers.

#

0-9

crude charm
#

oh

#

im dumb

proud basin
hasty prawn
#

Why would it

crude charm
hasty prawn
#

Youre only changing like 30-ish blocks depending on how you size and format your numbers

#

That's trivial for the server to do

proud basin
#

Your changing multiple blocks every second

crude charm
#

saying in a dumb way but I had that in mind lol

hasty prawn
#

WorldEdit can place thousands of blocks all at once without much lag, pretty sure you're going to be okay with not even 100

crude charm
#

this isn't worldedit tho

#

it's setBlock

hasty prawn
#

It's the same concept

crude charm
#

no

#

/fill and setting each block is different

hasty prawn
#

No it's not. Fill just iterates through and sets each block.

#

They do the same thing

#

I mean there's really no other way for what you're trying to achieve anyways. You have to set the blocks regardless of your method of doing so.

tacit drift
#

decompile lol

crude charm
proud basin
#

I thought I saw a github link

crude charm
#

there isn't one

proud basin
#

oh found something

tacit drift
crude charm
#

see it is

#

and you said

tacit drift
#

it's about the platform

dense goblet
#

Bulkedit can do >100k blocks easily but I think they are using a lot of optimisations

tacit drift
#

not the content

chrome beacon
#

To the platform

#

Yeah

hasty prawn
#

Plugins can have their own licenses though, so be careful with what you do. Decompiling is generally okay afaik but never just steal the code

crude charm
#

"works to the platform"

proud basin
#

Your just viewing how they did it though so you can get a general idea

hasty prawn
#

^

#

That's fine

hybrid spoke
crude charm
#

Eh I dont do that stuff I'll just figure it out myself

#

Im not a skid

hybrid spoke
hasty prawn
tacit drift
#

Yeah a staff member should clarify this

#

:))

crude charm
#

You're not allowed to

proud basin
crude charm
#

it's common knowledge

#

If you decompile stuff you're 99% a skid

proud basin
#

It’s not skidding

crude charm
#

ik the difference

#

but still

hybrid spoke
proud basin
#

Literally what your saying is if you look at a github project your skidding

tacit drift
#

that's what you said

crude charm
#

but if you decompile it without perms then you're obv breaking the rules

hybrid spoke
#

stackoverflow = skidding

proud basin
crude charm
#

because thats public

proud basin
#

decompiling is public

hybrid spoke
#

its not

crude charm
#

^

proud basin
#

yeah it is

hybrid spoke
#

i will have to agree with zoibox here

#

its against the laws

crude charm
#

^^^^^

hybrid spoke
#

you are accessing data you aren't allowed to access. as i already said, its equated with hacking

crude charm
#

^^^

proud basin
#

Take a look at Digital Millennium Copyright Act PUBLIC LAW 105–304

crude charm
hybrid spoke
#

intellectual property

#

its like breaking into a house

#

to just look around

crude charm
#

^

hybrid spoke
#

but if the author stated its allowed Γ‘ the door of the house is open with a sign "come in", its allowed

proud basin
#

πŸ€·β€β™‚οΈ

proud basin
#

anyways

#

just go to his github then

crude charm
#

It's not on github

proud basin
#

ask the author for it

crude charm
#

There's a reason it's not public

proud basin
#

Maybe he is a noob at github and doesn’t know how

queen niche
#

I dont see it

crude charm
proud basin
#

Is there an error message? Tim

queen niche
#

yes

#

its in the paste

#

too

proud basin
#

What’s line 19

queen niche
#

its also in the paste but its

getServer().getPluginCommand("plugin").setExecutor(new plugin());

tacit drift
#

Yeah so this is the license used for every spigot plugin if not specified otherwise

proud basin
#

ah

tacit drift
proud basin
#

I didn’t even know that existed

proud basin
queen niche
grim ice
#

How do I stop players from placing my itemstack? What I have now:

#
@EventHandler
    public void onPlace(BlockPlaceEvent e){
        if(e.getItemInHand().isSimilar(recipes.getEngine())) {
            e.setCancelled(true);
        }```
proud basin
#

change the name of the command

#

and see if that does something

queen niche
#

Like the class?

proud basin
#

no executor

grim ice
#

but getItemInHand() wouldn't be as good, right

queen niche
#

Cant really change the /command since it has to be a simple replacement for /plugins

tacit drift
#

CommandPreProcessEvent

queen niche
#

I also added the perm to plugin.yml

tacit drift
#

Or something like that

#

check if command is /plugins and cancel it

#

and do what you want it to do

queen niche
#

Just send a simple messages when a players tries to lurk into our plugins list

proud basin
#

oh i see

grim ice
#

Wait I think i know the solution for that, whats the problem?

queen niche
proud basin
#

can you do getServer.getCommand

grim ice
#

btw

#

Naming conventions

#

pls

queen niche
proud basin
#

uh

grim ice
#

?learnjava

undone axleBOT
proud basin
#

idk i don’t ide

grim ice
#

getServer()

queen niche
#

I do have this warning at the 3 lines
Method invocation 'setExecutor' may produce 'NullPointerException'

grim ice
#

Please learn java before going into spigot

proud basin
#

your class looks fone

#

fine*

queen niche
tardy delta
#

is mysql faster than yaml for data storage?

#

for an economy plugin

grim ice
#

so you if you did register it you can ignore that

queen niche
#

I have registered it in plugins.yml

grim ice
#

Then you can ignore it

queen niche
#

so is the permission

vestal moat
#

guys which is better storing list of ids in a column in database or a new table?

#

im sure column is faster but idk if its a good idea

grim ice
#

replace your "line 19" with
getCommand("plugin").setExecutor(new plugin());

#

@queen niche

hasty prawn
#

^ not sure how getPluginCommand works but I don't think you can use it for registering them

#

I think that gets already registered commands maybe?

grim ice
#

wtf r u talking about

#

thats how you register commands in ur main class

hasty prawn
#

He's using getPluginCommand

grim ice
#

What?

hasty prawn
#

Not getCommand

#

Look at his registration code again.

grim ice
#

Why?

hasty prawn
#

Nevermind. πŸ€¦β€β™‚οΈ

grim ice
#

Why is he using that...

hasty prawn
#

I don't know that's why I'm saying this...

#

Make sense now?

grim ice
#

bruh

#

oop I misread ur message

#

idk who told him to use that

#

dont tell me a yt showed it

hasty prawn
#

Hopefully not

quaint mantle
#

Hello spigot is there any 1.15.2 schematic pasting/copy code? I tried to find for 1.2hour and I failed (Failed 6 code far) (without worldedit/api) (Failed example1: https://pastebin.com/raw/KiDUCs5m)

grim ice
#

iirc right u use that to get the commands of other plugins

hasty prawn
quaint mantle
#

oof I don't want use any api/worldeidt sorry I should said

chrome beacon
#

Use it

hasty prawn
#

Yeah... It's gonna be a huge pain for you to recreate something like that

quaint mantle
#

thanks you for worrying about me. but I will never use that πŸ™‚

#

because I want to make my system

chrome beacon
#

Oh well good luck figuring it out

#

Oh and it's not your system if we write it for you

#

Try not to ask for code next time

grim ice
#

How to stop a itemstack from being placed?
I have

#

@EventHandler
public void onPlace(BlockPlaceEvent e){
if(e.getItemInHand().isSimilar(recipes.getEngine())) {
e.setCancelled(true);
}
}

quaint mantle
#

I personally think this part needs a code.

chrome beacon
#

.-. If you don't know what you're doing stop asking us to spoonfeed you and use libraries like WorldEdit

hasty prawn
grim ice
#

Okay

hybrid spoke
tacit drift
vivid temple
#

so i have this code

// more code here
Location loc = e.getWhoClicked().getLocation();
                loc.setX(-53.0);
                loc.setY(8.0);
                loc.setZ(95.0);
                loc.setYaw(0);

                Minecart minecart = Bukkit.getWorld("TPCSurvival").spawn(loc, Minecart.class);

                switch (e.getCurrentItem().getType()) {
                    case COPPER_BLOCK:
                        minecart.addPassenger(e.getWhoClicked());
                        player.sendMessage(ChatColor.YELLOW + "[NPC] " + ChatColor.WHITE + "Minecart Operator: " + ChatColor.GRAY + "I will bring you to the copper mines!");
                        break;
// more code here

and this is what happens, how can i get the minecart on the rail?
https://youtu.be/H3i3tzsC3LQ

scenic hill
#

hello

#

plugin annotations don't seem to be working

chrome beacon
#

What annotation?

scenic hill
#

@Plugin(name = "2b4c Core", version = "v1") I'm trying to use this but my plugin simply isn't loaded..

#

pl

#

pl
[17:47:37 INFO]: Plugins (0):

chrome beacon
#

Never seen that one before

#

Anyway just use a normal spigot plugin

scenic hill
#

package twobeefourcee.core;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.plugin.java.annotation.plugin.Plugin;

import twobeefourcee.core.commands.Update;

@SuppressWarnings({ "rawtypes" })
@Plugin(name = "2b4c Core", version = "v1")
public class Core extends JavaPlugin {
    // DB db = DBMaker.fileDB("file.db").make();
    // ConcurrentMap map = db.hashMap("map").createOrOpen();

    @Override
    public void onEnable() {

        this.getCommand("update").setExecutor(new Update());
        if (Bukkit.getOnlinePlayers().size() != 0) {
            System.out.println(
                    "I'm not really a fan of reloads, but because this is probably a development environment, I don't care.");
            // do some shit here idk
        }
    }

    @Override
    public void onDisable() {
        System.out.println(";( bye");
        // db.close();
    }
}

#

This is my code

#

Pom

chrome beacon
#

Show your plugin.yml

#

Also

#

?pastd

scenic hill
#

My plugin.yml is empty.

chrome beacon
#

?paste

undone axleBOT
opal juniper
#

there is the issue

scenic hill
#

You need to have a plugin.yml?

opal juniper
#

you need to define stuff

chrome beacon
opal juniper
#

You must declare:
name
main
version

scenic hill
#
main: twobeefourcee.core.Core
version: 1.0.0
#

Same thing.

opal juniper
#

no space on name

#

e.g:
2b4cCore or 2b4c_Core

scenic hill
#
[17:51:20 ERROR]: Error occurred while enabling 2b4cCore v1.0.0 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "twobeefourcee.core.Core.getCommand(String)" is null
#

Do I need to have a command inside of Plugin.yml too?

opal juniper
#

yep

scenic hill
#

Why'd you use annotations then?

opal juniper
chrome beacon
scenic hill
#

Annotations are useless to me then

worldly ingot
#

If you're using plugin annotations, there is a @ Command annotation iirc

#

There's an annotation for every field in the plugin.yml

#

Those annotations are more verbose than if you were to just make a plugin.yml manually. You're just shifting all of that work load into annotations in source, which imo was a massive turn off unless you're making an extremely simple plugin

grim ice
#

?paste

undone axleBOT
grim ice
#

why is my code not working

#

no errors

chrome beacon
#

Did you register the event

hybrid spoke
chrome beacon
#

Add some debug messages or smth

worldly ingot
#

e.getPlayer().getInventory().getItemInMainHand().equals(new ItemStack(Material.IRON_NUGGET))

#

equals() checks for exact NBT matches

#

Check its type instead

grim ice
#

o

#

right

#

first time i use equals, i usually use isSimilar

worldly ingot
#

Even still, that will yield a similar result because isSimilar() is just equals() without equating item amount

#

Just simplifying that to item.getType() == Material.IRON_NUGGET should yield some results

#

Also, please make some variables for readability sake ;p

grim ice
#

yeah lol

worldly ingot
#

Definitely PlayerInteractEvent#getItem() over Inventory#getItemInMainHand()

#

Not only is it more concise but it's going to better support multiple hands

#

Though careful because if I recall correctly it returns null as opposed to an empty stack like getItemInMainHand() does

grim ice
#

o

#

i can just check if e.getItem() is null though

hidden delta
#

e#hasItem

grim ice
#

so

#

i would still need

#

to check if getItem is not null

#

at least to remove the warning from my ide

quaint mantle
#

hello

#

i was trying to keep the diamond_sword item on my inv on death

#

like when a person die his armors are removed except for the sword

#

e.getDrops().removeIf(item -> item.getType() != Material.DIAMOND_AXE);

#

i tried that

#

hello?

#

What version are you using? for spigot

young knoll
#

A diamond axe is not a diamond sword

#

Also that will just stop it from dropping

#

You could set event.keepInventory to true and then manually drop all the items

vivid temple
#

how do i kill a minecart?

chrome beacon
#

Call remove on it iirc

scenic hill
#

hello

#

i'm trying to disable a plugin to update it

#

i want to delete my plugin to delete itself, but it's being locked by spigot

#

how do i disable spigot from using my plugin before I toggle it back on?

#

my code:

chrome beacon
#

You want your plugin to delete itself?

scenic hill
#

I want it to auto-update itself via a command..

chrome beacon
#

I see.. is that a private plugin or are you going to upload it to spigot

scenic hill
#

Private.

chrome beacon
#

So I looked things up you can get the update folder with Bukkit.getUpdateFolderFile() and put your plugin there. During the next start bukkit will replace jar

vivid zodiac
#

Who know how can i colored name players ? but not on chat, on their head

proud basin
#

nametag?

oblique pike
#

is there a proper way to cancel EntityTargetLivingEntity event? It keeps occurring after some retries even if i cancel it

grim sage
#

Hey there πŸ‘‹ currently working on a plugin witch involve ender dragon, but as you probably know dragons have a « portal locationΒ Β» attribute witch is the location where they will fly around when they are in circling phase for example. I’m trying to modify this attribute but idk how :/

scenic hill
#

@chrome beacon

#

Do you know any documentation for that method?

#

Heres what I have right now.

#

I now have a core-1.0.0-2b4c.jar file.

grim ice
#

How do i make durabilities for custom items (for example sticks..etc)

oblique pike
grim ice
#

If i do that the durability will change for everyone using the item

#

not just the one who is using it

oblique pike
#

wut

grim ice
# oblique pike wut

If i do that the durability will change for everyone using the item
not just the one who is using it

oblique pike
#

you... just repeated exact same messages but with a reply

#

Big brain time

grim ice
#

Yes

#

item persistent data containers apply for all copies of an item

#

dont they

oblique pike
#

...no?

burnt current
#

Quick question: When you make a shaped recipe, how can you make it so that you need several items on one slot for the recipe? e.g. you make a recipe for which you need 10 earth blocks. one earth block must be on each crafting slot and 2 earth blocks must be on a certain slot?

grim ice
oblique pike
#

wdym by "all the copies"

grim ice
#

like

#

when a player crafts the item

#

and damages it

#

ill add the persistent data container to the item, right

oblique pike
#

yeah

chrome beacon
grim ice
#

the key of the pcd will be same for

#

every item

#

except if i make it by uuid

oblique pike
#

but it will contain specific durability integer

grim ice
#

what

#

show me an example if u can

oblique pike
#

just ItemStack#getItemMeta#getPersistentDataContainer#set(NamespacedKey, PersistentDataType.INTEGER, value)

#

and you just handle block break (for example) events and check if that item has that key and reduce the value

#

and if the value is 0

#

remove the item

grim ice
#

uh

#

but that will change the value for everybody using the item too

vivid zodiac
grim ice
#

becuz u set the value to the item itself

cursive trellis
#

can anybody help
is there any spigot plugins i can ue as a discord bot to note down people users names and ips

chrome beacon
proud basin
#

skid

hybrid spoke
#

Β―\_(ツ)_/Β―

chrome beacon
#

Yeah but why do you need to log it yourself

cursive trellis
#

from previous servers i ran

cursive trellis
chrome beacon
#

They can just use a VPN

#

And yes it logs

cursive trellis
#

i need a discord bot so all my staff see

cursive trellis
chrome beacon
#

Read the logs

#

Or you know you could just ban the ip

#

Instead of keeping track of each ip manually

hardy swan
#

On prepareitemcraftevent set result as null if there are insufficient items. And on craftitemevent decide how much amount of ingredient to deduct

tardy delta
#

if i added the plugins jar to the dependencies why cant it find the class?

chrome beacon
#

Did you forget repo?

tardy delta
#

on the site there is nothing for the pom.xml so i got it from the github page

#

like i hope it's this

chrome beacon
#

It's that

#

So what you need to do is download that project

tardy delta
#

i did

#

the jar

chrome beacon
#

Not jar

#

Source

tardy delta
#

oh wew i did it everywhere and it worked

chrome beacon
#

Then run mvn install in the folder

tardy delta
#

intellij can find the classes if thats the problem

scenic hill
#

I have a new issue.

austere cove
#

does kicking a player still fire PlayerQuitEvent? I can't remember ._.

scenic hill
#

I have this config.yml ```
locations:
RED_WOOL:
- "234,97,217"

I'm trying to use it here 
```        Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
            public void run() {
                locations.forEach((loc, mt) -> {
                    loc.getWorld().dropItemNaturally(loc, new ItemStack(mt));
                });
            }
        }, 0L, 3);
tardy delta
tardy delta
#

i dont know where i can find it

#

on his spigot page there's nothing about it

chrome beacon
tardy delta
#

the source is the zip file right?

chrome beacon
#

Yeah or clone with git

tardy delta
#

unzip

#

and open with intellij or something

quaint mantle
chrome beacon
tardy delta
#

i dunno if i have

chrome beacon
#

Just open Intellij then

tardy delta
#

yes

#

i'm using maven the whole day so i assume i have

chrome beacon
#

Have you opened Intellij?

tardy delta
#

yessir

chrome beacon
#

Now instead of using package in run configurations use install

tardy delta
#

aha thankjoe

#

the only thing is that the maven tab is gone

#

i defined the project sdk

#

ah found

radiant oak
#

is there a way to set an item stack of a custom item ,morefood:pinapplebeing the ID of the item any help would be greatly appreciated and ty in advanced

chrome beacon
#

A mod?

radiant oak
#

yh

#

or just minecraft

chrome beacon
#

Spigot is not designed to run with mods

radiant oak
#

ik

#

but is it possible to be done with like minecraft:apple

chrome beacon
#

No you use the Material Enum

radiant oak
#

kk

#

ill work out if you can do a custom one

tardy delta
#

hmm it cant find the pom.xml

chrome beacon
radiant oak
#

kk

#

ive been trying that but libgui is complicated

shut field
#

I have a question about buildtools?

#

Is there a way you can make a spigot jar from a version of minecraft you have downloaded on your pc?

tardy delta
#

what will it do if i cancell the playerquit event

shut field
tardy delta
#

ow you're right

#

actually it was the playerjoin

shut field
tardy delta
#

normally it sends a message to the server when someone joins

#

but when im vanished it wont

#

but it sends the default minecraft one

#

and i dont want that

#

like this brr

shut field
#

set the join message?

eternal oxide
#

Whatever vanish pluging you are using has a permission override to see vanished joins

tardy delta
#

i made it myself Β°-Β°

shut field
eternal oxide
#

Then make it better πŸ™‚

tardy delta
#

well i think hust set the join message to an empty string

shut field
scenic hill
#

Material.getMaterial("RED_WOOL") gives me nothing

shut field
scenic hill
#

no

#

gfigured it out

#

just use minecraft:red_wool instead

scenic hill
#

item stack is new ItemStack(Material.RED_WOOL)

scenic hill
#

Hmm. Still the same issue

#

Here's my code.

eternal oxide
#

missing API version in your plugin.yml

scenic hill
#
name: 2b4cCore
main: twobeefourcee.core.Core
version: 1.0.0
api-version: 1.16
commands:
   update:
      default: op
#

Still doesn't seem to work.

grim ice
#

why
Unboxing of 'e.getPlayer().getPersistentDataContainer().get(new NamespacedKey(plugin, "drill"), PersistentDataTyp...' may produce 'NullPointerException'

#

Integer total = (e.getPlayer().getPersistentDataContainer().get(new NamespacedKey(plugin, "drill"), PersistentDataType.INTEGER) + amount);

#

how to fix it tho

eternal oxide
#

test teh return before you attempt to add

grim ice
#

it was just a test

#

i removed it

#

lol

#

ye

#

who uses anything other than intelliJ anyways lUl

#

ok

#

there isnt find cause

#

lol

#

nothing there

#

i clicked it

#

nothing in it

#

just some useless stuff

chrome beacon
#

Anyway that warning is because the player might not have that pdc

grim ice
#

i checked if it has that pdc

chrome beacon
#

Then ignore the warning

ivory sleet
grim ice
#

Just when will I stop asking questions in this channel :(

#

I feel like I'm not progressing :/

ivory sleet
#

myeah

#

you should probably learn java on its own

#

might enhance your spigot dev skills significantly

#

I mean

unreal quartz
#

dont supress every warning

grim ice
unreal quartz
#

just deal with the yellow highlighting

#

it's not a big deal

grim ice
#

I don't find what I'm doing really uh

#

like

#

I don't feel like im really lacking java

#

I lack spigot api knowledge more

ivory sleet
#

sysdm its kinda the stfu compiler which might produce bugs later on because you weren't able to spot them, or rather couldn't

#

oh yeah

#

I mean "unchecked" would be enough then lol

grim ice
#

@ivory sleet btw

#

did i write smth that like

#

shows i suck at java

#

or smth

ivory sleet
#

I think I arbitrarily clicked on of your bin links just the other day

#

unused, rawtypes

#

uh

#

ConstantConditions

ivory sleet
#

there's a lot really

#

but yeah intellij got their own variants also I believe

grim ice
#

πŸ‘€

fluid cypress
#

how can i save to and read from the config a list of objects of my own class? can i do that with yaml? or does everything have to have a key?

#

so, doing that, i do config.set("some.key", myobject.serialize()) for storing it, and (MyObjectType)config.get("some.key") to read it?

#

what if i want to do a list of that? i just set a list of serialized maps? or it serializes automatically or what

#

right

#

it will use the deserialize method?

#

and setList?

#

but the main thing i want

#

is to have different data types in the same element of a list, can i do that? or the thing i serialize has to be all the same type?

ivory sleet
#

ConfigurationSerializable πŸ˜„

#

😌

eager sapphire
#

Does anyone know if it's possible to make the MC client recognize recipe ingredients with custom names in the knowledge book?

The recipe works, but the knowledge book doesn't know it works, if that makes sense.

quaint mantle
#

?

eager sapphire
#

if that makes sense.
I guess it did not πŸ˜‚

I have custom recipes with ingredients that have display names or other special data. The recipes work, they show up in the knowledge book, but always as "uncraftable" even if I have the right ingredients.

#

Seems like a client problem, I'm wondering if there is a workaround.

fossil sage
#

how can I make a child category of a category in the config file?

quaint mantle
eager sapphire
#
games:
  clash:
    clans: barbarian

Like that Barbarian? Not sure what you mean, exactly

fossil sage
#

yeah

quaint mantle
eager sapphire
#

It is the exact same item- I have tested with a simple item that has no meta except for a display name

fossil sage
#

ok thanks

eager sapphire
#

hm though I suppose I don't know at which point all the ChatComponent serialization kicks in

quaint mantle
#

ItemStack#isSimilar(other)

eager sapphire
#

well a I said, crafting works

#

so the ExactMatch works

#

anything I do server-side is going to show they match (I believe)- but I will dump the item when I register it to be sure

#

I'll also test with something simpler like the unbreakable tag

chrome beacon
#

Sounds like a client issue. Might not be much you can do

shadow gazelle
#

How much CPU usage is too much for a loop running every 5 ticks?

eternal oxide
#

10

#

2

#

100

shadow gazelle
#

What

eternal oxide
#

exactly

shadow gazelle
#

Oh, right, depends on CPU

eternal oxide
#

and what you are doing

eager sapphire
#

... fwiw using an unbreakable item instead of a named item is even weirder. It now thinks I can craft the recipe, but won't move the unbreakable item into the grid automatically.

#

So i guess it's not an issue with name/component translation, or at least not entirely. Ah well, probably nothing I can do, but that sure doesn't stop my users from complaining πŸ˜…

chrome beacon
#

Try using datapack recipies in Vanilla

#

If those work then might be worth looking in to further

eager sapphire
chrome beacon
#

If it works with Vanilla we can help work around it

eager sapphire
#

well that skyblock.zip seems like a no-go, it's just simple items.
Sadly I've no idea how to make a datapack that has ingredients with tags on them

toxic mesa
#

Hi hi, I have this calculation to get the velocity 5 ticks later in a free-fall which works fine.

Double Velocity = player.getVelocity().getY();
Integer x = 5;
Double expectedVelocity = (3.92 + Velocity) * Math.pow(0.98, x) - 3.92;

Can I also calculate the expected Y level of the player with the current Y level and the expected velocity of the player after 5 ticks?

proud basin
#

no?

#

actually

grim ice
#

uh so how do i know if i know enough java

proud basin
#

maybe doing some calculations with System.currentMillisionecsondssomeyhing

#

i forgot the rest

undone axleBOT
toxic mesa
#

F, cuz I saw this post

And by integrating the function and adjusting some constants, you get this function, which describes the player's Y position after X ticks:
p(x) = -3.92(x+1) - 0.98^(x+1) * 50(3.92 + INITIAL_Y_VELOCITY) + 50(3.92 + INITIAL_Y_VELOCITY) + INITIAL_Y_POSITION

But I have no clue if it would work

grim ice
#

i saw ppl in forums rly struggle in some really basic stuff and im scared now

toxic mesa
#

will do

proud basin
#

system.currenttimemillis()

#

that

grim ice
proud basin
#

im on mobile ok

#

don’t blame m

#

e

grim ice
#

system.currentTimeMillis()

proud basin
#

I don’t have time to capitalize

grim ice
#

:)

#

it legit takes seconds

#

lol

proud basin
#

extra button

grim ice
#

lol

toxic mesa
#

lol

grim ice
#

no?

#

wait nvm

toxic mesa
#

it's System.currentTimeMillis() right?

grim ice
#

yep

toxic mesa
#

Ye okay I got confused lol

grim ice
#

why is it caps tho

#

shouldnt it be camelCase

toxic mesa
#

idfk

proud basin
#

no

eager sapphire
#

Caused by: net.minecraft.ResourceKeyInvalidException: Non [a-z0-9/._-] character in path of location: minecraft:diamond{Unbreakable:1}
Maybe.. you can not actually make datapacks with custom item ingredients?

proud basin
#

System is a class

grim ice
proud basin
#

and currentmili is a method

#

in that class that is static

grim ice
#

right