Rename internal registry constant holder interfaces

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-09-06 13:32:52 +02:00
parent f3ee80d126
commit 02d927cc4d
19 changed files with 27 additions and 27 deletions

View File

@ -17,15 +17,15 @@ public class Generators {
} }
File outputFolder = new File(args[0]); File outputFolder = new File(args[0]);
var generator = new CodeGenerator(outputFolder); var generator = new CodeGenerator(outputFolder);
generator.generate(resource("blocks.json"), "net.minestom.server.instance.block", "Block", "BlockImpl", "BlockConstants"); generator.generate(resource("blocks.json"), "net.minestom.server.instance.block", "Block", "BlockImpl", "Blocks");
generator.generate(resource("items.json"), "net.minestom.server.item", "Material", "MaterialImpl", "MaterialConstants"); generator.generate(resource("items.json"), "net.minestom.server.item", "Material", "MaterialImpl", "Materials");
generator.generate(resource("entities.json"), "net.minestom.server.entity", "EntityType", "EntityTypeImpl", "EntityTypeConstants"); generator.generate(resource("entities.json"), "net.minestom.server.entity", "EntityType", "EntityTypeImpl", "EntityTypes");
generator.generate(resource("enchantments.json"), "net.minestom.server.item", "Enchantment", "EnchantmentImpl", "EnchantmentConstants"); generator.generate(resource("enchantments.json"), "net.minestom.server.item", "Enchantment", "EnchantmentImpl", "Enchantments");
generator.generate(resource("potion_effects.json"), "net.minestom.server.potion", "PotionEffect", "PotionEffectImpl", "PotionEffectConstants"); generator.generate(resource("potion_effects.json"), "net.minestom.server.potion", "PotionEffect", "PotionEffectImpl", "PotionEffects");
generator.generate(resource("potions.json"), "net.minestom.server.potion", "PotionType", "PotionTypeImpl", "PotionTypeConstants"); generator.generate(resource("potions.json"), "net.minestom.server.potion", "PotionType", "PotionTypeImpl", "PotionTypes");
generator.generate(resource("particles.json"), "net.minestom.server.particle", "Particle", "ParticleImpl", "ParticleConstants"); generator.generate(resource("particles.json"), "net.minestom.server.particle", "Particle", "ParticleImpl", "Particles");
generator.generate(resource("sounds.json"), "net.minestom.server.sound", "SoundEvent", "SoundEventImpl", "SoundEventConstants"); generator.generate(resource("sounds.json"), "net.minestom.server.sound", "SoundEvent", "SoundEventImpl", "SoundEvents");
generator.generate(resource("custom_statistics.json"), "net.minestom.server.statistic", "StatisticType", "StatisticTypeImpl", "StatisticTypeConstants"); generator.generate(resource("custom_statistics.json"), "net.minestom.server.statistic", "StatisticType", "StatisticTypeImpl", "StatisticTypes");
// Generate fluids // Generate fluids
new FluidGenerator(resource("fluids.json"), outputFolder).generate(); new FluidGenerator(resource("fluids.json"), outputFolder).generate();

View File

