This repository has been archived by the owner on May 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement Knockback Profile * Update EntityLiving.java * Add knockback values * New KnockbackCommand * Patch stupid error * Instant interactions * Save knockback method * FastMath cos/sin > MathHelper Co-authored-by: Elier <[email protected]> * Move ClickableBuilder to CobbleSword * Update EntityHuman.java * Update EntityHuman.java * Change Knockback config to static * fix conflict * Update NachoSpigot-Server/src/main/java/net/minecraft/server/EntityHuman.java Co-authored-by: Elier <[email protected]> * Fix import * Fix velocity variable not existing * Save on Set Co-authored-by: Sculas <[email protected]> Co-authored-by: Elier <[email protected]>
- Loading branch information
1 parent
1bd45b3
commit 98268b2
Showing
25 changed files
with
1,230 additions
and
352 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
NachoSpigot-API/src/main/java/dev/cobblesword/nachospigot/knockback/KnockbackProfile.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 dev.cobblesword.nachospigot.knockback; | ||
|
||
public interface KnockbackProfile { | ||
|
||
void save(); | ||
void save(boolean projectiles); | ||
|
||
String getName(); | ||
|
||
void setName(String name); | ||
|
||
double getHorizontal(); | ||
|
||
void setHorizontal(double horizontal); | ||
|
||
double getVertical(); | ||
|
||
void setVertical(double vertical); | ||
|
||
double getVerticalMin(); | ||
|
||
void setVerticalMin(double verticalMin); | ||
|
||
double getVerticalMax(); | ||
|
||
void setVerticalMax(double verticalMax); | ||
|
||
double getExtraHorizontal(); | ||
|
||
void setExtraHorizontal(double extraHorizontal); | ||
|
||
double getExtraVertical(); | ||
|
||
void setExtraVertical(double extraVertical); | ||
|
||
double getFrictionHorizontal(); | ||
|
||
void setFrictionHorizontal(double frictionHorizontal); | ||
|
||
double getFrictionVertical(); | ||
|
||
void setFrictionVertical(double frictionVertical); | ||
|
||
boolean isStopSprint(); | ||
|
||
void setStopSprint(boolean stopSprint); | ||
|
||
double getRodHorizontal(); | ||
|
||
void setRodHorizontal(double rodHorizontal); | ||
|
||
double getRodVertical(); | ||
|
||
void setRodVertical(double rodVertical); | ||
|
||
double getArrowHorizontal(); | ||
|
||
void setArrowHorizontal(double arrowHorizontal); | ||
|
||
double getArrowVertical(); | ||
|
||
void setArrowVertical(double arrowVertical); | ||
|
||
double getPearlHorizontal(); | ||
|
||
void setPearlHorizontal(double pearlHorizontal) ; | ||
|
||
double getPearlVertical(); | ||
|
||
void setPearlVertical(double pearlVertical); | ||
|
||
double getSnowballHorizontal(); | ||
|
||
void setSnowballHorizontal(double snowballHorizontal); | ||
|
||
double getSnowballVertical(); | ||
|
||
void setSnowballVertical(double snowballVertical); | ||
|
||
double getEggHorizontal(); | ||
|
||
void setEggHorizontal(double eggHorizontal); | ||
|
||
double getEggVertical(); | ||
|
||
void setEggVertical(double eggVertical); | ||
|
||
String[] getKnockbackValues(); | ||
|
||
String[] getProjectilesValues(); | ||
} |
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
117 changes: 0 additions & 117 deletions
117
NachoSpigot-API/src/main/java/org/bukkit/command/defaults/nacho/KnockbackCommand.java
This file was deleted.
Oops, something went wrong.
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
32 changes: 32 additions & 0 deletions
32
NachoSpigot-Server/src/main/java/dev/cobblesword/nachospigot/commons/ClickableBuilder.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,32 @@ | ||
package dev.cobblesword.nachospigot.commons; | ||
|
||
import net.md_5.bungee.api.chat.ClickEvent; | ||
import net.md_5.bungee.api.chat.ComponentBuilder; | ||
import net.md_5.bungee.api.chat.HoverEvent; | ||
import net.md_5.bungee.api.chat.TextComponent; | ||
|
||
public class ClickableBuilder { | ||
private TextComponent textComponent; | ||
|
||
public ClickableBuilder() { } | ||
|
||
public ClickableBuilder(String message) { | ||
this.textComponent = new TextComponent(message); | ||
} | ||
|
||
public ClickableBuilder setHover(String hover) { | ||
this.textComponent.setHoverEvent( | ||
new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create()) | ||
); | ||
return this; | ||
} | ||
|
||
public ClickableBuilder setClick(String command, ClickEvent.Action mode) { | ||
this.textComponent.setClickEvent(new ClickEvent(mode, command)); | ||
return this; | ||
} | ||
|
||
public TextComponent build() { | ||
return this.textComponent; | ||
} | ||
} |
Oops, something went wrong.