#help-development
1 messages · Page 691 of 1
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI("https://httpbin.org/ip"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
no, it doesnt work
well
what did you do to your intellij lol
Did you use the right port together with this ip?
had a couple projects open
Bukkit.getServer().getPort()
A couple as in 10+?
that intellij IDEA really be in caps lol
prob firewalled if he's using minehut
like 6
i tried with port
one was compiling paperweight
and its stuck on conecting...
Doesnt sound like a good upgrade...
intel or amd?
I'm team amd but it's whatever you prefer
I'd say guys
Whatever has the best price/performance whenever i buy a new rig
lol
wait... AYO
i have laptop with 16 gb, idk if i can upgrade it to 32 however there was option of 32 lol
well
Why edit the message :(
It goes from the lower-end chip of that generation to the higher-end one
I guess all I have is more cores tbh
But it was funny, wasn't it?
And we all know what you meant anyways
A cpu that works by having slaves change the 0's and 1's?
yeah the fps is the same in gaming it's literally not worth upgrading
yea
still I want more ram
My thoughts when I look in task manager:
is Bukkit.getServer().getPort() always not null?
Hi im trying to change my servers player count from multiplayer menu i read somwhere i need to use ProxyPingEvent but i have no idea how to use that event can someone help? please
Correct afaik
thing is I'm using mismatched sticks
and I want blinky lights
match them then
can't they just use tinder to match?
one's red
the other is gray
the gray one is discontinued
the red one is hard to find
they're both 3200mhz sticks overclocked to 3600
?paste
tf is that emo party
Try to print out the actual arguments or print the exception
How do I get the CraftContainer or an InventoryView?
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
Is this right?
Hello,
can someone help me in 1.19 to send DataWatcher through PacketPlayOutEntityMetadata please ?
It seems that they removed the constructor using datawatchers
Is it still possible to ?
Iirc datawatcher has a packDirty or something
Which will get you the list
There’s also a getNonDefaultValues or something
Oh ok now its just a list of data watchers rights ?
It's for 1.19.4, but I guess it is also for 1.19.0
ty ❤️
It's a list of data values
Instead of the entire datawatcher
what is the difference, could you give me a link to some resource please 🙂
because I just tested and it gives me an error so (with the list of data watchers)
no clue what you're trying to do
how can I create such list please
Iirc datawatcher has a packDirty or something
Which will get you the list
There’s also a getNonDefaultValues or something
?kick @quaint mantle
Done. That felt good.
seems to work thanks ❤️
patched_1.12.2.jar:git-Paper-1620
Sir, this is Spigot
How could i change max durability of an item?
My guess would be that the amount is too big
try to debug deserialization
So.. where is the method setDurability??
It literally links to damageable.setDamage
oh
what
Eaglercraft ig?
ok
how would i go about formatting the name above player heads
Sadly the ru page for eaglercraft closed
Gee I wonder why
The person who hosted the page couldn't do that because his religion, something about that he couldn't do DMCA'ble stuff because of his religion or something like that
@shadow night You’ll get banned on paper etc. With those pronouns on ur disc
what's my pronouns
Mayo/naise
Hey, i'm currently working on a 1V1 plugin for my server with multi instances that are handled with multiverse core (its the same server but we teleport the players to a new world)
however sometimes the players can't see each other, or only one player can see the other, or its just working as intended like its not making any sense im confused
were running en 1.8.8 btw with via version, do you guys think the issue could come from here?
our code doesnt involve any hide players or invisibility or messing with any packets btw
You shouldn't create a lot of worlds, you should do everything on one world
How can I make multi instances of the same map then?
Its only a 1v1 game, so when one game is full we create a new map for other players to be able to join
Well, when a player joins you copy over the structure to another spot in that world and do whatever you need to
Creating a lot of worlds is bad for performance
Thats how big servers are doing? Bc doing researches online everyone is recommanding to do this
Idk how big servers do it, but when you're making a lot of worlds you should know you are doing something wrong
Define big
we arent , we usually only have 2/3 worlds at a time on the same server
idk like hypixel and shit , mini games servers in general
i mean hypixel is a pretty bad example but
Hypixel spins up servers when they need them
u got my point lol
And runs a few worlds on one server
But hypixel prob has pretty insane hardware
that sounds pretty good
Make sure to set them all to not keep spawn loaded and they won't have much of a performance impact when not in use
I've noticed multiverse worlds and generally any extra worlds slow down the loading time
so creating dynamically worlds can cause the issue?
And generally isn't a good idea
Oh you have player visibility issues
Probably just 1.8 being jank with multiple worlds
I wonder if having one or two pre-made worlds could actually fix or improve their issue
so you think that just having premade worls and not generating them on the go will fix the visibility issues ?
It might
It makes no sense for any of us but knowing minecraft that could absolutely fix the issue
@echo basalt I don't know their current setup or what they have changed, but I know the original design that it is all based off of
wrong channel
whitch one is the right one?
#help-server or ask on the mythic discord
the discord sent me here
mthic discord which is for the plugin sent you to spigot discord which is mostly for the server
o.O
doesn't seem quite right or make that much sense
yes
literally
well hopefully someone can help you
shame the discord for said plugin doesn't know the issue with their own plugin
i think they dont have a discord so they sent me here
well you said the discord for it sent you here o.O
I have no idea if they do or don't just going based off what you said
Seems they have a fine discord server right there
I would try getting help from the actual devs of the plugin or those who do use it from there 🙂
hello
go to the plugin page and i will send you here
is there a way to increase the distance whicha fishing hook can be cast? Increasing velocity just makes it hit its maximum faster
nope the discord invite sent me there
Hey can someone please help me
I am trying to make so i can use /balance add <my name> <amount> but the amount is never being added to my account
https://paste.md-5.net/sowojijixu.cs
public double addBalance(OfflinePlayer p, double amount) {
if(economy != null && economy.hasAccount(p)){
economy.depositPlayer(p, amount);
return economy.getBalance(p);
}
return 0.0;
}
When i use /balance add <my name> <amount> it is sending my name and balance but the amount is not getting added
It dosent have anything to update
how save num in livingEntity
return economy.depositPlayer(p, amount).balance;
demm
protocol limitation, CMD was added in like 1.14
Why does RegionAccessor not have methods to get a Block directly?
how would i go about formatting the name above player heads
I thought it was added in 1.9
no
Weird shit
Quick question: How do I get an Item / ItemStack from the name, like "redstone" or "flint_and_steel"?
thx
tf isnt it nbt
They introduced the tag on 1.14
and added it to their rendering system
Sure you can add it to 1.12 items using NBTAPI and it'll render fine for 1.14+ clients
It is just NBT
Yeah it requires the render change
I mean PDC is also just NBT
Could easily backport it to 1.8 if ur insane
average hypixel moment
I wanted to but lazy
Hypixel would just work with raw NBT
Not that hard
Or they’d make a simple wrapper
¯_(ツ)_/¯
PR it
mm would just add it to paper
I want do know if there is an actual reason. It seems dumb that it was just overlooked when the interface was split up
methods were moved from World to RegionAccessor, but not a Block method?
Probably something to do with state or some other reason. Unsure
I believe that interface came to exist due to world generation in which block instances aren't really necessary anyways
Block wasn't added since people should not use it during world generation since it contains a lot of methods which don't make sense to have. e.g. light or redstone methods.
but you can still get a Block instance for the world generation world, you just have to go through one more method
why do you require address to sign up for stash anyways
regionAccessor.getBlockState(1, 1, 1).getBlock() that also just creates a blockstate for no reason, since the CraftBlock is created anyways in the impl of the method
are you sure that this works?
It's a difference if people have direct access to it or not
I think so. the requirePlaced check should pass I think on getBLock
CraftBLock requires access to the net.minecraft.world.level.GeneratorAccess
which a BlockState does not have
neither does the CraftRegionAccessor
the getBLock() method in CraftBlockState also checks if the block is placed
which it probably won't be if you got it from "only" a regionaccessor that isn't a world
(just a guess, idk)
if you can verify that getBLock() works on a BlockState you got during world generation, then yeah, there shuold be a getBLock method in RegionAccessor too
I'm pretty sure it works just from looking at the code. CraftBlock takes a LevelAccessor which CraftRegionAccessor most certainly does have
CraftBlockState also does via the WeakReference field it has
CraftRegionAccesssor has a WorldGenLevel with is a subtype of LevelAccessor
CraftBlockState#isPlaced should succeed since there is a CraftWorld set on the CraftBlockState when its created in CraftBlockStates
then the getWorldHandle method should return the LevelAccessor inside the weakref cause that field is not null
(assuming the weak ref isn't empty as well, but that's a safe assumption cause this is all happening at the same time)
public Player getPlayersOpponent(Player player) {
if(!playerIsInDuel(player)) {
return null;
}
UUID opponentUuid = playerOpponents.get(player.getUniqueId());
if(opponentUuid == null) {
return null;
}
// check if opponent is online
if(plugin.getServer().getPlayer(opponentUuid) == null) {
return null;
}
return plugin.getServer().getPlayer(opponentUuid);
}
Should I add any other checks before returning the Player?
CraftBlockState has a comment that says that if it "only" returns a GeneratorAccess and not an actual World, the block isn't considered placed and that's what BlockState#getBlock() is checking. Idk maybe just try if BlockState#getBlock() works? I'd test it myself but I have no clue in which situations I'd only get a RegionAccessor instead of an actual world
you did that logic thing were you did if a -> b doesn't mean if b -> a
if it returns a World its placed, if it doesn't, that doesn't mean its not placed
if it returns a GeneratorAccess that doesn't mean its not placed
plus, that's not what the isPlaced method even checks, it checks if the CraftWorld field is null or not
CraftBlockState#isPlaced() simpy checks if the CraftWorld field is null
yeah, and its not null for block states from a CraftRegionAccessor, so it is placed, so the requirePlaced check passes
well that's great, I never said it won't work, I only asked if you tried whether it actually works. And that I cannot test it myself because I have no clue in which situations I'd be able to obtain a RegionAccessor that is not a world
a chunk generator already got the world
oh lol. so im just gonna add a new block populator. The block populator list on CraftWorld isn't safe. It returns the actual list, so you can just add a populator at runtime whenever, but you don't know if its being iterated over at the same time on another thread
Thats mention in the docs, you should add your BlockPopulators during WorldInitEvent
declaration: package: org.bukkit.generator, class: BlockPopulator
that kinda covers adding them, but you can still prob get CMEs if you remove something from that list.
would be better if that list returned could only be mutated before anything happened in the world
or if it was copied when iterated over in the chunk generation
This is the old way of creating ChunkGenerator, please use the new methods.
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/generator/ChunkGenerator.html
declaration: package: org.bukkit.generator, class: ChunkGenerator
and yeah, it def works. tested it with a custom block populator. can get Block from the block state
\n i guess
yep I also just tested it
it also seems like BLockPopulators are the only thing where LimitedRegions/RegionAccessors are used at all
that's the only place I see the constructor for CraftLimitedRegion used, so yeah
The block, it is not in the RegionAccessor since as mention it does not provide additional use full methods which BlockState or RegionAccessor already has in a world generation context.
And has more methods which should not be used during world generation e.g light and redstone.
This way the use is discouraged and especially newer developers using the world generation api won't use it.
There is no additional check in BlockState#getBlock do give more advanced developers still the option to get the Block instance, for what ever reason there might need it.
there are useful things tho. Block#canPlace, Block#getshape (2 methods)
canPlace won't necessary work during world generation since it uses the minecraft world
which looking at it isn't even necessary and it could use the normal generator access
And Block#getShape does not exist
the voxel shape and bounding box ones, idk the exact names
getCollisionShape getBoundingBox
can we have a rayTraceBlocks method with a predicate for each block pls
What about BlockIterator?
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/util/BlockIterator.html
declaration: package: org.bukkit.util, class: BlockIterator
i'm surprised it doesnt exist. LivingEntity#getTargetBlock has a transparent thing
that uses an iterator
I mean like a transparency thing
Sometimes collision shapes are funky
But I might want glass to be seen as a transparent block
make it happy then :3
Egg
moo
what development help do you need with that picture
on an apache-2 license can i yoink classes
whoa, those exist?
you can create custom generation in plugins?
yeah
probably
what
no
Is there a way to get the vector of a projectile before it hits a player?
i dont know anything about it
emplace
no
that's about as real a word as embiggen
no
choco might know
ask chatgpt
he did cpp like twice
?kick @quaint mantle troll
Can I put a timer in the constructor of an object to remove an entry in a hashmap holding the object with the timer and still use other functionalities of the object?
sure
sounds like bad design to do in constructor
but sure
do it yourself then
just explain why you can't do it
is there a better method? For more context, the object is a duel Challenge, and I want it to be removed if the opponent doesn't accept after x time
I don't believe that discord does but google doesnt
how did you download discord?
how are you using discord
you're a troll lol
discord needs internet
sudo apt install firefox
what
md do the thing
that'll be $40 please
My phone has 128GB bruh
6 minutes @ $400/hour
my phone has 32gb and i downloaded discord just fine
charge for the full hour
I don't know how you even buy a computer than only has 64GB of storage
Always gotta have that 1 hour minimum
12 hour minimum
Anyway, I would assume this isn't the case, but does an arrow still "have" its velocity when it hits a player in the ProjectileHitEvent?
coll
what happened to you going to nap
4 hours ago
couldve found me them hibernate examples
this dude is trolling
he said as he was online on a phone
lmao
I can't think of any other way to do this other than with expensive operations to keep track of every launched projectile until right it hits the player
?
Why are you asking for help with a Windows API in a server for a block game API
The six other search engines that exist:
oh.. thats a thing?
no lol
discos
w h y
discordos
DiscordOS never heard of it?
why is that a thing
NP++ is not an IDE
All this OS has is js and node to run a single electron app
Science
Okay now I know he's trolling
Write your data down on paper
how much ram does a piece of paper have
hold on guys
infinite
let me get my friend's Minecraft PC
Depends on how small you can write
(he wrote a compiler for it)
MineOS?
no
(I mean it's technically rom if you're writing with a pen)
Not with that attitude
I was literally preparing to quote that exact message
10k/mb. Cheaper than RAM today 
Unless you are using a pencil and an erraser. Then its more like EPROM... PEPROM
Pencil erasable programmable read-only memory
Ok but you can get used 500g HDDs for like 10 bucks
if you're not rotating your hard disk platters by hand what are you even doing
troll
waiting for coll to google for me
Are you working in an african coal mine? wtf
But per hour...
Well
Although it was probably rhetorical it's still a question
Most African coal mines are in Africa
no way
I was asking where he works
What country?
Yeah there are some countries where an 10$ expense needs to be carefully considered...
But you know how to program in C++. If you have decent spoken english then you can surely
get a decent remote job.

Ah
Would It be right if i will do something like this?
ItemStack pickaxe = new ItemStack(Material.DIAMOND_PICKAXE);
Damageable itemMeta = (Damageable) pickaxe.getItemMeta()
Or it works differently?
that looks fine
Oh ok, thanks
If you have issues then you probably imported the wrong Damageable
Hmm
Ok, thx
But there is no problem, i just wanted to ask if it works fine, because i cant test it now
What lib are you using?
I wish if i could get some hand into fixing this weird issue i having. I having with it like 1h and i cant actually understand whats happening. Im facing a permission issue related to my command framework, for some reason when i try to run an argument or sub command from a parent command its yells telling me that i dont have permission
Hmm. So i need some tutorials about NMS, where could i find it?
Yes im familiar. Are you fine with importing arpa/inet?
?nms
Caps of code are here, the first cap is the parser which works perfect
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/world/AsyncStructureSpawnEvent.html @kindred pasture
declaration: package: org.bukkit.event.world, class: AsyncStructureSpawnEvent
anyone used hibernate in an os plugin before, im very confused
Anyways ill try to write a very simple example
Racism
notepad 💀 💀 i want what the wheel you smoke to code on that ** its seems to be really efective
int sock; // Still needs to be created ofc. Think you got this. Just make sure the type is SOCK_DGRAM & IPPROTO_UDP
char *message = "Hello Saintes server!";
struct sockaddr_in serverAddr;
memset(&serverAddr, 0, sizeof(serverAddr)); // Allocate
serverAddr.sin_family = AF_INET; // Important for inet layer
serverAddr.sin_port = htons(12345); // The target port
serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); // The target IP
sockaddr * addr_p = (struct sockaddr *)&serverAddr;
if (sendto(sock, message, strlen(message), 0 /* flags iirc */,addr_p , sizeof(serverAddr)) < 0) {
perror("Sending failed");
close(sock); // Can also be kept open
return 0;
}
bruh why u mad, i was just for fun what i said. Dont get mad buddy
Btw this will fail for bigger packets if you reach the packet size limit.
You would have to partition the buffer by hand for this.
Gosh its honestly stupid to write this in C
yikes, and what the issue? We a re on the 23" not in the 80" where you have to deal with those things. Its terminology get up to update instead of losting time with old things. Just personal recommendations
Huh?
IPv4 chokes on ~65kb already. How can a higher level like UDP have a bigger size then?
The size field of ipv4 only has 16 bit. So the biggest unsigned number you can add there is 65k and a bit.
I dont understand how you can "force" more.
hey guys so ideally I would like to keep villages instead of disabling them but I can't have my players accessing the free GUI blocks it provides (my server has custom recipes for them that are way harder to craft).
Would I be able to on AsyncStructureSpawnEvent look through all the blocks in each chunk and set say like furnaces and smithing tables and such to air blocks? Or will this cause issues with world generation?
Would doing this have to be a delayed task also? AsyncStructureSpawnEvent might run before the structure is placed?
delay it by a tick and check all the blocks within the structure bounding box i imagine is the way to go
Alright thanks, I have all the code done to do just that! I just wanted to check and make sure :)
Hm, you def need to sync with the main thread to do this.
Get the chunkX and chunkY, request the chunk and get all TileEntities in this chunk.
You dont need to iterate the whole chunk because all interactable blocks are TileEntities
and can be retrieved in O(1) from a Chunk object.
OMG THEY CAN?
true actually
declaration: package: org.bukkit, interface: Chunk
But yeah, to remove them you need to do it sync
yea for sure
thank u guys!
@EventHandler
public void onStructureSpawn(AsyncStructureSpawnEvent event) {
if (event.getStructure() == Structure.VILLAGE_DESERT ||
event.getStructure() == Structure.VILLAGE_PLAINS ||
event.getStructure() == Structure.VILLAGE_SAVANNA ||
event.getStructure() == Structure.VILLAGE_SNOWY ||
event.getStructure() == Structure.VILLAGE_TAIGA ||
event.getStructure() == Structure.PILLAGER_OUTPOST ||
event.getStructure() == Structure.MANSION
) {
Bukkit.getScheduler().scheduleSyncDelayedTask(CraftedKingdoms.plugin, () -> {
removeFurnacesInChunk(event.getChunkX(), event.getChunkZ(), event.getWorld());
}, 20L * 5);
}
}
private void removeFurnacesInChunk(int chunkX, int chunkZ, World world) {
for (BlockState tileEntity : world.getChunkAt(chunkX, chunkZ).getTileEntities()) {
if (tileEntity instanceof Furnace) {
tileEntity.getBlock().setType(Material.AIR);
}
}
}
Something like this I presume?
Why you removing furnaces
They aren’t all tile entities
Don't your just want event setCancelled
5s might be a bit long. You def dont want the chunk to unload and load again (depending on the server chunk cache settings)
Some small question, isnt better to make a final collection with all the possible types and then loop over it?
Did I miss something
they only want to remove the furnace or whatever
He wants the structures but no tile entities in them
Because my plugin overrides vanilla recipes and the furnace recipe is much harder (it takes like 400 cobble worth of custom items). Its to keep players in the stone age longer. I dont want them to just take them from villages instead
Thought they wanted to disable villages
Cartography tables are not tile entities, neither are stonecutters, smithing tables, etc
I did initially but this is a better approach since I want to allwo players to still get crops form villages
Its coming out today :D
Ill DM ya
1.20.1. Its a spiritual successor to civcraft I have been working on for 3 months
Yeah maybe aim to do that a bit before release
well... hehe I was ready to launch and realized last minute oh shit palyers can just loot these blocks from villages
doesnt really break the game jsut is lame af
Also the better but annoying way to do this would be a datapack that replaces the village structures
it takes like 1 minute to download
true but JSON 😭
jk its not that bad
but yea
Not even json
oh?
You just need to spawn and edit the structures
Then save them and put them in the right spots to override
not if you delete the old one
Ive been in testing phase for 2 weeks. Its ready
Need a dev to help out? 🙂
I would def love that, let me just sort out this village thing and ill send u our discord if ur interested :)
Actually editing it the datapack way won’t be as bad as I thought
You only need to modify the buildings that have those blocks in them, which isn’t many
are you just server scanning
How did your 1200rpm hard drive with wired wifi manage that
why not use them to search google
So you are admiting to hacking peoples servers they pay for
no permission = stealing
What about this
I mean there’s like a .2% chance any of this is real and a 99.8% chance ur some edgy teen that thinks it’s cool to DDoS
edgy
can somebody help me with that (or is this the wrong server, bc I dont find any for VaultAPI)
Error: Cannot invoke "org.bukkit.plugin.RegisteredServiceProvider.getProvider()" because "rsp" is null
I have already:
- added Vault as a softdepend
- got an economyplugin (EssentialsX) which connects with Vault (
[Vault] [Economy] Essentials Economy hooked)
buy some storage
buy some storage
penetration testing

