-
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.
feat: crouch + jump to fly ( very simple rn )
feat: Power#tick
- Loading branch information
Showing
6 changed files
with
116 additions
and
16 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
32 changes: 32 additions & 0 deletions
32
src/main/java/mc/duzo/timeless/power/impl/FlightPower.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 mc.duzo.timeless.power.impl; | ||
|
||
import mc.duzo.timeless.Timeless; | ||
import mc.duzo.timeless.power.Power; | ||
import net.minecraft.server.network.ServerPlayerEntity; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class FlightPower extends Power { | ||
private final Identifier id; | ||
|
||
public FlightPower() { | ||
this.id = new Identifier(Timeless.MOD_ID, "flight"); | ||
} | ||
|
||
@Override | ||
public boolean run(ServerPlayerEntity player) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void tick(ServerPlayerEntity player) { | ||
if (player.isSneaking() && !player.isOnGround()) { | ||
player.setVelocity(player.getVelocity().add(0, 0.25, 0)); | ||
player.velocityModified = true; | ||
} | ||
} | ||
|
||
@Override | ||
public Identifier id() { | ||
return this.id; | ||
} | ||
} |
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,4 @@ | ||
package mc.duzo.timeless.suit.data; | ||
|
||
public class SuitData { | ||
} |
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