generated from NeoForgeMDKs/MDK-1.21-NeoGradle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
13 changed files
with
159 additions
and
31 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
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
9 changes: 5 additions & 4 deletions
9
src/main/java/com/portingdeadmods/modjam/content/augments/StaticAugment.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,14 @@ | ||
package com.portingdeadmods.modjam.content.augments; | ||
|
||
import com.portingdeadmods.modjam.capabilities.augmentation.Slot; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.neoforged.neoforge.event.level.BlockEvent; | ||
import net.neoforged.neoforge.event.tick.PlayerTickEvent; | ||
|
||
public interface StaticAugment { | ||
void breakBlock(BlockEvent.BreakEvent event); | ||
void clientTick(PlayerTickEvent.Post event); | ||
void serverTick(PlayerTickEvent.Post event); | ||
void handleKeybindPress(Player player); | ||
void breakBlock(Slot slot, BlockEvent.BreakEvent event); | ||
void clientTick(Slot slot, PlayerTickEvent.Post event); | ||
void serverTick(Slot slot, PlayerTickEvent.Post event); | ||
void handleKeybindPress(Slot slot, Player player); | ||
int getId(); | ||
} |
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
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
25 changes: 25 additions & 0 deletions
25
src/main/java/com/portingdeadmods/modjam/network/SetCooldownPayload.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,25 @@ | ||
package com.portingdeadmods.modjam.network; | ||
|
||
import com.portingdeadmods.modjam.ModJam; | ||
import net.minecraft.network.RegistryFriendlyByteBuf; | ||
import net.minecraft.network.codec.ByteBufCodecs; | ||
import net.minecraft.network.codec.StreamCodec; | ||
import net.minecraft.network.protocol.common.custom.CustomPacketPayload; | ||
import net.minecraft.resources.ResourceLocation; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public record SetCooldownPayload (int cooldown, int slot)implements CustomPacketPayload { | ||
public static final Type<SetCooldownPayload> TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath(ModJam.MODID, "augment_cooldown_payload")); | ||
public static final StreamCodec<RegistryFriendlyByteBuf, SetCooldownPayload> STREAM_CODEC = StreamCodec.composite( | ||
ByteBufCodecs.INT, | ||
SetCooldownPayload::cooldown, | ||
ByteBufCodecs.INT, | ||
SetCooldownPayload::slot, | ||
SetCooldownPayload::new | ||
); | ||
|
||
@Override | ||
public @NotNull Type<? extends CustomPacketPayload> type() { | ||
return TYPE; | ||
} | ||
} |
Oops, something went wrong.