I made an update on the design. Initially, the background was too flahsy and the cards too dark, making it look weird. To fix this, I decided to go with a more simple and basic theme.
I think it looks way better as its more simple and basic.
I made an update on the design. Initially, the background was too flahsy and the cards too dark, making it look weird. To fix this, I decided to go with a more simple and basic theme.
I think it looks way better as its more simple and basic.
I finished the basic design of the Website. I will keep tweaking with the colors of the background and the cards as they dont match that good yet. I tried many designs and also tried vertical but I noticed that when i categorize them, horizontal would work and look better.
Fixxed a bug where the status indicator would sometimes not be showed when hovered over the boxes for some reason. Done :)
I finished the Mod! There were a few bugs left, where whe nyou would rejoin, the randomizer wouldnt work but i could fix it pretty easily.
I added two new challenges. one is pretty simple. Every time you jump you get a random item dropped to you. mixin into jumpFromGround, grab a random item from the registry and spawn it. (might also have been easier with just giving it to the player but it works for now. i will go into testing later if one has bugs)
the second one is the ice trail. you can sneak to toggle it on and off and a 3x3 platform of ice spawns under you wherever you walk. The ice will only replace air blocks and not existing blocks / blockentities.
getting the sneak toggle to work was annoying as to mixin into a sneak method didnt work because i couldnt find the right class. ended up using client.options.keyShift.isDown in a client tick event.
The first challegne “shared life” is done.
The core mechanic is when a player takes damage, everyone else gets the same amount. sounds simple, but it took me quiet a bit to get that right. the method i needed to use is called hurtServer in 26.x, not hurt like every tutorial says (cause of old yarn mappings like alr said in last devlog).
@Inject(method = [“hurtServer”], at = [At(“TAIL”)])
private fun onHurtServer(level: ServerLevel, source: DamageSource, amount: Float, cir: CallbackInfoReturnable) {
if (!cir.returnValue) return
if (ChallengeState.activeChallenge !is SharedLifeChallenge) return
val entity = this as? ServerPlayer ?: return
if (source.directEntity == null && source.entity == null) return
SharedLifeChallenge.onPlayerHurt(entity, amount)
}
the directEntity == null check is to prevent an infinite loop. When we deal damage to the other players, that would trigger the mixin again. Generic damage (the kind I use to pass the damage to other players) has no entity source so we can filter it out that way.
I have been building a challenges mod for minecraft 26.x and the idea is pretty simple. You type /challenges, a menu opens, you pick a challenge and it changes the gameplay. First challenge I am working on is shared life, where damage shared with every player.
Getting it running was honestly kind of a pain. 26.x doesnt need yarn mappings anymore since mojang ships unobfuscated now. Which sounds great until you realize nearly every of the classes isnt the same as yarn mappings and nothing matches the (now outdated) tutorials. For example: hurt() is now hurtServer(), GuiGraphics is GuiGraphicsExtractor.
I used AI to help look stuff up which sped things up a lot but even that was not always right.
I am finished with the Menu and I started with the challenge code.
I made the status dots feature actually work. Each card now has a dot that shows if a service is online or not. If the service works, the dot is green, if not it is red. It updates automatically every few seconds.
I used some AI help and also looked up a few things on Google to understand how to check if a website is reachable in JavaScript.
I added some UI improvements for the dashboard and the status indicators (the little dots on the cards).
At first I ran into a problem where the animation didn’t behave correctly and the status dots were not showing properly once hovered. It took a bit of testing, but I figured out that it was related to the CSS setup and how the hover/animation effects were combined.
After adjusting the everything started working as expected again.
Started working on a small internal dashboard for my Docker services. The goal is to keep everything simple and just get a clean dashboard with quick links to containers and self-hosted apps.
Most of the time went into getting a idea (even though its pretty simple now) My first version looked too plain, while another version felt way too much and for a utility page.
Current progress:
page structure finished
grid layout working
Header and live clock working
Example service cards added
Fixed the inventory sorting system so it now properly merges duplicate item stacks before sorting.
Before this change the sorter used each stack separately so items like multiple slots of oak planks would stay split across different slots. Now the system first collects all items from the main inventory, adds them up per material, and then rebuilds the inventory.
The main fix was adding a simple material-based map that adds up the item amounts before rebuilding the inventory:
val map = HashMap<Material, Int>()
for (i in 9..35) {
val item = inv.getItem(i)
if (item != null && item.type != Material.AIR) {
map[item.type] = (map[item.type] ?: 0) + item.amount
inv.setItem(i, null)
}
}
Today I added a simple inventory sorting command to my Paper Minecraft plugin. The command /sortinv sorts only the players main inventory while keeping the hotbar untouched. (i never did these item rearranging things in the inventory so it was complicated at first)
The implementation collects all items from the inventory, clears those slots, sorts the items by material name, and then places them back starting from slot 9. It’s a pretty basic approach but it works reliably and keeps the code easy to understand. Also, i need to fix that individual items stack together and i will maybe not only sort by alphabet but by item category.