add InventoryUtils
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m33s

This commit is contained in:
Daniella / Tove 2024-06-25 20:24:17 +02:00
parent 75b0b24176
commit 1baf2709b8
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -0,0 +1,26 @@
package de.com.baseband.client.feature.modules.experimental;
import de.com.baseband.client.event.events.PacketEvent;
import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.category.Experimental;
import de.com.baseband.client.registry.annotation.Config;
import de.com.baseband.client.registry.annotation.Description;
import net.minecraft.network.play.client.CPacketCloseWindow;
@Experimental
public class InventoryUtils extends Feature {
@Config("XCarry")
@Description("Allows you to put stuff into your crafting slots!")
public boolean xCarry = false;
public void onPacket(PacketEvent.Send event) {
if(xCarry && event.getPacket() instanceof CPacketCloseWindow)
event.setCancelled(true);
}
@Override
public String toString() {
return "InventoryUtils";
}
}