diff --git a/src/main/java/net/wurstclient/events/TesselateBlockListener.java b/src/main/java/net/wurstclient/events/TesselateBlockListener.java deleted file mode 100644 index 1873402f3a..0000000000 --- a/src/main/java/net/wurstclient/events/TesselateBlockListener.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2014-2023 Wurst-Imperium and contributors. - * - * This source code is subject to the terms of the GNU General Public - * License, version 3. If a copy of the GPL was not distributed with this - * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt - */ -package net.wurstclient.events; - -import java.util.ArrayList; - -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; -import net.wurstclient.event.CancellableEvent; -import net.wurstclient.event.Listener; - -public interface TesselateBlockListener extends Listener -{ - public void onTesselateBlock(TesselateBlockEvent event); - - public static class TesselateBlockEvent - extends CancellableEvent - { - private final BlockState state; - private final BlockPos pos; - - public TesselateBlockEvent(BlockState state, BlockPos pos) - { - this.state = state; - this.pos = pos; - } - - public BlockState getState() - { - return state; - } - - public BlockPos getPos() - { - return pos; - } - - @Override - public void fire(ArrayList listeners) - { - for(TesselateBlockListener listener : listeners) - { - listener.onTesselateBlock(this); - - if(isCancelled()) - break; - } - } - - @Override - public Class getListenerType() - { - return TesselateBlockListener.class; - } - } -} diff --git a/src/main/java/net/wurstclient/hacks/XRayHack.java b/src/main/java/net/wurstclient/hacks/XRayHack.java index 4288b7e280..31c0286809 100644 --- a/src/main/java/net/wurstclient/hacks/XRayHack.java +++ b/src/main/java/net/wurstclient/hacks/XRayHack.java @@ -25,7 +25,6 @@ import net.wurstclient.events.RenderBlockEntityListener; import net.wurstclient.events.SetOpaqueCubeListener; import net.wurstclient.events.ShouldDrawSideListener; -import net.wurstclient.events.TesselateBlockListener; import net.wurstclient.events.UpdateListener; import net.wurstclient.hack.Hack; import net.wurstclient.mixinterface.ISimpleOption; @@ -37,7 +36,7 @@ @SearchTags({"XRay", "x ray", "OreFinder", "ore finder"}) public final class XRayHack extends Hack implements UpdateListener, SetOpaqueCubeListener, GetAmbientOcclusionLightLevelListener, - ShouldDrawSideListener, TesselateBlockListener, RenderBlockEntityListener + ShouldDrawSideListener, RenderBlockEntityListener { private final BlockListSetting ores = new BlockListSetting("Ores", "A list of blocks that X-Ray will show. They don't have to be just ores" @@ -109,7 +108,6 @@ public void onEnable() EVENTS.add(SetOpaqueCubeListener.class, this); EVENTS.add(GetAmbientOcclusionLightLevelListener.class, this); EVENTS.add(ShouldDrawSideListener.class, this); - EVENTS.add(TesselateBlockListener.class, this); EVENTS.add(RenderBlockEntityListener.class, this); // reload chunks @@ -128,7 +126,6 @@ public void onDisable() EVENTS.remove(SetOpaqueCubeListener.class, this); EVENTS.remove(GetAmbientOcclusionLightLevelListener.class, this); EVENTS.remove(ShouldDrawSideListener.class, this); - EVENTS.remove(TesselateBlockListener.class, this); EVENTS.remove(RenderBlockEntityListener.class, this); // reload chunks @@ -168,13 +165,6 @@ public void onShouldDrawSide(ShouldDrawSideEvent event) isVisible(event.getState().getBlock(), event.getPos())); } - @Override - public void onTesselateBlock(TesselateBlockEvent event) - { - if(!isVisible(event.getState().getBlock(), event.getPos())) - event.cancel(); - } - @Override public void onRenderBlockEntity(RenderBlockEntityEvent event) {