#help-development
1 messages · Page 41 of 1
then return a value i have in async
(now, ive done this before, just thinking of different ways to do it)
couldn't i just make a callback pattern
or a method with a Consumer parameter
still times them out 😦
@vocal cloud Finally watching that video now... the reason im using NMS is because I want to do custom stuff with beehaviors, pathfinders etc at some point
how could you generate a world on another thread
you cannot
Question about remappings:
If im wanting to support 1.19 and 1.19.1, do i need seperate modules for both 1.19 and 1.19.1 remapped? Or can i get by with only using one of either or?
yes
Is ArmorStand#getItem supposed to return null after setting it to null with Armorstand#setItem(). It returns null even though the API is annotated with @urban grotto
public void useToplist(Consumer<Toplist> action) {
CompletableFuture.supplyAsync(this::fetchToplistFromDatabase).thenAccept(action);
}
private Toplist fetchToplistFromDatabase() {
...
}
Or if you want the action to run on the spigot thread
public void useToplist(Consumer<Toplist> action) {
CompletableFuture.supplyAsync(this::fetchToplistFromDatabase).thenAccept(toplist -> {
Bukkit.getScheduler().runTask(yourPlugin, () -> action.accept(toplist));
});
}
private Toplist fetchToplistFromDatabase() {
...
}
Mostly due to runtime size, but the thing is runtime is on central, plugin.yml time
public void getMyString(Consumer<String> callback) {
Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), () -> {
// do some database stuff here
callback.accept("This is my database data");
});
}```
Like this
oh ok interesting
thenAccept
is that on the main or async thread?
Hey @lost matrix
This function you sent me:
public static String toNbtString(Entity bukkitEntity) {
CompoundTag tag = new CompoundTag();
((CraftEntity) bukkitEntity).getHandle().saveWithoutId(tag);
return tag.getAsString();
}
Is there a way to only get my custom tag? or would I have to split the string and all that
shit
thenAccept will run on the fork join pool here. So on a different thread.
ok
You could even write a Plugin in Clojure. Not that you ever would want to
You can use the CompoundTag. Look at its methods. Its basically key:value storage.
Hey a silly question, if i have a domain therifty.net would I put net.therifty in groupid?
im always confused with it, and just put me.therifty
so thelooter.de would be de.thelooter, minecraft.something.org would be org.something.minecraft
thats fine too
only use a domain prefix if you actually own the domain
i do
yes i know
In theory you could put everything there, its just established that you use either your domain or me.blabla if you don't own one
ah ok 😆
why does this crash?
Well almost everything, as long as it's alphanumeric
you provided no server logs or anything
the artifactId does allow all Unicode Characters tho
cant help yall
It does not crash but times out the players
Think I seen someone mention it here the other day, and I know this question isn't really in the scope of the channel, but do you use stripe or paypal for receiving payment? I've always used paypal although looking to change up how I've been doing things and wondering if stripe is a better alternative
hi yall, im working with a SQLite database, and im trying to read/write custom objects in my plugin to the database. here's the snippets of code I have written:
// for saving the object:
public void addPunishment( NPunishment punishment ) {
PreparedStatement ps = ConnectionManager.CONN.prepareStatement( "INSERT INTO " + TABLE_NAME + "(player, data, guipun, reference) VALUES(?, ?, ?, ?);" );
...
// Here is where I save the object
NPunishmentData data = ( NPunishmentData ) punishment;
ps.setObject( 2, data );
...
}
// for getting the object:
public List<NPunishment> forceGetPunishments( String playerUuid ) {
PreparedStatement ps = ConnectionManager.CONN.prepareStatement( "SELECT * FROM " + TABLE_NAME + " WHERE player = ?;" );
...
ResultSet rs = ps.executeQuery();
while ( rs.next() ) {
// Here is where I get the object and is also where the error below is happening
NPunishmentData data = ( NPunishmentData ) rs.getObject( "data" );
}
...
}```
Here's the error I keep getting, though:
```java.lang.ClassCastException: class java.lang.String cannot be cast to class com.github.cyberryan1.netunoapi.models.punishments.NPunishmentData (java.lang.String is in module java.base of loader 'bootstrap'; com.github.cyberryan1.netunoapi.models.punishments.NPunishmentData is in unnamed module of loader 'Netuno-1.5.0.5-DEV.jar' @280097f5)```
It looks like it's saving it as a string, even though it shouldn't be. Any clue as to why and how to fix it?
Why wouldn't I
If I want to I will use clojure
#help-server would have better information on this
Fuck It clojure time
yeah possibly, although I meant from a freelancing perspective (i.e invoicing or however you deal with accepting payment)
i mean
i think youre capable to weigh the pros and cons
it really just comes down to fees and how much you take home
almost everyone has paypal
fees are pretty much the same, I'm asking more about experience with both companies. I've never had a problem with PayPal so I don't see much reason to switch, just wondering if anyone had anything good to say about stripe
You're probably gonna hate yourself in about 69 Minutes and 42 Seconds
Lisp the great
@vocal cloud Yeah.. even nbt tags get completely wiped along with PDC... is there a way to do behavioral/pathfinder stuff without nms?
You're gonna get biased answers in here ngl, and you can still use nms iirc
?whereami
@lost matrix Do you know if its possible to overwrite methods from BeehiveBlockEntity.class...? I need to prevent this from happening somehow:
https://i.gyazo.com/de4f4b966518b9dee53a80f240af335c.png
You’d have to try and figure out a way to register over the existing tile entity
Though I mean… inevitably going to break something
lol that too I guess is an option
Wait wut
I mean that loop should only remove tags it’s specified
So custom ones not in said list should stay
you'd think so..
but....
it completely loses my custom tag
@Override
public boolean save(CompoundTag nbt) {
boolean returnVal = super.save(nbt);
nbt.putString("bee-uuid", uuid.toString());
return returnVal;
}
@Override
public void load(CompoundTag nbt) {
super.load(nbt);
String beeUUID = nbt.getString("bee-uuid");
this.originalBeeUUID = UUID.fromString(beeUUID);
}
Unless my load method is wrong
why is it printing sus but not sending the action bar
Well.. nah its fine but its not a CustomBee once it leaves so that data is byebye.
what is sendactionbar
Player list
show
private List<Player> sendActionBar = new ArrayList<>();
where are they being added
@worldly ingot If I do away with NMS entities for this, could I still do behavior stuff without?
what entity type are you registering it with
CustomBee..
It might be trying to create the bee back from the original entitytype using the factory
hm
its just spawning as a normal bee without any of my custom stuff.
I mean yeah but
and theres currently no way to reference it.
show your full class's code
you are registering a custom entity type in the registry right?
yes
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Mike spent hours working on this and wasnt able to find a solution either
?
public static EntityType<Bee> GANGSTA_BEE_TYPE = register("gangsta_bee", EntityType.Builder.of(GangstaBee::new, MobCategory.MISC).sized(0.5f, 0.5f));
public static void registerCustomBee() {
String typeName = "custom_bee";
EntityType.Builder<Entity> builder = EntityType.Builder.of(CustomBee::new, MobCategory.CREATURE)
.sized(0.7F, 0.6F)
.clientTrackingRange(8);
Registry.register(Registry.ENTITY_TYPE, typeName, builder.build(typeName));
}
registring
returns an entitytype
pass it on the constructor
you're registering the custom type but you're not using it anywhere
uh...
public CustomBee(CustomBee customBee, Location location, String beeName, Boolean isBaby)
thatt..?
Would that even change anything...?
you gotta make that 2-arg constructor
for nms to realize it's a custom entity type apparently
it's stupid
This one
public CustomBee(EntityType entityType, Level level) {
super(EntityType.BEE, level);
}
its in there
instead of BEE
public CustomBee(EntityType entityType, Level level) {
super(this, level);
}
this is all IN my CustomBee class
so its just an enum then
it's not necessarily an enum
InternalsPlugin.GANGSTA_BEE_TYPE this
because nms's EntityType is not an enum
it's treated in a similar way
but use your custom entity type
that you're registring
instead of passing bee
okay
I got a big big issue 👀
So if I use Chunk#load works but it doesn't load their entities.
are you messing with region files?
No
that was my only guess honestly ¯_(ツ)_/¯
because entities aren't contained in region files
they have their own folder
How may I load chunk's entities without needing the player to load the chunk?
Or, at least how may I know which entities are inside a chunk even though they are not loaded yet
Just by sticking with Bukkit && Spigot API
that last message really made me unhappy
You can explore unloaded entities by going through nbt
I guess you can use a plugin like nbtapi
^ that's on the entities folder
files are labelled r.<x>.<z>.mca
where the x and z determine a 512x512 area
r.0.0 will be 0,0 -> 512, 512
r.1.0 will be 512,0 -> 1024,512
type thing
So there's that
You won't have a spigot native entity because it isn't loaded
but you'll have all its data
including all the positioning stuff
I hate NMS
nms is gangsta stuff
how else would I know the exact behavior of what happens when you eat chorus fruit
From what I understood, NMS equals extra time since you will need to use an interface and implement it through each version that breaks.
or you can just refuse to support older stuff
if you're working on a project that's only meant to run under specific conditions
it unlocks a lot
There's only so much spigot can do
Past a certain blurry line, extra stuff relies on nms
Bukkit's design is against exposing implementation details like mob behavior and NBT, for example
I know. The only thing I find attractive about NMS are those faster methods of placing blocks (even if they don't update lightning). Other than that I'm happy writing around a bubble that's also written around another bubble lol
NMS isn't just fast block placement
It allows you to mess with entities in a deeper level
And lots of other internals
Want to know how much saturation an item type in specific provides? nms has that
Or register a custom entity? Maybe make a skeleton fly up like a chicken?
sike chickens don't fly up
You can also mess with mob collisions
so they consider a specific block or region as a wall
these are all very specific things that spigot wasn't made for
because no server just decided "ayo this air block? well I don't care what you see, this zombie should treat it as a fence"
it doesn't make logical sense
but then there are mfs like me
that decide to make fake blocks
and expect entities to collide with them
Hey just wondering if anyone has a good resource for very lightweight floating text (or hologram) creation and deletion without using any external libraries. In my plugin I will be creating and deleting many of these every few seconds so just wondering if anyone knows of a good way to do this that uses a little of resources as possible :) Thanks!
Does "no external plugins" also exclude ProtocolLib?
if possible yes
Do you need multi version support?
no only 1.19
Then using nms:
Creation:
- Create nms ArmorStand instance (but dont spawn it)
- Change metadata of ArmorStand (visible text, invisible body, marker etc)
- Send spawn packet for this ArmorStand to all players
- Send metadata packet for ArmorStand to all players (using its datawatcher)
Deletion:
- Send destroy packet with the entity id of the ArmorStand to all players
Thank you, very much appreciated :D
I haven't done too much with nms so this was very useful.
@echo basalt
Caused by: java.lang.IllegalStateException: Registry is already frozen
at net.minecraft.core.RegistryMaterials.e(SourceFile:365) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3558-Spigot-2183145-401f1ad]
at net.minecraft.world.entity.EntityTypes.<init>(EntityTypes.java:309) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3558-Spigot-2183145-401f1ad]
at net.minecraft.world.entity.EntityTypes$Builder.a(EntityTypes.java:668) ~[spigot-1.19.1-R0.1-SNAPSHOT.jar:3558-Spigot-2183145-401f1ad]
at com.squallz.cadiabees.utilities.CustomEntityRegistry.registerCustomBee(CustomEntityRegistry.java:15) ~[?:?]
public class CustomEntityRegistry {
public static EntityType<Bee> CUSTOM_BEE_TYPE = registerCustomBee("custom_bee", EntityType.Builder.of(CustomBee::new, MobCategory.MISC).sized(0.5f, 0.5f));
public static <T extends Entity> EntityType registerCustomBee(String id, EntityType.Builder type) {
return (EntityType) Registry.register(Registry.ENTITY_TYPE, id, (EntityType<T>) type.build(id));
}
}
uh
Registry is already frozen
Yes
of course nms does this stupid shit
called what
That the reg would be frozen
What does that even mean
cant we just
Means that the registry phase is complete. You can't register anything
unfreeze it
you should not unfreeze it
should
Yes, but that's probably not a great idea 
definitely do not unfreeze it
he did
but you cant register it
I mean
yeah
imagine if freezing the registry turned everything into an immutable collection
soooo... where should I unfreeze it...
ugh
let's hope it dont crashy everything
Sadly an easy fix to his issue is just to remove the UUID wipe from the beehive entity
I know nothing about reflection other than its a mirror image of an object in front of it.
But that requires a custom spigot version or making your own beehive entity
here
a watered down version of an "EntityType" pattern i made
I have an entity called IronBee
but i am begging
why wont a skull update to its owner?
did u set the item meta
How is that different from what I have already
yes I know it worked before but now I canceld the interaction and block place event since then it wont update
hmm
i tried updating it instantly I tried updating the inv 1 sec later idk what to do
java generics make me wanna cry
so good yet so annoying
err
look at your code
look at my code
your code tries to register with the nms registry
he uses the builder
my code has its own little lightweight registry
I mean when the server restarts is the type kept? I've seen a lot of people complaining it isn't
my code also doesnt use the builder pattern, i didnt need to use it myself
If I dont have to register than it shouldve been working before
what was before?
you dont need to register custom entities to the registry
because also, if the client detects an entitytype that is not part of the client registry,
heh
it will disconnect them
The issue was that the bee was no longer a CustomBee once it exited the hive
and it lost its pdc and nbt data.
You need to create a custom hive entity.
That'd allow you to fix it
Why not make a fake beehive where you can store the bee how you want it
we should all gets jobs at mojang and just fix it ourselves
Indeed. Add a native modding API
public static @Nullable Entity loadEntityRecursive(CompoundTag nbttagcompound, Level world, Function<Entity, Entity> function) {
return (Entity)loadStaticEntity(nbttagcompound, world).map(function).map((entity) -> {
if (nbttagcompound.contains("Passengers", 9)) {
ListTag nbttaglist = nbttagcompound.getList("Passengers", 10);
for(int i = 0; i < nbttaglist.size(); ++i) {
Entity entity1 = loadEntityRecursive(nbttaglist.getCompound(i), world, function);
if (entity1 != null) {
entity1.startRiding(entity, true);
}
}
}
return entity;
}).orElse((Object)null);
}```
private static Optional<Entity> loadStaticEntity(CompoundTag nbttagcompound, Level world) {
try {
return create(nbttagcompound, world);
} catch (RuntimeException var3) {
LOGGER.warn("Exception loading entity: ", var3);
return Optional.empty();
}
}```
public static Optional<Entity> create(CompoundTag nbttagcompound, Level world) {
return Util.ifElse(by(nbttagcompound).map((entitytypes) -> {
return entitytypes.create(world);
}), (entity) -> {
entity.load(nbttagcompound);
}, () -> {
LOGGER.warn("Skipping Entity with id {}", nbttagcompound.getString("id"));
});
}```
as you can see
you owuld need to override the hive loading stuff
Is that possible
im unsure
it fetches the entity type by the tag compound
that's the yiffy part
YIFF??
LMAO
bro ive changed my code like 40 times im tired mentally 😭
Furry confirmed
reminds me of when I tried getting island loading on my skyblock core
chunks werent being sent
You dug this grave now you must lay in it
definitely should be saving with persistent data
How would you design a class command framework using method with annotations?
I need ideas
this is a situation where u quite literally will only have with bees
Like I said. You either do custom beehive behavior or figure out if you can make s custom beehive entity
well the hive is a block though not an entity
It's an entity. It's called a block entity
tile entity
I'm not at my PC but I showed you the class in the video I sent
Tomato tamato
Yeah but how do you override the core one
No clue if you can
And how would I tell the game that the beehive I just place would be my custom one?
ofc there's a fucking registry for beehives as well
I mean it's the block registry
but what if
we override the registry value
without adding a new value
and we toss in an extension of BeehiveBlock
that just has a tiny change
ends up to about 30 cents / hour ^
Yeah, I think the best course of action is to pretend to have the bee enter the hive and instead make it enter some database so it can be stored properly
Like a sql thing?
Sure
hive?
Bee has already lost the info required to track it by then
it should be saving PDC
It does if it's not a custom entity
I already have enough experience modifying stuff and injecting it
And I need it to be an NMS entity to control behaviors
wdym lmao
Dude try it
weve both tried this.
Don't wdym me I tested it
does CustomBee extend Entity though?
Test it yourself
it aint my project lmfao
im looking at the code
it says it should be saving
if you guys say "it dont work" without actually trying to solve the problem
My guy
we've been working on this for days
multiple of us have tested just about everything
I've tested it myself. It doesn't save
Dude you can look at all the code you want
public void addOccupantWithPresetTicks(Entity entity, boolean flag, int i) {
if (this.stored.size() < this.maxBees) {
if (this.level != null) {
EntityEnterBlockEvent event = new EntityEnterBlockEvent(entity.getBukkitEntity(), CraftBlock.at(this.level, this.getBlockPos()));
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
if (entity instanceof Bee) {
((Bee)entity).setStayOutOfHiveCountdown(400);
}
return;
}
}
entity.stopRiding();
entity.ejectPassengers();
CompoundTag nbttagcompound = new CompoundTag();
entity.save(nbttagcompound);
this.storeBee(nbttagcompound, i, flag);
if (this.level != null) {
if (entity instanceof Bee) {
Bee entitybee = (Bee)entity;
if (entitybee.hasSavedFlowerPos() && (!this.hasSavedFlowerPos() || this.level.random.nextBoolean())) {
this.savedFlowerPos = entitybee.getSavedFlowerPos();
}
}
BlockPos blockposition = this.getBlockPos();
this.level.playSound((Player)null, (double)blockposition.getX(), (double)blockposition.getY(), (double)blockposition.getZ(), SoundEvents.BEEHIVE_ENTER, SoundSource.BLOCKS, 1.0F, 1.0F);
this.level.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, Context.of(entity, this.getBlockState()));
}
entity.discard();
super.setChanged();
}
}```
It doesn't work
do we agree that it calls entity.save?
Shut up
Lmao
You're useless
this guy..
have you actually looked at the nbt of the block entity?
we can try to diagnose if its not saving or if its not loading
I looked at the bees info too
you guys dont understand what im saying
if its not working
its a bug with spigot
it's an nms thing
and we need to account for it
not even spigot
It's saving. It's not loading
I found a hacky way to get custom tiles working
oh ok
It respawns as a Bee not CustomBee
well thats cuz it uses the EntityType
and theres no way to know what it is
it creates the bee from the EntityType
not the class or whatever
im saying the PDC should be saving/loading
thats my point
entity losing its original class is perfectly normal (intended) behavior
Yes but it doesn't. Feel free to try
Actually recreate my situation to see if the solution works
Cause no disrespect, ive tried tons of different things and nothing works
and... I dont really wanna mess with more getting my hopes up over and over to be disappointed
you guys dont understand im encouraging you guys to open a bug report
if the pdc isnt saving/loading
thats a big problem
It works on vanilla bees so that's the confusing part
pdc?
does pdc work?
can i see your CustomBee getBukkitEntity @carmine nacelle ?
I gotta revert to my previous code stuff
Yes PDC works on vanilla bees only.
Ok great, so now we can start diagnosing why it doesnt work on custom bees
Is there an event for when an item is added to the player's inventory? I've searched the docs and couldn't manage to see anything? :) thanks!
looking at the code, theres no magical class checks or anything
its literally just calling methods from the Entity type
declaration: package: org.bukkit.event.entity, class: EntityPickupItemEvent
the entity type is fetched from nbt
from the registry
that we can't modify
yes i said this
That is helpful, but I believe that this is only fired when a player picks up an item, what if the server 'rewards' the item by placing it directly in the inventory?
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
behold, custombee
Damn, would've though there was an event for that.
never listen to your own events!
Command framework help
holy fuck I never thought injecting into the registry would be this janky
there are like 15 fields
I gotta modify all of them
Wait that's not the custom bee I remember
its the original
It might slightly vary from last nights cause ive changed it a lot..
Sorry I'm a java noob, what exactly is abstraction and interface?
(I have experience in other languages, but trying to help my friend make plugins)
Oh well that's not going to work properly cause you screw the saving
im not really here to teach java, sorry
he calls super
someone else may help
?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.
are we sure that PDC doesnt work with this version?
which value
Any value you apply to the PDC is removed
public void setBeeUUID(Entity bee, UUID uuid) {
NamespacedKey beeUUIDKey = new NamespacedKey(cadiaBees, "bee-uuid");
bee.getPersistentDataContainer().set(beeUUIDKey, PersistentDataType.STRING, uuid.toString());
}
public UUID getBeeUUID(Entity bee) {
NamespacedKey beeUUIDKey = new NamespacedKey(cadiaBees, "bee-uuid");
if(bee.getPersistentDataContainer().has(beeUUIDKey, PersistentDataType.STRING)) {
return UUID.fromString(Objects.requireNonNull(bee.getPersistentDataContainer().get(beeUUIDKey, PersistentDataType.STRING)));
}
return null;
}
alright, and how do we use these two methods?
im seeing no indication as to why the PDC should not be loading unless im missing something obvious
@EventHandler
public void hit (EntityDamageByEntityEvent event) {
if(event.getDamager() instanceof Player) {
if(event.getEntity() instanceof Bee) {
pdcManager.setBeeUUID(event.getEntity(), event.getEntity().getUniqueId());
Bukkit.broadcastMessage("PDC SET");
}
}
}
@EventHandler
public void beeExitHive(CreatureSpawnEvent event) {
if(event.getSpawnReason().equals(CreatureSpawnEvent.SpawnReason.BEEHIVE)) {
if(event.getEntity() instanceof Bee) {
Bukkit.broadcastMessage(pdcManager.getBeeUUID(event.getEntity()).toString());
}
}
Nothing outputs
how can i get a list of all the armor stands inside of a world?
try calling BeehiveBlockEntity#saveWithoutMetadata
and debug that compound
see if the entity's are saving with BukkitValues
Where
BeehiveBlockEntity is a nms class
yes but where am I calling that at
hmmmmm....
heh
I tried Beehive block and blockdata, savewithoutmetadata isnt an option
It's different in mapped?
Nvm im dumb
@glossy scroll How can I cast the block to BleehiveBlockEntity?
Tried normal, data and state
Uhh i believe theres a GetBlockEntity in nms block
I assume you mean search for..
@carmine nacelle
yes?
How would I be able to make it so that when its on top of the gold block it clears rn it works but I have to throw 2 blocks in order for it to clear
for (Entity ent : e.getEntity().getNearbyEntities(3, 3, 3)) {
if (ent instanceof Item){
Item i = (Item) ent;
if (i.getItemStack().getType() == Material.SAND){
if (i.getLocation().getBlock().getRelative(0, -1,0).getType() == Material.GOLD_BLOCK)
ent.remove();```
@glossy scroll
new BukkitRunnable() {
@Override
public void run() {
CraftBlock craftBlock = (CraftBlock) ((CraftBlock) block).getHandle();
BeehiveBlockEntity beehiveBlockEntity = (BeehiveBlockEntity) (((CraftWorld) block.getWorld()).getHandle().getBlockEntity(craftBlock.getPosition()));
beehiveBlockEntity.saveWithoutMetadata();
}
}.runTaskLater(cadiaBees, 20);
class cast exception
u sure its a beehive
@EventHandler
public void beeEnterHive(EntityEnterBlockEvent event) {
if (event.getEntity() instanceof Bee beeEnteredHive) {
if (!event.getBlock().getType().equals(Material.BEEHIVE)) {
return;
}
if(pdcManager.getBeeUUID(beeEnteredHive) == null) return;
Bukkit.broadcastMessage("Enter: " + pdcManager.getBeeUUID(beeEnteredHive).toString());
if(!(beeEnteredHive.hasNectar())) return;
Block block = event.getBlock();
new BukkitRunnable() {
@Override
public void run() {
CraftBlock craftBlock = (CraftBlock) ((CraftBlock) block).getHandle();
BeehiveBlockEntity beehiveBlockEntity = (BeehiveBlockEntity) (((CraftWorld) block.getWorld()).getHandle().getBlockEntity(craftBlock.getPosition()));
beehiveBlockEntity.saveWithoutMetadata();
}
}.runTaskLater(cadiaBees, 20);
CustomHive customHive = hiveManager.getCustomHiveForBlock(block.getLocation());
if(customHive == null) return;
//Stop foreign bees from entering the hive
if(!(customHive.getBeeUUIDs().contains(pdcManager.getBeeUUID(beeEnteredHive))) || customHive.isBeeBeingRenamed()) {
event.setCancelled(true);
return;
}
hiveManager.addRandomReward(customHive);
if(customHive.getHoneyAmt() < customHive.getHiveLevel().getMaxHoney()) {
hiveManager.setHoneyLevel(customHive, customHive.getHoneyAmt() + 1);
} else {
hiveManager.setHoneyLevel(customHive, customHive.getHiveLevel().getMaxHoney());
}
}
}
yea
what is it trying to cast from
if youre getting a class cast exception
lmao
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.UUID.toString()" because the return value of "com.squallz.cadiabees.managers.PDCManager.getBeeUUID(org.bukkit.entity.Entity)" is null
at com.squallz.cadiabees.listeners.BeeEnterHiveListener.beeExitHive(BeeEnterHiveListener.java:91) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.19.1-R0.1-SNAPSHOT.jar:?]
... 21 more
[21:43:16] [Server thread/INFO]: Squallz issued server command: /time noon
oh oops
[21:38:59] [Server thread/WARN]: [CadiaBees] Task #8954 for CadiaBees v${project.version} generated an exception
java.lang.ClassCastException: class net.minecraft.server.level.WorldServer cannot be cast to class org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock (net.minecraft.server.level.WorldServer and org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock are in unnamed module of loader java.net.URLClassLoader @18769467)
what am I just stupid or
I am quite literally not having a good time rn bro
do you see whats happening here lol
it forced me to
I dont need to get handle???
i thought everything nms needed handle
alright well its still losing its pdc
what does the hive tag look like?
right now we're just debugging
we want to see what beehiveBlockEntity.saveWithoutMetadata(); this looks like
get its nbt tags?
just beehiveBlockEntity.saveWithoutMetadata().toString();
Any help with this
[21:54:16] [Server thread/INFO]: {Bees:[{EntityData:{AbsorptionAmount:0.0f,Age:0,AgeLocked:0b,AngerTime:0,Attributes:[{Base:0.30000001192092896d,Name:"minecraft:generic.movement_speed"},{Base:10.0d,Name:"minecraft:generic.max_health"}],Bukkit.Aware:1b,Bukkit.updateLevel:2,CustomName:'{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"#6A06FB","text":"B"},{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"#8C21FC","text":"e"},{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"#AE3BFD","text":"e"}],"text":""}',CustomNameVisible:1b,FlowerPos:{X:35,Y:-60,Z:-43},ForcedAge:0,Glowing:1b,HasNectar:1b,HasStung:0b,Health:8.0f,InLove:0,Invulnerable:0b,PersistenceRequired:0b,Spigot.ticksLived:464,WorldUUIDLeast:-5526025201707824336L,WorldUUIDMost:4772959422628644230L,bee-uuid:"abbffd3d-9076-4d14-a677-ed40f51cb45b",id:"minecraft:bee"},MinOccupationTicks:2400,TicksInHive:20}],Bukkit.MaxEntities:1,FlowerPos:{X:35,Y:-60,Z:-43}}
>
@glossy scroll
this bee is supposed to have pdc, correct?
right
oh wait
yeah
@EventHandler
public void beeExitHive(CreatureSpawnEvent event) {
if(event.getSpawnReason().equals(CreatureSpawnEvent.SpawnReason.BEEHIVE)) {
if(event.getEntity() instanceof Bee) {
if(pdcManager.getBeeUUID(event.getEntity()) != null) {
Bukkit.broadcastMessage(pdcManager.getBeeUUID(event.getEntity()).toString());
} else {
Bukkit.broadcastMessage("PDC lost");
}
}
}
im getting "PDC Lost"
but you know the bee has PDC when it enters, correct?
Line 1 is when it spawns
enter is when it enters
This is a bee that I spawned with an egg and punched (to set pdc)
[21:59:04] [Server thread/INFO]: {Bees:[{EntityData:{AbsorptionAmount:0.0f,Age:0,AgeLocked:0b,AngerTime:0,Attributes:[{Base:0.30000001192092896d,Name:"minecraft:generic.movement_speed"},{Base:48.0d,Modifiers:[{Amount:0.03241293552296432d,Name:"Random spawn bonus",Operation:1,UUID:[I;-757729959,698370476,-1259616670,993993660]}],Name:"minecraft:generic.follow_range"},{Base:10.0d,Name:"minecraft:generic.max_health"}],Bukkit.Aware:1b,Bukkit.updateLevel:2,BukkitValues:{"cadiabees:bee-uuid":"58a3a467-b43e-48ea-9fac-142c0eb483af"},FlowerPos:{X:40,Y:-60,Z:-44},ForcedAge:0,HasNectar:1b,HasStung:0b,Health:9.0f,InLove:0,Invulnerable:0b,PersistenceRequired:0b,Spigot.ticksLived:536,WorldUUIDLeast:-5526025201707824336L,WorldUUIDMost:4772959422628644230L,id:"minecraft:bee"},MinOccupationTicks:2400,TicksInHive:20}],Bukkit.MaxEntities:3,FlowerPos:{X:40,Y:-60,Z:-44}}
waiting for it to exit now.
why that?
events are for API calls
if you need to access something from an event call, just register the handler you need and call the method from the haandler
a handler is usually an interface or abstract class
@glossy scroll https://i.gyazo.com/72b96c08e45893cef5238a722ea132dc.png
Thats with a bee spawned from an egg.
the pdc retains..
very interesting
I already knew this so its not new news but
whats the nbt on that?
like when it enters the hive
also, remind me of the class CustomBee?
can i see it again
[22:04:19] [Server thread/INFO]: Enter: b9b6af67-d566-4fe8-bbbc-0c257238abc8
[22:04:20] [Server thread/INFO]: {Bees:[{EntityData:{AbsorptionAmount:0.0f,Age:0,AgeLocked:0b,AngerTime:0,Attributes:[{Base:0.30000001192092896d,Name:"minecraft:generic.movement_speed"},{Base:48.0d,Modifiers:[{Amount:0.07126595799254398d,Name:"Random spawn bonus",Operation:1,UUID:[I;1048387077,1887388698,-1817519598,-1423524498]}],Name:"minecraft:generic.follow_range"},{Base:10.0d,Name:"minecraft:generic.max_health"}],Bukkit.Aware:1b,Bukkit.updateLevel:2,BukkitValues:{"cadiabees:bee-uuid":"b9b6af67-d566-4fe8-bbbc-0c257238abc8"},FlowerPos:{X:40,Y:-60,Z:-44},ForcedAge:0,HasNectar:1b,HasStung:0b,Health:9.0f,InLove:0,Invulnerable:0b,PersistenceRequired:0b,Spigot.ticksLived:578,WorldUUIDLeast:-5526025201707824336L,WorldUUIDMost:4772959422628644230L,id:"minecraft:bee"},MinOccupationTicks:2400,TicksInHive:20}],Bukkit.MaxEntities:3,FlowerPos:{X:40,Y:-60,Z:-44}}
>
this is with the pdc one
Thats the one from the hive
this is the bee itself:
[22:04:19] [Server thread/INFO]: {AbsorptionAmount:0.0f,Age:0,AgeLocked:0b,Air:300s,AngerTime:0,ArmorDropChances:[0.085f,0.085f,0.085f,0.085f],ArmorItems:[{},{},{},{}],Attributes:[{Base:0.30000001192092896d,Name:"minecraft:generic.movement_speed"},{Base:48.0d,Modifiers:[{Amount:0.07126595799254398d,Name:"Random spawn bonus",Operation:1,UUID:[I;1048387077,1887388698,-1817519598,-1423524498]}],Name:"minecraft:generic.follow_range"},{Base:10.0d,Name:"minecraft:generic.max_health"}],Brain:{memories:{}},Bukkit.Aware:1b,Bukkit.updateLevel:2,BukkitValues:{"cadiabees:bee-uuid":"b9b6af67-d566-4fe8-bbbc-0c257238abc8"},CanPickUpLoot:0b,CannotEnterHiveTicks:0,CropsGrownSincePollination:0,DeathTime:0s,FallDistance:0.0f,FallFlying:0b,Fire:-1s,FlowerPos:{X:40,Y:-60,Z:-44},ForcedAge:0,HandDropChances:[0.085f,0.085f],HandItems:[{},{}],HasNectar:1b,HasStung:0b,Health:9.0f,HivePos:{X:42,Y:-60,Z:-43},HurtByTimestamp:130,HurtTime:0s,InLove:0,Invulnerable:0b,LeftHanded:0b,Motion:[0.06152207456383818d,0.0d,0.06484870101280597d],NoGravity:1b,OnGround:1b,PersistenceRequired:0b,PortalCooldown:0,Pos:[40.82206768522505d,-60.0d,-43.26206294460952d],Rotation:[318.08978f,0.0f],Spigot.ticksLived:578,TicksSincePollination:0,UUID:[I;-1179209881,-714715160,-1145304027,1916316616],WorldUUIDLeast:-5526025201707824336L,WorldUUIDMost:4772959422628644230L}
these are the nbt tags btw.
public static String toNbtString(Entity bukkitEntity) {
CompoundTag tag = new CompoundTag();
((CraftEntity) bukkitEntity).getHandle().saveWithoutId(tag);
return tag.getAsString();
}
yes can i see CustomBee.class again
public CustomBee(Location location, String beeName, Boolean isBaby) {
super(EntityType.BEE, ((CraftWorld) location.getWorld()).getHandle());
this.setCanPickUpLoot(false);
this.setPos(location.getX(), location.getY(), location.getZ());
getBukkitEntity().setCustomName(ColorUtil.color(beeName));
getBukkitEntity().setCustomNameVisible(true);
getBukkitEntity().setPersistent(true);
getBukkitEntity().setGlowing(true);
if(isBaby) {
getBukkitEntity().setBaby();
}
}
public CustomBee(EntityType entityType, Level level) {
super(EntityType.BEE, level);
}
public String getBeeName() {
return this.beeName;
}
public void setBeeName(String beeName) {
this.beeName = beeName;
}
@Override
public final CraftBee getBukkitEntity() {
if (this.bukkitEntity == null) {
this.bukkitEntity = new CraftBee(this.level.getCraftServer(), this);
}
return this.bukkitEntity;
}
@Override
public boolean save(CompoundTag nbt) {
boolean returnVal = super.save(nbt);
nbt.putString("bee-uuid", uuid.toString());
return returnVal;
}
@Override
public void load(CompoundTag nbt) {
super.load(nbt);
String beeUUID = nbt.getString("bee-uuid");
this.originalBeeUUID = UUID.fromString(beeUUID);
}
public UUID getOriginalBeeUUID() {
return this.originalBeeUUID;
}
@Override
public CompoundTag saveWithoutId(CompoundTag nbt) {
nbt.putString("bee-uuid", uuid.toString());
CompoundTag tag = super.saveWithoutId(nbt);
return tag;
}
The ones im spawning atm arent custombees.
so they wont have that
however the pdc does save for bukkit ones.
you mean is empty?
well it shouldnt be empty when you save it right
you want the pdc to persist
here's another idea
ServerLevel world = ((CraftWorld) customHive.getHiveLocation().getWorld()).getHandle();
CustomBee customBee = new CustomBee(customHive.getHiveLocation(), cadiaBees.colorUtil.color(beeName), isBaby);
world.tryAddFreshEntityWithPassengers(customBee);
pdcManager.setBeeUUID(customBee.getBukkitEntity(), customBee.getBukkitEntity().getUniqueId());
Bukkit.broadcastMessage("UUID set to: " + pdcManager.getBeeUUID(customBee.getBukkitEntity()));
This is on spawn
call CraftEntity#storeBukkitValues(new CompoundTag()) and print that tag
or rather
CompoundTag tag = new CompoundTag();
customBee.getBukkitEntity().storeBukkitValues(tag);
System.out.println(tag);
(after you set the pdc)
ok im starting to feel stumped here
private class BeeEnterHiveGoal extends BaseBeeGoal {
BeeEnterHiveGoal() {
super();
}
public boolean canBeeUse() {
if (Bee.this.hasHive() && Bee.this.wantsToEnterHive() && Bee.this.hivePos.closerToCenterThan(Bee.this.position(), 2.0)) {
BlockEntity tileentity = Bee.this.level.getBlockEntity(Bee.this.hivePos);
if (tileentity instanceof BeehiveBlockEntity) {
BeehiveBlockEntity tileentitybeehive = (BeehiveBlockEntity)tileentity;
if (!tileentitybeehive.isFull()) {
return true;
}
Bee.this.hivePos = null;
}
}
return false;
}
public boolean canBeeContinueToUse() {
return false;
}
public void start() {
BlockEntity tileentity = Bee.this.level.getBlockEntity(Bee.this.hivePos);
if (tileentity instanceof BeehiveBlockEntity tileentitybeehive) {
tileentitybeehive.addOccupant(Bee.this, Bee.this.hasNectar());
}
}
}```
it will addOccupant on the block that is at hivePos
I swear if you continue like that im gonna have a whole zombie survival server with moderation system and everything done before you finish the plugin
?
@carmine nacelle what is the tag yuo get when you simply call
CustomBee#save
of course you need to provide a tag
I just got a quadruple ad on spotify
sitting through it takes less time than digging through all this nms
thats pretty cool and a nice use of custom textures
custom textures are a pain
I had to hire 2 different texture artists to get a 3d model to look nice on the hotbar
I swear when some people use custom textures they just slap them over the screen so much you can't even tell its minecraft anymore
Thats really cool. Are they available for some work? 😄
imagine spending 600$ on gun models smh couldn't be me
lmfao guns in minecraft tho xD
uhhhhhh
I'm recreating call of duty black ops 1 zombies
tired of working on it honestly
damn it best be good
it has been way too long
client-side zombies, barricades and mystery box renderings worky
We are actually undecided if we want the server in a modern setup (with guns) or a fantasy/medieval setup
everything worky
but also
but it's such a damn pain
if you do guns you gotta see if you can make 3d item models for them
2d guns are funny looking ngl
3d item models for guns are ehhh
Their not going to leave you if they are :/
I already tested some stuff. The models have to be low poly or they dont fit the style.
ahhh makes sense
So 3D yes but still quite simple
that looks nice
you should go back to that guy lol
I think this might even be too much
Ok I wasnt setting the hive but I did now
Scopes don't work because they a pain in the ass
still didnt save tho
we also got an ak
Why?
can you actually do that with just spigot lol i feel like you'd need client crap to do this shit
we use a plugin called ModelEngine
you'd need to make a model for just the scope
@lost matrix like this?
you can't control sway (client does that by itself)
oh but of course, texture pack
also the hold-to-zoom feature would be janky because the client only sends 5 right-click packets per second
so it would have an input delay of 0-200ms
in an ideal world
Ah yes. But that goes for all accessories.
But this really helps for sniper rifles:
Like
smile would you mind sharing your technology for that hotbar thing haha
I already have a gun system coded
true, spy glass might be nice for a dart shooter
integrating scopes is just hell
do you use the actionbar and some custom font?
The client sends 20 right click packets per second
PlayerInteractEvent only fires 5 times per second
Last I tried it was firing every 50ms
the client only handles right-clicking an item on hand 5 times per second
it can send up to 20
but holding it only sends 5
I was holding it
Literally the only way to do this at this point is to add the bee's uuid to the hive pdc when entering and on creature spawn, find the closest hive to see if it has a uuid in it
In Minecraft and no one has done this before
that would indicate that the bee was previously custom..
So the first to do it would probably get big after a while
one thing I'm thinking on implementing
Yes
im stumped as to why its not saving the pdc
is maybe the ray tracing should come out of the barrel
?
because I want it to
instead of the player's eye view
Custom fonts are amazing
it would be a huge pain in the ass to manually align to each weapon
gang gang
unless there just code that im not seeing from u lol
thats impacting a major thing
ive sent everything relevant
the fact that bedrock has so much more customization options
is criminal
java has the capacity 100%
We should make a BukkitExtensions plugin/api
I mean... make one and try it for yourself
Throwback to spout
that provides better inventory management, custom block breaking speeds and all
i wish we could add custom sounds into texture pack namespaces
that would be so nice
just ways to modify most things without doing hacky stuff
can you not?
I thought you could
You can add custom sounds
well how would you be able to use play sound?
packetas
and you can use a sound from a resource pack namespace?
api uses a enum so you'd need a packet
:o
nah :P
Problem is sounds get kinda chunky
I love how much you can do with texture packs its awesome
ogg files be like
Compared to images and json files
My resourcepack assembler also generates a font so that i have every resource as a character as well
how did you find eonugh unicode chars for that lol
You can have unlimited fonts
intersting
oh I thought you had to override unicode to display custom fonts
we have these little icons
we're not too familiar with the font stuff yet
are there such thing as like
unused unicode characters
or do you gotta replace some
you can do some fancy stuff if you pair models with namespaced sounds
i mean those characters are used in a font for a resource pack
I believe u800 to ufff are all unused
There are millions of characters that you can use. I just started using old chinese symbols. I got about 50k to spare there.
type thing
they just currently are replacing some other chacters
hmmm I was just not wanting to overwrite other languages
sound is incredibly quiet because I use everything on 20% volume
You don’t have to replace any characters
Make a custom font, leave minecraft:default untouched
It’s a json file
wait show a code example of how you'd implement that
we just kinda took inspo from this
I know how to do custom fonts I just thought you were required to overwrite unicode
The thing is using custom fonts in spigot is annoying, since you have to use components and spigot only supports those for a few things
if you were to use paper that'd be easier though correct
all of this texture stuff makes me want to make some over-the-top api
where you toss a .png and splits it into custom models for guis
I had an API once that constructed a gui pixel by pixel for the user
ah yes
🤔
and im assuming you have some sort of code registry/enum or something
dynamic image rendering fully completed
to allow easy access?
wait you mean like
you assigned each pixel combination a custom model id?
then assigned each slot a combination
I had a pixel texture you can color pixels and I rendered a jpg image on it
it was too laggy because of my approach but I'm planning to redo it
i just like this little bee we made too
and then wait 15 hours for the client to load a 6tb resource pack
It’s pretty cool how much we can customize on java these days
Just missing the ability to add custom blocks with non-standard shapes easily
Resourcepacks have a max size
if it weren't for the title being so laggy because the amount of characters on the client it would have worked
huh
now try to give it a pdc
none of our mobs need to be saved or loaded at any time
that's enough
so we dont need to worry about saving and stuff lol
what if
we made such a system to render any image in any gui
because we cache all pixels
we make 1 resource pack and reuse it across all guis
and waste 3 tons of disk space and upload bandwidth
My custom mobs save their data in their nbt compound. I just expanded the save and load method and then registered them.
Works really well.
HOW.
yea for some reason we cant figure out why his bees dont save PDC to compounds
I never got custom mobs to persist after restarts
its really quite strange
beehives do this clown thing
Granted last time I tried was back in like, 1.16
where they don't save nbt data of the belonging bees
👍
I mean they do and don't
its weird
In 1.19 its quite simply. You just need to write one line in your onLoad
I looked into making my own armorstand animation plugin type thing
Great now everyone in here is gonna make a super over the top api
then remembered I failed trig
I'm good at triangles I suck at circles
then I looked into quaternions for 16 hours straight and came out dumber
The one Origin Realms uses is really nice
I'm good at circles but triangles fucked my grade
granted the math I do is really fucking easy
They do everything
I learned trig in 6th grade because I wanted to make some custom mob abilities
like a spinning thunder circle
Indeed they do
The animations on their mobs are very impressive
I mean you can't really compare
one of their devs is kennytv
guy leads viaversion
and codes plugins for mrbeast gaming
he's no rookie
you need to learn trigonometry so you can become better at minecraft pvp
jokes on you I don't play minecraft casually
I boot up the game, test code for 3 hours straight and close the game
I do thats why everything I've released on spigot is easily 10/10
👍 you got 0 released plugins
can't be bad if there are none
funny thing now that I look at some profiles
half of the active / knowledgeable people here are nearing their 30's
the other half are high school students
i am neither of those
Who are you calling old?
mfnalex
Boomers amirite
he's like a year younger than you
at the same time I've had a 50yo man commission me before
for some glow api plugin
ElgarL is our gateway to the boomer world
guy talks about tech like he's 60
Welp, time to do some of the jankiest shit of my spigot career.
"back in '98 I fixed the internet with this cobol code"
im just in college studying Materials Science
Better than the material enum
you are right
Better than CraftEntity#getEntity
people ask why im not in csci all the time 😅
oh hell naw
I'm in a weird school thing
it's like high school but gives lower-tier degrees
I picked a 3 year programming course
biggest mistake of my life
got put in a class with 27 hentai addict guys
and 1 hentai addict girl
With Mojmap NMS just feels normal now
Ew i always hated solid-state physics when i studied physics. Excluding superconductors, those where nice.
haha! im in a lab that researches semiconductor mateirals
specifically thin-film oled technology
I hate physics & chem in general
but I can watch nilered videos for hours
maybe I just had really shitty teachers
Physics & chem are 1 single class here
I actually benefited from knowing the meißner-ochsenfeld effect last semester in electrical engineering.
first 3 years we were "causing hazards" at the back of the class
nearly got the cops called on me
school thought I was making bombs
so yeah I never caught on
are you currently in a program then?
If you make a bomb in science class do you get an A and get arrested?
no I failed that test
No im glad when i got my bachelors next year so i can study CS. Im so done with electrical engineering.
I failed physics & chem in general
...unrelated
Spawned?
Were you playing around with the summon command in real life
yes
came to the tests
you know i also teach kids how to play minecraft
dudes were grabbing my test from my desk
/deop Martoph
while I was writing
its my teaching job
copying BS answers
teaching how to play mc
a network wants me to make a learning platform within mc
legit
its funny because kids dont know how to use a mouse 😭
will CS be another BS or a graduate program?
where teachers can make their own courses within the server
and students can import those courses
and teachers get to track progress
“What is the correct thing to say when you kill someone”
A. gg ez
B. L trash
C. get gud skrub
D. UR BAD XD
it's worth it imo
extremely well paid and they're willing to sponsor a trip to the states
i just say
"gn" or "gg ez"
How can I provide a jar file and add it as a dependency in maven?
yes, there are steps to do it online tho
better than what we can explain
although
you should really be trying to use a dependency from your local maven repo
can you install NeoConfig?
then just use that
Beehive nearestHiveBlock;
CustomHive nearestHive = null;
for (CustomHive customHive : cadiaBees.hiveManager.getCustomHives()) {
if (customHive.getHiveLocation().distanceSquared(beeEnteredHive.getLocation()) <= 2) {
//This must be where it spawned
nearestHive = customHive;
break;
}
}
hiveManager.getCustomHives().stream().filter(hive -> hive.getHiveLocation()
.distanceSquared(event.getEntity().getLocation()) <= 2)
.findFirst();
Which of these methods is least inefficient
Wdym?
dont optimize code until necessary
both are fine
Did a Chem Lab once where half the idiots made sulfur dioxide and hydrochloric acid gas
yo md_5

It's a plugin I made, I could do a maven install but I would prefer to do it this way
yea see we were messing with bleach and i added HCl
and it turned a mild green color
are CraftBees meant to discard all pdc/nbt stuff when exiting a hive?
hey guys. sorry to bother you again.
i have this code here: if(items.hasItem(player.getInventory().getItemInMainHand())) { cs.sendMessage(ColorUtils.colorize("&#D39FF0&l> &r&#A39E7CThis item has been removed from the loottable.")); items.removeDrop(player.getInventory().getItemInMainHand());
which checks if a hashmap has the item that the player is holding:
for(Map.Entry<ItemStack, Double> e : drops.entrySet()) {
if(e.getKey().equals(item)) {
return true;
}
}
return false;
}```
this returns true and then the items.removeDrop code is triggered:
```public void removeDrop(ItemStack drop) {
drops.remove(drop);
}```
somehow the entry for specified item does not get removed form the hashmap even though it prints the "This item has been removed from the loottable." line.
any ideas?
also this is the definition of drops:
private HashMap<ItemStack, Double> drops = new HashMap<>();
Don't mix water with thionyl chloride means don't fkin wash the glassware with water
come to find out, after lab, i researched it
Idiots
I once brought halloween candy that my neighbour gave me
they were little sugar tablets
TL;DR - Kids crushed it and did lines in art class
i added HCl on ACCIDENT by the way
I became the school's dealer for the day
i wasnt just a rogue genchem student
💀
theyre not
and we already discussed this
the pdc isnt saving
was trying to get an official answer
i mean although md is lead dev he doesnt instantly know the answers
he gotta look at the code like the rest of us haha
imagine knowing all of the nms code that mojang wrote for you
is it okay if I do it like so?
<dependency>
<groupId>com.neomechanical</groupId>
<artifactId>NeoConfig</artifactId>
<version>1.0.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/libs/NeoConfig-1.0.3.jar</systemPath>
</dependency>```
Sounds like a bug to me
it works for vanilla bees
he has a nms bee impl
You don’t have all of NMS memorized?
Oh
i mean id prefer you just install NeoConfig
isSimilar instead of equals maybe?
and import from your local maven repo
Nope im specialised so that i can get a masters in CS
it recognises that it has that key because it sends the message to the player so this shouldnt be the issue
nice
cause it prints the "item has been removed" line which means hasItem has returned true
Im not starting another bachelor at my age
what is a LinkageError?
even though im my BS im carefully considering a graduate program 😅
oh do I need to relocate the jar file?
you calling yourself old? 🤨
no, just run mvn clean install on the NeoConfig project
Gramps
7grandchildren
Could be a lot of things. Im suspecting problems with multiple classloaders.
