-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MiddleClick Module, Notification update.
- Loading branch information
Showing
16 changed files
with
315 additions
and
60 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
53 changes: 53 additions & 0 deletions
53
src/main/java/top/whitecola/promodule/common/Position.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,53 @@ | ||
package top.whitecola.promodule.common; | ||
|
||
public class Position { | ||
public float x; | ||
public float y; | ||
public float x2; | ||
public float y2; | ||
|
||
public Position(){} | ||
|
||
public Position(float x,float y,float x2,float y2){ | ||
this.x = x; | ||
this.y = y; | ||
this.x2 = x2; | ||
this.y2 = y2; | ||
} | ||
|
||
public float getX() { | ||
return x; | ||
} | ||
|
||
public Position setX(float x) { | ||
this.x = x; | ||
return this; | ||
} | ||
|
||
public float getY() { | ||
return y; | ||
} | ||
|
||
public Position setY(float y) { | ||
this.y = y; | ||
return this; | ||
} | ||
|
||
public float getX2() { | ||
return x2; | ||
} | ||
|
||
public Position setX2(float x2) { | ||
this.x2 = x2; | ||
return this; | ||
} | ||
|
||
public float getY2() { | ||
return y2; | ||
} | ||
|
||
public Position setY2(float y2) { | ||
this.y2 = y2; | ||
return this; | ||
} | ||
} |
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
17 changes: 8 additions & 9 deletions
17
src/main/java/top/whitecola/promodule/gui/notification/INotificationPos.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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
package top.whitecola.promodule.gui.notification; | ||
|
||
import top.whitecola.promodule.common.Position; | ||
|
||
public interface INotificationPos { | ||
void setX(float x); | ||
void setY(float y); | ||
float getX(); | ||
float getY(); | ||
|
||
void setX2(float x); | ||
void setY2(float y); | ||
float getX2(); | ||
float getY2(); | ||
Position getPos(); | ||
void setPos(Position pos); | ||
|
||
Position getToPos(); | ||
void setToPos(Position pos); | ||
|
||
} |
4 changes: 3 additions & 1 deletion
4
src/main/java/top/whitecola/promodule/gui/notification/INotificationStyle.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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package top.whitecola.promodule.gui.notification; | ||
|
||
import top.whitecola.promodule.gui.notification.beans.NotificationRenderEvent; | ||
|
||
public interface INotificationStyle { | ||
void render(); | ||
void render(NotificationRenderEvent e); | ||
} |
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
27 changes: 27 additions & 0 deletions
27
src/main/java/top/whitecola/promodule/gui/notification/beans/NotificationRenderEvent.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 top.whitecola.promodule.gui.notification.beans; | ||
|
||
public class NotificationRenderEvent { | ||
private int level; | ||
private int totalLine; | ||
|
||
public NotificationRenderEvent(int level,int totalLine){ | ||
this.level = level; | ||
this.totalLine = totalLine; | ||
} | ||
|
||
public int getLevel() { | ||
return level; | ||
} | ||
|
||
public void setLevel(int level) { | ||
this.level = level; | ||
} | ||
|
||
public int getTotalLine() { | ||
return totalLine; | ||
} | ||
|
||
public void setTotalLine(int totalLine) { | ||
this.totalLine = totalLine; | ||
} | ||
} |
24 changes: 22 additions & 2 deletions
24
src/main/java/top/whitecola/promodule/gui/notification/impls/PureNotification.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 |
---|---|---|
@@ -1,13 +1,33 @@ | ||
package top.whitecola.promodule.gui.notification.impls; | ||
|
||
import top.whitecola.promodule.gui.notification.AbstractNotification; | ||
import top.whitecola.promodule.gui.notification.beans.NotificationRenderEvent; | ||
|
||
public class PureNotification extends AbstractNotification { | ||
protected long totalTime = 1000; | ||
|
||
|
||
public PureNotification(){ | ||
|
||
} | ||
|
||
@Override | ||
public void render() { | ||
public void render(NotificationRenderEvent e) { | ||
manageTime(e.getLevel()); | ||
if(!isEntered()){ | ||
|
||
} | ||
} | ||
|
||
public void manageTime(int level){ | ||
if(lastTime==0){ | ||
if(level==1){ | ||
lastTime = System.currentTimeMillis(); | ||
} | ||
return; | ||
} | ||
|
||
if(System.currentTimeMillis() - this.lastTime>=totalTime){ | ||
this.setNeedLeave(true); | ||
} | ||
}; | ||
} |
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
29 changes: 29 additions & 0 deletions
29
src/main/java/top/whitecola/promodule/modules/impls/movement/EagleJump.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,29 @@ | ||
package top.whitecola.promodule.modules.impls.movement; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.entity.EntityPlayerSP; | ||
import net.minecraft.init.Blocks; | ||
import net.minecraft.util.BlockPos; | ||
import top.whitecola.promodule.modules.AbstractModule; | ||
import top.whitecola.promodule.modules.ModuleCategory; | ||
|
||
public class EagleJump extends AbstractModule { | ||
|
||
@Override | ||
public void onTick() { | ||
|
||
super.onTick(); | ||
} | ||
|
||
@Override | ||
public ModuleCategory getModuleType() { | ||
return ModuleCategory.MOVEMENT; | ||
} | ||
|
||
@Override | ||
public String getModuleName() { | ||
return "EagleJump"; | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.