@ -4,7 +4,7 @@ package net.minestom.server.entity;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface EntityTypeConstants { interface EntityTypes {
EntityType AREA_EFFECT_CLOUD = EntityTypeImpl.get("minecraft:area_effect_cloud"); EntityType AREA_EFFECT_CLOUD = EntityTypeImpl.get("minecraft:area_effect_cloud");
EntityType ARMOR_STAND = EntityTypeImpl.get("minecraft:armor_stand"); EntityType ARMOR_STAND = EntityTypeImpl.get("minecraft:armor_stand");

View File

@ -4,7 +4,7 @@ package net.minestom.server.instance.block;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface BlockConstants { interface Blocks {
Block AIR = BlockImpl.get("minecraft:air"); Block AIR = BlockImpl.get("minecraft:air");
Block STONE = BlockImpl.get("minecraft:stone"); Block STONE = BlockImpl.get("minecraft:stone");

View File

@ -4,7 +4,7 @@ package net.minestom.server.item;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface EnchantmentConstants { interface Enchantments {
Enchantment PROTECTION = EnchantmentImpl.get("minecraft:protection"); Enchantment PROTECTION = EnchantmentImpl.get("minecraft:protection");
Enchantment FIRE_PROTECTION = EnchantmentImpl.get("minecraft:fire_protection"); Enchantment FIRE_PROTECTION = EnchantmentImpl.get("minecraft:fire_protection");

View File

@ -4,7 +4,7 @@ package net.minestom.server.item;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface MaterialConstants { interface Materials {
Material AIR = MaterialImpl.get("minecraft:air"); Material AIR = MaterialImpl.get("minecraft:air");
Material STONE = MaterialImpl.get("minecraft:stone"); Material STONE = MaterialImpl.get("minecraft:stone");

View File

@ -4,7 +4,7 @@ package net.minestom.server.particle;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface ParticleConstants { interface Particles {
Particle AMBIENT_ENTITY_EFFECT = ParticleImpl.get("minecraft:ambient_entity_effect"); Particle AMBIENT_ENTITY_EFFECT = ParticleImpl.get("minecraft:ambient_entity_effect");
Particle ANGRY_VILLAGER = ParticleImpl.get("minecraft:angry_villager"); Particle ANGRY_VILLAGER = ParticleImpl.get("minecraft:angry_villager");

View File

@ -4,7 +4,7 @@ package net.minestom.server.potion;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface PotionEffectConstants { interface PotionEffects {
PotionEffect SPEED = PotionEffectImpl.get("minecraft:speed"); PotionEffect SPEED = PotionEffectImpl.get("minecraft:speed");
PotionEffect SLOWNESS = PotionEffectImpl.get("minecraft:slowness"); PotionEffect SLOWNESS = PotionEffectImpl.get("minecraft:slowness");

View File

@ -4,7 +4,7 @@ package net.minestom.server.potion;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface PotionTypeConstants { interface PotionTypes {
PotionType EMPTY = PotionTypeImpl.get("minecraft:empty"); PotionType EMPTY = PotionTypeImpl.get("minecraft:empty");
PotionType WATER = PotionTypeImpl.get("minecraft:water"); PotionType WATER = PotionTypeImpl.get("minecraft:water");

View File

@ -4,7 +4,7 @@ package net.minestom.server.sound;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface SoundEventConstants { interface SoundEvents {
SoundEvent AMBIENT_CAVE = SoundEventImpl.get("minecraft:ambient.cave"); SoundEvent AMBIENT_CAVE = SoundEventImpl.get("minecraft:ambient.cave");
SoundEvent AMBIENT_BASALT_DELTAS_ADDITIONS = SoundEventImpl.get("minecraft:ambient.basalt_deltas.additions"); SoundEvent AMBIENT_BASALT_DELTAS_ADDITIONS = SoundEventImpl.get("minecraft:ambient.basalt_deltas.additions");

View File

@ -4,7 +4,7 @@ package net.minestom.server.statistic;
* Code autogenerated, do not edit! * Code autogenerated, do not edit!
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
interface StatisticTypeConstants { interface StatisticTypes {
StatisticType LEAVE_GAME = StatisticTypeImpl.get("minecraft:leave_game"); StatisticType LEAVE_GAME = StatisticTypeImpl.get("minecraft:leave_game");
StatisticType PLAY_TIME = StatisticTypeImpl.get("minecraft:play_time"); StatisticType PLAY_TIME = StatisticTypeImpl.get("minecraft:play_time");

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface EntityType extends ProtocolObject, EntityTypeConstants { public interface EntityType extends ProtocolObject, EntityTypes {
/** /**
* Returns the entity registry. * Returns the entity registry.
* *

View File

@ -20,7 +20,7 @@ import java.util.function.BiPredicate;
* Implementations are expected to be immutable. * Implementations are expected to be immutable.
*/ */
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface Block extends ProtocolObject, TagReadable, BlockConstants { public interface Block extends ProtocolObject, TagReadable, Blocks {
/** /**
* Creates a new block with the the property {@code property} sets to {@code value}. * Creates a new block with the the property {@code property} sets to {@code value}.

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface Enchantment extends ProtocolObject, EnchantmentConstants { public interface Enchantment extends ProtocolObject, Enchantments {
/** /**
* Returns the enchantment registry. * Returns the enchantment registry.

View File

@ -12,7 +12,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface Material extends ProtocolObject, MaterialConstants { public interface Material extends ProtocolObject, Materials {
/** /**
* Returns the material registry. * Returns the material registry.

View File

@ -9,7 +9,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface Particle extends ProtocolObject, ParticleConstants { public interface Particle extends ProtocolObject, Particles {
static @NotNull Collection<@NotNull Particle> values() { static @NotNull Collection<@NotNull Particle> values() {
return ParticleImpl.values(); return ParticleImpl.values();

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface PotionEffect extends ProtocolObject, PotionEffectConstants { public interface PotionEffect extends ProtocolObject, PotionEffects {
@Contract(pure = true) @Contract(pure = true)
@NotNull Registry.PotionEffectEntry registry(); @NotNull Registry.PotionEffectEntry registry();

View File

@ -9,7 +9,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface PotionType extends ProtocolObject, PotionTypeConstants { public interface PotionType extends ProtocolObject, PotionTypes {
static @NotNull Collection<@NotNull PotionType> values() { static @NotNull Collection<@NotNull PotionType> values() {
return PotionTypeImpl.values(); return PotionTypeImpl.values();

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface SoundEvent extends ProtocolObject, Sound.Type, SoundEventConstants { public interface SoundEvent extends ProtocolObject, Sound.Type, SoundEvents {
static @NotNull Collection<@NotNull SoundEvent> values() { static @NotNull Collection<@NotNull SoundEvent> values() {
return SoundEventImpl.values(); return SoundEventImpl.values();

View File

@ -9,7 +9,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
@ApiStatus.NonExtendable @ApiStatus.NonExtendable
public interface StatisticType extends ProtocolObject, StatisticTypeConstants { public interface StatisticType extends ProtocolObject, StatisticTypes {
static @NotNull Collection<@NotNull StatisticType> values() { static @NotNull Collection<@NotNull StatisticType> values() {
return StatisticTypeImpl.values(); return StatisticTypeImpl.values();