-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
2,385 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/me/cumhax/chipshack/event/EventCancellable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
14
src/main/java/me/cumhax/chipshack/event/EventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
22
src/main/java/me/cumhax/chipshack/event/EventPacketSend.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/me/cumhax/chipshack/event/PlayerLivingUpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/me/cumhax/chipshack/event/RenderChatBackgroundEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
27
src/main/java/me/cumhax/chipshack/event/RenderToolTipEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
6
src/main/java/me/cumhax/chipshack/event/TraceEntityEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
26
src/main/java/me/cumhax/chipshack/event/aura/PacketSendEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/me/cumhax/chipshack/event/autocrystal/Cancellable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/me/cumhax/chipshack/event/autocrystal/EventCancellable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
src/main/java/me/cumhax/chipshack/event/autocrystal/EventRender.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/me/cumhax/chipshack/event/autocrystal/ICancellable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/me/cumhax/chipshack/event/autocrystal/Render3DEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
91 changes: 91 additions & 0 deletions
91
src/main/java/me/cumhax/chipshack/event/autocrystal/UpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
Oops, something went wrong.