Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
CumHax authored Aug 17, 2021
1 parent fa357eb commit 4c1c76e
Show file tree
Hide file tree
Showing 32 changed files with 2,385 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/main/java/me/cumhax/chipshack/event/EventCancellable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package me.cumhax.chipshack.event;

import me.cumhax.chipshack.event.more.EventStageable;

public class EventCancellable extends EventStageable {
private boolean canceled;

public EventCancellable() {}

public EventCancellable(EventStage stage) {
super(stage);
}

public EventCancellable(EventStage stage, boolean canceled) {
super(stage);

this.canceled = canceled;
}

public void setCanceled(boolean canceled) {
this.canceled = canceled;
}

public void cancel() {
this.canceled = true;
}

public boolean isCancelled() {
return this.canceled;
}
}
7 changes: 7 additions & 0 deletions src/main/java/me/cumhax/chipshack/event/EventHurtCam.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package me.cumhax.chipshack.event;

import me.cumhax.chipshack.event.Event;

public class EventHurtCam extends Event {

}
14 changes: 14 additions & 0 deletions src/main/java/me/cumhax/chipshack/event/EventListener.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package me.cumhax.chipshack.event;

import me.cumhax.chipshack.event.Event;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(value = RetentionPolicy.RUNTIME)
public @interface EventListener {

Class<? extends Event>[] events();
int priority() default 3;

}
22 changes: 22 additions & 0 deletions src/main/java/me/cumhax/chipshack/event/EventPacketSend.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package me.cumhax.chipshack.event;

import net.minecraft.network.Packet;
import me.cumhax.chipshack.event.EventCancellable;

public class EventPacketSend extends EventCancellable {
private Packet packet;

public EventPacketSend(EventStage stage, Packet packet) {
super(stage);

this.packet = packet;
}

public void setPacket(Packet packet) {
this.packet = packet;
}

public Packet getPacket() {
return this.packet;
}
}
7 changes: 7 additions & 0 deletions src/main/java/me/cumhax/chipshack/event/Minecraftable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package me.cumhax.chipshack.event;

import net.minecraft.client.Minecraft;

