-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reimplement custom bomb explosion radius and add custom bomb fuse time
- Loading branch information
1 parent
1d7f66c
commit 4e8a161
Showing
8 changed files
with
78 additions
and
98 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
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
18 changes: 18 additions & 0 deletions
18
src/main/java/ladysnake/blast/common/init/BlastComponentTypes.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,18 @@ | ||
package ladysnake.blast.common.init; | ||
|
||
import ladysnake.blast.common.Blast; | ||
import net.minecraft.component.ComponentType; | ||
import net.minecraft.network.codec.PacketCodecs; | ||
import net.minecraft.registry.Registries; | ||
import net.minecraft.registry.Registry; | ||
import net.minecraft.util.dynamic.Codecs; | ||
|
||
public class BlastComponentTypes { | ||
public static final ComponentType<Integer> FUSE = new ComponentType.Builder<Integer>().codec(Codecs.POSITIVE_INT).packetCodec(PacketCodecs.VAR_INT).build(); | ||
public static final ComponentType<Float> EXPLOSION_RADIUS = new ComponentType.Builder<Float>().codec(Codecs.POSITIVE_FLOAT).packetCodec(PacketCodecs.FLOAT).build(); | ||
|
||
public static void init() { | ||
Registry.register(Registries.DATA_COMPONENT_TYPE, Blast.id("fuse"), FUSE); | ||
Registry.register(Registries.DATA_COMPONENT_TYPE, Blast.id("explosion_radius"), EXPLOSION_RADIUS); | ||
} | ||
} |
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