-
Notifications
You must be signed in to change notification settings - Fork 2
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
15 changed files
with
131 additions
and
20 deletions.
There are no files selected for viewing
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
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
2 changes: 1 addition & 1 deletion
2
.../components/items/buttons/BindButton.java → ...i/components/items/button/BindButton.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
2 changes: 1 addition & 1 deletion
2
...mponents/items/buttons/BooleanButton.java → ...omponents/items/button/BooleanButton.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
2 changes: 1 addition & 1 deletion
2
.../gui/components/items/buttons/Button.java → ...d/gui/components/items/button/Button.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
2 changes: 1 addition & 1 deletion
2
.../components/items/buttons/EnumButton.java → ...i/components/items/button/EnumButton.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
2 changes: 1 addition & 1 deletion
2
...omponents/items/buttons/ModuleButton.java → ...components/items/button/ModuleButton.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
2 changes: 1 addition & 1 deletion
2
.../gui/components/items/buttons/Slider.java → ...d/gui/components/items/button/Slider.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
2 changes: 1 addition & 1 deletion
2
...omponents/items/buttons/StringButton.java → ...components/items/button/StringButton.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
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
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
68 changes: 68 additions & 0 deletions
68
src/main/java/me/crimp/claudius/mod/modules/pvp/CrystalAura.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,68 @@ | ||
package me.crimp.claudius.mod.modules.pvp; | ||
|
||
import me.crimp.claudius.Claudius; | ||
import me.crimp.claudius.event.events.UpdateWalkingPlayerEvent; | ||
import me.crimp.claudius.mod.modules.Module; | ||
import me.crimp.claudius.mod.setting.Setting; | ||
import net.minecraft.entity.item.EntityItem; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.init.Items; | ||
import net.minecraft.util.EnumHand; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
|
||
public class CrystalAura extends Module { | ||
|
||
public Setting<Boolean> Place = this.register(new Setting<>("Place", true)); | ||
public Setting<Boolean> Break = this.register(new Setting<>("Break", true)); | ||
public Setting<Boolean> GappPause = this.register(new Setting<>("GappPause", false)); | ||
public Setting<Float> PlayerRange = this.register(new Setting<>("PlayerRange", 5f,1f,10f)); | ||
public Setting<Float> PlaceDelay = this.register(new Setting<>("PlaceDelay", 0f,0f,20f)); | ||
public Setting<Float> BreakSpeed = this.register(new Setting<>("BreakSpeed", 20f,0f,20f)); | ||
|
||
public CrystalAura() { | ||
super("CrystalAura", "CrystalAura", Category.PVP, true, false, false); | ||
} | ||
|
||
private int hitTicks; | ||
private int placeTicks; | ||
private EntityPlayer target; | ||
|
||
|
||
|
||
@SubscribeEvent | ||
public void onWalk (UpdateWalkingPlayerEvent event) { | ||
doCrystal(); | ||
hitTicks ++; | ||
placeTicks ++; | ||
} | ||
|
||
|
||
|
||
private void doCrystal() { | ||
if (!fullNullCheck() || this.GappPause.getValue() && mc.player.getHeldItem(EnumHand.MAIN_HAND).getItem().equals(Items.GOLDEN_APPLE)) return; | ||
target = GetPlayer(); | ||
if (target == null) return; | ||
if (this.Place.getValue() && placeTicks > this.PlaceDelay.getValue()) { | ||
//placecrystal | ||
} | ||
if (this.Break.getValue() && hitTicks > this.BreakSpeed.getValue()) { | ||
//breakcrystal | ||
} | ||
} | ||
|
||
private EntityPlayer GetPlayer() { | ||
EntityPlayer playerTarget = null; | ||
for (EntityPlayer player: mc.world.playerEntities) { | ||
if (Claudius.friendManager.isFriend(player)) continue; | ||
if (player.getName() == mc.player.getName()) continue; | ||
if (player.getDistanceSq(mc.player) > this.PlayerRange.getValue() * this.PlayerRange.getValue()) continue; | ||
if (player.isDead) continue; | ||
if (playerTarget != null) { | ||
if (player.getDistance(player) > player.getDistance(playerTarget)) continue; | ||
} | ||
playerTarget = player; | ||
} | ||
return playerTarget; | ||
} | ||
} | ||
|
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
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
File renamed without changes