From 597ce20269efcba220a02111af68b28b238db076 Mon Sep 17 00:00:00 2001 From: LocusAzzurro Date: Sat, 15 Jul 2023 15:36:09 +0200 Subject: [PATCH] :truck: class renames --- .../locusazzurro/icaruswings/IcarusWings.java | 2 +- .../icaruswings/blocks/Amphora.java | 12 +++++----- .../icaruswings/blocks/MeadPot.java | 14 +++++------ ...ileEntity.java => AmphoraBlockEntity.java} | 8 +++---- ...ileEntity.java => MeadPotBlockEntity.java} | 10 ++++---- .../icaruswings/datagen/DataGenerators.java | 10 ++++---- .../datagen/LootTableProvider.java | 2 +- ...er.java => ModBlockLootTableProvider.java} | 4 ++-- ...erator.java => ModBlockStateProvider.java} | 6 ++--- ...erator.java => ModBlockTagsGenerator.java} | 5 ++-- ...rator.java => ModDamageTagsGenerator.java} | 6 ++--- ...erator.java => ModItemModelGenerator.java} | 6 ++--- ...enerator.java => ModItemTagsProvider.java} | 4 ++-- ...Generator.java => ModRecipesProvider.java} | 6 ++--- .../icaruswings/mixin/CapeLayerMixin.java | 8 +++---- .../registry/BlockEntityTypeRegistry.java | 24 +++++++++++++++++++ .../registry/TileEntityTypeRegistry.java | 23 ------------------ 17 files changed, 75 insertions(+), 75 deletions(-) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/{AmphoraTileEntity.java => AmphoraBlockEntity.java} (85%) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/{MeadPotTileEntity.java => MeadPotBlockEntity.java} (88%) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/{BlockLootTableProvider.java => ModBlockLootTableProvider.java} (85%) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/{BlockStatesGenerator.java => ModBlockStateProvider.java} (66%) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/{BlockTagsGenerator.java => ModBlockTagsGenerator.java} (90%) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/{DamageTagsGenerator.java => ModDamageTagsGenerator.java} (75%) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/{ItemModelsGenerator.java => ModItemModelGenerator.java} (78%) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/{ItemTagsGenerator.java => ModItemTagsProvider.java} (92%) rename src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/{RecipesGenerator.java => ModRecipesProvider.java} (72%) create mode 100644 src/main/java/org/mineplugin/locusazzurro/icaruswings/registry/BlockEntityTypeRegistry.java delete mode 100644 src/main/java/org/mineplugin/locusazzurro/icaruswings/registry/TileEntityTypeRegistry.java diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/IcarusWings.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/IcarusWings.java index 7f80e598..7c859e6d 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/IcarusWings.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/IcarusWings.java @@ -20,7 +20,7 @@ public IcarusWings() { ItemRegistry.ITEMS.register(bus); EntityTypeRegistry.ENTITIES.register(bus); ParticleRegistry.PARTICLES.register(bus); - TileEntityTypeRegistry.TILE_ENTITIES.register(bus); + BlockEntityTypeRegistry.BLOCK_ENTITIES.register(bus); EnchantmentRegistry.ENCHANTMENTS.register(bus); EffectRegistry.EFFECTS.register(bus); diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/Amphora.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/Amphora.java index 4a844671..4edaf78e 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/Amphora.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/Amphora.java @@ -25,7 +25,7 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; -import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.AmphoraTileEntity; +import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.AmphoraBlockEntity; import javax.annotation.Nullable; @@ -89,8 +89,8 @@ public void setPlacedBy(Level worldIn, BlockPos posIn, BlockState stateIn, Livin worldIn.setBlock(posIn.above(), stateIn.setValue(HALF, DoubleBlockHalf.UPPER), 3); if (stackIn.hasCustomHoverName()) { BlockEntity tileentity = worldIn.getBlockEntity(posIn); - if (tileentity instanceof AmphoraTileEntity) { - ((AmphoraTileEntity) tileentity).setCustomName(stackIn.getHoverName()); + if (tileentity instanceof AmphoraBlockEntity) { + ((AmphoraBlockEntity) tileentity).setCustomName(stackIn.getHoverName()); } } } @@ -140,7 +140,7 @@ public int getAnalogOutputSignal(BlockState pState, Level pLevel, BlockPos pPos) @Override public BlockEntity newBlockEntity(BlockPos pPos, BlockState state) { if (state.getValue(HALF) == DoubleBlockHalf.LOWER) { - return new AmphoraTileEntity(pPos, state); + return new AmphoraBlockEntity(pPos, state); } return null; @@ -156,8 +156,8 @@ public InteractionResult use(BlockState stateIn, Level worldIn, BlockPos posIn, if (stateIn.getValue(HALF) == DoubleBlockHalf.UPPER) { tileentity = worldIn.getBlockEntity(posIn.below()); } else { tileentity = worldIn.getBlockEntity(posIn); } - if (tileentity instanceof AmphoraTileEntity) { - playerIn.openMenu((AmphoraTileEntity) tileentity); + if (tileentity instanceof AmphoraBlockEntity) { + playerIn.openMenu((AmphoraBlockEntity) tileentity); } return InteractionResult.CONSUME; } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/MeadPot.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/MeadPot.java index aa3cc65e..80211155 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/MeadPot.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/MeadPot.java @@ -41,12 +41,12 @@ import net.minecraftforge.items.ItemHandlerHelper; import org.jetbrains.annotations.Nullable; import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.ITickableBlockEntity; -import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.MeadPotTileEntity; +import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.MeadPotBlockEntity; import org.mineplugin.locusazzurro.icaruswings.items.Mead; import org.mineplugin.locusazzurro.icaruswings.items.WorldEssence; import org.mineplugin.locusazzurro.icaruswings.registry.ItemRegistry; import org.mineplugin.locusazzurro.icaruswings.registry.SoundRegistry; -import org.mineplugin.locusazzurro.icaruswings.registry.TileEntityTypeRegistry; +import org.mineplugin.locusazzurro.icaruswings.registry.BlockEntityTypeRegistry; import org.mineplugin.locusazzurro.icaruswings.utils.IWLazy; import javax.annotation.ParametersAreNonnullByDefault; @@ -84,13 +84,13 @@ public MeadPot() { @Nullable @Override public BlockEntityTicker getTicker(Level pLevel, BlockState pState, BlockEntityType pBlockEntityType) { - return ITickableBlockEntity.getTicker(pLevel, TileEntityTypeRegistry.meadPotTileEntity.get(), pBlockEntityType); + return ITickableBlockEntity.getTicker(pLevel, BlockEntityTypeRegistry.MEAD_POT_BLOCK_ENTITY.get(), pBlockEntityType); } @Nullable @Override public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { - return new MeadPotTileEntity(pPos, pState); + return new MeadPotBlockEntity(pPos, pState); } @Override @@ -115,9 +115,9 @@ public boolean hasAnalogOutputSignal(BlockState pState) { @Override public int getAnalogOutputSignal(BlockState stateIn, Level worldIn, BlockPos pos) { - if (worldIn.getBlockEntity(pos) != null && worldIn.getBlockEntity(pos) instanceof MeadPotTileEntity meadPotTE){ + if (worldIn.getBlockEntity(pos) != null && worldIn.getBlockEntity(pos) instanceof MeadPotBlockEntity meadPotTE){ float progress = meadPotTE.getFermentationProgress(); - float fermentationTime = MeadPotTileEntity.getFermentationTime(); + float fermentationTime = MeadPotBlockEntity.getFermentationTime(); return (int) ((progress / fermentationTime) * 15); } return 0; @@ -129,7 +129,7 @@ public boolean isPathfindable(BlockState pState, BlockGetter pLevel, BlockPos pP } @Override public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { - if (!worldIn.isClientSide && handIn == InteractionHand.MAIN_HAND && worldIn.getBlockEntity(pos) instanceof MeadPotTileEntity meadPotTE) { + if (!worldIn.isClientSide && handIn == InteractionHand.MAIN_HAND && worldIn.getBlockEntity(pos) instanceof MeadPotBlockEntity meadPotTE) { ItemStack stackIn = player.getItemInHand(handIn); if (stackIn.getItem() == Items.HONEY_BOTTLE && stackIn.getCount() >= 4 && !meadPotTE.isFermenting() && !meadPotTE.isComplete()) { diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/AmphoraTileEntity.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/AmphoraBlockEntity.java similarity index 85% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/AmphoraTileEntity.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/AmphoraBlockEntity.java index fae487f4..0540d942 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/AmphoraTileEntity.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/AmphoraBlockEntity.java @@ -12,15 +12,15 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity; import net.minecraft.world.level.block.state.BlockState; -import org.mineplugin.locusazzurro.icaruswings.registry.TileEntityTypeRegistry; +import org.mineplugin.locusazzurro.icaruswings.registry.BlockEntityTypeRegistry; -public class AmphoraTileEntity extends RandomizableContainerBlockEntity { +public class AmphoraBlockEntity extends RandomizableContainerBlockEntity { private NonNullList items = NonNullList.withSize(45, ItemStack.EMPTY); - public AmphoraTileEntity(BlockPos a, BlockState b) { - super(TileEntityTypeRegistry.amphoraTileEntity.get(), a, b); + public AmphoraBlockEntity(BlockPos a, BlockState b) { + super(BlockEntityTypeRegistry.AMPHORA_BLOCK_ENTITY.get(), a, b); } @Override diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/MeadPotTileEntity.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/MeadPotBlockEntity.java similarity index 88% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/MeadPotTileEntity.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/MeadPotBlockEntity.java index ec9cc9b7..7b059327 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/MeadPotTileEntity.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/blocks/blockentities/MeadPotBlockEntity.java @@ -7,17 +7,17 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import org.mineplugin.locusazzurro.icaruswings.blocks.MeadPot; -import org.mineplugin.locusazzurro.icaruswings.registry.TileEntityTypeRegistry; +import org.mineplugin.locusazzurro.icaruswings.registry.BlockEntityTypeRegistry; -public class MeadPotTileEntity extends BlockEntity implements ITickableBlockEntity { +public class MeadPotBlockEntity extends BlockEntity implements ITickableBlockEntity { private static final int FERMENTATION_TIME = 3600 * 20; //1h / 3 in-game days private int fermentationProgress = 0; private boolean isFermenting = false; private boolean isComplete = false; - public MeadPotTileEntity(BlockPos pos, BlockState state) { - super(TileEntityTypeRegistry.meadPotTileEntity.get(), pos, state); + public MeadPotBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntityTypeRegistry.MEAD_POT_BLOCK_ENTITY.get(), pos, state); } public void startFermenting() { @@ -63,7 +63,7 @@ public static int getFermentationTime() { } @Override - public MeadPotTileEntity getBlockEntity() { + public MeadPotBlockEntity getBlockEntity() { return this; } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/DataGenerators.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/DataGenerators.java index f7d7603d..d02ac360 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/DataGenerators.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/DataGenerators.java @@ -34,16 +34,16 @@ public static void gatherData(GatherDataEvent event) { ExistingFileHelper fh = event.getExistingFileHelper(); CompletableFuture lookupProvider = event.getLookupProvider(); - generator.addProvider(event.includeServer(), new RecipesGenerator(output)); + generator.addProvider(event.includeServer(), new ModRecipesProvider(output)); //generator.addProvider(event.includeServer(), LootTableProvider.create(output)); - BlockTagsGenerator blockTags = new BlockTagsGenerator(output, lookupProvider, fh); + ModBlockTagsGenerator blockTags = new ModBlockTagsGenerator(output, lookupProvider, fh); generator.addProvider(event.includeServer(), blockTags); - generator.addProvider(event.includeServer(), new ItemTagsGenerator(output, lookupProvider, blockTags, fh)); + generator.addProvider(event.includeServer(), new ModItemTagsProvider(output, lookupProvider, blockTags, fh)); generator.addProvider(event.includeServer(), new DatapackBuiltinEntriesProvider(output, event.getLookupProvider(), BUILDER, Set.of(ModData.MOD_ID))); //generator.addProvider(event.includeServer(), new DamageTagsGenerator(output, lookupProvider, fh)); - generator.addProvider(event.includeClient(), new BlockStatesGenerator(output, fh)); - generator.addProvider(event.includeClient(), new ItemModelsGenerator(output, fh)); + generator.addProvider(event.includeClient(), new ModBlockStateProvider(output, fh)); + generator.addProvider(event.includeClient(), new ModItemModelGenerator(output, fh)); } } \ No newline at end of file diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/LootTableProvider.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/LootTableProvider.java index cea116d3..d346385c 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/LootTableProvider.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/LootTableProvider.java @@ -10,6 +10,6 @@ public class LootTableProvider { public static net.minecraft.data.loot.LootTableProvider create(PackOutput output){ return new net.minecraft.data.loot.LootTableProvider(output, Set.of(), - List.of(new net.minecraft.data.loot.LootTableProvider.SubProviderEntry(BlockLootTableProvider::new, LootContextParamSets.BLOCK))); + List.of(new net.minecraft.data.loot.LootTableProvider.SubProviderEntry(ModBlockLootTableProvider::new, LootContextParamSets.BLOCK))); } } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockLootTableProvider.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockLootTableProvider.java similarity index 85% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockLootTableProvider.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockLootTableProvider.java index bcec7844..2cb17e94 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockLootTableProvider.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockLootTableProvider.java @@ -8,9 +8,9 @@ import java.util.Set; -public class BlockLootTableProvider extends BlockLootSubProvider { +public class ModBlockLootTableProvider extends BlockLootSubProvider { - public BlockLootTableProvider() { + public ModBlockLootTableProvider() { super(Set.of(), FeatureFlags.REGISTRY.allFlags()); } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockStatesGenerator.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockStateProvider.java similarity index 66% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockStatesGenerator.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockStateProvider.java index 9e227fac..82918f47 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockStatesGenerator.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockStateProvider.java @@ -1,16 +1,16 @@ package org.mineplugin.locusazzurro.icaruswings.datagen; -import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; import net.minecraftforge.client.model.generators.BlockStateProvider; import net.minecraftforge.common.data.ExistingFileHelper; /** * @author DustW + * @author LocusAzzurro **/ -public class BlockStatesGenerator extends BlockStateProvider { +public class ModBlockStateProvider extends BlockStateProvider { - public BlockStatesGenerator(PackOutput output, ExistingFileHelper existingFileHelper) { + public ModBlockStateProvider(PackOutput output, ExistingFileHelper existingFileHelper) { super(output, DataGenerators.MOD_ID, existingFileHelper); } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockTagsGenerator.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockTagsGenerator.java similarity index 90% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockTagsGenerator.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockTagsGenerator.java index daea8947..d11607c1 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/BlockTagsGenerator.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModBlockTagsGenerator.java @@ -12,10 +12,11 @@ /** * @author DustW + * @author LocusAzzurro **/ -public class BlockTagsGenerator extends BlockTagsProvider { +public class ModBlockTagsGenerator extends BlockTagsProvider { - public BlockTagsGenerator(PackOutput output, CompletableFuture lookupProvider, @Nullable ExistingFileHelper helper) { + public ModBlockTagsGenerator(PackOutput output, CompletableFuture lookupProvider, @Nullable ExistingFileHelper helper) { super(output, lookupProvider, DataGenerators.MOD_ID, helper); } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/DamageTagsGenerator.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModDamageTagsGenerator.java similarity index 75% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/DamageTagsGenerator.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModDamageTagsGenerator.java index dca62454..7d5a1e47 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/DamageTagsGenerator.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModDamageTagsGenerator.java @@ -1,11 +1,9 @@ package org.mineplugin.locusazzurro.icaruswings.datagen; import net.minecraft.core.HolderLookup; -import net.minecraft.core.Registry; import net.minecraft.core.registries.Registries; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.TagsProvider; -import net.minecraft.resources.ResourceKey; import net.minecraft.tags.DamageTypeTags; import net.minecraft.world.damagesource.DamageType; import net.minecraftforge.common.data.ExistingFileHelper; @@ -14,9 +12,9 @@ import javax.annotation.Nullable; import java.util.concurrent.CompletableFuture; -public class DamageTagsGenerator extends TagsProvider { +public class ModDamageTagsGenerator extends TagsProvider { - public DamageTagsGenerator(PackOutput output, CompletableFuture provider, @Nullable ExistingFileHelper fh) { + public ModDamageTagsGenerator(PackOutput output, CompletableFuture provider, @Nullable ExistingFileHelper fh) { super(output, Registries.DAMAGE_TYPE, provider, CompletableFuture.completedFuture(TagsProvider.TagLookup.empty()), DataGenerators.MOD_ID, fh); } @Override diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ItemModelsGenerator.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModItemModelGenerator.java similarity index 78% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ItemModelsGenerator.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModItemModelGenerator.java index 22478133..51094fc8 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ItemModelsGenerator.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModItemModelGenerator.java @@ -1,16 +1,16 @@ package org.mineplugin.locusazzurro.icaruswings.datagen; -import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; import net.minecraftforge.client.model.generators.ItemModelProvider; import net.minecraftforge.common.data.ExistingFileHelper; /** * @author DustW + * @author LocusAzzurro **/ -public class ItemModelsGenerator extends ItemModelProvider { +public class ModItemModelGenerator extends ItemModelProvider { - public ItemModelsGenerator(PackOutput output, ExistingFileHelper existingFileHelper) { + public ModItemModelGenerator(PackOutput output, ExistingFileHelper existingFileHelper) { super(output, DataGenerators.MOD_ID, existingFileHelper); } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ItemTagsGenerator.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModItemTagsProvider.java similarity index 92% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ItemTagsGenerator.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModItemTagsProvider.java index f4e1a167..f0a2bc26 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ItemTagsGenerator.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModItemTagsProvider.java @@ -16,9 +16,9 @@ /** * @author DustW **/ -public class ItemTagsGenerator extends ItemTagsProvider { +public class ModItemTagsProvider extends ItemTagsProvider { - public ItemTagsGenerator(PackOutput output, CompletableFuture lookupProvider, TagsProvider blockTagProvider, ExistingFileHelper existingFileHelper) { + public ModItemTagsProvider(PackOutput output, CompletableFuture lookupProvider, TagsProvider blockTagProvider, ExistingFileHelper existingFileHelper) { super(output, lookupProvider, blockTagProvider.contentsGetter(), DataGenerators.MOD_ID, existingFileHelper); } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/RecipesGenerator.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModRecipesProvider.java similarity index 72% rename from src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/RecipesGenerator.java rename to src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModRecipesProvider.java index 34add5b1..b70613b1 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/RecipesGenerator.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/datagen/ModRecipesProvider.java @@ -1,6 +1,5 @@ package org.mineplugin.locusazzurro.icaruswings.datagen; -import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; @@ -10,10 +9,11 @@ /** * @author DustW + * @author LocusAzzurro **/ -public class RecipesGenerator extends RecipeProvider implements IConditionBuilder { +public class ModRecipesProvider extends RecipeProvider implements IConditionBuilder { - public RecipesGenerator(PackOutput output) { + public ModRecipesProvider(PackOutput output) { super(output); } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/mixin/CapeLayerMixin.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/mixin/CapeLayerMixin.java index ca290ec5..0d422db8 100644 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/mixin/CapeLayerMixin.java +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/mixin/CapeLayerMixin.java @@ -15,12 +15,12 @@ @Mixin(CapeLayer.class) public class CapeLayerMixin { - @Inject(at = @At(value = "HEAD"), method = "render", cancellable = true) - public void render(PoseStack p_225628_1_, MultiBufferSource p_225628_2_, int p_225628_3_, - AbstractClientPlayer p_225628_4_, float p_225628_5_, float p_225628_6_, float p_225628_7_, + @Inject(at = @At(value = "HEAD"), method = "render*", cancellable = true) + public void render(PoseStack pose, MultiBufferSource p_225628_2_, int p_225628_3_, + AbstractClientPlayer clientPlayer, float p_225628_5_, float p_225628_6_, float p_225628_7_, float p_225628_8_, float p_225628_9_, float p_225628_10_, CallbackInfo cb) { - ItemStack itemstack = p_225628_4_.getItemBySlot(EquipmentSlot.CHEST); + ItemStack itemstack = clientPlayer.getItemBySlot(EquipmentSlot.CHEST); if (itemstack.getItem() instanceof AbstractWings) { cb.cancel(); } diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/registry/BlockEntityTypeRegistry.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/registry/BlockEntityTypeRegistry.java new file mode 100644 index 00000000..d9aef551 --- /dev/null +++ b/src/main/java/org/mineplugin/locusazzurro/icaruswings/registry/BlockEntityTypeRegistry.java @@ -0,0 +1,24 @@ +package org.mineplugin.locusazzurro.icaruswings.registry; + +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; +import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.AmphoraBlockEntity; +import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.MeadPotBlockEntity; +import org.mineplugin.locusazzurro.icaruswings.data.ModData; + +public class BlockEntityTypeRegistry { + + public static final DeferredRegister> BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, ModData.MOD_ID); + + public static final RegistryObject> + MEAD_POT_BLOCK_ENTITY = BLOCK_ENTITIES.register( + "mead_pot_block_entity", () -> BlockEntityType.Builder + .of(MeadPotBlockEntity::new, BlockRegistry.meadPot.get()).build(null)); + + public static final RegistryObject> + AMPHORA_BLOCK_ENTITY = BLOCK_ENTITIES.register( + "amphora_block_entity", () -> BlockEntityType.Builder + .of(AmphoraBlockEntity::new, BlockRegistry.amphora.get()).build(null)); +} diff --git a/src/main/java/org/mineplugin/locusazzurro/icaruswings/registry/TileEntityTypeRegistry.java b/src/main/java/org/mineplugin/locusazzurro/icaruswings/registry/TileEntityTypeRegistry.java deleted file mode 100644 index fba29741..00000000 --- a/src/main/java/org/mineplugin/locusazzurro/icaruswings/registry/TileEntityTypeRegistry.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.mineplugin.locusazzurro.icaruswings.registry; - -import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.RegistryObject; -import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.AmphoraTileEntity; -import org.mineplugin.locusazzurro.icaruswings.blocks.blockentities.MeadPotTileEntity; -import org.mineplugin.locusazzurro.icaruswings.data.ModData; - -public class TileEntityTypeRegistry { - public static final DeferredRegister> TILE_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, ModData.MOD_ID); - - public static final RegistryObject> - meadPotTileEntity = TILE_ENTITIES.register( - "mead_pot_tile_entity", () -> BlockEntityType.Builder - .of(MeadPotTileEntity::new, BlockRegistry.meadPot.get()).build(null)); - - public static final RegistryObject> - amphoraTileEntity = TILE_ENTITIES.register( - "amphora_tile_entity", () -> BlockEntityType.Builder - .of(AmphoraTileEntity::new, BlockRegistry.amphora.get()).build(null)); -}