Removed onUpdate
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
package me.alpha432.oyvey.event.impl;
|
||||
|
||||
import me.alpha432.oyvey.event.Event;
|
||||
|
||||
public class UpdateEvent extends Event {
|
||||
}
|
||||
@@ -48,9 +48,6 @@ public class Module extends Feature implements Jsonable {
|
||||
public void onTick() {
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
}
|
||||
|
||||
public void onRender2D(Render2DEvent event) {
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package me.alpha432.oyvey.features.modules.client;
|
||||
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import me.alpha432.oyvey.OyVey;
|
||||
import me.alpha432.oyvey.event.impl.UpdateEvent;
|
||||
import me.alpha432.oyvey.event.impl.TickEvent;
|
||||
import me.alpha432.oyvey.features.gui.HudEditorScreen;
|
||||
import me.alpha432.oyvey.features.modules.Module;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class HudEditor extends Module {
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onUpdate(UpdateEvent event) {
|
||||
public void onTick(TickEvent event) {
|
||||
if (nullCheck()) return;
|
||||
if (!(mc.currentScreen instanceof HudEditorScreen)) {
|
||||
disable();
|
||||
|
||||
@@ -8,7 +8,7 @@ public class ReverseStep extends Module {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
public void onTick() {
|
||||
if (nullCheck()) return;
|
||||
if (mc.player.isInLava() || mc.player.isTouchingWater() || !mc.player.isOnGround()) return;
|
||||
mc.player.addVelocity(0, -1, 0);
|
||||
|
||||
@@ -29,7 +29,7 @@ public class Step extends Module {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
public void onTick() {
|
||||
if (nullCheck()) return;
|
||||
mc.player.getAttributeInstance(EntityAttributes.STEP_HEIGHT).setBaseValue(height.getValue());
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ public class FastPlace extends Module {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
public void onTick() {
|
||||
if (nullCheck()) return;
|
||||
|
||||
if (mc.player.isHolding(Items.EXPERIENCE_BOTTLE)) {
|
||||
|
||||
@@ -10,7 +10,7 @@ public class NoFall extends Module {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
public void onTick() {
|
||||
if (!mc.player.isOnGround() && OyVey.positionManager.getFallDistance() > 3) {
|
||||
boolean bl = mc.player.horizontalCollision;
|
||||
PlayerMoveC2SPacket.Full pakcet = new PlayerMoveC2SPacket.Full(mc.player.getX(), mc.player.getY() + 0.000000001, mc.player.getZ(),
|
||||
|
||||
@@ -23,14 +23,7 @@ public class EventManager extends Feature {
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onUpdate(UpdateEvent event) {
|
||||
if (!nullCheck()) {
|
||||
OyVey.moduleManager.onUpdate();
|
||||
onTick();
|
||||
}
|
||||
}
|
||||
|
||||
public void onTick() {
|
||||
public void onTick(TickEvent event) {
|
||||
if (nullCheck())
|
||||
return;
|
||||
OyVey.moduleManager.onTick();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.alpha432.oyvey.manager;
|
||||
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import me.alpha432.oyvey.event.impl.UpdateEvent;
|
||||
import me.alpha432.oyvey.event.impl.TickEvent;
|
||||
import me.alpha432.oyvey.features.Feature;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
@@ -22,7 +22,7 @@ public class HoleManager extends Feature {
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onTick(UpdateEvent event) {
|
||||
private void onTick(TickEvent event) {
|
||||
holes.clear();
|
||||
for (int x = -range; x < range; x++) {
|
||||
for (int y = -range; y < range; y++) {
|
||||
|
||||
@@ -79,10 +79,6 @@ public class ModuleManager implements Jsonable, Util {
|
||||
getModules().forEach(Module::onLoad);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
stream().filter(Feature::isEnabled).forEach(Module::onUpdate);
|
||||
}
|
||||
|
||||
public void onTick() {
|
||||
stream().filter(Feature::isEnabled).forEach(Module::onTick);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.alpha432.oyvey.mixin;
|
||||
|
||||
import me.alpha432.oyvey.event.Stage;
|
||||
import me.alpha432.oyvey.event.impl.UpdateEvent;
|
||||
import me.alpha432.oyvey.event.impl.TickEvent;
|
||||
import me.alpha432.oyvey.event.impl.UpdateWalkingPlayerEvent;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -15,7 +15,7 @@ import static me.alpha432.oyvey.util.traits.Util.EVENT_BUS;
|
||||
public class MixinClientPlayerEntity {
|
||||
@Inject(method = "tick", at = @At("TAIL"))
|
||||
private void tickHook(CallbackInfo ci) {
|
||||
EVENT_BUS.post(new UpdateEvent());
|
||||
EVENT_BUS.post(new TickEvent());
|
||||
}
|
||||
|
||||
@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/AbstractClientPlayerEntity;tick()V", shift = At.Shift.AFTER))
|
||||
|
||||
Reference in New Issue
Block a user