public interface Minecraftable {
Minecraft mc = Minecraft.getMinecraft();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package me.cumhax.chipshack.event;

import net.minecraftforge.fml.common.eventhandler.Event;

public class PlayerLivingUpdateEvent extends Event {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package me.cumhax.chipshack.event;

import me.cumhax.chipshack.event.Event;

public class RenderChatBackgroundEvent extends Event {
}
27 changes: 27 additions & 0 deletions src/main/java/me/cumhax/chipshack/event/RenderToolTipEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package me.cumhax.chipshack.event;

import net.minecraft.item.ItemStack;
import me.cumhax.chipshack.event.Event;

public class RenderToolTipEvent extends Event {
private ItemStack stack;
private int x, y;

public RenderToolTipEvent(ItemStack stack, int x, int y) {
this.stack = stack;
this.x = x;
this.y = y;
}

public int getX() {
return x;
}

public int getY() {
return y;
}

public ItemStack getStack() {
return stack;
}
}
6 changes: 6 additions & 0 deletions src/main/java/me/cumhax/chipshack/event/TraceEntityEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package me.cumhax.chipshack.event;

import me.cumhax.chipshack.event.Event;

public class TraceEntityEvent extends Event {
}
26 changes: 26 additions & 0 deletions src/main/java/me/cumhax/chipshack/event/aura/PacketSendEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package me.cumhax.chipshack.event.aura;

import net.minecraft.network.Packet;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;

@Cancelable
public class PacketSendEvent extends Event
{
private Packet<?> packet;

public PacketSendEvent(Packet<?> packet)
{
this.packet = packet;
}

public Packet<?> getPacket()
{
return packet;
}

public void setPacket(Packet<?> packet)
{
this.packet = packet;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Decompiled by Procyon v0.5.36
//

package me.cumhax.chipshack.event.autocrystal;

public class Cancellable implements ICancellable
{
private boolean cancelled;

@Override
public void cancel() {
this.cancelled = true;
}

@Override
public boolean isCancelled() {
return this.cancelled;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

package me.cumhax.chipshack.event.autocrystal;

import net.minecraft.client.Minecraft;
import me.cumhax.chipshack.event.autocrystal.Cancellable;

public class EventCancellable extends Cancellable
{
private final Era era_switch;
private final float partial_ticks;

public EventCancellable() {
this.era_switch = Era.EVENT_PRE;
this.partial_ticks = Minecraft.getMinecraft().getRenderPartialTicks();
}

public Era get_era() {
return this.era_switch;
}

public float get_partial_ticks() {
return this.partial_ticks;
}

public enum Era
{
EVENT_PRE,
EVENT_PERI,
EVENT_POST;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

package me.cumhax.chipshack.event.autocrystal;

import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.Vec3d;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.gui.ScaledResolution;
import me.cumhax.chipshack.event.autocrystal.EventCancellable;

public class EventRender extends EventCancellable
{
private final ScaledResolution res;
private final Tessellator tessellator;
private final Vec3d render_pos;

public EventRender(final Tessellator tessellator, final Vec3d pos) {
this.res = new ScaledResolution(Minecraft.getMinecraft());
this.tessellator = tessellator;
this.render_pos = pos;
}

public Tessellator get_tessellator() {
return this.tessellator;
}

public Vec3d get_render_pos() {
return this.render_pos;
}

public BufferBuilder get_buffer_build() {
return this.tessellator.getBuffer();
}

public void set_translation(final Vec3d pos) {
this.get_buffer_build().setTranslation(-pos.x, -pos.y, -pos.z);
}

public void reset_translation() {
this.set_translation(this.render_pos);
}

public double get_screen_width() {
return this.res.getScaledWidth_double();
}

public double get_screen_height() {
return this.res.getScaledHeight_double();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Decompiled by Procyon v0.5.36
//

package me.cumhax.chipshack.event.autocrystal;

public interface ICancellable
{
void cancel();

boolean isCancelled();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package me.cumhax.chipshack.event.autocrystal;

import me.cumhax.chipshack.event.Event;

public class Render3DEvent extends Event {
private final float partialTicks;

public Render3DEvent(float partialTicks) {
this.partialTicks = partialTicks;
}

public float getPartialTicks() {
return partialTicks;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package me.cumhax.chipshack.event.autocrystal;

import me.cumhax.chipshack.event.Event;
import me.cumhax.chipshack.event.EventType;
import net.minecraft.client.entity.EntityPlayerSP;

public class UpdateEvent extends Event {
private EventType type;
private EntityPlayerSP player;
private float yaw,pitch;
private double x,y,z;
private boolean onGround;
public UpdateEvent(EventType type, EntityPlayerSP player, float yaw,float pitch, double x,double y,double z,boolean onGround) {
this.type = type;
this.player = player;
this.yaw = yaw;
this.pitch = pitch;
this.x = x;
this.y = y;
this.z = z;
this.onGround = onGround;
}

public UpdateEvent() {
type = EventType.POST;
}

public void setType(EventType type) {
this.type = type;
}

public void setPlayer(EntityPlayerSP player) {
this.player = player;
}

public void setYaw(float yaw) {
this.yaw = yaw;
}

public void setPitch(float pitch) {
this.pitch = pitch;
}

public void setX(double x) {
this.x = x;
}

public void setY(double y) {
this.y = y;
}

public void setZ(double z) {
this.z = z;
}

public void setOnGround(boolean onGround) {
this.onGround = onGround;
}

public boolean isOnGround() {
return onGround;
}

public float getYaw() {
return yaw;
}

public float getPitch() {
return pitch;
}

public double getX() {
return x;
}

public double getY() {
return y;
}

public double getZ() {
return z;
}

public EventType getType() {
return type;
}

public EntityPlayerSP getPlayer() {
return player;
}
}
Loading

0 comments on commit 4c1c76e

Please sign in to comment.