Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Aug 14, 2024
1 parent afd131a commit fb12b1d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
2 changes: 0 additions & 2 deletions src/main/java/win/cuteguimc/zombieshelper/ZombiesHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import win.cuteguimc.zombieshelper.command.OpenGUICommand;
import win.cuteguimc.zombieshelper.config.ZombiesHelperConfig;
import win.cuteguimc.zombieshelper.listener.AutoSwitchListener;
import win.cuteguimc.zombieshelper.listener.BlockUseEntityListener;
import win.cuteguimc.zombieshelper.listener.NoPuncherListener;
import win.cuteguimc.zombieshelper.listener.RendHudListener;
Expand Down Expand Up @@ -35,7 +34,6 @@ public void onInit(FMLInitializationEvent event) {
new NoPuncherListener();
new BlockUseEntityListener();
new RendHudListener();
new AutoSwitchListener();
CommandManager.INSTANCE.registerCommand(new OpenGUICommand());
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import cc.polyfrost.oneconfig.libs.eventbus.Subscribe;
import net.minecraft.block.BlockChest;
import net.minecraft.client.Minecraft;
import net.minecraft.item.EnumAction;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C02PacketUseEntity;
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
Expand All @@ -23,6 +24,7 @@ public BlockUseEntityListener() {
@Subscribe
public void onPacketSend(SendPacketEvent event) {
if (!ZombiesHelperConfig.blockUseEntity) return;
if (mc.thePlayer.inventory.getCurrentItem().getItem().getItemUseAction(mc.thePlayer.inventory.getCurrentItem()) != EnumAction.NONE) return;
Packet packet = event.packet;
if ((packet instanceof C08PacketPlayerBlockPlacement &&
mc.theWorld.getBlockState(((C08PacketPlayerBlockPlacement) packet).getPosition()).getBlock() instanceof BlockChest) ||
Expand Down

0 comments on commit fb12b1d

Please sign in to comment.