Whell unfortunately it looks like my code does not really do anything to the villages :(
Maybe the SyncTask is executing too early
x*
How to create new itens for minecraft?
you can only use existing items and use CustomModelData
md's going in hard ngl lol
But there's no way I can add new items in minecraft?
Not just with the server, no
You need a client-server mod for that
Forge, Fabric, the like
No. Items hard-coded on client.
Ok
I think creating items with mods better. But user need to download the mods.
or you get a proper one for 2€
That is street robbery
And i bet you get some epyc cores with like 3Ghz clocks that will crumble under game loads
You kind of can with resource packs
Someone was sadly using it in paper for servers
Didn’t go well
cloud servers are so overly expensive lol
especially if compared to dedicated ones
i thought you were joking lol
Idk why they put the one you get by default below the rest
yeah no clue
yeah but their employees at falkenstein are very unfriendly
so i am determined to understand how origin realms does this.. how do ya'll reckon they do this black screen? something i discovered on a super wide game, you can see a clear line that separates whatever is black and what looks like a sky?
¯_(ツ)_/¯
no wait, other way around
the falkenstein people are nice, the nnürnberg people are unfriendly
you can with resource packs. I have a plugin that adds several "new" items with functionalities and stuff -- just need to run the resource pack with it, which you can apply automatically via the plugin
it's still just a texture for an already existing item
sure, but for virtually all intents and purposes, its a new item
You can give it right click features, recipes, etc
yep
yeah more or less, you'll need to cancel vanilla behaviour that item might have, and also crafting recipes with MaterialChoices will be messed
but yeah items like stick should work fine 😄
why do you think MateriaChoices would be messed?
because both a stick with custom model data 1337 and a normal stick will match the Material choice for stick
not if you check the key
so if you have a custom item that's totally unrelated to sticks (and just is one internally) can still be used to craft a torch
I specifically mentioned MaterialChoices, not ExactChoices
That’s why you just cancel all recipes that have a stick with your custom model data
Unless they are your custom recipes
yes, but still, the crafting book will think you can use them
I just checked if the recipe namespace is default "minecraft" and if any of the ingredients have custom model data, i set the result to null
sure you can do that, but the recipe book will tell your players that they'll be able to craft your custom item into a torch
youre saying if i had a leather and then "custom" paper items that arent treated like paper, the recipe book will say i can make a book with it?
i don't know whether the vanilla recipe for books uses material choices or not
where does the issue you're bringing up become apparent?
Yes
in every recipe that uses MaterialChoices for the material you're using for your custom items
alright. i do that that's such a small unimportant side-effect though
Might be annoying
yeah it might be
A good solution is to use an item that’s never used for recipes
its pretty amazing what some of these servers are doing though with just custom model data.
i didnt do that, unfortunately, but that might be a good solution to that problem
use a command block item or something
Problem with that is you have to cancel placing it, and even then trying to place it will make it flash briefly
Again that’s more so just annoying tho
couldn't the block also have custom model data for the texture?
it might still flash though
this is what I mean. the crafting book will tell you "sure, you can craft a torch" with your custom-model-data stick
Custom model data doesn’t apply to blocks
Spawn eggs might be a decent option
As long as you cancel their right click action
Ooh knowledge book is another option
i gotcha. well i dont know how to fix the book thinking you can craft it, but i do know how to fix the craft result from showing anything if you are attempting to use those items
yeah sure, one can easily fix those items being craftable, I just wanted to mention that custom model data isn't perfect and won't replace mojang sometime adding the possibility to actually add TOTALLY NEW items, hopefully
great 🥲
* with spigot
that's like a restaurant that makes totally awesome food but you can't order it
I’m still happy we have something
yeah 1000 times better than using damage like in ancient versions lol
How might I trigger an entity to "leap" towards the player? I'd like the entity to leap and land next to the player, as if it's jumping at the player. I'd like it to occur not at a fixed distance, but where the entity is for example 6-12 blocks from the player. The leap distance should calculate accordingly so the entity lands at the player.
Right it's based on the world position
Ye
That's what I thought it was
Very lame
They should be directional and counted like the flower petals
The cherry blossom leaf particle should be rgb
A lot of things should but alas they aren’t
any thoughts on this? Im so stuck on trying to figure it out #help-development message My newest theory is looking upwards at a block like concrete or something. something is causing a sharp change between black and sky
Yeah probably
if your monitor isnt bright, the left and right sides are clearly sky, in realtime the clouds move
Or a map in an item frame with fully black pixels
trying to recreate it but work around all the little gotchas
i was hoping to be able to do it without any specific block placement in the world, but maybe that isnt possible
I'm pretty sure that's just an overlay of some sorts. I know I've seen it done before, I just don't know how.
That’s the forced resource pack overlay
Also, that sky is just The End's skybox texture.
its not though because its literally on the resource pack acceptbance
But the black background is special
no clouds in the end
Those aren't clouds.
yeah you gotta have a bright monitor
Color acurate monitors are nice
but @kind hatch , these "clouds" they move across the sky like clouds, and rectangles of different sizes. im not aware of anything in the end that moves like that
We are talking about the image you posted earlier right? The accept the resource pack window?
here's a better image
yess
the black in the middle has to be a block, looking up, right? whether its a map, or a block, whatever. its some item
but i dont think that its in the end
Again why not just go with all black
like you pointed out you can see the sky in the image, meaning its in the overworld
i claim its sky, but someone else said they think it is not
well it is, because there are stars
sure, its just curiousity. trying to understand their methods
Idk
because could just put blindness on
Blindness effect maybe
and look up
you are probably looking up something's ass
haha
Ahh, my mistake, it's not the skybox that has the moving texture, it's the End Gateway block that has that texture.
haha
does the amplify for blindness allow you to set how strong it is? because even the sky on the left and right has an overlay to it.. almost like an inventory overlay
Try using F3
Why not?
if this is a 1.19.3+ server it might also be using display entities
just doesn't work on this menu
Try spamming it as you join the server
Or if the setting stays toggled go on another world and use F3 then join the server
so as you sit here, for a period of time a circular gradient begins to grow from the center of the screen outward, you can sorta see the layered rings here
If you're looking for a way to simulate a full black screen, put the player in a black concrete box, the darkness effect and maybe blindness to top it off.
yeayea. i was trying to figure out how to do it without any world stuff
Ohhhh, they could just have you really high up in the sky on a barrier block
cool, so 100% overworld
yes, assuming the white dots arent moving that much
You’re in purgatory
otherwise they could be nether particles
def clouds. they move in a constant direction
Yea, it makes sense now. Those dots are the stars in the skybox. lol
but am i looking up, or looking down? i almost think im looking down
because the clouds are so far away, yet im in fog
I think you're looking up
fog does not have to do with y level though right?
i think to have this much it does
I thought it was for cave fog and whatnot. There is something that happens past a certain y level though.
im gonna try to test way up high looking down at a concrete block or something
well there used to be some kinda fog when you are close to bedrock
but iirc they removed that
or reduced it idk
Yeah that was Ye old days
That bedrock particles?
but at that depth you would be bedrock particles too yeah
these look more like stars
they'are so small though, yeah
i don't think its clouds now that im in my world
clouds are way too big
unless im like at super low in the world, like the world was hogged out
Hypixel limbo is in the end though
Guess it just depends on how you want to do it. The end skybox is very dark and doesn't ever change like the overworld does.
does the amplify setting change the intensity of blindness?
i believe to an extent yes
but it’ll only go so far
I'm trying to alter synched entity data of a block-display. I need to set the blockstate of it, but some reason the value does not take a blockstate. What does it take?
synchedEntityData.set(new EntityDataAccessor<>(22, EntityDataSerializers.BLOCK_STATE), blockstate);//sets the blockstate
There's an API for displays
Inventory destination = event.getInventory();
if(!(destination instanceof PlayerInventory)) {
event.setCancelled(true);
}
Is this a good way to keep players from keeping items from a kit for an active duel after the duel ends?
This is in an InventoryClickEvent handler.
When the duel ends, the players old inventory is restored and their duel kit is wiped.
I also have an event handler to cancel the event if they drop an item
Create temp inventory then after end clear the current then give the temp.
I got that part figured out, this snippet is trying to stop players from putting items from the duel kit inventory into a chest or something so they can keep the items when the duel ends
There is, however I need to set the data in net.minecraft.world.entity.Display.BlockDisplay The only way to access the data appears to be through BlockDisplay#getEntityData() This returns SynchedEntityData, which I then use to send an entity data packet
At least, that’s what I’ve seen.
But I’m probably wrong.
how can i cast an ActionBar?
can you silently kill someone? eg i want to teleport someone but they are dead, so i respawn them. i want to move them somewhere, do something, and then move them back to their last place, and kill them
or if there's an easier way to move a dead play please tell me
The API sets it fine
If you mean sending it to the player, you can do something like:
.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(""));
… I may have the entity as the wrong type… Woops. Thanks LOL
could probably just switch them into spectator then do what you want
i was, because i am putting them inside of blocks, but doing so in spectator resulted in seeing right through them.
I want the effect of spectator without any ui or anything, but they need to be able to see blocks if they are inside of them
i guess i can just put more blocks around them and leave a 1x2 space
That sounds a little more reasonable. My gut tells me that the whole effect of spectator without UI might be a packets thing, which is something I am not an expert in
probably so, but i think this will work
ty
can i filter out messages/broadcasts to not be sent to certain players using the Broadcast event?
How can I create a new net.minecraft.world.level.block.state.blockstate? I need to set the blockstate of net.minecraft.world.entity.Display.BlockDisplay, but the method Display.BlockDisplay#setBlockState() takes the latter
I think so, something like .getRecipients().remove(event.getPlayer()) I believe
oh good. i was hoping i didnt have to cancel and manually do all of the sends
why type of event do join/leave messages get sent out through? does not appear to be BroadcastMessageEvent
Probably PlayerJoinEvent and PlayerQuitEvent
you think that does the sending of the messages?
i guess maybe so
doesn't look like it does
Oh you mean the generic join and quit messages?
yeah, so i have a specific state that a player will be in that i dont want any messages showing up on their screen
no join messages, no quit messages, no chat, no broadcast, etc
Not an expert, but maybe BlockState state = Blocks.MATERIAL.defaultBlockState().setValue(...);
Perhapes AsyncPlayerChatEvent and also setting the message null in PlayerQuitEvent, etc.
for the player join/quit -- wouldnt that set it to null for everyone though
Ah fair point, that is tricky, can't think of how to resolve that off the top of my head
oh well, problem for another day. thanks for your help today
no problem
i thought the say command would be a broadcast
I mentioned AsyncPlayerChatEvent becuase it can block general messages, not just broadcast I believe.
if that's what you were reffering to
I think say command would fall under Async
What does this error mean? me.tissemyren.missionsx.commands.MissionsCommand is not abstract and does not override abstract method onCommand(org.bukkit.command.CommandSender,org.bukkit.command.Command,java.lang.String,java.lang.String[]) in org.bukkit.command.CommandExecutor
Some of my code```java
public class MissionsCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, String[] args, String label) {```
Your implementation is not correct I believe.
I think you meant to say: onCommand(CommandSender sender, Command command, String label, String[] args). Something like that
it did not, unfortunately
oh, i didn't know that the arguments should be in a specific order. Thanks
i created listeners for both AsyncPlayerChatEvent and BroadcastMessageEvent. threw a sysout print on them and nada
for join/leave that is
same for "/say"
Hmmm, then I don't know how /say operates then, I thought it was either Async or Broadcast. I mean you could just not use the /say command lol, that's one way around it
oh for sure. i don't actually even use it im just trying to test. im not sure how to kick off a "broadcast" tbh. and i dont have another account to join to send messagfes to see if they cancel, lol
Uhhh isn't /broadcast a thing?
Or do you mean the broadcast for when a person joins specifically?
nah just broadcast. i dont think it is
Also something that I just thought, you could just set all the join and quit messages null for everyone, and then create a for loop to message people with a different message respectivly, that new message would probably could as a message that Async could handle.
Probably not the best approach, but it came to mind
yeah probably. that could just be a broastcast, no?
Oh yeah lol, broadcast message is better
im trying searching a solution, how can i convert a string
String annotationKey = field.getAnnotation(Path.class).key();
Into a path for mongodb like "subsection.sub" and then on mongodb
subsection: {
sub: ...
}
Why would you want that
I'm trying to get vanilla mobs loot, it works perfectly with most of the mobs but it doesn't work with blazes, like it will give me an empty loottable instead, this is my code https://paste.md-5.net/munaxujofu.java.
because i don't want to rewrite an entire library only for a stupid thing like this
You're using mongo wrong
so i can use the path annotation (that already exist) to make that
why?
i used it like this for most of my time with sub sections to make everything more "organized"
Ideally you have collections of your determined type with codecs and work with the data directly
Instead of playing with documents
Give me a sec I just woke up
ok
i already have made my own codecs for that, i just need to figure it out how to translate it just that
and i have already that
What you could do is just get all of the data as a json objects and play around with it
i use pojo, and i can separate everything but having everything inside a pojo with a path don't know but for me seems clean
with multiple collection i should remeber every one of them or just separating data that i found like world paths and other similar data but for other type of data should be better in one place
dead chat
fr
now i realized what they have on pfp
hi
how to resize title
my code: p.sendTitle("Witaj ponownie " + p.getDisplayName(), "życzymy udanej zabawy!");
There's no way to resize chat texts/titles/actionbars.
but title is too big
you can use a small font
BUT HOW
not sure if it's a resource pack only thing
check to see if utf 8 has any other fonts
it should be compatible
ty
👍
peristent data container
but isn't he using 1.12?
not exists in 1.12
it needs a newer version than 1.12
don't you need nbt then?
nbt?
if you want to do it on 1.12, use a yaml system or sql to save uuid as key and value as your data
oh
NBT is Named Binary Tag
does 1.12 still need nms for nbt?
i'm sure that some exist
i think so
actually yes
you can't just edit an entity otherwise
you don't have access to the nbt internals
hmm
even if the nbt classes are provided in the api
Hey, so in maven when adding bstats you get a new <plugin> in pom provided by bstats. how do I integrate into the one already there? or can I ahve two? because it now returns found duplicate declaration of plugin org.apache.maven.plugins:maven-shade-plugin
I understand the issue, but not how to fix it
I tried placing the bstats part inside the original one and that didnt work
can i see both?
you just copy paste the shade part into your existing shading section
<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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<!-- Replace this with your package! -->
<shadedPattern>me.albus.grapplinghook</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>```
As you see I have duplicates, as I have two, but I don't see how I can merge them and keep the original one as I assume I need that one and integrate the new one
do I need the top one at all? the <configuration> parts and that?
just copy what one misses from the other
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<!-- Replace this with your package! -->
<shadedPattern>me.albus.grapplinghook</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
use this instead of those 2
this one has both
Language level is invalid or missing in pom.xml. Current project JDK is 17. Specify language level in GrapplingHook```
fixed it, thanks.
had a question how to do I leave a gap in between two lines in a scoreboard?
the current one looks like this
if you're using scores make sure those 2 lines are unique
I was told to do something like
otherwise if you're using teams
it'd be similar for scores but it wouldn't matter for teams
Score score = objective.getScore(ChatColor.GRAY + date + ChatColor.GRAY + " hehehahhaha" + 1); //create a line for the board
Score s2 = objective.getScore(""); //blank space
Score s3 = objective.getScore(""); //blank space
Score s4 = objective.getScore(ChatColor.WHITE + "Early June" );```
try to do a sidebar with teams
score.setScore(13);
s2.setScore(12);
s3.setScore(11);
s4.setScore(10);```
it'll save you a headache
how does that work?
use a score and team with the same name
and when you set a score, the teams would be pulled into the sidebar
the score can be unique color codes
alr lemme try
so you don't see it
you can find more about this on spigot
'how to use teams for sidebar'
alr bet
Objective obj = board.registerNewObjective("SKYBLOCK", "dummy", "test");
``` this would be at the top right?
- what ram, ddr5,ddr4 etc
- what cpu
- what disk
for example, best setup would be, 128gb ddr5, amd ryzen 9 7950X3D, 8tb ssd nvme disks
uhh apparently the ryzen 7 7800x3d is slightly better in some applications due to the way the cache is handled
Pretty sure that on the ryzen 9's their 3d vcache only applies to half the cpu
something like that
oh lol
yeah something like this
Dosent work, it still says i have 0.0
public double addBalance(OfflinePlayer p, double amount) {
if(economy != null && economy.hasAccount(p)){
economy.depositPlayer(p, amount);
return economy.depositPlayer(p, amount).balance;
}
return 0.0;
}
how can economy be null
are you making your own economy plugin?
if you don't have an economy plugin
What is wrong with this? it gives a error at depostPlayer(p, amount)
public double addBalance(OfflinePlayer p, double amount) {
economy.depositPlayer(p, amount);
return economy.depositPlayer(p, amount).balance;
}
?paste
Paste the balace class
weird adapter class
Does anybodybody know how to resolve this intellij error:
If i lauch intellij a window pops up with this text:
Exception: Process 2 is still running```
There is nothing in the system maneger (i am on ubuntu)
And i tried to reinstall intellij, reboot, shutdown, update&upgrade linux and nothing helped
very weird
on it
tho i don't think an app could have id 2
yeah, guessed as much
ye
what do you mean sry?
how would I check if a invulnerable entity is attacked?
well, use a cmd instead
k
does damage event output anything?
me?
yes
dint set it up
you might have to listen to ServerboundInteractPacket
and now it is to late
wouldnt interact be like right click?
i see, would it be possible to get whats attacked as well?
you'll get the id
like minecraft:allay?
ah shit here we go again
how?
i had the same issue , but it seems to have been me clicking material by mistake, i fixed it now
otherwise i don't know
Bro just 26mb for discord? I've seen it almost reach 2gb once
Lmao
Did that the other day
go figure
I've seen it a 3
Also, how is ur 18 tabs (threads) of chrome using more ram than by 54 tabs (threads) of firefox
task manager is weird
because I got like 19 youtube tabs open and some other stuff
- tampermonkey
I only got 3 youtubes usually eyyy
I really want to upgrade to 64gb ram grr
weird question, does Enum#ordinal start from 0?
yes
nice
private boolean testEnum(MyEnum value) {
assert MyEnum.values()[value.ordinal()] == value;
}
You got 32?
??
