Skip to content

Commit 7eaebe8

Browse files
Merge pull request #435 from VolmitSoftware/Development
Development
2 parents a081a84 + 5ee330c commit 7eaebe8

23 files changed

+361
-199
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ plugins {
2323
id "de.undercouch.download" version "5.0.1"
2424
}
2525

26-
version '1.10.0-1.19.4'
26+
version '1.10.1-1.19.4'
2727
def nmsVersion = "1.19.4" //[NMS]
2828
def apiVersion = '1.19'
2929
def specialSourceVersion = '1.11.0' //[NMS]
@@ -124,15 +124,15 @@ dependencies {
124124
// Cancer
125125
implementation 'art.arcane:Amulet:22.7.18'
126126
implementation 'art.arcane:Fukkit:22.7.5'
127-
implementation 'art.arcane:Curse:22.11.8'
127+
implementation 'art.arcane:Curse:23.5.2'
128128
implementation "io.papermc:paperlib:1.0.7"
129129
annotationProcessor 'systems.manifold:manifold-ext:' + manifoldVersion
130130
testAnnotationProcessor 'systems.manifold:manifold-ext:' + manifoldVersion
131131
implementation 'systems.manifold:manifold-rt:' + manifoldVersion
132132

133133
//Random Api's
134134
implementation 'com.github.DeadSilenceIV:AdvancedChestsAPI:2.9-BETA'
135-
implementation 'com.sk89q.worldguard:worldguard-bukkit:7.0.7'
135+
implementation 'com.sk89q.worldguard:worldguard-bukkit:7.0.8'
136136
implementation "com.github.FrancoBM12:API-MagicCosmetics:1.9.85"
137137
implementation 'me.clip:placeholderapi:2.11.2'
138138
implementation 'com.github.LoneDev6:api-itemsadder:3.2.5'

src/main/java/com/volmit/adapt/content/adaptation/agility/AgilitySuperJump.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ public void on(PlayerMoveEvent e) {
117117
p.getWorld().playSound(p.getLocation(), Sound.ITEM_ARMOR_EQUIP_LEATHER, 1.25f, 0.7f);
118118
p.getWorld().playSound(p.getLocation(), Sound.ITEM_ARMOR_EQUIP_LEATHER, 1.25f, 1.7f);
119119
if (getConfig().showParticles) {
120-
xp(p, 1);
121120
p.getWorld().spawnParticle(Particle.BLOCK_CRACK, p.getLocation().clone().add(0, 0.3, 0), 15, 0.1, 0.8, 0.1, 0.1, p.getLocation().getBlock().getRelative(BlockFace.DOWN).getBlockData());
122121
}
123122
p.setVelocity(p.getVelocity().setY(getJumpHeight(getLevel(p))));

src/main/java/com/volmit/adapt/content/adaptation/agility/AgilityWallJump.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ public void on(PlayerMoveEvent e) {
8282
return;
8383
}
8484
Player p = e.getPlayer();
85+
if (!canInteract(p, p.getLocation())) {
86+
return;
87+
}
8588
if (airjumps.containsKey(p)) {
8689
if (p.isOnGround() && !p.getLocation().getBlock().getRelative(BlockFace.DOWN).getBlockData().getMaterial().isAir()) {
8790
airjumps.remove(p);
@@ -104,6 +107,10 @@ public void onTick() {
104107
continue;
105108
}
106109

110+
if (!canInteract(p, p.getLocation())){
111+
return;
112+
}
113+
107114
if (p.isFlying() || !p.isSneaking() || p.getFallDistance() < 0.3) {
108115
boolean jumped = false;
109116

@@ -119,7 +126,6 @@ public void onTick() {
119126
p.getWorld().spawnParticle(Particle.BLOCK_CRACK, p.getLocation().clone().add(0, 0.3, 0), 15, 0.1, 0.8, 0.1, 0.1, getStick(p).getBlockData());
120127
}
121128
}
122-
xp(p, 2);
123129
airjumps.put(p, j);
124130
}
125131

@@ -155,6 +161,7 @@ public void onTick() {
155161
}
156162

157163
private boolean canStick(Player p) {
164+
158165
for (Block i : getBlocks(p)) {
159166
if (i.getBlockData().getMaterial().isSolid()) {
160167
Vector velocity = p.getVelocity();

src/main/java/com/volmit/adapt/content/adaptation/architect/ArchitectFoundation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,15 @@ public void on(PlayerMoveEvent e) {
8383
if (!hasAdaptation(p)) {
8484
return;
8585
}
86+
if (!canBlockPlace(p, p.getLocation())) {
87+
return;
88+
}
8689
if (!e.getFrom().getBlock().equals(e.getTo().getBlock())) {
8790
return;
8891
}
89-
9092
if (!this.active.contains(p)) {
9193
return;
9294
}
93-
9495
int power = blockPower.get(p);
9596

9697
if (power <= 0) {
@@ -107,7 +108,6 @@ public void on(PlayerMoveEvent e) {
107108

108109
for (Block b : locs) {
109110
if (addFoundation(b)) {
110-
xp(p, 3);
111111
power--;
112112
}
113113

src/main/java/com/volmit/adapt/content/adaptation/architect/ArchitectGlass.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public void on(BlockBreakEvent e) {
6161
}
6262
Player p = e.getPlayer();
6363
if (hasAdaptation(p) && (p.getInventory().getItemInMainHand().getType() == Material.AIR || !isTool(p.getInventory().getItemInMainHand())) && !e.isCancelled()) {
64+
if (!canBlockBreak(p, e.getBlock().getLocation())) {
65+
return;
66+
}
6467
if (e.getBlock().getType().toString().contains("GLASS") && !e.getBlock().getType().toString().contains("TINTED_GLASS")) {
6568
e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation(), new ItemStack(e.getBlock().getType(), 1));
6669
e.getBlock().getWorld().playSound(e.getBlock().getLocation(), Sound.BLOCK_LARGE_AMETHYST_BUD_BREAK, 1.0f, 1.0f);

src/main/java/com/volmit/adapt/content/adaptation/architect/ArchitectWirelessRedstone.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public void onPlayerInteract(PlayerInteractEvent event) {
103103
event.setCancelled(true);
104104
return;
105105
}
106+
if (!canInteract(event.getPlayer(), event.getPlayer().getLocation())) {
107+
return;
108+
}
106109

107110
handleOffhandInteraction(event, player);
108111

src/main/java/com/volmit/adapt/content/adaptation/axe/AxeChop.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,17 @@ public void on(PlayerInteractEvent e) {
6464
if (p.getCooldown(p.getInventory().getItemInMainHand().getType()) > 0) {
6565
return;
6666
}
67+
6768
if (e.getClickedBlock() != null && e.getAction().equals(Action.RIGHT_CLICK_BLOCK) && isAxe(p.getInventory().getItemInMainHand()) && hasAdaptation(p)) {
69+
if (!canBlockBreak(p, e.getClickedBlock().getLocation())) {
70+
return;
71+
}
6872
BlockData b = e.getClickedBlock().getBlockData();
6973
if (isLog(new ItemStack(b.getMaterial()))) {
7074
e.setCancelled(true);
7175
p.getLocation().getWorld().playSound(p.getLocation(), Sound.ITEM_AXE_STRIP, 1.25f, 0.6f);
7276
for (int i = 0; i < getLevel(p); i++) {
7377
if (breakStuff(e.getClickedBlock(), getRange(getLevel(p)), p)) {
74-
getSkill().xp(p, 5);
7578
p.setCooldown(p.getInventory().getItemInMainHand().getType(), getCooldownTime(getLevelPercent(p)));
7679
damageHand(p, getDamagePerBlock(getLevelPercent(p)));
7780
}

src/main/java/com/volmit/adapt/content/adaptation/axe/AxeDropToInventory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ public void on(BlockDropItemEvent e) {
7171
if (p.getGameMode() != GameMode.SURVIVAL) {
7272
return;
7373
}
74+
if (!canBlockBreak(p, e.getBlock().getLocation())) {
75+
return;
76+
}
7477
if (ItemListings.toolAxes.contains(p.getInventory().getItemInMainHand().getType())) {
7578
List<Item> items = e.getItems().copy();
7679
e.getItems().clear();
7780
for (Item i : items) {
7881
p.playSound(p.getLocation(), Sound.BLOCK_CALCITE_HIT, 0.05f, 0.01f);
79-
xp(p, 2);
8082
if (!p.getInventory().addItem(i.getItemStack()).isEmpty()) {
8183
p.getWorld().dropItem(p.getLocation(), i.getItemStack());
8284
}

src/main/java/com/volmit/adapt/content/adaptation/axe/AxeLeafVeinminer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,10 @@ public void on(BlockBreakEvent e) {
113113
J.s(() -> {
114114
for (Location l : blockMap.keySet()) {
115115
Block b = e.getBlock().getWorld().getBlockAt(l);
116-
xp(p, 3);
117116
if (getPlayer(p).getData().getSkillLines() != null && getPlayer(p).getData().getSkillLines().get("axes").getAdaptations() != null && getPlayer(p).getData().getSkillLines().get("axes").getAdaptations().get("axe-drop-to-inventory") != null && getPlayer(p).getData().getSkillLines().get("axes").getAdaptations().get("axe-drop-to-inventory").getLevel() > 0) {
118117
Collection<ItemStack> items = e.getBlock().getDrops();
119118
for (ItemStack i : items) {
120119
p.playSound(p.getLocation(), Sound.BLOCK_CALCITE_HIT, 0.01f, 0.01f);
121-
xp(p, 2);
122120
HashMap<Integer, ItemStack> extra = p.getInventory().addItem(i);
123121
if (!extra.isEmpty()) {
124122
p.getWorld().dropItem(p.getLocation(), extra.get(0));

src/main/java/com/volmit/adapt/content/adaptation/excavation/ExcavationDropToInventory.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ public void on(BlockDropItemEvent e) {
7272
if (p.getGameMode() != GameMode.SURVIVAL) {
7373
return;
7474
}
75+
if (!canInteract(p, e.getBlock().getLocation())) {
76+
return;
77+
}
78+
if (!canBlockBreak(p, e.getBlock().getLocation())) {
79+
return;
80+
}
7581
if (ItemListings.toolShovels.contains(p.getInventory().getItemInMainHand().getType())) {
7682
List<Item> items = e.getItems().copy();
7783
e.getItems().clear();

0 commit comments

Comments
 (0)