#help-development
1 messages · Page 1495 of 1
lmao
xD
nah
:(
that was just something i searched up
quality code
Yeah
Oh, nice
Also, would it be possible to save an item when the player died?
Basically keep inventory, but only that item gets saved?
Yeah sure
For the first question, have a look at ItemMeta, ItemStack and PersistentDataContainer. Second one use PlayerDeathEvent.
is there a way to stop players from being damaged by end crystal explosions
this cancels the explosion
and cancels the damage to mobs and items too
but i only want to cancel for the player
entityDmagaeEvent .getCause
returns PLAYER
have you tried EntityExplodeEvent
how can i actually save a custom FileConfiguration by default? like the same as #saveDefaultConfig does, but for custom ones
maybe FileConfiguration#save() works? lets try
well, then i'll use that. thanks!
huh?
well, what does saveResource("file", "true");? and how does this measure the path? is that everytime the datafolder?
i mean, looks like that would replace the file
i love how intellij literally has no docs lmao
idk it somehow doesnt work
yea
i mean, i just use saveResource() tho, because that does what i want
ty
You have no docs
i have docs
Oh, that's decompiled
like one sec
Download Sources and Documentations option
theres no option i guess
Probably your project is bad configured
tf
You have maven?
Download Sources with Documentations and it will get solved
how do i do that lol
And close the previous tabs
that didnt fixed anything
like my problem isn't there are no docs
the problem is, they are there for some methods, but not for all
or is that because spigot didnt documented all of them?
Spigot's decisions, who knows
thats the question lol
That may very well be the case
well, then i cant do anything about it lol
well
weird
hmm
lemme restart ij real quick
well nope
If they are not documented, they may not appear on the Javadoc
idk
actually, i am in love already, to write like 5 whole yml language-files
well, maybe 2 are enough at first
german and engllish. dont think there are more native languages than that
Now I realize I'm one as well
i think that can only stop the explosion from the exploding entity
and not cancel the dmg to players
yea, that only cancels breaking blocks from the explosion
you wanna cancel explosion damage?
ye
then just cancel the EntityDamageEvent, if the DamageCause equals DamageCause.EXPLOSION
its not that easy
because?
explosion dmg can also be caused by creepers
but i only want to cancel dmg from crystals
dmgCause.Entity_explosion
the .getEntityType returns PLAYER
for some reason
bc the crystal is damaged by a player
i suppose
well
yeah, getEntityType returns player because the player is who is damaged
i got an idea
one sec
just an idea, and pretty weird and shitty, but maybe this could work. didnt tested it tho:
private final Map<Entity, Boolean> crystalExploded = new HashMap<>();
@EventHandler
public void onEntityExplosion(EntityExplodeEvent event) {
if (event.getEntity() instanceof EnderCrystal) {
for (Entity entity : event.getLocation().getWorld().getNearbyEntities(event.getLocation(), event.getYield(), event.getYield(), event.getYield()))
crystalExploded.put(entity, true);
Bukkit.getScheduler().runTaskLater(Challenge.getPlugin(), () -> {
for (Entity entity : event.getLocation().getWorld().getNearbyEntities(event.getLocation(), event.getYield(), event.getYield(), event.getYield()))
crystalExploded.put(entity, false);
}, 10);
}
}
@EventHandler
public void onDamage(EntityDamageEvent event) {
if (event.getCause().equals(EntityDamageEvent.DamageCause.ENTITY_EXPLOSION) && event.getEntity() instanceof Player) {
if ((crystalExploded.get(event.getEntity()) != null) && (crystalExploded.get(event.getEntity()))) {
//damage is caused by crystal-explosion
}
}
}
idk tho if the yield is equal to the damage distance
okie thx
It's not. Yield is the % from 0.0 to 1.0 of how many of the items will drop
EntityDamageByEntityEvent
okay i can get the damager there
just check in that event, if the damager is the crystal
fml
yeah that should work xd
but i cant specify what entities to cancel the damage
@EventHandler
public void onDamage(EntityDamageByEntityEvent event) {
if(event.getDamager() instanceof EnderCrystal){
//damaged by crystal
}
}```
what do i do after i check if the entity getting damaged by is a player
event.setCanceled
cancels the explosion
oh nice idea
uhhh no
it sets the damage to 0
on all entites in the ender crystal's balst radius
how do i set 0 dmg on ONE entity?
hmm
why would you do that
you would set the damage to 0 for all entity, who are damaged by the explosion
thats what it does
players don't take dmg from crystals in peaceful difficulty
yea
well i still want the crystal to damage mobs
thats what you can do with what i sent
then just check if the entity who is damaged is a player :o
and letsgooooooooo
choco, you god damn bigbrain
well i still cant cancel the damage to only players
@EventHandler
public void onDamage(EntityDamageByEntityEvent event) {
if(event.getDamager() instanceof EnderCrystal){
if(event.getEntityType().equals(EntityType.PLAYER)){
event.setCancelled(true); // it damaged a player
} else {
//it damaged another entity
}
}
}```
obv
e.setCanceled cancel dmg to ALL entites
including mobs
whom are NOT players
it really doesn't?
thats not how it works
why don't just try it out? lol
i mean, it cancels the event only if the damaged entity is a player
i am testing
and the event obviously gets called for every entity that is damaged by an entity
soooo
no no noo
one crystal
can dmg MULTIPLE entities
yeah it can
yes
cancel the dmg to ALL
really
if you do it like i sent
hmm lemme test it
this one?
no
How do i send an ERROR to console
wait
/say error
^
nah
I mean like this type of error > [21:08:29 ERROR]:
ofcourse it does :)
XD
it does because choco is a cute smol bigbrain
XD
with chocolate in his hands ofc
okay and?
why is lax so weird?
i cant deny that
hes also pretty funny
yea
@simple garden explain to him lol
he insulted my german accent in vc
funny xd
well no that wasnt lax
nvm
guys. why is working with configurations so painful? ahhhhhh
hm wrong room
guys what is the best LOL agent
who plays lol lol
lol
(lol)
<>
tons of plugins use <> and %%
player.sendMessage(Challenge.getPlugin().getLanguageManager().getConfig().getString("command_wrong_syntax").replace("<syntax>", Challenge.getPlugin().getCommand("settings").getUsage()));```
tthat's literally the longest line i've ever seen holy god
i hate working with configs
can command usages actually have §-colorcodes?
if you sending the help usage to the player in the chat use &colorcode
I was thinking of using replaceAll to make a placeholder but I feel like there is a better way, any ideas? making a place holder for a click event. Thinking the place holder will be like %command: /<theircommand>%TEXT%/command%
Use chatcolor.translatealternatecolorcodes
i meant in the plugin.yml directly. like:
usage: "§c/settings"
put &c
but you still need chatcolor.translatealternatecolorcodes in your code
for it to work
oh wait
^
nah
my b
in config i don't use colorcodes by default, because people likely edit them
and that would mostly screw it
make a custom help command
tf
hm?
would be hell much of work, just for displaying default usages from the plugin.yml
i dont want a help command tho
here's what i do:
//Settings-Command
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
Player player = (Player) sender;
if (args.length == 0) {
initSettingsGUI(player);
} else
//send syntax
player.sendMessage(Challenge.getPlugin().getLanguageManager().getConfig().getString("command_wrong_syntax").replace("<syntax>", Challenge.getPlugin().getCommand("settings").getUsage()));
} else
sender.sendMessage(Challenge.getPlugin().getLanguageManager().getConfig().getString("command_no_player"));
return false;
}
i see now, i forgot to return false there lol
well, i probably just use custom usages directly from code
ItemStack stack = new ItemStack(Material.LEATHER_CHESTPLATE);
LeatherArmorMeta meta = (LeatherArmorMeta) stack.getItemMeta();
meta.setColor(Color.GREEN);
Cast the meta to LeatherArmorMeta
why does discord wreck like everything i paste? lmao
i didnt spoonfeed. because i dont even know if that works. just feels right lol
ctrl + shift + v 😄
Oh, I was missing some things before
Need someones opinion I have a BlockBreakEvent listener that checks if the block the player broke was inside a "claimed area" which in turn would cancel the event if the player is not allowed to build in that claimed area. Right now the code trys to find out if that block is inside a claim by checking each and every claim. Is there a better way to implement this because this can quickly get out of hand with 20+ players constantly breaking blocks with each their own claims possibly more than one.
What if a claim overlaps into several different chunks. Like its on the corners blocks of one and goes into a couple more?
Oh wait I think I see. I can check the chunk the player is in and only check that chunk and neighboring chunks for claims anything else is impossible for the player to reach. Didn't know you can get a chunk from Block
You only really have to check that chunk
You may want to use larger regions than a chunk, up to you
but what if the player is breaking a block from a neighboring chunk?
nvm im an idiot I can check block position rather than player position
i have no clue if this is the right place but i'm trying to compile buildtools and i'm getting this -
i'll try that after
oh md personally :O
no idea
If a plugin is relatively simple and should work across versions, do you need to do anything extra to make it run on newer versions?
If it’s all API, usually no
most plugins work on newer versions
Okay
except theyre using nms, or version-related stuff
Would it be a good idea to add the API versions it should work on in the plugin yaml?
To stop any potential warning of it being outdated
You can only have 1
Oh
well
if you want to support multiple version, you have to probably use extra code for every version
if its stuff that depends on a version
like 1.12 and 1.13+ compatibility
You can sometimes get away with reflection
if thats a better way... hmmmm
didn't java16 change the reflection api
idk
yeah it was one of them I thought so
this is how you know I was stuck on java8 along with minecraft for all these years out of habit
😂
denizen is somehow able to work with reflection and java 16 on latest dev versions
Have any new features been announced for the api? For 1.17
As long as they aren’t doing some cursed reflection into the reflection classes themselves
im missing my /dev/fd folder as well bruh
cant compile paper because of that either
tf happened to my pc
i have
public void onThrow (PlayerDropItemEvent e) {
}```
void has the error: Syntax error on token "void", record expected.
onThrow has the error: void is an invalid type for the variable onThrow
uhhh
you probably have a syntax error somewhere above that
this is the whole script for reference:
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.Event;
import me.croze.dropsareenchanted.Main;
public class DropCommands implements CommandExecutor{
private Main plugin;
public DropCommands(Main plugin) {
this.plugin = plugin;
plugin.getCommand("dropsareenchanted").setExecutor(this);
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
@EventHandler
public void onThrow (PlayerDropItemEvent e) {
}
return false;
}
}```
That applies to java in general
^
You don’t put a method inside a method
You should learn basic java before spigot
Java tutorial for beginners full course
#Java #tutorial #beginners
⭐️Time Stamps⭐️
#1 (00:00:00) Java tutorial for beginners ☕
#2 (00:20:26) variables ❌
#3 (00:32:58) swap two variables 💱
#4 (00:36:42) user input ⌨️
#5 (00:44:40) expressions 🧮
#6 (00:49:13) GUI intro 🚩
#7 (00:55:01) Math class 📐
#8 (01:01:08) ra...
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
thanks
native to spigot no
but i dont wanna coll
Well then make someone else do it
What's the cleanest way of having hundreds of custom items. I had two ideas, what one would be cleaner or does anyone else have a better idea. Either making an interface with stuff like the name, lore and item type or having an enum with like 10 different fields in it and using that.
In my opinion, an interface, because it is more scalable
^^
aight that's what I was gonna do, thanks
abstract class objects you can XD
you can't put eventhandler inside that and also your thing isn't even implementing listener etiher
also did you come from roblox
nvm
what even are interfaces
i see them every time in intellij every time i hit alt +ins idea but i never bothered to use them
hmm
for e.g.
public interface Behaviour {
void invokeBehaviour();
}
public abstract class Animal implements Behaviour {
private String name;
private int age;
public Animal(String name,int age) {
this.name = name;
this.age = age;
}
public String getName() { return this.name;}
public int getAge() { return this.age;}
}
public class Dog extends Animal {
public Dog(String name,int age) {
super(name,age);
}
@Override
public void invokeBehaviour() {
System.out.println("BARK!");
}
}
but then you can also make
for examples abstract class Machines implements Behaviour
too
and they would inherit those methods
its like for example saying
a Human is an animal
but they can have emotions and emotions are the interface in this case while animal is the abstract parent class
What’s new in spigot 1.17
Not much. The only change really is that you cannot access most of the JDKs internals anymore (com.sun.* and jdk.*), Though some exceptions exist like com.sun.Unsafe.
Another change that could affect things, though I don't know if it was promoted to stable yet or if it's still incubating, is sealed classes.
^^ this change will prevent you from modifying static final variables tho
Yea, you used to remove the final attribute from the field itself using reflection to access it
which is no longer possible as the Field is hidden inside a module
Which JEP is that change described in?
it is implied in the same one you referenced earlier ?
Oh I probably missed that
like if you follow this, you will note that it is reflecting into a jdk internal
which is no longer possible
J16 has got plusses too though. I'm super stoked for the record class type, and the foreign memory linker api, though that one still incubating :/
armor equip event soon
Yea don't get me wrong java 16 is lit. This reflection issue is rather specific to spigot/minecraft eh xD
Lynx: I'm curious if we're still able to do this using native code?
Since traditionally the jdk has been super lax about that, and will allow you to do anything really
Depends on where the security checks are implemented
but would be a fun thing to actually try
if that is possible, something like an "advanced reflection" jni would be sick
Especially with the new linker api
Since jni is well, a mess 😂
Might write a library though if we can't do certain things on the java side anymore, but we can on the native side 🤔
Yeah, a library to ease reflective access to the server internals might be pretty sweet
tho I think the bigger issue with static finals at this point will be the rather aggressive inlining
Oh that is a good point yeah
I dont know tbh how java does inlining, I know rust tends to be pretty aggressive
it is part of the JIT compiler (at least in HotSpot)
Static final is ≈ rust's const, where it is always inlined
tho I think java mostly inlines things like primitives
We'll have to see I think
What i didn't quite understand though, what is the change in the mapping things?
Will in 1.17 only the obfuscated names be used or?
no. Some variable name mappings have changed. I don't know if that is md_5 or mojang
how can i send packets in 1.17? xd
what magic do compilers do that de compilers cant do
i want to know so that i can minecraft
there is still EntityPlayer.connection.sendPacket
the fields are obfuscated
is it b?
you need to either use the obfuscated fields or build against a different set of maps
Ok, thanks
see the release post for info and how to do this for maven
ma confusion
I saw and read that post yeah, but was unsure if it already affects current builds
i rebased my local environment onto 1.17
and all the fields are still deobfuscated
welp
time to dig in
you rebased your plugin or spigot?
spigot itself
theyre deobfuscated on spigot, not the final jar
that's the trade off of the mojang maps --- you can only use them for dev
Things previously left unobfuscated, like sendPacket, are those still unobfuscated in the final jar?
unknown
Check
As long as I keep writing the nms code following a decompiled spigot jar I'm good I suppose😄
So realistically the mojang mappings can be used to develop against tho your plugin will need to be repackaged because mojang mappings may not be distributed. Sweet I guess 😅
Shouldn't affect those not using nms directly though I think
Like importing the packages
Those using reflection should be good
huh ? How so
I've got class now, will explains what I mean in an hour or so
the more important question is, will craftbukkit itself ever switch to mojang mappings 😅
and tbh using nms directly should work fine using the remapping example provided in the post
reflection might be a bigger issue
Hey can I get some help, I'm trying to test out my plugin on 1.17 so I need to make a 1.17 server. Only thing is I can't open the jar file. Im already on Java 16 yet my jarlauncher is on Java 15. Im on my mac. How do I update my jarlauncher to Java 16, does anyone know?
i haven't used a mac in 7~ years
I believe the Azul Zulu packages for macos will update the default java when installed but don't quote me on that
I mean I just use brew install openjdk then brew link openjdk
installing openjdk on windows is such a mess lmao
i everytime need to get it from some weird sources, because i'm too dumb to setup path stuff
So since reflection is evaluated at runtime, you call on the obfuscated field names, not the unobfuscated since they dont exist at runtime.
So, if you only do reflection, you only touch 'runtime stuff' and so don't even really need the mappings, nor do you need to reobf your jar :D
oh. Yes obviously if you wanna reflect against the obfs stuff then reflection is easier
Alright I solved it just by opening the jar manually from terminal
I thought we were talking about porting 1.16
which might somewhat work using the obfuscation maven plugin
when directly importing the NMS classes
while reflective access is not going to be remapped automatically 😅
I always avoid importing the classes directly due to the versioned shenanigans😅
I mean makes sense 😂 Quick "legal" question. When the mojang mappings talk about "development only/do not redistribute" wouldn't that put "running my own production server with a mojang mapped spigot" in somewhat of a gray area?
my interpretation is technically if you're profitting from your server then you're using mojang mappings for a commercial purpose, but ofc IANAL
Yeah seems like a rather gray area 😅 because tbh I do agree with the 1.17 post, the introduction of mojang mappings seems like another hurdle for NMS usage.
which imo is gonna leave spigot in a bit of a weird spot. If we actually want to properly replace a lot of the "wanky" NMS usage, that is gonna be a pain to represent in the API
dont. We dont support 1.8.9 here anymore 🙂
I agree with you
yet everyone seems to want the mappings
so this is effectively a try and see; and doing it partially with just fields helps it just being a try and see
i do wanna make a 1.8.9 plugin tho 🙂
I mean, I guess a lot of people believe they can just code against it
which they cannot
from our stance that's not a gray area at all. It's black and white not allowed.
I'm not sure about the mappings, honestly I was fine with the spigot mappings, they were fairly complete for what I ran into. Is the pressure from Mojang that big to use the new mappings?
well this will make that known then and we can look at reverting
@lunar schooner no the pressure is from everyone else
Ah
its probably the single most requested thing
I'd honestly prefer to use the spigot mappings for existing code, but use the mojang mappings for everything new added, but I doubt that is easily doable
I mean, the advantage of mojang mappings is obviously that they are complete
Except for function parameter names
(At least. for what I noticed)
Though I suppose those are missing currently too
Yea, don't think they are shipped. I guess the maven plugin itself should work somewhat. Tho I guess if people keep pushing for mojang mappings, spigot would need to look into how to provide/enable the more funky NMS things through API. Similar to like sendBlockChange
@eternal night there's no reason most things cant be in the api
I totally agree xD
the exception is of course generic packet sending
Just means a lot more contribution is needed
and the other exception is basically custom content that you cant add through vanilla and would traditionally be the domain of a mod
I might start contibuting to bukkit tbh, just havent had the time yet
still waiting for the NNY ItemStack#equals PR
I mean PDC worked out rather well as an API addition that isn't really "vanilla"
PDC worked cause it was isolated
so I guess the API has some nice space for some fun addons
Was more comparing how "vanilla" it feels
Is the EntityPlayer class removed at 1.17? If so we need to use Player and NPC instead?
Hm that might have some implications for plugins wanting to be compatible with both versions
Though I suppose nothing a little reflection wont solve
I can't even find the EntityPlayer class at helpch.at
import net.minecraft.server.level.EntityPlayer;
Thanks!
Oh, I thought you ment the Spigot version of entity player 😄
Btw, is there any chart somewhere to go between deobfuscated and obfuscated names?
if you check the release post it has the path to the text files in your maven repo
It isnt yet no, unfortunately
Hello, so I am trying to use the mappings on my environment and maven cannot seem to find the artifact in my local repository
Maven local repo https://gyazo.com/2c11f20c8151261fafcfbf4c0c242506
Maven dependency config https://gyazo.com/2deaac663b3c2d4a500940f104a01117
@radiant stag did you run buildtools
p.getPing
no NMS needed
no you need version and classifier
Yes, I ran BuildTools with 1.17 and the --remap flag
keep version as usual
add new <classifier>remapped-mojang</version>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-server</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>```
Oh, thanks that worked
I usually dont use maven in depth
i did the same and nothing worked
did you run buildtools --remapped
yes
java -jar BuildTools.jar --remapped --rev 1.17
The requested profile "remapped" could not be activated because it does not exist.
but seems every version has some obfuscated field and method name, and they may be changed when updating. You can import them directly but might calls the wrong method or access the wrong filed when you plugin is disign to be multiversion compatible
or am i wrong
seems like pretty much it
with --rev 1.17 obviously
what did i do wrong?
What are the advantages of using maven?
ok I need a class to super different things depending on a boolean in its constructor, how do I do this
is there any good sodution for multiversion compatible?
have code for multiple versions
just like before?
look into any reputable open source multiversion projects
out of interest - can you just do --rev latest?
Hi, I have a HashMap<String, Integer>, i want to add the key to an ArrayList<String>
If the Hashmap has Vinit, 9 then it will put vinit 9 times in the ArrayList
how do i do so
Hey, how do I set spigot to 1.17 in Intellij?
If u use the MC plugin, i dont think it has the option, try using maven
How?
for(int i=0;i<Map.getValue("Blablabla");i++){arrayList.append(Key)
no
okee
Hey, how do I set spigot to 1.17 in Intellij?
In maven
I know, but what about intellIj?
Import it
do you use maven?
as a dependency
md_5, how to fix the thing with mappings? I'm having this in my deps
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
with this i can't import anything i need
but without classifier it loads without mappings
i'm running BuildTools with this java -jar BuildTools.jar --rev 1.17 --remapped
ok so if I want a method to take any type/object as an argument, and return that thing back? If that's even possible
you cant import it because all the names are different if you use the mojang mappings
@keen kelp look up java generics
thanks
no
public static < E > void printArray( E[] inputArray )
in this example, E stores the type of the generic argument Im guessing?
you need to recode your plugin to use the mojang mappings
else just omit the classifier
Yes, looks like it
ok
I would reccomend it - if not you need to download from the link above and add it to project structure
i get this error, this is after going to 1.17 worked in 1.16 ofc.
https://pastebin.com/1d5PimYK
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
only mention in my plugin is this line
for (Entity ent : e.getPlayer().getNearbyEntities(4.0D, 4.0D, 4.0D)) {
ill just rebuild incase
I fixed world.nerby but not entity.nearby
ah
oh. Well then 😂 I guess it will be fixed by an upcoming commit
thanks md_5
my fav was right clicking my shrine and instantly crashing
its the fun update season 🙂
make allowed me to create monster line with no way to shorten it excepet shortening the name
its fixed, give it 5 or use --dev
I hate how you can't run anything before super and it just makes your supers so verboooose
this was in the crash btw
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
which wasnt true
well the Array has length of 0 (nothing in it)
lengths 3 and
and you tried to access it
i was able to confirm that
did you log right before that line or
thing is the bounded scroll wil not work if there was no shrines in the list
but it did
just trying logging man
log all the data you might need and you might just find the problem
i have debug logs for this kind of thing so yes i did debug
says it was in fact registered
to that list
until i right click the shrine and get that
and instantrly crash
what about the list's size
I'm getting an instant server crash with the same error as Fahlur, but its with opening custom inventories
worked fine on Spigot 1.16.5. very confused
you guys working on 1.17?
yes
Yes custom inv seems have some problems when open it
then I have no idea
i made this plug back in 1.13 and updated since
might be spigot's fault
some of the configuration is missing in spigot.yml, do I have to add them myself? (sorry for posting here #help-server is quiet).
we devs not admins lol
lol
just wonder if anybody knows
I've never seen the entire server crash like this before, it's kinda impressive
and there fact ive been updating that particular plugin since 1.12
Same, just with 1.13
try spam pinging md_5 and he might just fix spigot just for you
lol
the description of the error is ticking entity...
yes
^
sigh then i can stop testing for now. until more patches are made LOL
yeeeeeeep
do we report this somewhere? or assume that he knows?
rip
im happy at least my library and a few plugins work fine
for now imma just use viaversion to support 1.17 on my server XD
but like 6 of them i cant even test till certain plugins update
yea i did that with via version
wait is viaversion OpenS?
so now we need to use a remapped jar for development and remap it to the original spigot compatible one in the build processes?
I suggest waiting
wait for wut
yea im waiting. theres an nms class here that things dont make sense even for versioning
im glad I was able to even do a rough test tbh
will the things be changed? hasnt it been released?
it has bugs
ahem
Cyberpunk 2077
ahem
personally should of known better on initial release
i also wish this system will be more decent
are there anticipated any big changes in newest api? or it's safe to use?
apparently custom inventories crash ya
theres a huge changes on nms
let's just wait
i don't care about nms right now
I care about api because i want to start development on newest version
which may cause many things even become difficult
generally no
as i thought
some plugin is deeply rely on nms
and this update may result in some big issue or difficulty on development
I wouldn't use 1.17 right now. wait for the bugs to be patched
I know Ill have to do a lot of NMS work, but Mini's mappings haven't yet been updated :/
¯_(ツ)_/¯
oh thank you
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
Is what I have for 1.16.5, but 1.17 nor 1.17.0 dont wokr
In regards to 1.17 spigot
Is it well better optimized or is it still bad? like 1.8 optimized. Does it finally use multiple cores?
have there been api changes?
Is the maven repo out?
its 1.17 not 1.17.0
tank you
It's better then the versions that follow
it is lightweight, yes, but it's not optimized
To get the inventory fix do I need to run buildtools with --dev or --rev ?
I'm aware of that
but it still runs smoother
What happened to field names? Why are they obfuscated, everything was so nice until now, what happened?
it probably isn't
Does it use multiple cores?
it almost certainly runs worse
is it planned
Probably no newer version than 1.8 will be as smooth given how every newer version will have more and more content
I think you should use --dev
yes, all minecraft server versions since like 1.2 or something use multiple cores
and yeah, the jig is that doing stuff takes time
a version that does less stuff will use less time
a version that does more stuff will almost without exception use more time, that is, be slower
yeah that is false
the minecraft server by default has probably like 50 threads
of course that doesn't mean that everything happens in parallel or concurrently
its complex
whats the goals of the nms changed this time?
for example on paper, chunk loading and generation is on its own thread
light has been on its own thread on vanilla for a few versions
chat happens on its own thread, and like that says, networking uses multiple threads
if you mean whether the main tick loop uses multiple threads, it does not, and it never will
That's fine, spreading the load across multiple, but I mean the whole processes across 8 or how many can be used
threading is difficult
What and stuff is nothing
that doesnt say how actually hard it is
its even hard to explain
if the underlying server is parallelized, bukkit needs to be rewritten
I know but it would fix all the downsides of newer spigots. Making it a million times more optimized then any other version
it would be easier to make a big serever actually multiple servers
some things happen faster single threaded
Bungeecord
tbh the amount of syncing that would need to go into the server to still create a vanilla gameplay might just slow it down
It could even slow down the server, due to spinlocks
imagine a 2b2t that what does in the inside is multiple servers with bungee
you look like a typical 1.8 guy who goes blindly after buzzwords like "async" and "multi thread"
I dont
without knowing what they do or the difficulty or downsides involved with them
I just use it because it's what people who pvp like and use + its lightweight and i'm not going to use the new features
you made the list smh
your denomimation will be "async multithread spigot"
no
It will be "better optimized" and stack up in tests
When I try to compile the dev version , I have this error
@patent quarry yeah was just fixed
Thank you 
Ok off the optimization thing. What about the other two question I had?
have there been api changes? What has been added / changed?
Is the maven repo out?
rip the //CraftBukkit private -> public comment 😭
If I have a class extend itemstack, I can just take an ItemStack and instanceof to see if it's my custom item right
frick
@eternal night dont need the comment for my own commit since Ive already added the mapping for the next ver
the md_5 powers every wishes they had 😭
is there a way to run stuff before super?
Ok so just the new entities, blocks and stuff like that, as expected.
there is no way, no
in the constructor, anyway
the best you can do is a static factory method that does stuff and then calls the constructor
I want a class that extends ItemStack to super a different arg depending on its constructor
you probably don't want to extend itemstack
lmfao
oh?
"unless explicitly specified the bukkit api classes shouldn't be extended or implemented" and blah blah
What is a marker?
you can click through it
no one can kill it
it's a marker
it's there
but if you make it invisible nobody would know it's there
basic concept is that, where people prior used things like area potion effects or amor stands
these entities perform no logic when ticking
Like Holigrams?
I don#t think they are rendered
Is it something I can get if I launch up 1.17 for the first time rn?
more like, marking locations etc
or to display text
or is it like a debug / qol / region marking thing / holigram
make it display custom name, give it a custom name, make it marker + invisible
boom text
What does it look like if its not?
the marker ?
an armorstand
the marker is literally not rendered
no nbt tags are respected on it (besides data tags)
nothing happens with the entity
made this with a marker invis armorstand
wait you guys talking about the vanilla marker or
nvm lmao
idk
yeah
I've never played 1.17
ooo
nor do I even play minecraft
I just make plugins I never play survival or servers or anything
yea nah it is it's own entity. As a matter of fact it is not even send to the client
Aight
ooh what is it for
for marking things
thanks
these
Do Markers emit light???
big move for world gen
i skipped half way through the video and saw a java edition player mention light 😭
there is a new block called light
from bedrock?
yes i think it is also in bedrock in a simpler form
I mean, idk if bedrock has it
thats really nice
/setblock ~ ~ ~ minecraft:light
is it used in play? or something for fun mojang threw in
it was in the snapshot
i havent kept up
mapmaker tool
unobtainable in survival
and you can right click it with a light item to change its light level
so markers do nothing, except mark as a position of an entity?
do they have entity attributes?
they mark a position
pretty sure no
they're used for commandblock and custom map fucknuggetry
but none of the things stored in them translate into gameplay effects
what is their purpose if I cant attach a pig to it and give it 100 vertical velocity
basically stuff that you don't need to worry about as a developer
just give the pig 100 vertical velo
it's a crutch for the noob map makers who stick to command blocks
problem solved
it is the poor mans version of ```java
final Location location = ...
ahhhh i understand
yep
command block map makers
light blocks will be instrumental though
glad to hear theyre here
no use to devs?
yeah, light blocks will be great
no
can they have multiple light levels?
yeap
or are they bound to 15
video says you choose
hmm
what percentage of servers do you think, a year from
perhaps my custom raycasting light engine will be possible now
since even with commands
now, will use 1.17+
without the use of enermous protocol hacks
giving yourself a light level 1000 light is still 15
Does 1.17 still SUPPORT java 8 or do I NEED 16 and does 11 work?
you tryna do server-side ray-tracing?
you need java 16
You need java 16
to run a server
ok
So in my Pom
Do I need to set the target version to 16?
And my project structure needs to be updated to 16?
yes
what structure change o.O
your project layout has little to do with the java version
I think he meant in intellij?
oh speaking of which
today is the day I finally decide to switch to intellij from eclipse
how bumpy is the ride?
java is very compatible in the backward direction
not really
Well, intellij doesn't really have the concept of a "workspace"
you could compile your shit in java 6 and it'd work fine on 16
but you are gonna be a lot happier
so you only really have one project open in a window at a time
oh no fun
It's not necessary, but if you want to use the latest java 16 features, yes
Which you will want to 😏
ill deal with it, I always get distracted by my thirty unfinished projects in the tab anyways
gl
little to nothing has been added since java 8 that I feel I need
record classes are crying
vars, diamond notation for anonymous classes, some matcher/collection utils
but thats about it
b-b-but garbage collector making my 4gb memory feel like 5gb
yeeeah but that's a runtime thing
Good choice
it's a 25% improvement
i can compile for 8 and run on 16
35% feels like nothing when youre still poor in the end
There's so much more than that man :/
Well that's up to you, but when you get more advanced you would be glad that you've gotten used to the never features.
real men write their own http client
i'm a pretty advanced guy
don't doubt my advancement
real man be living in that mom's basement xD
I use maven and I try to do entitytype.axoloty and it’s not finding it? Do I need to update maven or?
and take like half a year to recode what already exists before even starting the actual project
did you update your API to 1.17
I can only if you don't see the obvious advantages of 16 over 8
the dependency
Not sure where I specify to update
in your pom.xml
i use a 10 year old browser
i'm going to use a 10 year old version of the language, too
Masochrists are interesting people