Skip to content

Commit

Permalink
another hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ANightDazingZoroark committed Dec 14, 2023
1 parent 8850abc commit 6ba3491
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ dependencies {
}
implementation 'software.bernie.geckolib:geckolib-forge-1.12.2:3.0.31'
compileOnly "net.ilexiconn:llibrary:1.7.19-1.12.2"
// compileOnly 'curse.maven:shoulder-surfing-reloaded-243190:4757879'
compileOnly files('libs/ShoulderSurfing-1.12.2-2.6.jar')
compileOnly 'curse.maven:shoulder-surfing-reloaded-243190:4757879'
// compileOnly files('libs/ShoulderSurfing-1.12.2-2.6.jar')
}

// Adds Access Transformer files to tasks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.World;
import net.minecraft.world.storage.loot.LootTableList;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import software.bernie.geckolib3.core.IAnimatable;
Expand Down Expand Up @@ -252,18 +253,20 @@ public void setControls() {
RiftMessages.WRAPPER.sendToServer(new RiftManageUtilizingControl(this, 2, settings.keyBindJump.isKeyDown()));

if (settings.keyBindAttack.isKeyDown() && !this.isActing() && this.getLeftClickCooldown() == 0) {
if (ShoulderInstance.getInstance().doShoulderSurfing()) {
Entity toBeAttacked = SSRCompatUtils.getEntities(this.attackWidth * (64D/39D)).entityHit;
if (this.hasLeftClickChargeBar()) {
RiftMessages.WRAPPER.sendToServer(new RiftIncrementControlUse(this, 0));
}
else {
if (toBeAttacked != null) {
int targetId = toBeAttacked.getEntityId();
RiftMessages.WRAPPER.sendToServer(new RiftMountControl(this, targetId,0));
if (Loader.isModLoaded(RiftInitialize.SSR_MOD_ID)) {
if (ShoulderInstance.getInstance().doShoulderSurfing()) {
Entity toBeAttacked = SSRCompatUtils.getEntities(this.attackWidth * (64D/39D)).entityHit;
if (this.hasLeftClickChargeBar()) {
RiftMessages.WRAPPER.sendToServer(new RiftIncrementControlUse(this, 0));
}
else {
RiftMessages.WRAPPER.sendToServer(new RiftMountControl(this, -1,0));
if (toBeAttacked != null) {
int targetId = toBeAttacked.getEntityId();
RiftMessages.WRAPPER.sendToServer(new RiftMountControl(this, targetId,0));
}
else {
RiftMessages.WRAPPER.sendToServer(new RiftMountControl(this, -1,0));
}
}
}
}
Expand All @@ -290,7 +293,8 @@ else if (settings.keyBindJump.isKeyDown() && this.getSpacebarCooldown() == 0) {
}
}
else if (!settings.keyBindAttack.isKeyDown() && !settings.keyBindUseItem.isKeyDown()) {
Entity toBeAttacked = SSRCompatUtils.getEntities(this.attackWidth * (64D/39D)).entityHit;
Entity toBeAttacked = null;
if (Loader.isModLoaded(RiftInitialize.SSR_MOD_ID)) toBeAttacked = SSRCompatUtils.getEntities(this.attackWidth * (64D/39D)).entityHit;
if (this.hasLeftClickChargeBar()) {
if (this.getLeftClickUse() > 0) {
if (toBeAttacked != null) {
Expand Down

0 comments on commit 6ba3491

Please sign in to comment.