1
0
Fork 0

add rocket launcher + fixes

This commit is contained in:
Sen 2025-07-08 01:51:47 +02:00
parent 987c76d2c5
commit eca1f242c4
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
54 changed files with 452 additions and 478 deletions

View file

@ -770,6 +770,8 @@ public class Client implements IThreadListener {
if (this.keyBindsHotbar[l].isPressed())
{
// if(!this.showDebugProfilerChart) {
if(this.player.inventory.currentItem != l)
this.controller.resetUseCooldown();
this.player.inventory.currentItem = l;
// }
}
@ -1127,7 +1129,7 @@ public class Client implements IThreadListener {
ItemStack itemstack = this.player.inventory.mainInventory[index];
if(itemstack != null) {
GuiContainer.renderItemOverlay(itemstack,
this.fb_x / 2 - 180 + 4 + 1 + index * 40, this.fb_y - 40 + 1, null);
this.fb_x / 2 - 180 + 4 + 1 + index * 40, this.fb_y - 40 + 1, null, index == this.player.inventory.currentItem ? this.controller.getUseCooldown() : 0, this.controller.getUseCooldownMax());
}
}
}
@ -1270,8 +1272,10 @@ public class Client implements IThreadListener {
// }
if(this.zooming)
this.zoomLevel = ExtMath.clampf(this.zoomLevel + (dir < 0 ? -0.25f : 0.25f), 2.0f, 16.0f);
else if(this.player != null)
else if(this.player != null) {
this.player.inventory.changeCurrentItem(dir);
this.controller.resetUseCooldown();
}
}
// public void resize(int width, int height)
@ -1558,7 +1562,8 @@ public class Client implements IThreadListener {
InventoryPlayer inventoryplayer = this.player.inventory;
inventoryplayer.setCurrentItem(item);
if(inventoryplayer.setCurrentItem(item))
this.controller.resetUseCooldown();
if(this.itemCheat) {
this.player.client.addToSendQueue(new CPacketCheat(item, -2 - inventoryplayer.currentItem, this.ctrl()));
}