diff --git a/src/main/java/com/minelittlepony/unicopia/redux/BlockInteractions.java b/src/main/java/com/minelittlepony/unicopia/BlockInteractions.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/redux/BlockInteractions.java rename to src/main/java/com/minelittlepony/unicopia/BlockInteractions.java index 7a7488ec..a1d835ce 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/BlockInteractions.java +++ b/src/main/java/com/minelittlepony/unicopia/BlockInteractions.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux; +package com.minelittlepony.unicopia; import java.util.List; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.redux.block.ITillable; -import com.minelittlepony.unicopia.redux.item.UItems; +import com.minelittlepony.unicopia.block.ITillable; +import com.minelittlepony.unicopia.item.UItems; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +// TODO: forge events public class BlockInteractions { public boolean onBlockTilled(World world, BlockPos pos, PlayerEntity player, ItemStack hoe) { BlockState state = world.getBlockState(pos); diff --git a/src/main/java/com/minelittlepony/unicopia/redux/CloudType.java b/src/main/java/com/minelittlepony/unicopia/CloudType.java similarity index 85% rename from src/main/java/com/minelittlepony/unicopia/redux/CloudType.java rename to src/main/java/com/minelittlepony/unicopia/CloudType.java index 2dac124a..9237eade 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/CloudType.java +++ b/src/main/java/com/minelittlepony/unicopia/CloudType.java @@ -1,7 +1,6 @@ -package com.minelittlepony.unicopia.redux; +package com.minelittlepony.unicopia; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.redux.entity.CloudEntity; +import com.minelittlepony.unicopia.entity.CloudEntity; import net.minecraft.entity.Entity; import net.minecraft.entity.ItemEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/Config.java b/src/main/java/com/minelittlepony/unicopia/Config.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/Config.java rename to src/main/java/com/minelittlepony/unicopia/Config.java index 5fc561f6..78f33f14 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/Config.java +++ b/src/main/java/com/minelittlepony/unicopia/Config.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import java.io.IOException; import java.nio.file.Files; diff --git a/src/main/java/com/minelittlepony/unicopia/core/EquinePredicates.java b/src/main/java/com/minelittlepony/unicopia/EquinePredicates.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/core/EquinePredicates.java rename to src/main/java/com/minelittlepony/unicopia/EquinePredicates.java index f57acbc0..1ab2b50c 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/EquinePredicates.java +++ b/src/main/java/com/minelittlepony/unicopia/EquinePredicates.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import com.google.common.base.Predicate; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/Hooks.java b/src/main/java/com/minelittlepony/unicopia/Hooks.java similarity index 66% rename from src/main/java/com/minelittlepony/unicopia/redux/Hooks.java rename to src/main/java/com/minelittlepony/unicopia/Hooks.java index c831ab0c..ecbceaa2 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/Hooks.java +++ b/src/main/java/com/minelittlepony/unicopia/Hooks.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux; +package com.minelittlepony.unicopia; /* package com.minelittlepony.unicopia.world; @@ -27,18 +27,6 @@ public class Hooks { UWorld.instance().getBlocks().addAuxiliaryDrops(event.getWorld(), event.getState(), event.getPos(), event.getDrops(), event.getFortuneLevel()); } - public static void onBlockTilled(UseHoeEvent event) { - if (UWorld.instance().getBlocks().onBlockTilled(event.getWorld(), event.getPos(), event.getPlayerEntity(), event.getCurrent())) { - event.setResult(Result.ALLOW); - } - } - - public static void onStructureGen(PopulateChunkEvent.Populate event) { - if (event.getType() == EventType.DUNGEON) { - UWorld.instance().generateStructures(event.getWorld(), event.getChunkX(), event.getChunkZ(), event.getGen()); - } - } - public static void onWorldTick(TickEvent.WorldTickEvent event) { if (event.phase == Phase.START) { UWorld.instance().onUpdate(event.world); diff --git a/src/main/java/com/minelittlepony/unicopia/core/IKeyBindingHandler.java b/src/main/java/com/minelittlepony/unicopia/IKeyBindingHandler.java similarity index 85% rename from src/main/java/com/minelittlepony/unicopia/core/IKeyBindingHandler.java rename to src/main/java/com/minelittlepony/unicopia/IKeyBindingHandler.java index a8a3b549..97e4e060 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/IKeyBindingHandler.java +++ b/src/main/java/com/minelittlepony/unicopia/IKeyBindingHandler.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; public interface IKeyBindingHandler { diff --git a/src/main/java/com/minelittlepony/unicopia/core/InteractionManager.java b/src/main/java/com/minelittlepony/unicopia/InteractionManager.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/core/InteractionManager.java rename to src/main/java/com/minelittlepony/unicopia/InteractionManager.java index 3a4e364c..e3e3c5d5 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/InteractionManager.java +++ b/src/main/java/com/minelittlepony/unicopia/InteractionManager.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.util.dummy.DummyPlayerEntity; -import com.minelittlepony.unicopia.core.util.dummy.DummyServerPlayerEntity; +import com.minelittlepony.unicopia.util.dummy.DummyPlayerEntity; +import com.minelittlepony.unicopia.util.dummy.DummyServerPlayerEntity; import com.mojang.authlib.GameProfile; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/Race.java b/src/main/java/com/minelittlepony/unicopia/Race.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/Race.java rename to src/main/java/com/minelittlepony/unicopia/Race.java index 21389253..ffbf1524 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/Race.java +++ b/src/main/java/com/minelittlepony/unicopia/Race.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/minelittlepony/unicopia/core/SpeciesList.java b/src/main/java/com/minelittlepony/unicopia/SpeciesList.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/core/SpeciesList.java rename to src/main/java/com/minelittlepony/unicopia/SpeciesList.java index c64e6ecc..ea623cc2 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/SpeciesList.java +++ b/src/main/java/com/minelittlepony/unicopia/SpeciesList.java @@ -1,12 +1,12 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import java.util.Optional; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.Config; -import com.minelittlepony.unicopia.core.ducks.IRaceContainerHolder; -import com.minelittlepony.unicopia.core.entity.IEntity; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.Config; +import com.minelittlepony.unicopia.ducks.IRaceContainerHolder; +import com.minelittlepony.unicopia.entity.IEntity; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/UBlocks.java b/src/main/java/com/minelittlepony/unicopia/UBlocks.java similarity index 68% rename from src/main/java/com/minelittlepony/unicopia/redux/UBlocks.java rename to src/main/java/com/minelittlepony/unicopia/UBlocks.java index a0de53c9..8366f7af 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/UBlocks.java +++ b/src/main/java/com/minelittlepony/unicopia/UBlocks.java @@ -1,29 +1,28 @@ -package com.minelittlepony.unicopia.redux; +package com.minelittlepony.unicopia; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.redux.block.BlockCloudDoor; -import com.minelittlepony.unicopia.redux.block.BlockGrowingCuccoon; -import com.minelittlepony.unicopia.redux.block.BlockTomatoPlant; -import com.minelittlepony.unicopia.redux.block.ChiselledChitinBlock; -import com.minelittlepony.unicopia.redux.block.ChitinBlock; -import com.minelittlepony.unicopia.redux.block.CloudAnvilBlock; -import com.minelittlepony.unicopia.redux.block.CloudBlock; -import com.minelittlepony.unicopia.redux.block.CloudFarmlandBlock; -import com.minelittlepony.unicopia.redux.block.CloudFenceBlock; -import com.minelittlepony.unicopia.redux.block.CloudSlabBlock; -import com.minelittlepony.unicopia.redux.block.CloudStairsBlock; -import com.minelittlepony.unicopia.redux.block.DiamondDoorBlock; -import com.minelittlepony.unicopia.redux.block.DutchDoorBlock; -import com.minelittlepony.unicopia.redux.block.FruitLeavesBlock; -import com.minelittlepony.unicopia.redux.block.GlowingGemBlock; -import com.minelittlepony.unicopia.redux.block.HiveWallBlock; -import com.minelittlepony.unicopia.redux.block.SlimeLayerBlock; -import com.minelittlepony.unicopia.redux.block.StickBlock; -import com.minelittlepony.unicopia.redux.block.SugarBlock; -import com.minelittlepony.unicopia.redux.block.TallCropBlock; -import com.minelittlepony.unicopia.redux.item.AppleItem; -import com.minelittlepony.unicopia.redux.item.UItems; -import com.minelittlepony.unicopia.redux.structure.CustomSaplingGenerator; +import com.minelittlepony.unicopia.block.CloudDoorBlock; +import com.minelittlepony.unicopia.block.BlockGrowingCuccoon; +import com.minelittlepony.unicopia.block.TomatoPlantBlock; +import com.minelittlepony.unicopia.block.ChiselledChitinBlock; +import com.minelittlepony.unicopia.block.ChitinBlock; +import com.minelittlepony.unicopia.block.CloudAnvilBlock; +import com.minelittlepony.unicopia.block.CloudBlock; +import com.minelittlepony.unicopia.block.CloudFarmlandBlock; +import com.minelittlepony.unicopia.block.CloudFenceBlock; +import com.minelittlepony.unicopia.block.CloudSlabBlock; +import com.minelittlepony.unicopia.block.CloudStairsBlock; +import com.minelittlepony.unicopia.block.DiamondDoorBlock; +import com.minelittlepony.unicopia.block.DutchDoorBlock; +import com.minelittlepony.unicopia.block.FruitLeavesBlock; +import com.minelittlepony.unicopia.block.GlowingGemBlock; +import com.minelittlepony.unicopia.block.HiveWallBlock; +import com.minelittlepony.unicopia.block.SlimeLayerBlock; +import com.minelittlepony.unicopia.block.StickBlock; +import com.minelittlepony.unicopia.block.SugarBlock; +import com.minelittlepony.unicopia.block.TallCropBlock; +import com.minelittlepony.unicopia.item.AppleItem; +import com.minelittlepony.unicopia.item.UItems; +import com.minelittlepony.unicopia.structure.CustomSaplingGenerator; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; @@ -46,7 +45,7 @@ public interface UBlocks { CloudSlabBlock enchanted_cloud_slab = register(new CloudSlabBlock<>(enchanted_cloud, UMaterials.CLOUD), "enchanted_cloud_slab"); CloudSlabBlock packed_cloud_slab = register(new CloudSlabBlock<>(enchanted_cloud, UMaterials.CLOUD), "packed_cloud_slab"); - BlockCloudDoor mist_door = register(new BlockCloudDoor(), "mist_door"); + CloudDoorBlock mist_door = register(new CloudDoorBlock(), "mist_door"); DutchDoorBlock library_door = register(new DutchDoorBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(3).build()), "library_door"); DutchDoorBlock bakery_door = register(new DutchDoorBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(3).build()), "bakery_door"); DiamondDoorBlock diamond_door = register(new DiamondDoorBlock(), "diamond_door"); @@ -60,7 +59,7 @@ public interface UBlocks { TallCropBlock alfalfa = register(new TallCropBlock(FabricBlockSettings.of(Material.PLANT).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP).build()), "alfalfa"); StickBlock stick = register(new StickBlock(), "stick"); - BlockTomatoPlant tomato_plant = register(new BlockTomatoPlant(), "tomato_plant"); + TomatoPlantBlock tomato_plant = register(new TomatoPlantBlock(), "tomato_plant"); CloudFarmlandBlock cloud_farmland = register(new CloudFarmlandBlock(FabricBlockSettings.of(UMaterials.CLOUD).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.WOOL).build()), "cloud_farmland"); diff --git a/src/main/java/com/minelittlepony/unicopia/redux/UContainers.java b/src/main/java/com/minelittlepony/unicopia/UContainers.java similarity index 69% rename from src/main/java/com/minelittlepony/unicopia/redux/UContainers.java rename to src/main/java/com/minelittlepony/unicopia/UContainers.java index 20974e1d..d0e6b8e4 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/UContainers.java +++ b/src/main/java/com/minelittlepony/unicopia/UContainers.java @@ -1,8 +1,7 @@ -package com.minelittlepony.unicopia.redux; +package com.minelittlepony.unicopia; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.redux.container.BagOfHoldingContainer; -import com.minelittlepony.unicopia.redux.container.SpellBookContainer; +import com.minelittlepony.unicopia.container.BagOfHoldingContainer; +import com.minelittlepony.unicopia.container.SpellBookContainer; import net.fabricmc.fabric.api.container.ContainerProviderRegistry; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/minelittlepony/unicopia/core/UEffects.java b/src/main/java/com/minelittlepony/unicopia/UEffects.java similarity index 85% rename from src/main/java/com/minelittlepony/unicopia/core/UEffects.java rename to src/main/java/com/minelittlepony/unicopia/UEffects.java index 0948d867..593ec0dc 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/UEffects.java +++ b/src/main/java/com/minelittlepony/unicopia/UEffects.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; -import com.minelittlepony.unicopia.core.util.CustomStatusEffect; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.CustomStatusEffect; +import com.minelittlepony.unicopia.util.MagicalDamageSource; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectInstance; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/UEntities.java b/src/main/java/com/minelittlepony/unicopia/UEntities.java similarity index 81% rename from src/main/java/com/minelittlepony/unicopia/redux/UEntities.java rename to src/main/java/com/minelittlepony/unicopia/UEntities.java index da67b39e..a4528eaa 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/UEntities.java +++ b/src/main/java/com/minelittlepony/unicopia/UEntities.java @@ -1,17 +1,17 @@ -package com.minelittlepony.unicopia.redux; +package com.minelittlepony.unicopia; -import com.minelittlepony.unicopia.core.util.collection.ListHelper; -import com.minelittlepony.unicopia.redux.entity.ButterflyEntity; -import com.minelittlepony.unicopia.redux.entity.CloudEntity; -import com.minelittlepony.unicopia.redux.entity.ConstructionCloudEntity; -import com.minelittlepony.unicopia.redux.entity.CuccoonEntity; -import com.minelittlepony.unicopia.redux.entity.ProjectileEntity; -import com.minelittlepony.unicopia.redux.entity.RacingCloudEntity; -import com.minelittlepony.unicopia.redux.entity.RainbowEntity; -import com.minelittlepony.unicopia.redux.entity.SpearEntity; -import com.minelittlepony.unicopia.redux.entity.SpellbookEntity; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; -import com.minelittlepony.unicopia.redux.entity.WildCloudEntity; +import com.minelittlepony.unicopia.entity.ButterflyEntity; +import com.minelittlepony.unicopia.entity.CloudEntity; +import com.minelittlepony.unicopia.entity.ConstructionCloudEntity; +import com.minelittlepony.unicopia.entity.CuccoonEntity; +import com.minelittlepony.unicopia.entity.ProjectileEntity; +import com.minelittlepony.unicopia.entity.RacingCloudEntity; +import com.minelittlepony.unicopia.entity.RainbowEntity; +import com.minelittlepony.unicopia.entity.SpearEntity; +import com.minelittlepony.unicopia.entity.SpellbookEntity; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.unicopia.entity.WildCloudEntity; +import com.minelittlepony.unicopia.util.collection.ListHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCategory; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/UMaterials.java b/src/main/java/com/minelittlepony/unicopia/UMaterials.java similarity index 85% rename from src/main/java/com/minelittlepony/unicopia/redux/UMaterials.java rename to src/main/java/com/minelittlepony/unicopia/UMaterials.java index ad70538b..28d09b8f 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/UMaterials.java +++ b/src/main/java/com/minelittlepony/unicopia/UMaterials.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux; +package com.minelittlepony.unicopia; import net.minecraft.block.Material; import net.minecraft.block.MaterialColor; diff --git a/src/main/java/com/minelittlepony/unicopia/core/UParticles.java b/src/main/java/com/minelittlepony/unicopia/UParticles.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/UParticles.java rename to src/main/java/com/minelittlepony/unicopia/UParticles.java index b9b183d4..56b7f226 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/UParticles.java +++ b/src/main/java/com/minelittlepony/unicopia/UParticles.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import net.minecraft.particle.DefaultParticleType; import net.minecraft.util.Identifier; public interface UParticles { - // TODO: + // TODO: ParticleTypeRegistry interface ParticleTypeRegistry { static ParticleTypeRegistry getTnstance() {return null;} DefaultParticleType register(Identifier id); diff --git a/src/main/java/com/minelittlepony/unicopia/core/USounds.java b/src/main/java/com/minelittlepony/unicopia/USounds.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/core/USounds.java rename to src/main/java/com/minelittlepony/unicopia/USounds.java index 938e4098..49fc3391 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/USounds.java +++ b/src/main/java/com/minelittlepony/unicopia/USounds.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import net.minecraft.sound.SoundEvent; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/minelittlepony/unicopia/core/UTags.java b/src/main/java/com/minelittlepony/unicopia/UTags.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/core/UTags.java rename to src/main/java/com/minelittlepony/unicopia/UTags.java index 5cb1b552..a42e7faa 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/UTags.java +++ b/src/main/java/com/minelittlepony/unicopia/UTags.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import net.fabricmc.fabric.api.tag.TagRegistry; import net.minecraft.item.Item; diff --git a/src/main/java/com/minelittlepony/unicopia/core/UnicopiaCore.java b/src/main/java/com/minelittlepony/unicopia/UnicopiaCore.java similarity index 53% rename from src/main/java/com/minelittlepony/unicopia/core/UnicopiaCore.java rename to src/main/java/com/minelittlepony/unicopia/UnicopiaCore.java index 9eab38a6..2a9d3586 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/UnicopiaCore.java +++ b/src/main/java/com/minelittlepony/unicopia/UnicopiaCore.java @@ -1,17 +1,24 @@ -package com.minelittlepony.unicopia.core; +package com.minelittlepony.unicopia; import net.fabricmc.api.ModInitializer; +import net.fabricmc.fabric.api.resource.ResourceManagerHelper; +import net.minecraft.resource.ResourceType; + import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.minelittlepony.common.util.GamePaths; import com.minelittlepony.jumpingcastle.api.Channel; import com.minelittlepony.jumpingcastle.api.JumpingCastle; -import com.minelittlepony.unicopia.core.ability.PowersRegistry; -import com.minelittlepony.unicopia.core.command.Commands; -import com.minelittlepony.unicopia.core.network.MsgPlayerAbility; -import com.minelittlepony.unicopia.core.network.MsgPlayerCapabilities; -import com.minelittlepony.unicopia.core.network.MsgRequestCapabilities; +import com.minelittlepony.unicopia.ability.PowersRegistry; +import com.minelittlepony.unicopia.command.Commands; +import com.minelittlepony.unicopia.enchanting.Pages; +import com.minelittlepony.unicopia.enchanting.recipe.AffineIngredients; +import com.minelittlepony.unicopia.item.UItems; +import com.minelittlepony.unicopia.network.MsgPlayerAbility; +import com.minelittlepony.unicopia.network.MsgPlayerCapabilities; +import com.minelittlepony.unicopia.network.MsgRequestCapabilities; +import com.minelittlepony.unicopia.structure.UStructures; public class UnicopiaCore implements ModInitializer { public static final String MODID = "unicopia"; @@ -39,6 +46,13 @@ public class UnicopiaCore implements ModInitializer { UTags.bootstrap(); Commands.bootstrap(); + UBlocks.bootstrap(); + UItems.bootstrap(); + UContainers.bootstrap(); + UStructures.bootstrap(); PowersRegistry.instance().init(); + + ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(Pages.instance()); + ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(AffineIngredients.instance()); } } diff --git a/src/main/java/com/minelittlepony/unicopia/ability/Hit.java b/src/main/java/com/minelittlepony/unicopia/ability/Hit.java new file mode 100644 index 00000000..b4494755 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/ability/Hit.java @@ -0,0 +1,5 @@ +package com.minelittlepony.unicopia.ability; + +public class Hit implements IPower.IData { + +} diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/IAbilityReceiver.java b/src/main/java/com/minelittlepony/unicopia/ability/IAbilityReceiver.java similarity index 57% rename from src/main/java/com/minelittlepony/unicopia/core/ability/IAbilityReceiver.java rename to src/main/java/com/minelittlepony/unicopia/ability/IAbilityReceiver.java index a8a7cac7..cf98e25b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/IAbilityReceiver.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/IAbilityReceiver.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; -import com.minelittlepony.unicopia.core.ability.IPower; +import com.minelittlepony.unicopia.ability.IPower; public interface IAbilityReceiver { diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/IFlyingPredicate.java b/src/main/java/com/minelittlepony/unicopia/ability/IFlyingPredicate.java similarity index 63% rename from src/main/java/com/minelittlepony/unicopia/core/ability/IFlyingPredicate.java rename to src/main/java/com/minelittlepony/unicopia/ability/IFlyingPredicate.java index 2407b5c4..3830f07c 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/IFlyingPredicate.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/IFlyingPredicate.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.entity.player.IPlayer; /** * Predicate for abilities to control whether a player can fly. diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/IHeightPredicate.java b/src/main/java/com/minelittlepony/unicopia/ability/IHeightPredicate.java similarity index 69% rename from src/main/java/com/minelittlepony/unicopia/core/ability/IHeightPredicate.java rename to src/main/java/com/minelittlepony/unicopia/ability/IHeightPredicate.java index 924b06b1..25a46daf 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/IHeightPredicate.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/IHeightPredicate.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.entity.player.IPlayer; /** * Predicate for abilities to control what the player's physical height is. diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/IPower.java b/src/main/java/com/minelittlepony/unicopia/ability/IPower.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/core/ability/IPower.java rename to src/main/java/com/minelittlepony/unicopia/ability/IPower.java index b7a16131..832b84cf 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/IPower.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/IPower.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.IKeyBindingHandler; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.IKeyBindingHandler; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.minecraft.world.World; diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/Location.java b/src/main/java/com/minelittlepony/unicopia/ability/Location.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/core/ability/Location.java rename to src/main/java/com/minelittlepony/unicopia/ability/Location.java index 4d930dfa..6c664598 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/Location.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/Location.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import com.google.gson.annotations.Expose; diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/Numeric.java b/src/main/java/com/minelittlepony/unicopia/ability/Numeric.java similarity index 78% rename from src/main/java/com/minelittlepony/unicopia/core/ability/Numeric.java rename to src/main/java/com/minelittlepony/unicopia/ability/Numeric.java index 4bff02bf..edab9c96 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/Numeric.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/Numeric.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import com.google.gson.annotations.Expose; diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerCarry.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerCarry.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/core/ability/PowerCarry.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerCarry.java index 6a55e1a4..8e50cf27 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerCarry.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerCarry.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import org.lwjgl.glfw.GLFW; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.util.VecHelper; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.util.VecHelper; import net.minecraft.client.network.packet.EntityPassengersSetS2CPacket; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/ability/PowerCloudBase.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerCloudBase.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/redux/ability/PowerCloudBase.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerCloudBase.java index 9d4d6e64..0fb18bf1 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/ability/PowerCloudBase.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerCloudBase.java @@ -1,15 +1,13 @@ -package com.minelittlepony.unicopia.redux.ability; +package com.minelittlepony.unicopia.ability; import java.util.Optional; import org.lwjgl.glfw.GLFW; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.ability.IPower; -import com.minelittlepony.unicopia.core.ability.Numeric; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.util.VecHelper; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.util.VecHelper; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/ability/PowerDisguise.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerDisguise.java similarity index 83% rename from src/main/java/com/minelittlepony/unicopia/redux/ability/PowerDisguise.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerDisguise.java index fac13f74..23d6fd34 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/ability/PowerDisguise.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerDisguise.java @@ -1,19 +1,17 @@ -package com.minelittlepony.unicopia.redux.ability; +package com.minelittlepony.unicopia.ability; import javax.annotation.Nullable; import org.lwjgl.glfw.GLFW; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.ability.Hit; -import com.minelittlepony.unicopia.core.ability.PowerFeed; -import com.minelittlepony.unicopia.core.entity.InAnimate; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.util.VecHelper; -import com.minelittlepony.unicopia.redux.magic.spells.DisguiseSpell; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.entity.InAnimate; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.spell.DisguiseSpell; +import com.minelittlepony.unicopia.util.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/ability/PowerEngulf.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerEngulf.java similarity index 74% rename from src/main/java/com/minelittlepony/unicopia/redux/ability/PowerEngulf.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerEngulf.java index c06576a5..1404eba5 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/ability/PowerEngulf.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerEngulf.java @@ -1,14 +1,12 @@ -package com.minelittlepony.unicopia.redux.ability; +package com.minelittlepony.unicopia.ability; import javax.annotation.Nullable; import org.lwjgl.glfw.GLFW; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.ability.Hit; -import com.minelittlepony.unicopia.core.ability.IPower; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.redux.magic.spells.ChangelingTrapSpell; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.spell.ChangelingTrapSpell; public class PowerEngulf implements IPower { diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerFeed.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerFeed.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/ability/PowerFeed.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerFeed.java index a073c357..0ad5375a 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerFeed.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerFeed.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import java.util.List; import java.util.stream.Collectors; @@ -7,10 +7,10 @@ import javax.annotation.Nullable; import org.lwjgl.glfw.GLFW; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.VecHelper; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.VecHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; @@ -134,7 +134,7 @@ public class PowerFeed implements IPower { living.damage(d, damage); } - // TODO: + // TODO: ParticleTypeRegistry //ParticleTypeRegistry.spawnParticles(UParticles.CHANGELING_MAGIC, living, 7); if (changeling.hasStatusEffect(StatusEffects.NAUSEA)) { diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerGrow.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerGrow.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/core/ability/PowerGrow.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerGrow.java index 653a6b8a..b3efa376 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerGrow.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerGrow.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import org.lwjgl.glfw.GLFW; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.util.VecHelper; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.util.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.item.BoneMealItem; diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerMagic.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerMagic.java similarity index 82% rename from src/main/java/com/minelittlepony/unicopia/core/ability/PowerMagic.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerMagic.java index c99429c1..e3c69dc2 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerMagic.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerMagic.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import org.lwjgl.glfw.GLFW; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.spell.ShieldSpell; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.spell.ShieldSpell; /** * A magic casting ability for unicorns. diff --git a/src/main/java/com/minelittlepony/unicopia/redux/ability/PowerStomp.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerStomp.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/ability/PowerStomp.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerStomp.java index 6bdbd483..1c839e4b 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/ability/PowerStomp.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerStomp.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.ability; +package com.minelittlepony.unicopia.ability; import java.util.ArrayList; import java.util.List; @@ -6,19 +6,17 @@ import org.lwjgl.glfw.GLFW; import com.google.common.collect.Lists; import com.google.gson.annotations.Expose; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.ability.IPower; -import com.minelittlepony.unicopia.core.ability.Location; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.util.AwaitTickQueue; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.PosHelper; -import com.minelittlepony.unicopia.core.util.VecHelper; -import com.minelittlepony.unicopia.core.util.WorldEvent; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; -import com.minelittlepony.unicopia.redux.item.AppleItem; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.item.AppleItem; +import com.minelittlepony.unicopia.util.AwaitTickQueue; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.PosHelper; +import com.minelittlepony.unicopia.util.VecHelper; +import com.minelittlepony.unicopia.util.WorldEvent; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -462,7 +460,7 @@ public class PowerStomp implements IPower { } private Object getVariant(BlockState state) { - // TODO: + // TODO: Variants are gone /*if (state.getBlock() instanceof LeavesBlock) { return ((LeavesBlock)state.getBlock()).getWoodType(state); } diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerTeleport.java b/src/main/java/com/minelittlepony/unicopia/ability/PowerTeleport.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/ability/PowerTeleport.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowerTeleport.java index ac4a01f9..e8cc6da9 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/PowerTeleport.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowerTeleport.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import org.lwjgl.glfw.GLFW; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.util.VecHelper; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.util.VecHelper; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/PowersRegistry.java b/src/main/java/com/minelittlepony/unicopia/ability/PowersRegistry.java similarity index 75% rename from src/main/java/com/minelittlepony/unicopia/core/ability/PowersRegistry.java rename to src/main/java/com/minelittlepony/unicopia/ability/PowersRegistry.java index b94fed43..8a700c63 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/PowersRegistry.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/PowersRegistry.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.ability; +package com.minelittlepony.unicopia.ability; import java.util.ArrayList; import java.util.Collection; @@ -7,7 +7,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; -import com.minelittlepony.unicopia.core.Race; +import com.minelittlepony.unicopia.Race; public class PowersRegistry { @@ -25,11 +25,15 @@ public class PowersRegistry { } public void init() { - registerPower(new PowerTeleport()); - registerPower(new PowerMagic()); - registerPower(new PowerGrow()); - registerPower(new PowerFeed()); - registerPower(new PowerCarry()); + register(new PowerTeleport()); + register(new PowerMagic()); + register(new PowerGrow()); + register(new PowerFeed()); + register(new PowerCarry()); + register(new PowerCloudBase()); + register(new PowerEngulf()); + register(new PowerStomp()); + register(new PowerDisguise()); } public boolean hasRegisteredPower(int keyCode) { @@ -50,7 +54,7 @@ public class PowersRegistry { return keyToPowerMap.computeIfAbsent(keyCode, ArrayList::new); } - public void registerPower(IPower power) { + public void register(IPower power) { getKeyCodePool(power.getKeyCode()).add(power); powerNamesMap.put(power.getKeyName(), power); } diff --git a/src/main/java/com/minelittlepony/unicopia/redux/advancements/AbstractCriterion.java b/src/main/java/com/minelittlepony/unicopia/advancements/AbstractCriterion.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/advancements/AbstractCriterion.java rename to src/main/java/com/minelittlepony/unicopia/advancements/AbstractCriterion.java index ba81cccd..469374ce 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/advancements/AbstractCriterion.java +++ b/src/main/java/com/minelittlepony/unicopia/advancements/AbstractCriterion.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.advancements; +package com.minelittlepony.unicopia.advancements; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/advancements/AdvancementPredicate.java b/src/main/java/com/minelittlepony/unicopia/advancements/AdvancementPredicate.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/advancements/AdvancementPredicate.java rename to src/main/java/com/minelittlepony/unicopia/advancements/AdvancementPredicate.java index f5a0dc08..dbbef2ca 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/advancements/AdvancementPredicate.java +++ b/src/main/java/com/minelittlepony/unicopia/advancements/AdvancementPredicate.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.advancements; +package com.minelittlepony.unicopia.advancements; import com.google.gson.JsonElement; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/advancements/BOHDeathCriterion.java b/src/main/java/com/minelittlepony/unicopia/advancements/BOHDeathCriterion.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/advancements/BOHDeathCriterion.java rename to src/main/java/com/minelittlepony/unicopia/advancements/BOHDeathCriterion.java index 997a11ca..8b4215c4 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/advancements/BOHDeathCriterion.java +++ b/src/main/java/com/minelittlepony/unicopia/advancements/BOHDeathCriterion.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.advancements; +package com.minelittlepony.unicopia.advancements; import java.util.Optional; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/AbstractDoorBlock.java b/src/main/java/com/minelittlepony/unicopia/block/AbstractDoorBlock.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/block/AbstractDoorBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/AbstractDoorBlock.java index 0b7ddaf7..f6d3d49b 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/AbstractDoorBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/AbstractDoorBlock.java @@ -1,8 +1,8 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.util.WorldEvent; +import com.minelittlepony.unicopia.util.WorldEvent; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/BlockGrowingCuccoon.java b/src/main/java/com/minelittlepony/unicopia/block/BlockGrowingCuccoon.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/block/BlockGrowingCuccoon.java rename to src/main/java/com/minelittlepony/unicopia/block/BlockGrowingCuccoon.java index f3daf916..cb16025a 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/BlockGrowingCuccoon.java +++ b/src/main/java/com/minelittlepony/unicopia/block/BlockGrowingCuccoon.java @@ -1,25 +1,27 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import java.util.List; import java.util.Random; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.USounds; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.PosHelper; -import com.minelittlepony.unicopia.redux.UBlocks; -import com.minelittlepony.unicopia.redux.UMaterials; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.UMaterials; +import com.minelittlepony.unicopia.USounds; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.PosHelper; import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.block.LadderBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.damage.DamageSource; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.particle.ParticleTypes; +import net.minecraft.sound.SoundCategory; import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.IntProperty; import net.minecraft.util.StringIdentifiable; @@ -115,7 +117,7 @@ public class BlockGrowingCuccoon extends Block { BlockPos below = pos.down(); if (world.isBlockLoaded(below)) { - boolean spaceBelow = world.isAirBlock(below); + boolean spaceBelow = world.isAir(below); Shape shape = state.get(SHAPE); @@ -132,7 +134,7 @@ public class BlockGrowingCuccoon extends Block { } else { if (age < getMaximumAge(world, pos, state, spaceBelow)) { if (rand.nextInt(5 * (age + 1)) == 0) { - world.setBlockState(pos, state.cycleProperty(AGE)); + world.setBlockState(pos, state.cycle(AGE)); } } } @@ -295,10 +297,11 @@ public class BlockGrowingCuccoon extends Block { return new BlockStateContainer(this, AGE, SHAPE); } - @Override + // TODO: isLadder + /*@Override public boolean isLadder(BlockState state, BlockView world, BlockPos pos, LivingEntity entity) { return true; - } + }*/ @Override public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random rand) { diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/ChiselledChitinBlock.java b/src/main/java/com/minelittlepony/unicopia/block/ChiselledChitinBlock.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/redux/block/ChiselledChitinBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/ChiselledChitinBlock.java index 77248e38..84d356a1 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/ChiselledChitinBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/ChiselledChitinBlock.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.redux.UMaterials; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UMaterials; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/ChitinBlock.java b/src/main/java/com/minelittlepony/unicopia/block/ChitinBlock.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/redux/block/ChitinBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/ChitinBlock.java index a2bf16ac..8624e018 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/ChitinBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/ChitinBlock.java @@ -1,9 +1,9 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.redux.UMaterials; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UMaterials; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudAnvilBlock.java b/src/main/java/com/minelittlepony/unicopia/block/CloudAnvilBlock.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/block/CloudAnvilBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/CloudAnvilBlock.java index 55b3f371..16467c18 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudAnvilBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/CloudAnvilBlock.java @@ -1,9 +1,9 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import java.util.Random; -import com.minelittlepony.unicopia.core.util.WorldEvent; -import com.minelittlepony.unicopia.redux.CloudType; +import com.minelittlepony.unicopia.CloudType; +import com.minelittlepony.unicopia.util.WorldEvent; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.AnvilBlock; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudBlock.java b/src/main/java/com/minelittlepony/unicopia/block/CloudBlock.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/redux/block/CloudBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/CloudBlock.java index c6739d9b..8c4b1e88 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/CloudBlock.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import java.util.Random; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.redux.CloudType; -import com.minelittlepony.unicopia.redux.UBlocks; -import com.minelittlepony.unicopia.redux.item.MossItem; +import com.minelittlepony.unicopia.CloudType; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.item.MossItem; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/BlockCloudDoor.java b/src/main/java/com/minelittlepony/unicopia/block/CloudDoorBlock.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/redux/block/BlockCloudDoor.java rename to src/main/java/com/minelittlepony/unicopia/block/CloudDoorBlock.java index dd7b2e29..583e588b 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/BlockCloudDoor.java +++ b/src/main/java/com/minelittlepony/unicopia/block/CloudDoorBlock.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; -import com.minelittlepony.unicopia.redux.CloudType; -import com.minelittlepony.unicopia.redux.UMaterials; +import com.minelittlepony.unicopia.CloudType; +import com.minelittlepony.unicopia.UMaterials; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.BlockRenderLayer; @@ -15,10 +15,10 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.BlockView; import net.minecraft.world.World; -public class BlockCloudDoor extends AbstractDoorBlock implements ICloudBlock { +public class CloudDoorBlock extends AbstractDoorBlock implements ICloudBlock { @SuppressWarnings("deprecation") - public BlockCloudDoor() { + public CloudDoorBlock() { super(FabricBlockSettings.of(UMaterials.CLOUD) .sounds(BlockSoundGroup.WOOL) .hardness(3) diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudFarmlandBlock.java b/src/main/java/com/minelittlepony/unicopia/block/CloudFarmlandBlock.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/redux/block/CloudFarmlandBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/CloudFarmlandBlock.java index d9bec505..fda1705d 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudFarmlandBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/CloudFarmlandBlock.java @@ -1,8 +1,8 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; -import com.minelittlepony.unicopia.core.ducks.IFarmland; -import com.minelittlepony.unicopia.redux.CloudType; -import com.minelittlepony.unicopia.redux.UBlocks; +import com.minelittlepony.unicopia.CloudType; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.ducks.IFarmland; import net.minecraft.block.BlockRenderLayer; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudFenceBlock.java b/src/main/java/com/minelittlepony/unicopia/block/CloudFenceBlock.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/block/CloudFenceBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/CloudFenceBlock.java index 7b03ca28..97a73b2f 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudFenceBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/CloudFenceBlock.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; -import com.minelittlepony.unicopia.redux.CloudType; +import com.minelittlepony.unicopia.CloudType; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.BlockRenderLayer; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudSlabBlock.java b/src/main/java/com/minelittlepony/unicopia/block/CloudSlabBlock.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/block/CloudSlabBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/CloudSlabBlock.java index cd27a199..0a756f1b 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudSlabBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/CloudSlabBlock.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; -import com.minelittlepony.unicopia.redux.CloudType; +import com.minelittlepony.unicopia.CloudType; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudStairsBlock.java b/src/main/java/com/minelittlepony/unicopia/block/CloudStairsBlock.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/block/CloudStairsBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/CloudStairsBlock.java index 311d4349..bc9b30b2 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/CloudStairsBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/CloudStairsBlock.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; -import com.minelittlepony.unicopia.redux.CloudType; +import com.minelittlepony.unicopia.CloudType; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/DiamondDoorBlock.java b/src/main/java/com/minelittlepony/unicopia/block/DiamondDoorBlock.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/redux/block/DiamondDoorBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/DiamondDoorBlock.java index 0fb1b1f6..25f1c4b9 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/DiamondDoorBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/DiamondDoorBlock.java @@ -1,8 +1,8 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; +import com.minelittlepony.unicopia.EquinePredicates; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/DutchDoorBlock.java b/src/main/java/com/minelittlepony/unicopia/block/DutchDoorBlock.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/block/DutchDoorBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/DutchDoorBlock.java index 6e2169f4..22fb39e0 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/DutchDoorBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/DutchDoorBlock.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import net.minecraft.block.BlockState; import net.minecraft.block.enums.DoubleBlockHalf; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/FruitLeavesBlock.java b/src/main/java/com/minelittlepony/unicopia/block/FruitLeavesBlock.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/redux/block/FruitLeavesBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/FruitLeavesBlock.java index c81659c6..b77f89c9 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/FruitLeavesBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/FruitLeavesBlock.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import java.util.Random; import java.util.function.Function; import javax.annotation.Nonnull; -import com.minelittlepony.unicopia.core.SpeciesList; +import com.minelittlepony.unicopia.SpeciesList; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/GlowingGemBlock.java b/src/main/java/com/minelittlepony/unicopia/block/GlowingGemBlock.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/block/GlowingGemBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/GlowingGemBlock.java index 65a44a83..87fa8045 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/GlowingGemBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/GlowingGemBlock.java @@ -1,8 +1,9 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import java.util.Random; -import com.minelittlepony.unicopia.redux.CloudType; +import com.minelittlepony.unicopia.CloudType; +import com.minelittlepony.unicopia.UParticles; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; @@ -124,10 +125,9 @@ public class GlowingGemBlock extends TorchBlock implements ICloudBlock { if (state.get(ON)) { for (int i = 0; i < 3; i++) { - // TODO: - // ParticleTypeRegistry.getTnstance().spawnParticle(UParticles.UNICORN_MAGIC, false, - // x - 0.3, y - 0.3, z - 0.3, - // rand.nextFloat(), rand.nextFloat(), rand.nextFloat()); + world.addParticle(UParticles.UNICORN_MAGIC, + x - 0.3, y - 0.3, z - 0.3, + rand.nextFloat(), rand.nextFloat(), rand.nextFloat()); } } else { world.addParticle(ParticleTypes.SMOKE, x, y, z, 0, 0, 0); diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/HiveWallBlock.java b/src/main/java/com/minelittlepony/unicopia/block/HiveWallBlock.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/block/HiveWallBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/HiveWallBlock.java index 5416264f..ac9dd0f9 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/HiveWallBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/HiveWallBlock.java @@ -1,18 +1,18 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import java.util.Map; import java.util.Random; import com.google.common.collect.Maps; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.USounds; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.util.PosHelper; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; -import com.minelittlepony.unicopia.redux.UBlocks; -import com.minelittlepony.unicopia.redux.UMaterials; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.UMaterials; +import com.minelittlepony.unicopia.USounds; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.util.PosHelper; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; @@ -45,6 +45,7 @@ public class HiveWallBlock extends FallingBlock { private static final IShape shape = new Sphere(false, 1.5); + @SuppressWarnings("deprecation") public HiveWallBlock() { super(FabricBlockSettings.of(UMaterials.HIVE) .noCollision() @@ -53,14 +54,12 @@ public class HiveWallBlock extends FallingBlock { .ticksRandomly() .lightLevel(1) .sounds(BlockSoundGroup.SAND) + .breakByTool(net.fabricmc.fabric.api.tools.FabricToolTags.PICKAXES, 1) .build() ); setDefaultState(stateFactory.getDefaultState() .with(STATE, State.GROWING).with(AXIS, Axis.Y) ); - - // TODO: - // setHarvestLevel("pickaxe", 1); } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/ICloudBlock.java b/src/main/java/com/minelittlepony/unicopia/block/ICloudBlock.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/block/ICloudBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/ICloudBlock.java index 168bc78a..fbfb57cd 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/ICloudBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/ICloudBlock.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.redux.CloudType; +import com.minelittlepony.unicopia.CloudType; +import com.minelittlepony.unicopia.EquinePredicates; import net.minecraft.block.BedBlock; import net.minecraft.block.Block; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/IColourful.java b/src/main/java/com/minelittlepony/unicopia/block/IColourful.java similarity index 74% rename from src/main/java/com/minelittlepony/unicopia/redux/block/IColourful.java rename to src/main/java/com/minelittlepony/unicopia/block/IColourful.java index 54c6b224..540daf46 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/IColourful.java +++ b/src/main/java/com/minelittlepony/unicopia/block/IColourful.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/ITillable.java b/src/main/java/com/minelittlepony/unicopia/block/ITillable.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/redux/block/ITillable.java rename to src/main/java/com/minelittlepony/unicopia/block/ITillable.java index a6cd9d7c..8c1ccd54 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/ITillable.java +++ b/src/main/java/com/minelittlepony/unicopia/block/ITillable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import javax.annotation.Nonnull; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/SlimeLayerBlock.java b/src/main/java/com/minelittlepony/unicopia/block/SlimeLayerBlock.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/redux/block/SlimeLayerBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/SlimeLayerBlock.java index 324f1092..41ba1abe 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/SlimeLayerBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/SlimeLayerBlock.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.BlockRenderLayer; @@ -20,8 +20,7 @@ public class SlimeLayerBlock extends SnowBlock { .build() ); - // TODO: - // drops Items.SLIME_BALL x1 + // TODO: drops Items.SLIME_BALL x1 } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/StickBlock.java b/src/main/java/com/minelittlepony/unicopia/block/StickBlock.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/block/StickBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/StickBlock.java index 7d5da59e..ddff8843 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/StickBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/StickBlock.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; @@ -40,8 +40,7 @@ public class StickBlock extends Block { .build() ); - // TODO: - // drops Items.STICK x1 + // TODO: drops Items.STICK x1 } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/SugarBlock.java b/src/main/java/com/minelittlepony/unicopia/block/SugarBlock.java similarity index 78% rename from src/main/java/com/minelittlepony/unicopia/redux/block/SugarBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/SugarBlock.java index aa79ef0d..7f4716da 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/SugarBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/SugarBlock.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.FallingBlock; @@ -13,8 +13,6 @@ public class SugarBlock extends FallingBlock { .sounds(BlockSoundGroup.SAND) .build() ); - //TODO: - // Loot table drops: - // // Items.SUGAR x 9; + //TODO: drops SUGAR x 9; } } diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/TallCropBlock.java b/src/main/java/com/minelittlepony/unicopia/block/TallCropBlock.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/redux/block/TallCropBlock.java rename to src/main/java/com/minelittlepony/unicopia/block/TallCropBlock.java index 07b64b68..aab179e5 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/TallCropBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/TallCropBlock.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import java.util.Random; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.redux.item.UItems; +import com.minelittlepony.unicopia.item.UItems; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/BlockTomatoPlant.java b/src/main/java/com/minelittlepony/unicopia/block/TomatoPlantBlock.java similarity index 67% rename from src/main/java/com/minelittlepony/unicopia/redux/block/BlockTomatoPlant.java rename to src/main/java/com/minelittlepony/unicopia/block/TomatoPlantBlock.java index 82186875..e1e5847e 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/BlockTomatoPlant.java +++ b/src/main/java/com/minelittlepony/unicopia/block/TomatoPlantBlock.java @@ -1,13 +1,14 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; -import java.util.Random; - -import com.minelittlepony.unicopia.redux.item.UItems; +import java.util.List; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.item.UItems; +import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.CropBlock; -import net.minecraft.block.Fertilizable; +import net.minecraft.block.Material; import net.minecraft.entity.EntityContext; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; @@ -21,21 +22,30 @@ import net.minecraft.util.Hand; import net.minecraft.util.StringIdentifiable; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction; import net.minecraft.util.math.Vec3d; import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; import net.minecraft.world.ViewableWorld; import net.minecraft.world.World; +import net.minecraft.world.loot.context.LootContext; -public class BlockTomatoPlant extends CropBlock { +public class TomatoPlantBlock extends CropBlock { public static final EnumProperty TYPE = EnumProperty.of("type", Type.class); - public BlockTomatoPlant() { + public TomatoPlantBlock() { + super(FabricBlockSettings.of(Material.PLANT) + .noCollision() + .strength(0.2F, 0.2F) + .ticksRandomly() + .lightLevel(1) + .sounds(BlockSoundGroup.WOOD) + .build() + ); setDefaultState(getDefaultState().with(TYPE, Type.NORMAL)); - setHardness(0.2F); - setSoundType(SoundType.WOOD); + + // TODO: drops UItems.tomato_seeds x1 + // if mature: UItems.tomato } @Deprecated @@ -61,14 +71,9 @@ public class BlockTomatoPlant extends CropBlock { return UItems.tomato_seeds; } - @Override - protected Item getCrop() { - return UItems.tomato; - } - @Override public boolean canPlaceAt(BlockState state, ViewableWorld world, BlockPos pos) { - if (world.getBlockState(pos.down()).getBlock() instanceof BlockTomatoPlant) { + if (world.getBlockState(pos.down()).getBlock() instanceof TomatoPlantBlock) { return true; } @@ -76,55 +81,27 @@ public class BlockTomatoPlant extends CropBlock { } @Override - public boolean canSustainPlant(BlockState state, BlockView world, BlockPos pos, Direction direction, Fertilizable plantable) { - - if (direction == Direction.UP && state.getBlock() instanceof BlockTomatoPlant) { - return true; - } - - return super.canSustainPlant(state, world, pos, direction, plantable); + protected boolean canPlantOnTop(BlockState state, BlockView view, BlockPos pos) { + return super.canPlantOnTop(state, view, pos) + || state.getBlock() == UBlocks.cloud_farmland + || state.getBlock() == UBlocks.tomato_plant + || state.getBlock() == UBlocks.stick; } @Override - public void onScheduledTick(BlockState state, World world, BlockPos pos, Random rand) { - checkAndDropBlock(world, pos, state); + @Deprecated + public List getDroppedStacks(BlockState state, LootContext.Builder context) { + List drops = super.getDroppedStacks(state, context); - if (world.isBlockLoaded(pos) && world.getLightLevel(pos.up()) >= 9) { - int i = getAge(state); - - if (i < getMaxAge()) { - float f = getAvailableMoisture(this, world, pos); - - world.setBlockState(pos, state.with(getAgeProperty(), i + 1), 2); - } - } - } - - @Override - public int quantityDropped(BlockState state, int fortune, Random random) { - return 1; - } - - @Override - public Item getItemDropped(BlockState state, Random rand, int fortune) { + drops.add(new ItemStack(Items.STICK, 1)); if (isMature(state)) { - return state.get(TYPE).getCrop(); + drops.add(new ItemStack(state.get(TYPE).getCrop(), 1)); + } else { + drops.add(new ItemStack(getSeedsItem())); } - return getSeed(); - } - - @Override - public void getDrops(NonNullList drops, WorldView world, BlockPos pos, BlockState state, int fortune) { - Random rand = world instanceof World ? ((World)world).random : RANDOM; - - drops.add(new ItemStack(Items.STICK, 1, 0)); - - Item item = getItemDropped(state, rand, fortune); - if (item != Items.AIR) { - drops.add(new ItemStack(item, 1, damageDropped(state))); - } + return drops; } @Override @@ -163,10 +140,7 @@ public class BlockTomatoPlant extends CropBlock { } public boolean plant(World world, BlockPos pos, BlockState state) { - Block block = state.getBlock(); - - if (block instanceof StickBlock && ((StickBlock)block).canSustainPlant(world, pos, this)) { - + if (canPlantOnTop(state, world, pos)) { world.setBlockState(pos, getPlacedState(world, pos, state).with(getAgeProperty(), 1)); BlockSoundGroup sound = getSoundGroup(state); @@ -189,7 +163,7 @@ public class BlockTomatoPlant extends CropBlock { return getDefaultState().with(TYPE, Type.CLOUDSDALE); } - if (state.getBlock() instanceof BlockTomatoPlant) { + if (state.getBlock() instanceof TomatoPlantBlock) { return getDefaultState().with(TYPE, state.get(TYPE)); } diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/USlab.java b/src/main/java/com/minelittlepony/unicopia/block/USlab.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/block/USlab.java rename to src/main/java/com/minelittlepony/unicopia/block/USlab.java index dd085a42..e248ce66 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/USlab.java +++ b/src/main/java/com/minelittlepony/unicopia/block/USlab.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import java.util.Random; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/block/UStairs.java b/src/main/java/com/minelittlepony/unicopia/block/UStairs.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/block/UStairs.java rename to src/main/java/com/minelittlepony/unicopia/block/UStairs.java index 5825b0fb..fe865f06 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/block/UStairs.java +++ b/src/main/java/com/minelittlepony/unicopia/block/UStairs.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.block; +package com.minelittlepony.unicopia.block; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/InversionAwareKeyboardInput.java b/src/main/java/com/minelittlepony/unicopia/client/InversionAwareKeyboardInput.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/core/client/InversionAwareKeyboardInput.java rename to src/main/java/com/minelittlepony/unicopia/client/InversionAwareKeyboardInput.java index cea29e81..843b0253 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/InversionAwareKeyboardInput.java +++ b/src/main/java/com/minelittlepony/unicopia/client/InversionAwareKeyboardInput.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.client; +package com.minelittlepony.unicopia.client; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.minecraft.client.MinecraftClient; import net.minecraft.client.input.Input; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/KeyBindingsHandler.java b/src/main/java/com/minelittlepony/unicopia/client/KeyBindingsHandler.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/core/client/KeyBindingsHandler.java rename to src/main/java/com/minelittlepony/unicopia/client/KeyBindingsHandler.java index 0ab27fa6..e3377b07 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/KeyBindingsHandler.java +++ b/src/main/java/com/minelittlepony/unicopia/client/KeyBindingsHandler.java @@ -1,13 +1,13 @@ -package com.minelittlepony.unicopia.core.client; +package com.minelittlepony.unicopia.client; import java.util.ArrayList; import java.util.List; -import com.minelittlepony.unicopia.core.IKeyBindingHandler; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.core.ability.PowersRegistry; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.IKeyBindingHandler; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UnicopiaCore; +import com.minelittlepony.unicopia.ability.PowersRegistry; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.fabricmc.fabric.api.client.keybinding.FabricKeyBinding; import net.fabricmc.fabric.api.client.keybinding.KeyBindingRegistry; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/MouseControl.java b/src/main/java/com/minelittlepony/unicopia/client/MouseControl.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/core/client/MouseControl.java rename to src/main/java/com/minelittlepony/unicopia/client/MouseControl.java index ee914800..c5da090d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/MouseControl.java +++ b/src/main/java/com/minelittlepony/unicopia/client/MouseControl.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.client; +package com.minelittlepony.unicopia.client; -import com.minelittlepony.unicopia.core.SpeciesList; +import com.minelittlepony.unicopia.SpeciesList; import net.minecraft.client.MinecraftClient; import net.minecraft.client.Mouse; diff --git a/src/main/java/com/minelittlepony/unicopia/client/URenderers.java b/src/main/java/com/minelittlepony/unicopia/client/URenderers.java new file mode 100644 index 00000000..1239195c --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/client/URenderers.java @@ -0,0 +1,39 @@ +package com.minelittlepony.unicopia.client; + +import com.minelittlepony.unicopia.client.render.ButterflyEntityRenderer; +import com.minelittlepony.unicopia.client.render.CloudEntityRenderer; +import com.minelittlepony.unicopia.client.render.CuccoonEntityRenderer; +import com.minelittlepony.unicopia.client.render.RainbowEntityRenderer; +import com.minelittlepony.unicopia.client.render.SpearEntityRenderer; +import com.minelittlepony.unicopia.client.render.RenderSpellbook; +import com.minelittlepony.unicopia.client.render.SpellcastEntityRenderer; +import com.minelittlepony.unicopia.entity.ButterflyEntity; +import com.minelittlepony.unicopia.entity.CloudEntity; +import com.minelittlepony.unicopia.entity.CuccoonEntity; +import com.minelittlepony.unicopia.entity.ProjectileEntity; +import com.minelittlepony.unicopia.entity.RainbowEntity; +import com.minelittlepony.unicopia.entity.SpearEntity; +import com.minelittlepony.unicopia.entity.SpellbookEntity; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; +import net.minecraft.client.render.entity.FlyingItemEntityRenderer; + +public interface URenderers { + static void bootstrap() { + EntityRendererRegistry.INSTANCE.register(CloudEntity.class, CloudEntityRenderer::new); + EntityRendererRegistry.INSTANCE.register(SpellcastEntity.class, SpellcastEntityRenderer::new); + EntityRendererRegistry.INSTANCE.register(ProjectileEntity.class, (manager, context) -> new FlyingItemEntityRenderer<>(manager, context.getItemRenderer())); + EntityRendererRegistry.INSTANCE.register(SpellbookEntity.class, RenderSpellbook::new); + EntityRendererRegistry.INSTANCE.register(RainbowEntity.class, RainbowEntityRenderer::new); + EntityRendererRegistry.INSTANCE.register(ButterflyEntity.class, ButterflyEntityRenderer::new); + EntityRendererRegistry.INSTANCE.register(CuccoonEntity.class, CuccoonEntityRenderer::new); + EntityRendererRegistry.INSTANCE.register(SpearEntity.class, SpearEntityRenderer::new); + + // TODO: ParticleFactoryRegistry + //ParticleFactoryRegistry.instance().register(UParticles.UNICORN_MAGIC, MagicParticle::new); + //ParticleFactoryRegistry.instance().register(UParticles.CHANGELING_MAGIC, ChangelingMagicParticle::new); + //ParticleFactoryRegistry.instance().register(UParticles.RAIN_DROPS, RaindropsParticle::new); + //ParticleFactoryRegistry.instance().register(UParticles.SPHERE, SphereParticle::new); + //ParticleFactoryRegistry.instance().register(UParticles.DISK, DiskParticle::new); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/UnicopiaCoreClient.java b/src/main/java/com/minelittlepony/unicopia/client/UnicopiaCoreClient.java similarity index 86% rename from src/main/java/com/minelittlepony/unicopia/core/client/UnicopiaCoreClient.java rename to src/main/java/com/minelittlepony/unicopia/client/UnicopiaCoreClient.java index e18482c4..9cc4f64d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/UnicopiaCoreClient.java +++ b/src/main/java/com/minelittlepony/unicopia/client/UnicopiaCoreClient.java @@ -1,22 +1,22 @@ -package com.minelittlepony.unicopia.core.client; +package com.minelittlepony.unicopia.client; import javax.annotation.Nonnull; import javax.annotation.Nullable; import com.minelittlepony.common.event.ClientReadyCallback; import com.minelittlepony.jumpingcastle.api.Target; -import com.minelittlepony.unicopia.core.Config; -import com.minelittlepony.unicopia.core.IKeyBindingHandler; -import com.minelittlepony.unicopia.core.InteractionManager; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.core.ability.PowersRegistry; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.network.MsgRequestCapabilities; -import com.minelittlepony.unicopia.core.util.MineLPConnector; -import com.minelittlepony.unicopia.core.util.dummy.DummyClientPlayerEntity; -import com.minelittlepony.unicopia.redux.client.render.DisguiseRenderer; +import com.minelittlepony.unicopia.Config; +import com.minelittlepony.unicopia.IKeyBindingHandler; +import com.minelittlepony.unicopia.InteractionManager; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UnicopiaCore; +import com.minelittlepony.unicopia.ability.PowersRegistry; +import com.minelittlepony.unicopia.client.render.DisguiseRenderer; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.network.MsgRequestCapabilities; +import com.minelittlepony.unicopia.util.MineLPConnector; +import com.minelittlepony.unicopia.util.dummy.DummyClientPlayerEntity; import com.mojang.authlib.GameProfile; import com.mojang.blaze3d.platform.GlStateManager; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/UnicopiaReduxClient.java b/src/main/java/com/minelittlepony/unicopia/client/UnicopiaReduxClient.java similarity index 83% rename from src/main/java/com/minelittlepony/unicopia/redux/client/UnicopiaReduxClient.java rename to src/main/java/com/minelittlepony/unicopia/client/UnicopiaReduxClient.java index 529af812..0d0db1c3 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/UnicopiaReduxClient.java +++ b/src/main/java/com/minelittlepony/unicopia/client/UnicopiaReduxClient.java @@ -1,13 +1,14 @@ -package com.minelittlepony.unicopia.redux.client; +package com.minelittlepony.unicopia.client; -import static com.minelittlepony.unicopia.core.EquinePredicates.MAGI; +import static com.minelittlepony.unicopia.EquinePredicates.MAGI; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.redux.UBlocks; -import com.minelittlepony.unicopia.redux.block.IColourful; -import com.minelittlepony.unicopia.redux.item.UItems; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.block.IColourful; +import com.minelittlepony.unicopia.item.UItems; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; + import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.client.render.ColorProviderRegistry; import net.minecraft.block.Block; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/gui/ClientHooks.java b/src/main/java/com/minelittlepony/unicopia/client/gui/ClientHooks.java similarity index 82% rename from src/main/java/com/minelittlepony/unicopia/core/client/gui/ClientHooks.java rename to src/main/java/com/minelittlepony/unicopia/client/gui/ClientHooks.java index 0bfc3848..1dfec699 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/gui/ClientHooks.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/ClientHooks.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.client.gui; +package com.minelittlepony.unicopia.client.gui; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.client.gui.UHud; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.client.gui.UHud; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.MinecraftClient; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/gui/FlightExperienceBar.java b/src/main/java/com/minelittlepony/unicopia/client/gui/FlightExperienceBar.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/client/gui/FlightExperienceBar.java rename to src/main/java/com/minelittlepony/unicopia/client/gui/FlightExperienceBar.java index 2e64fbf7..004ac580 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/gui/FlightExperienceBar.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/FlightExperienceBar.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.client.gui; +package com.minelittlepony.unicopia.client.gui; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.entity.player.IPlayer; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.gui.DrawableHelper; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/gui/IHudElement.java b/src/main/java/com/minelittlepony/unicopia/client/gui/IHudElement.java similarity index 56% rename from src/main/java/com/minelittlepony/unicopia/core/client/gui/IHudElement.java rename to src/main/java/com/minelittlepony/unicopia/client/gui/IHudElement.java index 0b16d2c3..1e34d5b8 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/gui/IHudElement.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/IHudElement.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.client.gui; +package com.minelittlepony.unicopia.client.gui; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.entity.player.IPlayer; public interface IHudElement { diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/gui/SettingsScreen.java b/src/main/java/com/minelittlepony/unicopia/client/gui/SettingsScreen.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/core/client/gui/SettingsScreen.java rename to src/main/java/com/minelittlepony/unicopia/client/gui/SettingsScreen.java index 4fa4b893..97a5c51b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/gui/SettingsScreen.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/SettingsScreen.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.client.gui; +package com.minelittlepony.unicopia.client.gui; import com.minelittlepony.common.client.gui.GameGui; import com.minelittlepony.common.client.gui.element.Button; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/gui/UHud.java b/src/main/java/com/minelittlepony/unicopia/client/gui/UHud.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/core/client/gui/UHud.java rename to src/main/java/com/minelittlepony/unicopia/client/gui/UHud.java index 58996c46..a9499c68 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/gui/UHud.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/UHud.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.core.client.gui; +package com.minelittlepony.unicopia.client.gui; import java.util.ArrayList; import java.util.List; import org.lwjgl.opengl.GL11; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.entity.player.IPlayer; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.MinecraftClient; diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/client/MixinCamera.java b/src/main/java/com/minelittlepony/unicopia/client/mixin/MixinCamera.java similarity index 83% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/client/MixinCamera.java rename to src/main/java/com/minelittlepony/unicopia/client/mixin/MixinCamera.java index 059e07b5..c77b8a4b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/client/MixinCamera.java +++ b/src/main/java/com/minelittlepony/unicopia/client/mixin/MixinCamera.java @@ -1,12 +1,12 @@ -package com.minelittlepony.unicopia.core.mixin.client; +package com.minelittlepony.unicopia.client.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.player.PlayerCamera; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.entity.player.PlayerCamera; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.Camera; diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/client/MixinGameRenderer.java b/src/main/java/com/minelittlepony/unicopia/client/mixin/MixinGameRenderer.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/client/MixinGameRenderer.java rename to src/main/java/com/minelittlepony/unicopia/client/mixin/MixinGameRenderer.java index af963762..7584e0bf 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/client/MixinGameRenderer.java +++ b/src/main/java/com/minelittlepony/unicopia/client/mixin/MixinGameRenderer.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.core.mixin.client; +package com.minelittlepony.unicopia.client.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import com.minelittlepony.unicopia.core.SpeciesList; +import com.minelittlepony.unicopia.SpeciesList; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.Camera; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/particle/ChangelingMagicParticle.java b/src/main/java/com/minelittlepony/unicopia/client/particle/ChangelingMagicParticle.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/core/client/particle/ChangelingMagicParticle.java rename to src/main/java/com/minelittlepony/unicopia/client/particle/ChangelingMagicParticle.java index 9928a77e..769ee723 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/particle/ChangelingMagicParticle.java +++ b/src/main/java/com/minelittlepony/unicopia/client/particle/ChangelingMagicParticle.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.client.particle; +package com.minelittlepony.unicopia.client.particle; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/particle/DiskParticle.java b/src/main/java/com/minelittlepony/unicopia/client/particle/DiskParticle.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/core/client/particle/DiskParticle.java rename to src/main/java/com/minelittlepony/unicopia/client/particle/DiskParticle.java index bd7ada1d..ca629593 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/particle/DiskParticle.java +++ b/src/main/java/com/minelittlepony/unicopia/client/particle/DiskParticle.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.client.particle; +package com.minelittlepony.unicopia.client.particle; import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.Camera; @@ -7,7 +7,7 @@ import net.minecraft.world.World; import org.lwjgl.opengl.GL14; -import com.minelittlepony.unicopia.core.client.render.DiskModel; +import com.minelittlepony.unicopia.client.render.DiskModel; import com.mojang.blaze3d.platform.GlStateManager; public class DiskParticle extends SphereParticle { diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/particle/MagicParticle.java b/src/main/java/com/minelittlepony/unicopia/client/particle/MagicParticle.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/client/particle/MagicParticle.java rename to src/main/java/com/minelittlepony/unicopia/client/particle/MagicParticle.java index a04bb987..1277b257 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/particle/MagicParticle.java +++ b/src/main/java/com/minelittlepony/unicopia/client/particle/MagicParticle.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.client.particle; +package com.minelittlepony.unicopia.client.particle; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/particle/RaindropsParticle.java b/src/main/java/com/minelittlepony/unicopia/client/particle/RaindropsParticle.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/core/client/particle/RaindropsParticle.java rename to src/main/java/com/minelittlepony/unicopia/client/particle/RaindropsParticle.java index 65e9cc25..86a76668 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/particle/RaindropsParticle.java +++ b/src/main/java/com/minelittlepony/unicopia/client/particle/RaindropsParticle.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.client.particle; +package com.minelittlepony.unicopia.client.particle; import net.minecraft.client.particle.Particle; import net.minecraft.client.particle.ParticleFactory; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/particle/SphereParticle.java b/src/main/java/com/minelittlepony/unicopia/client/particle/SphereParticle.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/client/particle/SphereParticle.java rename to src/main/java/com/minelittlepony/unicopia/client/particle/SphereParticle.java index fd48f7f0..69f25bd2 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/particle/SphereParticle.java +++ b/src/main/java/com/minelittlepony/unicopia/client/particle/SphereParticle.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.client.particle; +package com.minelittlepony.unicopia.client.particle; import net.minecraft.client.MinecraftClient; import net.minecraft.client.particle.Particle; @@ -15,9 +15,9 @@ import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL14; -import com.minelittlepony.unicopia.core.client.render.SphereModel; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.util.particles.ParticleConnection.IAttachableParticle; +import com.minelittlepony.unicopia.client.render.SphereModel; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.particles.ParticleConnection.IAttachableParticle; import com.mojang.blaze3d.platform.GlStateManager; public class SphereParticle extends Particle implements IAttachableParticle { diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/ButterflyEntityRenderer.java b/src/main/java/com/minelittlepony/unicopia/client/render/ButterflyEntityRenderer.java similarity index 69% rename from src/main/java/com/minelittlepony/unicopia/redux/client/render/ButterflyEntityRenderer.java rename to src/main/java/com/minelittlepony/unicopia/client/render/ButterflyEntityRenderer.java index 231d4073..016c5ca8 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/ButterflyEntityRenderer.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/ButterflyEntityRenderer.java @@ -1,9 +1,10 @@ -package com.minelittlepony.unicopia.redux.client.render; +package com.minelittlepony.unicopia.client.render; -import com.minelittlepony.unicopia.redux.client.render.model.ButterflyEntityModel; -import com.minelittlepony.unicopia.redux.entity.ButterflyEntity; +import com.minelittlepony.unicopia.client.render.model.ButterflyEntityModel; +import com.minelittlepony.unicopia.entity.ButterflyEntity; import com.mojang.blaze3d.platform.GlStateManager; +import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.LivingEntityRenderer; import net.minecraft.util.Identifier; @@ -11,8 +12,8 @@ import net.minecraft.util.math.MathHelper; public class ButterflyEntityRenderer extends LivingEntityRenderer { - public ButterflyEntityRenderer(EntityRenderDispatcher rm) { - super(rm, new ButterflyEntityModel(), 0.25F); + public ButterflyEntityRenderer(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) { + super(manager, new ButterflyEntityModel(), 0.25F); } @Override diff --git a/src/main/java/com/minelittlepony/unicopia/client/render/CloudEntityRenderer.java b/src/main/java/com/minelittlepony/unicopia/client/render/CloudEntityRenderer.java new file mode 100644 index 00000000..8fa905a3 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/client/render/CloudEntityRenderer.java @@ -0,0 +1,78 @@ +package com.minelittlepony.unicopia.client.render; + +import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; +import net.minecraft.client.render.entity.EntityRenderDispatcher; +import net.minecraft.client.render.entity.LivingEntityRenderer; +import net.minecraft.util.Identifier; + +import org.lwjgl.opengl.GL11; + +import com.minelittlepony.unicopia.client.render.model.CloudEntityModel; +import com.minelittlepony.unicopia.entity.CloudEntity; +import com.minelittlepony.unicopia.util.WorldHelper; +import com.mojang.blaze3d.platform.GlStateManager; + +public class CloudEntityRenderer extends LivingEntityRenderer { + private static final Identifier cloud = new Identifier("unicopia", "textures/entity/clouds.png"); + private static final Identifier rainCloud = new Identifier("unicopia", "textures/entity/clouds_storm.png"); + + public CloudEntityRenderer(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) { + super(manager, new CloudEntityModel(), 1f); + } + + @Override + public void scale(CloudEntity entity, float par2) { + float scale = entity.getCloudSize(); + + GL11.glScalef(scale, scale, scale); + } + + @Override + protected void render(CloudEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + if (!entity.removed) { + GlStateManager.pushMatrix(); + GlStateManager.translatef(0, -entity.getHeight()/entity.getCloudSize() + 0.3F, 0); + + GlStateManager.disableLighting(); + GlStateManager.enableBlend(); + + float brightness = Math.max(WorldHelper.getDaylightBrightness(entity.getEntityWorld(), 0) * 3, 0.05F); + + GlStateManager.color4f(brightness, brightness, brightness, entity.getOpaque() ? 1 : 0.8F); + + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); + + GlStateManager.disableBlend(); + GlStateManager.enableLighting(); + GlStateManager.color4f(1, 1, 1, 1); + + GlStateManager.popMatrix(); + } + } + + @Override + protected Identifier getTexture(CloudEntity entity) { + if (entity.getIsRaining() && entity.getIsThundering()) { + return rainCloud; + } + return cloud; + } + + @Override + protected float getLyingAngle(CloudEntity par1LivingEntity) { + return 0; + } +} + + + + + + + + + + diff --git a/src/main/java/com/minelittlepony/unicopia/client/render/CuccoonEntityRenderer.java b/src/main/java/com/minelittlepony/unicopia/client/render/CuccoonEntityRenderer.java new file mode 100644 index 00000000..24c82251 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/client/render/CuccoonEntityRenderer.java @@ -0,0 +1,53 @@ +package com.minelittlepony.unicopia.client.render; + +import com.minelittlepony.unicopia.InteractionManager; +import com.minelittlepony.unicopia.UnicopiaCore; +import com.minelittlepony.unicopia.client.render.model.CuccoonEntityModel; +import com.minelittlepony.unicopia.entity.CuccoonEntity; +import com.mojang.blaze3d.platform.GlStateManager; + +import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.entity.EntityRenderDispatcher; +import net.minecraft.client.render.entity.LivingEntityRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.util.Identifier; + +public class CuccoonEntityRenderer extends LivingEntityRenderer { + + private static final Identifier TEXTURE = new Identifier(UnicopiaCore.MODID, "textures/entity/cuccoon.png"); + + public CuccoonEntityRenderer(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) { + super(manager, new CuccoonEntityModel(), 1); + } + + @Override + protected Identifier getTexture(CuccoonEntity entity) { + return TEXTURE; + } + + @Override + protected float getLyingAngle(CuccoonEntity entity) { + return 0; + } + + @Override + public void render(CuccoonEntity entity, double x, double y, double z, float entityYaw, float partialTicks) { + + if (entity.hasPassengers()) { + Entity rider = entity.getPrimaryPassenger(); + + if (!(rider == MinecraftClient.getInstance().player) || InteractionManager.instance().getViewMode() != 0) { + GlStateManager.enableAlphaTest(); + GlStateManager.enableBlend(); + + renderManager.render(rider, x, y + rider.getMountedHeightOffset(), z, entityYaw, partialTicks, true); + + GlStateManager.disableBlend(); + GlStateManager.disableAlphaTest(); + } + } + + super.render(entity, x, y, z, entityYaw, partialTicks); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/DisguiseRenderer.java b/src/main/java/com/minelittlepony/unicopia/client/render/DisguiseRenderer.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/redux/client/render/DisguiseRenderer.java rename to src/main/java/com/minelittlepony/unicopia/client/render/DisguiseRenderer.java index d57b938b..0fe9d12b 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/DisguiseRenderer.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/DisguiseRenderer.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.redux.client.render; +package com.minelittlepony.unicopia.client.render; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.redux.magic.spells.DisguiseSpell; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.spell.DisguiseSpell; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.entity.EntityRenderDispatcher; diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/render/DiskModel.java b/src/main/java/com/minelittlepony/unicopia/client/render/DiskModel.java similarity index 55% rename from src/main/java/com/minelittlepony/unicopia/core/client/render/DiskModel.java rename to src/main/java/com/minelittlepony/unicopia/client/render/DiskModel.java index f4f393d7..b9573dbc 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/render/DiskModel.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/DiskModel.java @@ -1,13 +1,14 @@ -package com.minelittlepony.unicopia.core.client.render; +package com.minelittlepony.unicopia.client.render; public class DiskModel extends SphereModel { @Override protected void drawShape() { - Disk sphere = new Disk(); + /* Disk sphere = new Disk(); sphere.setDrawStyle(GLU.GLU_FILL); sphere.setNormals(GL.GLU_SMOOTH); - sphere.draw(0, 1, 32, 32); + sphere.draw(0, 1, 32, 32);*/ + // TODO: GLU Disk } } diff --git a/src/main/java/com/minelittlepony/unicopia/core/client/render/ModelQuads.java b/src/main/java/com/minelittlepony/unicopia/client/render/ModelQuads.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/core/client/render/ModelQuads.java rename to src/main/java/com/minelittlepony/unicopia/client/render/ModelQuads.java index f2bfa879..15d7b650 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/client/render/ModelQuads.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/ModelQuads.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.client.render; +package com.minelittlepony.unicopia.client.render; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/minelittlepony/unicopia/client/render/RainbowEntityRenderer.java b/src/main/java/com/minelittlepony/unicopia/client/render/RainbowEntityRenderer.java new file mode 100644 index 00000000..a2020394 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/client/render/RainbowEntityRenderer.java @@ -0,0 +1,75 @@ +package com.minelittlepony.unicopia.client.render; + +import org.lwjgl.opengl.GL11; + +import com.minelittlepony.unicopia.entity.RainbowEntity; +import com.minelittlepony.unicopia.util.WorldHelper; +import com.mojang.blaze3d.platform.GlStateManager; + +import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.BufferBuilder; +import net.minecraft.client.render.Tessellator; +import net.minecraft.client.render.VertexFormats; +import net.minecraft.client.render.entity.EntityRenderDispatcher; +import net.minecraft.client.render.entity.EntityRenderer; +import net.minecraft.util.Identifier; + +public class RainbowEntityRenderer extends EntityRenderer { + + public RainbowEntityRenderer(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) { + super(manager); + } + + private static final Identifier TEXTURE = new Identifier("unicopia", "textures/environment/rainbow.png"); + + public void doRender(RainbowEntity entity, double x, double y, double z, float entityYaw, float partialTicks) { + float distance = MinecraftClient.getInstance().getCameraEntity().distanceTo(entity); + float maxDistance = 16 * MinecraftClient.getInstance().options.viewDistance; + double r = entity.getRadius(); + float light = WorldHelper.getDaylightBrightness(entity.getEntityWorld(), partialTicks); + + float opacity = ((maxDistance - distance) / maxDistance); + + opacity *= light; + + if (opacity <= 0) { + return; + } + + bindEntityTexture(entity); + + GlStateManager.pushMatrix(); + GlStateManager.disableLighting(); + GlStateManager.disableCull(); + GlStateManager.enableBlend(); + GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); + + GlStateManager.translated(x, y, z); + GlStateManager.rotatef(entityYaw, 0, 1, 0); + + GlStateManager.color4f(1, 1, 1, opacity); + + Tessellator tessellator = Tessellator.getInstance(); + BufferBuilder bufferbuilder = tessellator.getBufferBuilder(); + + bufferbuilder.begin(GL11.GL_QUADS, VertexFormats.POSITION_UV); + bufferbuilder.vertex(-r, r, 0).texture(1, 0).end(); + bufferbuilder.vertex( r, r, 0).texture(0, 0).end(); + bufferbuilder.vertex( r, 0, 0).texture(0, 1).end(); + bufferbuilder.vertex(-r, 0, 0).texture(1, 1).end(); + + tessellator.draw(); + + GlStateManager.disableBlend(); + GlStateManager.enableCull(); + GlStateManager.enableLighting(); + GlStateManager.popMatrix(); + } + + @Override + protected Identifier getTexture(RainbowEntity entity) { + return TEXTURE; + } + +} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderSpellbook.java b/src/main/java/com/minelittlepony/unicopia/client/render/RenderSpellbook.java similarity index 55% rename from src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderSpellbook.java rename to src/main/java/com/minelittlepony/unicopia/client/render/RenderSpellbook.java index 55aea04f..3cf1a5aa 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderSpellbook.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/RenderSpellbook.java @@ -1,10 +1,11 @@ -package com.minelittlepony.unicopia.redux.client.render; +package com.minelittlepony.unicopia.client.render; -import com.minelittlepony.unicopia.redux.client.render.model.SpellbookModel; -import com.minelittlepony.unicopia.redux.entity.SpellbookEntity; +import com.minelittlepony.unicopia.client.render.model.SpellbookModel; +import com.minelittlepony.unicopia.entity.SpellbookEntity; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.util.math.MathHelper; +import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.LivingEntityRenderer; import net.minecraft.util.Identifier; @@ -14,24 +15,24 @@ public class RenderSpellbook extends LivingEntityRenderer { + public static final Identifier TEXTURE = new Identifier(UnicopiaCore.MODID, "textures/entity/projectiles/spear.png"); + + public SpearEntityRenderer(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) { + super(manager); + } + + @Override + protected Identifier getTexture(SpearEntity entity) { + return TEXTURE; + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/SpellcastEntityRenderer.java b/src/main/java/com/minelittlepony/unicopia/client/render/SpellcastEntityRenderer.java similarity index 64% rename from src/main/java/com/minelittlepony/unicopia/redux/client/render/SpellcastEntityRenderer.java rename to src/main/java/com/minelittlepony/unicopia/client/render/SpellcastEntityRenderer.java index 2fa70e45..eb14bcaf 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/SpellcastEntityRenderer.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/SpellcastEntityRenderer.java @@ -1,21 +1,20 @@ -package com.minelittlepony.unicopia.redux.client.render; +package com.minelittlepony.unicopia.client.render; -import com.minelittlepony.unicopia.redux.client.render.model.ModelGem; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; +import com.minelittlepony.unicopia.client.render.model.GemEntityModel; +import com.minelittlepony.unicopia.entity.SpellcastEntity; import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; -import net.minecraft.client.render.Frustum; import net.minecraft.client.render.VisibleRegion; import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.LivingEntityRenderer; import net.minecraft.util.Identifier; -public class SpellcastEntityRenderer extends LivingEntityRenderer { +public class SpellcastEntityRenderer extends LivingEntityRenderer { private static final Identifier gem = new Identifier("unicopia", "textures/entity/gem.png"); public SpellcastEntityRenderer(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) { - super(manager, new ModelGem(), 0); + super(manager, new GemEntityModel(), 0); } @Override @@ -29,13 +28,13 @@ public class SpellcastEntityRenderer extends LivingEntityRenderer { + + private final Cuboid body; + + public CloudEntityModel() { + body = new Cuboid(this, 0, 0); + body.setTextureSize(250, 90); + + body.setTextureOffset(0, 0); + body.addBox(-24, 5, -24, 48, 10, 48); + + body.setTextureOffset(0, 58); + body.addBox(-10, 14.999F, -10, 30, 2, 30); + + body.setTextureOffset(120, 58); + body.addBox(-10, 3.001F, -10, 30, 2, 30); + + body.rotationPointY += 4.2; + } + + @Override + public void render(CloudEntity cloud, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { + body.render(scale); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelCuccoon.java b/src/main/java/com/minelittlepony/unicopia/client/render/model/CuccoonEntityModel.java similarity index 50% rename from src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelCuccoon.java rename to src/main/java/com/minelittlepony/unicopia/client/render/model/CuccoonEntityModel.java index 3b0fbf34..6aa0feca 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelCuccoon.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/model/CuccoonEntityModel.java @@ -1,20 +1,19 @@ -package com.minelittlepony.unicopia.redux.client.render.model; +package com.minelittlepony.unicopia.client.render.model; -import com.minelittlepony.unicopia.redux.entity.CuccoonEntity; +import com.minelittlepony.unicopia.entity.CuccoonEntity; +import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.platform.GlStateManager.DestFactor; +import com.mojang.blaze3d.platform.GlStateManager.SourceFactor; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.GlStateManager.DestFactor; -import net.minecraft.client.renderer.GlStateManager.SourceFactor; -import net.minecraft.entity.Entity; +import net.minecraft.client.model.Cuboid; +import net.minecraft.client.render.entity.model.EntityModel; -public class ModelCuccoon extends ModelBase { +public class CuccoonEntityModel extends EntityModel { - private final ModelRenderer body; + private final Cuboid body; - public ModelCuccoon() { - body = new ModelRenderer(this, 0, 0); + public CuccoonEntityModel() { + body = new Cuboid(this, 0, 0); body.setTextureSize(250, 250); body.setTextureOffset(0, 0); @@ -38,30 +37,30 @@ public class ModelCuccoon extends ModelBase { } @Override - public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { + public void render(CuccoonEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { - float breatheAmount = ((CuccoonEntity)entity).getBreatheAmount(ageInTicks) / 8; + float breatheAmount = entity.getBreatheAmount(ageInTicks) / 8; GlStateManager.pushMatrix(); GlStateManager.enableBlend(); - GlStateManager.enableAlpha(); + GlStateManager.enableAlphaTest(); GlStateManager.enableNormalize(); GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA); - GlStateManager.scale(1 - breatheAmount, 1 + breatheAmount, 1 - breatheAmount); - GlStateManager.translate(0, -breatheAmount * 1.3F, 0); + GlStateManager.scalef(1 - breatheAmount, 1 + breatheAmount, 1 - breatheAmount); + GlStateManager.translatef(0, -breatheAmount * 1.3F, 0); body.render(scale); - GlStateManager.scale(0.9, 0.9, 0.9); - GlStateManager.translate(0, 0.2F, 0); + GlStateManager.scalef(0.9F, 0.9F, 0.9F); + GlStateManager.translatef(0, 0.2F, 0); body.render(scale); GlStateManager.disableNormalize(); - GlStateManager.disableAlpha(); + GlStateManager.disableAlphaTest(); GlStateManager.disableBlend(); GlStateManager.popMatrix(); diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelGem.java b/src/main/java/com/minelittlepony/unicopia/client/render/model/GemEntityModel.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelGem.java rename to src/main/java/com/minelittlepony/unicopia/client/render/model/GemEntityModel.java index 532c3b04..80cb006a 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelGem.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/model/GemEntityModel.java @@ -1,21 +1,22 @@ -package com.minelittlepony.unicopia.redux.client.render.model; +package com.minelittlepony.unicopia.client.render.model; -import com.minelittlepony.unicopia.core.client.render.ModelQuads; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; +import com.minelittlepony.unicopia.client.render.ModelQuads; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.util.Color; +import com.mojang.blaze3d.platform.GLX; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.model.Cuboid; import net.minecraft.client.model.Vertex; import net.minecraft.client.render.entity.model.EntityModel; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityPose; import net.minecraft.util.math.MathHelper; -public class ModelGem extends EntityModel { +public class GemEntityModel extends EntityModel { private Cuboid body; - public ModelGem() { + public GemEntityModel() { textureWidth = 256; textureHeight = 256; @@ -102,7 +103,8 @@ public class ModelGem extends EntityModel { setLightingConditionsBrightness(0xF0F0); if (entity.hasEffect()) { - Color.glColor(entity.getEffect().getTint(), 1); + int tint = entity.getEffect().getTint(); + GlStateManager.color4f(Color.r(tint), Color.g(tint), Color.b(tint), 1); } int tiers = Math.min(entity.getCurrentLevel(), 5); @@ -150,6 +152,6 @@ public class ModelGem extends EntityModel { int texX = brightness % 0x10000; int texY = brightness / 0x10000; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, texX, texY); + GLX.glMultiTexCoord2f(GLX.GL_TEXTURE1, texX, texY); } } diff --git a/src/main/java/com/minelittlepony/unicopia/client/render/model/SpellbookModel.java b/src/main/java/com/minelittlepony/unicopia/client/render/model/SpellbookModel.java new file mode 100644 index 00000000..ce6043c9 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/client/render/model/SpellbookModel.java @@ -0,0 +1,49 @@ +package com.minelittlepony.unicopia.client.render.model; + +import com.minelittlepony.unicopia.entity.SpellbookEntity; + +import net.minecraft.client.model.Cuboid; +import net.minecraft.client.render.entity.model.EntityModel; +import net.minecraft.util.math.MathHelper; + +public class SpellbookModel extends EntityModel { + private final Cuboid leftCover = (new Cuboid(this)).setTextureOffset(0, 0).addBox(-6.0F, -5.0F, 0.0F, 6, 10, 0); + private final Cuboid rightCover = (new Cuboid(this)).setTextureOffset(16, 0).addBox(0.0F, -5.0F, 0.0F, 6, 10, 0); + private final Cuboid leftBlock = (new Cuboid(this)).setTextureOffset(0, 10).addBox(0.0F, -4.0F, -0.99F, 5, 8, 1); + private final Cuboid rightBlock = (new Cuboid(this)).setTextureOffset(12, 10).addBox(0.0F, -4.0F, -0.01F, 5, 8, 1); + private final Cuboid leftPage = (new Cuboid(this)).setTextureOffset(24, 10).addBox(0.0F, -4.0F, 0.0F, 5, 8, 0); + private final Cuboid rightPage = (new Cuboid(this)).setTextureOffset(24, 10).addBox(0.0F, -4.0F, 0.0F, 5, 8, 0); + private final Cuboid spine = (new Cuboid(this)).setTextureOffset(12, 0).addBox(-1.0F, -5.0F, 0.0F, 2, 10, 0); + + public SpellbookModel() { + this.leftCover.setRotationPoint(0.0F, 0.0F, -1.0F); + this.rightCover.setRotationPoint(0.0F, 0.0F, 1.0F); + this.spine.yaw = 1.5707964F; + } + + @Override + public void render(SpellbookEntity entity, float float_1, float float_2, float float_3, float float_4, float float_5, float float_6) { + this.leftCover.render(float_6); + this.rightCover.render(float_6); + this.spine.render(float_6); + this.leftBlock.render(float_6); + this.rightBlock.render(float_6); + this.leftPage.render(float_6); + this.rightPage.render(float_6); + } + + @Override + public void setAngles(SpellbookEntity entity, float float_1, float float_2, float float_3, float float_4, float float_5, float float_6) { + float float_7 = (MathHelper.sin(float_1 * 0.02F) * 0.1F + 1.25F) * float_4; + this.leftCover.yaw = 3.1415927F + float_7; + this.rightCover.yaw = -float_7; + this.leftBlock.yaw = float_7; + this.rightBlock.yaw = -float_7; + this.leftPage.yaw = float_7 - float_7 * 2.0F * float_2; + this.rightPage.yaw = float_7 - float_7 * 2.0F * float_3; + this.leftBlock.rotationPointX = MathHelper.sin(float_7); + this.rightBlock.rotationPointX = MathHelper.sin(float_7); + this.leftPage.rotationPointX = MathHelper.sin(float_7); + this.rightPage.rotationPointX = MathHelper.sin(float_7); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/command/Commands.java b/src/main/java/com/minelittlepony/unicopia/command/Commands.java new file mode 100644 index 00000000..5e4ca17e --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/command/Commands.java @@ -0,0 +1,19 @@ +package com.minelittlepony.unicopia.command; + +import net.fabricmc.fabric.api.registry.CommandRegistry; +import net.fabricmc.loader.api.FabricLoader; +import net.minecraft.server.MinecraftServer; + +public class Commands { + public static void bootstrap() { + CommandRegistry.INSTANCE.register(false, SpeciesCommand::register); + CommandRegistry.INSTANCE.register(false, RacelistCommand::register); + CommandRegistry.INSTANCE.register(false, GravityCommand::register); + CommandRegistry.INSTANCE.register(false, DisguiseCommand::register); + + Object game = FabricLoader.getInstance().getGameInstance(); + if (game instanceof MinecraftServer) { + ((MinecraftServer)game).setFlightEnabled(true); + } + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/command/DisguiseCommand.java b/src/main/java/com/minelittlepony/unicopia/command/DisguiseCommand.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/command/DisguiseCommand.java rename to src/main/java/com/minelittlepony/unicopia/command/DisguiseCommand.java index bb128f13..0668a7a6 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/command/DisguiseCommand.java +++ b/src/main/java/com/minelittlepony/unicopia/command/DisguiseCommand.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.command; +package com.minelittlepony.unicopia.command; import java.util.function.Function; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.redux.magic.spells.DisguiseSpell; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.spell.DisguiseSpell; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import com.mojang.brigadier.exceptions.CommandSyntaxException; diff --git a/src/main/java/com/minelittlepony/unicopia/core/command/GravityCommand.java b/src/main/java/com/minelittlepony/unicopia/command/GravityCommand.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/command/GravityCommand.java rename to src/main/java/com/minelittlepony/unicopia/command/GravityCommand.java index 9c4b949e..abd56528 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/command/GravityCommand.java +++ b/src/main/java/com/minelittlepony/unicopia/command/GravityCommand.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.command; +package com.minelittlepony.unicopia.command; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.entity.player.IPlayer; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.FloatArgumentType; import com.mojang.brigadier.builder.LiteralArgumentBuilder; diff --git a/src/main/java/com/minelittlepony/unicopia/core/command/RaceArgument.java b/src/main/java/com/minelittlepony/unicopia/command/RaceArgument.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/core/command/RaceArgument.java rename to src/main/java/com/minelittlepony/unicopia/command/RaceArgument.java index da9d8472..9442ee41 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/command/RaceArgument.java +++ b/src/main/java/com/minelittlepony/unicopia/command/RaceArgument.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.core.command; +package com.minelittlepony.unicopia.command; import java.util.Arrays; import java.util.Collection; import java.util.stream.Collectors; -import com.minelittlepony.unicopia.core.Race; +import com.minelittlepony.unicopia.Race; import com.mojang.brigadier.StringReader; import com.mojang.brigadier.arguments.ArgumentType; import com.mojang.brigadier.exceptions.CommandSyntaxException; diff --git a/src/main/java/com/minelittlepony/unicopia/core/command/RacelistCommand.java b/src/main/java/com/minelittlepony/unicopia/command/RacelistCommand.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/core/command/RacelistCommand.java rename to src/main/java/com/minelittlepony/unicopia/command/RacelistCommand.java index eb0e80f3..92d66efb 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/command/RacelistCommand.java +++ b/src/main/java/com/minelittlepony/unicopia/command/RacelistCommand.java @@ -1,9 +1,9 @@ -package com.minelittlepony.unicopia.core.command; +package com.minelittlepony.unicopia.command; import java.util.function.BiFunction; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.builder.LiteralArgumentBuilder; diff --git a/src/main/java/com/minelittlepony/unicopia/core/command/SpeciesCommand.java b/src/main/java/com/minelittlepony/unicopia/command/SpeciesCommand.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/core/command/SpeciesCommand.java rename to src/main/java/com/minelittlepony/unicopia/command/SpeciesCommand.java index 4c30076d..68aefab9 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/command/SpeciesCommand.java +++ b/src/main/java/com/minelittlepony/unicopia/command/SpeciesCommand.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.command; +package com.minelittlepony.unicopia.command; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.builder.LiteralArgumentBuilder; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingContainer.java b/src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingContainer.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingContainer.java rename to src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingContainer.java index 2995f37f..8f34cfb9 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingContainer.java +++ b/src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingContainer.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.container; +package com.minelittlepony.unicopia.container; import net.minecraft.container.Container; import net.minecraft.container.Slot; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingInventory.java b/src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingInventory.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingInventory.java rename to src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingInventory.java index db53d566..b0a3cc07 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingInventory.java +++ b/src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingInventory.java @@ -1,15 +1,16 @@ -package com.minelittlepony.unicopia.redux.container; +package com.minelittlepony.unicopia.container; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.function.BiFunction; -import com.minelittlepony.unicopia.core.magic.IMagicalItem; -import com.minelittlepony.unicopia.core.util.HeavyInventoryUtils; -import com.minelittlepony.unicopia.core.util.InbtSerialisable; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.redux.advancements.BOHDeathCriterion; +import com.minelittlepony.unicopia.advancements.BOHDeathCriterion; +import com.minelittlepony.unicopia.magic.IMagicalItem; +import com.minelittlepony.unicopia.util.HeavyInventoryUtils; +import com.minelittlepony.unicopia.util.InbtSerialisable; +import com.minelittlepony.unicopia.util.MagicalDamageSource; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingScreen.java b/src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingScreen.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingScreen.java rename to src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingScreen.java index d75f2481..5b4a4ea3 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/container/BagOfHoldingScreen.java +++ b/src/main/java/com/minelittlepony/unicopia/container/BagOfHoldingScreen.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.redux.container; +package com.minelittlepony.unicopia.container; import com.minelittlepony.common.client.gui.element.Scrollbar; -import com.minelittlepony.unicopia.redux.item.BagOfHoldingItem; +import com.minelittlepony.unicopia.item.BagOfHoldingItem; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookContainer.java b/src/main/java/com/minelittlepony/unicopia/container/SpellBookContainer.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookContainer.java rename to src/main/java/com/minelittlepony/unicopia/container/SpellBookContainer.java index 2bac230d..02b0da12 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookContainer.java +++ b/src/main/java/com/minelittlepony/unicopia/container/SpellBookContainer.java @@ -1,12 +1,13 @@ -package com.minelittlepony.unicopia.redux.container; +package com.minelittlepony.unicopia.container; import javax.annotation.Nonnull; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.core.util.AwaitTickQueue; -import com.minelittlepony.unicopia.redux.enchanting.IPageUnlockListener; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.enchanting.IPageUnlockListener; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.util.AwaitTickQueue; + import net.minecraft.container.Container; import net.minecraft.container.Slot; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookInventory.java b/src/main/java/com/minelittlepony/unicopia/container/SpellBookInventory.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookInventory.java rename to src/main/java/com/minelittlepony/unicopia/container/SpellBookInventory.java index cd9976d4..bcca40c0 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookInventory.java +++ b/src/main/java/com/minelittlepony/unicopia/container/SpellBookInventory.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.container; +package com.minelittlepony.unicopia.container; import net.minecraft.container.Container; import net.minecraft.inventory.CraftingInventory; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookScreen.java b/src/main/java/com/minelittlepony/unicopia/container/SpellBookScreen.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookScreen.java rename to src/main/java/com/minelittlepony/unicopia/container/SpellBookScreen.java index 7287c2d1..1da4ee34 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/container/SpellBookScreen.java +++ b/src/main/java/com/minelittlepony/unicopia/container/SpellBookScreen.java @@ -1,16 +1,16 @@ -package com.minelittlepony.unicopia.redux.container; +package com.minelittlepony.unicopia.container; import org.lwjgl.opengl.GL11; import com.minelittlepony.common.client.gui.element.Button; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.core.enchanting.Page; -import com.minelittlepony.unicopia.core.enchanting.PageState; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.redux.container.SpellBookContainer.SpellbookSlot; -import com.minelittlepony.unicopia.redux.enchanting.IPageUnlockListener; -import com.minelittlepony.unicopia.redux.enchanting.Pages; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UnicopiaCore; +import com.minelittlepony.unicopia.container.SpellBookContainer.SpellbookSlot; +import com.minelittlepony.unicopia.enchanting.IPageUnlockListener; +import com.minelittlepony.unicopia.enchanting.Page; +import com.minelittlepony.unicopia.enchanting.PageState; +import com.minelittlepony.unicopia.enchanting.Pages; +import com.minelittlepony.unicopia.entity.player.IPlayer; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/container/SpellbookResultSlot.java b/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/redux/container/SpellbookResultSlot.java rename to src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java index 6522fdda..1a7a9d86 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/container/SpellbookResultSlot.java +++ b/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.container; +package com.minelittlepony.unicopia.container; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.redux.enchanting.IPageUnlockListener; -import com.minelittlepony.unicopia.redux.enchanting.SpellCraftingEvent; -import com.minelittlepony.unicopia.redux.item.MagicGemItem; +import com.minelittlepony.unicopia.enchanting.IPageOwner; +import com.minelittlepony.unicopia.enchanting.IPageUnlockListener; +import com.minelittlepony.unicopia.enchanting.SpellCraftingEvent; +import com.minelittlepony.unicopia.item.MagicGemItem; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.inventory.Inventory; diff --git a/src/main/java/com/minelittlepony/unicopia/core/ServerInteractionManager.java b/src/main/java/com/minelittlepony/unicopia/core/ServerInteractionManager.java deleted file mode 100644 index 2552d016..00000000 --- a/src/main/java/com/minelittlepony/unicopia/core/ServerInteractionManager.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.minelittlepony.unicopia.core; - -public class ServerInteractionManager { - - @Deprecated - public static boolean isClientSide() { - return false; - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/core/ability/Hit.java b/src/main/java/com/minelittlepony/unicopia/core/ability/Hit.java deleted file mode 100644 index c166846c..00000000 --- a/src/main/java/com/minelittlepony/unicopia/core/ability/Hit.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.minelittlepony.unicopia.core.ability; - -public class Hit implements IPower.IData { - -} diff --git a/src/main/java/com/minelittlepony/unicopia/core/command/Commands.java b/src/main/java/com/minelittlepony/unicopia/core/command/Commands.java deleted file mode 100644 index 6e181345..00000000 --- a/src/main/java/com/minelittlepony/unicopia/core/command/Commands.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.minelittlepony.unicopia.core.command; - -import net.fabricmc.fabric.api.registry.CommandRegistry; - -public class Commands { - public static void bootstrap() { - CommandRegistry.INSTANCE.register(false, SpeciesCommand::register); - CommandRegistry.INSTANCE.register(false, RacelistCommand::register); - CommandRegistry.INSTANCE.register(false, GravityCommand::register); - - // TODO: - //event.getServer().setAllowFlight(true); - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/core/enchanting/IUnlockEvent.java b/src/main/java/com/minelittlepony/unicopia/core/enchanting/IUnlockEvent.java deleted file mode 100644 index d818f808..00000000 --- a/src/main/java/com/minelittlepony/unicopia/core/enchanting/IUnlockEvent.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.minelittlepony.unicopia.core.enchanting; - -public interface IUnlockEvent { - -} diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IMagicals.java b/src/main/java/com/minelittlepony/unicopia/core/magic/IMagicals.java deleted file mode 100644 index 9e1b442f..00000000 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IMagicals.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.minelittlepony.unicopia.core.magic; - -public interface IMagicals { - -} diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/package-info.java b/src/main/java/com/minelittlepony/unicopia/core/magic/spell/package-info.java deleted file mode 100644 index c6bac56b..00000000 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.minelittlepony.unicopia.core.magic.spell; \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/AssetWalker.java b/src/main/java/com/minelittlepony/unicopia/core/util/AssetWalker.java deleted file mode 100644 index 29908949..00000000 --- a/src/main/java/com/minelittlepony/unicopia/core/util/AssetWalker.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.minelittlepony.unicopia.core.util; - -import java.io.BufferedReader; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.nio.file.FileSystem; -import java.nio.file.FileSystems; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Collections; -import java.util.Iterator; - -import javax.annotation.Nullable; - -import org.apache.commons.io.FilenameUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import net.minecraft.util.Identifier; - -/*** - * @deprecated Use Mojang's method - */ -@Deprecated -public class AssetWalker { - private static final Logger LOGGER = LogManager.getLogger(); - - private static final Gson GSON = new GsonBuilder() - .setPrettyPrinting() - .disableHtmlEscaping() - .create(); - - private final String loadLocation; - - private final String namespace; - - private final JsonConsumer consumer; - - public AssetWalker(Identifier assetLocation, JsonConsumer consumer) { - this.consumer = consumer; - this.namespace = assetLocation.getNamespace(); - - loadLocation = "/assets/" + namespace + "/" + assetLocation.getPath(); - } - - public void walk() { - try { - URL url = AssetWalker.class.getResource(loadLocation); - - if (url == null) { - LOGGER.error("Couldn't find .mcassetsroot"); - return; - } - - URI uri = url.toURI(); - - if ("file".equals(uri.getScheme())) { - readFiles(Paths.get(AssetWalker.class.getResource(loadLocation).toURI())); - } else { - if (!"jar".equals(uri.getScheme())) { - LOGGER.error("Unsupported scheme " + uri + " trying to list all recipes"); - - return; - } - - try (FileSystem filesystem = FileSystems.newFileSystem(uri, Collections.emptyMap())) { - readFiles(filesystem.getPath(loadLocation)); - } - } - } catch (IOException | URISyntaxException e) { - LOGGER.error("Couldn't get a list of all json files", e); - } - } - - private void readFiles(@Nullable Path path) throws IOException { - if (path == null) { - return; - } - - Iterator iterator = Files.walk(path).iterator(); - - while (iterator.hasNext()) { - Path i = iterator.next(); - - if ("json".equals(FilenameUtils.getExtension(i.toString()))) { - Identifier id = new Identifier(namespace, FilenameUtils.removeExtension(path.relativize(i).toString()).replaceAll("\\\\", "/")); - - try(BufferedReader bufferedreader = Files.newBufferedReader(i)) { - consumer.accept(id, GSON.fromJson(bufferedreader, JsonObject.class)); - } catch (JsonParseException e) { - LOGGER.error("Parsing error loading recipe " + id, e); - - return; - } catch (IOException e) { - LOGGER.error("Couldn't read recipe " + id + " from " + i, e); - - return; - } - } - } - } - - @FunctionalInterface - public interface JsonConsumer { - void accept(Identifier id, JsonObject json) throws JsonParseException; - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/core/ducks/IFarmland.java b/src/main/java/com/minelittlepony/unicopia/ducks/IFarmland.java similarity index 86% rename from src/main/java/com/minelittlepony/unicopia/core/ducks/IFarmland.java rename to src/main/java/com/minelittlepony/unicopia/ducks/IFarmland.java index 585804ad..6a79ae8b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ducks/IFarmland.java +++ b/src/main/java/com/minelittlepony/unicopia/ducks/IFarmland.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.ducks; +package com.minelittlepony.unicopia.ducks; import net.minecraft.block.BlockState; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/com/minelittlepony/unicopia/core/ducks/IItemEntity.java b/src/main/java/com/minelittlepony/unicopia/ducks/IItemEntity.java similarity index 52% rename from src/main/java/com/minelittlepony/unicopia/core/ducks/IItemEntity.java rename to src/main/java/com/minelittlepony/unicopia/ducks/IItemEntity.java index cdf23025..785b5991 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ducks/IItemEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/ducks/IItemEntity.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.ducks; +package com.minelittlepony.unicopia.ducks; -import com.minelittlepony.unicopia.core.entity.ItemEntityCapabilities; +import com.minelittlepony.unicopia.entity.ItemEntityCapabilities; public interface IItemEntity extends IRaceContainerHolder { diff --git a/src/main/java/com/minelittlepony/unicopia/core/ducks/IRaceContainerHolder.java b/src/main/java/com/minelittlepony/unicopia/ducks/IRaceContainerHolder.java similarity index 74% rename from src/main/java/com/minelittlepony/unicopia/core/ducks/IRaceContainerHolder.java rename to src/main/java/com/minelittlepony/unicopia/ducks/IRaceContainerHolder.java index 2fd3ff7f..df25789d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/ducks/IRaceContainerHolder.java +++ b/src/main/java/com/minelittlepony/unicopia/ducks/IRaceContainerHolder.java @@ -1,9 +1,9 @@ -package com.minelittlepony.unicopia.core.ducks; +package com.minelittlepony.unicopia.ducks; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.entity.IEntity; -import com.minelittlepony.unicopia.core.magic.ICaster; +import com.minelittlepony.unicopia.entity.IEntity; +import com.minelittlepony.unicopia.magic.ICaster; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/CompoundCondition.java b/src/main/java/com/minelittlepony/unicopia/enchanting/CompoundCondition.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/CompoundCondition.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/CompoundCondition.java index 5a433d0b..8d8d2e02 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/CompoundCondition.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/CompoundCondition.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting; +package com.minelittlepony.unicopia.enchanting; import java.util.List; import java.util.function.Predicate; @@ -7,8 +7,6 @@ import java.util.stream.Stream; import com.google.common.collect.Lists; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.enchanting.IUnlockEvent; public class CompoundCondition implements IUnlockCondition { diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/IConditionFactory.java b/src/main/java/com/minelittlepony/unicopia/enchanting/IConditionFactory.java similarity index 73% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/IConditionFactory.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/IConditionFactory.java index 9a19ea09..ccfe32e9 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/IConditionFactory.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/IConditionFactory.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting; +package com.minelittlepony.unicopia.enchanting; import com.google.gson.JsonObject; diff --git a/src/main/java/com/minelittlepony/unicopia/core/enchanting/IPageOwner.java b/src/main/java/com/minelittlepony/unicopia/enchanting/IPageOwner.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/core/enchanting/IPageOwner.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/IPageOwner.java index 21eddc52..f2465fa0 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/enchanting/IPageOwner.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/IPageOwner.java @@ -1,11 +1,12 @@ -package com.minelittlepony.unicopia.core.enchanting; +package com.minelittlepony.unicopia.enchanting; import java.util.Map; import java.util.function.Function; import javax.annotation.Nonnull; -import com.minelittlepony.unicopia.core.network.ITransmittable; +import com.minelittlepony.unicopia.network.ITransmittable; + import net.minecraft.util.Identifier; /** diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/IPageUnlockListener.java b/src/main/java/com/minelittlepony/unicopia/enchanting/IPageUnlockListener.java similarity index 69% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/IPageUnlockListener.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/IPageUnlockListener.java index ec2141fc..a3789b07 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/IPageUnlockListener.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/IPageUnlockListener.java @@ -1,6 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting; - -import com.minelittlepony.unicopia.core.enchanting.Page; +package com.minelittlepony.unicopia.enchanting; @FunctionalInterface public interface IPageUnlockListener { diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/IUnlockCondition.java b/src/main/java/com/minelittlepony/unicopia/enchanting/IUnlockCondition.java similarity index 81% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/IUnlockCondition.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/IUnlockCondition.java index b10fc980..48fb4b71 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/IUnlockCondition.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/IUnlockCondition.java @@ -1,9 +1,7 @@ -package com.minelittlepony.unicopia.redux.enchanting; +package com.minelittlepony.unicopia.enchanting; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.enchanting.IUnlockEvent; /** * A PageEvent for determining when certain pages must be unlocked. diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/IUnlockEvent.java b/src/main/java/com/minelittlepony/unicopia/enchanting/IUnlockEvent.java new file mode 100644 index 00000000..abcc5214 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/IUnlockEvent.java @@ -0,0 +1,5 @@ +package com.minelittlepony.unicopia.enchanting; + +public interface IUnlockEvent { + +} diff --git a/src/main/java/com/minelittlepony/unicopia/core/enchanting/Page.java b/src/main/java/com/minelittlepony/unicopia/enchanting/Page.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/core/enchanting/Page.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/Page.java index 748854aa..dae83de2 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/enchanting/Page.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/Page.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.enchanting; +package com.minelittlepony.unicopia.enchanting; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/PageInstance.java b/src/main/java/com/minelittlepony/unicopia/enchanting/PageInstance.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/PageInstance.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/PageInstance.java index 0fd4d1c0..42accd06 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/PageInstance.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/PageInstance.java @@ -1,14 +1,10 @@ -package com.minelittlepony.unicopia.redux.enchanting; +package com.minelittlepony.unicopia.enchanting; import javax.annotation.Nonnull; import javax.annotation.Nullable; import com.google.gson.JsonObject; import com.google.gson.annotations.Expose; -import com.minelittlepony.unicopia.core.enchanting.Page; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.enchanting.IUnlockEvent; -import com.minelittlepony.unicopia.core.enchanting.PageState; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/minelittlepony/unicopia/core/enchanting/PageState.java b/src/main/java/com/minelittlepony/unicopia/enchanting/PageState.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/core/enchanting/PageState.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/PageState.java index adb686cc..6f2efa9e 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/enchanting/PageState.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/PageState.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.enchanting; +package com.minelittlepony.unicopia.enchanting; public enum PageState { LOCKED, diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/PageStateCondition.java b/src/main/java/com/minelittlepony/unicopia/enchanting/PageStateCondition.java similarity index 69% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/PageStateCondition.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/PageStateCondition.java index ebd523b6..ea2096b8 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/PageStateCondition.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/PageStateCondition.java @@ -1,10 +1,6 @@ -package com.minelittlepony.unicopia.redux.enchanting; +package com.minelittlepony.unicopia.enchanting; import com.google.gson.JsonObject; -import com.minelittlepony.unicopia.core.enchanting.Page; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.enchanting.IUnlockEvent; -import com.minelittlepony.unicopia.core.enchanting.PageState; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/Pages.java b/src/main/java/com/minelittlepony/unicopia/enchanting/Pages.java similarity index 64% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/Pages.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/Pages.java index 9ad4260b..0e1114ba 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/Pages.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/Pages.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting; +package com.minelittlepony.unicopia.enchanting; import java.util.List; import java.util.Map; @@ -10,17 +10,24 @@ import javax.annotation.Nullable; import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.minelittlepony.unicopia.core.enchanting.Page; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.enchanting.IUnlockEvent; -import com.minelittlepony.unicopia.core.enchanting.PageState; -import com.minelittlepony.unicopia.core.util.AssetWalker; +import com.minelittlepony.unicopia.UnicopiaCore; +import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener; +import net.minecraft.resource.JsonDataLoader; +import net.minecraft.resource.ResourceManager; import net.minecraft.util.Identifier; +import net.minecraft.util.SystemUtil; +import net.minecraft.util.profiler.Profiler; -public class Pages { +public class Pages extends JsonDataLoader implements IdentifiableResourceReloadListener { + private static final Identifier ID = new Identifier(UnicopiaCore.MODID, "pages"); + private static final Gson GSON = new GsonBuilder() + .setPrettyPrinting() + .disableHtmlEscaping() + .create(); private static final Pages instance = new Pages(); @@ -31,19 +38,31 @@ public class Pages { private final Map pages = Maps.newHashMap(); private List pagesByIndex = Lists.newArrayList(); - private final Map conditionFactories = Maps.newHashMap(); - - private final AssetWalker assets = new AssetWalker(new Identifier("unicopia", "pages"), this::addPage); + private final Map conditionFactories = SystemUtil.consume(Maps.newHashMap(), m -> { + m.put("unicopia:compound_condition", CompoundCondition::new); + m.put("unicopia:page_state", PageStateCondition::new); + m.put("unicopia:spell_crafting", SpellCraftingEvent.Condition::new); + }); Pages() { - registerConditionFactory("unicopia:compound_condition", CompoundCondition::new); - registerConditionFactory("unicopia:page_state", PageStateCondition::new); - registerConditionFactory("unicopia:spell_crafting", SpellCraftingEvent.Condition::new); + super(GSON, "pages"); } - public void load() { + @Override + public Identifier getFabricId() { + return ID; + } + + @Override + protected Map prepare(ResourceManager manager, Profiler profiler) { + // TODO: broken synthetic + return super.method_20731(manager, profiler); + } + + @Override + protected void apply(Map data, ResourceManager manager, Profiler profiled) { pages.clear(); - assets.walk(); + data.forEach((id, json) -> pages.put(id, new PageInstance(id, json))); pagesByIndex = pages.values().stream().sorted(this::comparePages).collect(Collectors.toList()); @@ -78,10 +97,6 @@ public class Pages { return a.name.compareTo(b.name); } - void addPage(Identifier id, JsonObject json) throws JsonParseException { - pages.put(id, new PageInstance(id, json)); - } - @SuppressWarnings("unchecked") IUnlockCondition createCondition(JsonObject json) { String key = json.get("key").getAsString(); @@ -117,10 +132,6 @@ public class Pages { } } - public void registerConditionFactory(String conditionType, IConditionFactory factory) { - conditionFactories.put(conditionType, factory); - } - public int getTotalPages() { return pages.size(); } diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/SpellCraftingEvent.java b/src/main/java/com/minelittlepony/unicopia/enchanting/SpellCraftingEvent.java similarity index 81% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/SpellCraftingEvent.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/SpellCraftingEvent.java index ac18e305..1574c112 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/SpellCraftingEvent.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/SpellCraftingEvent.java @@ -1,15 +1,13 @@ -package com.minelittlepony.unicopia.redux.enchanting; +package com.minelittlepony.unicopia.enchanting; import javax.annotation.Nonnull; import javax.annotation.Nullable; import com.google.gson.JsonObject; import com.google.gson.annotations.Expose; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.enchanting.IUnlockEvent; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.redux.item.MagicGemItem; +import com.minelittlepony.unicopia.item.MagicGemItem; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AbstractSpecialRecipe.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AbstractSpecialRecipe.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AbstractSpecialRecipe.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AbstractSpecialRecipe.java index 96efd578..c93cdd12 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AbstractSpecialRecipe.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AbstractSpecialRecipe.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.enchanting.recipe; +package com.minelittlepony.unicopia.enchanting.recipe; import java.util.ArrayList; import java.util.List; import com.google.common.collect.Lists; -import com.minelittlepony.unicopia.redux.container.SpellBookInventory; -import com.minelittlepony.unicopia.redux.item.UItems; +import com.minelittlepony.unicopia.container.SpellBookInventory; +import com.minelittlepony.unicopia.item.UItems; import net.minecraft.inventory.CraftingInventory; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AffineIngredient.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredient.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AffineIngredient.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredient.java index 90a088cd..0cc19193 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AffineIngredient.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredient.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting.recipe; +package com.minelittlepony.unicopia.enchanting.recipe; import java.util.stream.Stream; diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredients.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredients.java new file mode 100644 index 00000000..abcefaa3 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredients.java @@ -0,0 +1,68 @@ +package com.minelittlepony.unicopia.enchanting.recipe; + +import java.util.Map; +import com.google.common.collect.Maps; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonObject; +import com.minelittlepony.unicopia.UnicopiaCore; + +import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener; +import net.minecraft.resource.JsonDataLoader; +import net.minecraft.resource.ResourceManager; +import net.minecraft.util.Identifier; +import net.minecraft.util.profiler.Profiler; + +public class AffineIngredients extends JsonDataLoader implements IdentifiableResourceReloadListener { + private static final Identifier ID = new Identifier(UnicopiaCore.MODID, "ingredients"); + private static final Gson GSON = new GsonBuilder() + .setPrettyPrinting() + .disableHtmlEscaping() + .create(); + + private static final AffineIngredients instance = new AffineIngredients(); + + public static AffineIngredients instance() { + return instance; + } + + private final Map storedIngredients = Maps.newHashMap(); + + AffineIngredients() { + super(GSON, "ingredients"); + } + + @Override + public Identifier getFabricId() { + return ID; + } + + @Override + protected Map prepare(ResourceManager manager, Profiler profiler) { + // TODO: broken synthetic + return super.method_20731(manager, profiler); + } + + @Override + protected void apply(Map data, ResourceManager manager, Profiler profiled) { + storedIngredients.clear(); + data.forEach((id, json) -> { + SpellIngredient ingredient = SpellIngredient.parse(json.get("items")); + + if (ingredient != null) { + storedIngredients.put(id, ingredient); + } + }); + } + + public SpellIngredient getIngredient(Identifier res) { + SpellIngredient result = storedIngredients.get(res); + + if (result == null) { + new RuntimeException("Ingredient `" + res + "` was not found.").printStackTrace(); + return SpellIngredient.EMPTY; + } + + return result; + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/CompoundSpellIngredient.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/CompoundSpellIngredient.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/CompoundSpellIngredient.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/recipe/CompoundSpellIngredient.java index 5b07e4de..24646c59 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/CompoundSpellIngredient.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/CompoundSpellIngredient.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting.recipe; +package com.minelittlepony.unicopia.enchanting.recipe; import java.util.List; import java.util.stream.Stream; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SingleSpellIngredient.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SingleSpellIngredient.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SingleSpellIngredient.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SingleSpellIngredient.java index cd335550..77d76c54 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SingleSpellIngredient.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SingleSpellIngredient.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting.recipe; +package com.minelittlepony.unicopia.enchanting.recipe; import java.util.Optional; import java.util.stream.Stream; @@ -7,7 +7,7 @@ import com.google.common.collect.Streams; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpecialRecipe.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpecialRecipe.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java index 29adf90a..627bd781 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpecialRecipe.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting.recipe; +package com.minelittlepony.unicopia.enchanting.recipe; import com.google.gson.JsonObject; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpellIngredient.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellIngredient.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpellIngredient.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellIngredient.java index 7cf6213a..cbd91cb6 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpellIngredient.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellIngredient.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.enchanting.recipe; +package com.minelittlepony.unicopia.enchanting.recipe; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpellRecipe.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellRecipe.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpellRecipe.java rename to src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellRecipe.java index a3f02975..fddfc970 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/SpellRecipe.java +++ b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellRecipe.java @@ -1,9 +1,9 @@ -package com.minelittlepony.unicopia.redux.enchanting.recipe; +package com.minelittlepony.unicopia.enchanting.recipe; import com.google.gson.JsonObject; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.redux.container.SpellBookInventory; -import com.minelittlepony.unicopia.redux.item.UItems; +import com.minelittlepony.unicopia.container.SpellBookInventory; +import com.minelittlepony.unicopia.item.UItems; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; import net.minecraft.inventory.CraftingInventory; import net.minecraft.inventory.Inventory; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/ButterflyEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/ButterflyEntity.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/ButterflyEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/ButterflyEntity.java index 30519c38..caa8e7aa 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/ButterflyEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/ButterflyEntity.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; import java.util.Random; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.UnicopiaCore; +import com.minelittlepony.unicopia.UnicopiaCore; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; @@ -123,7 +123,7 @@ public class ButterflyEntity extends AmbientEntity { if (player.isSprinting() || player.isHandSwinging || player.forwardSpeed > 0 || player.sidewaysSpeed > 0) { return true; } - // TODO: + // TODO: IMob.VISIBLE_MOB_SELECTOR }/* else if (!IMob.VISIBLE_MOB_SELECTOR.test(e)) { return false; }*/ diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/CloudEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/CloudEntity.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/CloudEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/CloudEntity.java index f7675d32..f031924c 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/CloudEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/CloudEntity.java @@ -1,18 +1,17 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; import java.util.Map; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.entity.InAnimate; -import com.minelittlepony.unicopia.core.util.particles.ParticleEmitter; -import com.minelittlepony.unicopia.redux.UBlocks; -import com.minelittlepony.unicopia.redux.ability.PowerCloudBase.ICloudEntity; -import com.minelittlepony.unicopia.redux.item.UItems; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.ability.PowerCloudBase.ICloudEntity; +import com.minelittlepony.unicopia.item.UItems; +import com.minelittlepony.unicopia.util.particles.ParticleEmitter; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -76,6 +75,7 @@ public class CloudEntity extends FlyingEntity implements ICloudEntity, InAnimate super(type, world); ignoreCameraFrustum = true; targetAltitude = getRandomFlyingHeight(); + // TODO: drops cloud_matter x1 } @Override @@ -97,12 +97,6 @@ public class CloudEntity extends FlyingEntity implements ICloudEntity, InAnimate return SoundEvents.BLOCK_WOOL_BREAK; } - // TODO: loot table - /*@Override - protected Item getDropItem() { - return UItems.cloud_matter; - }*/ - @Override public boolean doesRenderOnFire() { return false; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/ConstructionCloudEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/ConstructionCloudEntity.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/ConstructionCloudEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/ConstructionCloudEntity.java index 60f7ff4b..8376f873 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/ConstructionCloudEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/ConstructionCloudEntity.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; import com.google.common.collect.Lists; -import com.minelittlepony.unicopia.core.EquinePredicates; +import com.minelittlepony.unicopia.EquinePredicates; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/CuccoonEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/CuccoonEntity.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/CuccoonEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/CuccoonEntity.java index 8e97773e..597ab84b 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/CuccoonEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/CuccoonEntity.java @@ -1,18 +1,16 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; import java.util.List; import javax.annotation.Nullable; import com.google.common.collect.Lists; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.USounds; -import com.minelittlepony.unicopia.core.entity.InAnimate; -import com.minelittlepony.unicopia.core.entity.IMagicals; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.USounds; +import com.minelittlepony.unicopia.util.MagicalDamageSource; import net.minecraft.block.Blocks; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/FlightControl.java b/src/main/java/com/minelittlepony/unicopia/entity/FlightControl.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/core/entity/FlightControl.java rename to src/main/java/com/minelittlepony/unicopia/entity/FlightControl.java index 06f75484..be113d13 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/FlightControl.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/FlightControl.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; /** * Interface for controlling flight. diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/IEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/IEntity.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/core/entity/IEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/IEntity.java index 7c9ef361..8a7575d3 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/IEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/IEntity.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.util.InbtSerialisable; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.util.InbtSerialisable; import net.minecraft.entity.projectile.ProjectileEntity; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/IMagicals.java b/src/main/java/com/minelittlepony/unicopia/entity/IMagicals.java similarity index 75% rename from src/main/java/com/minelittlepony/unicopia/core/entity/IMagicals.java rename to src/main/java/com/minelittlepony/unicopia/entity/IMagicals.java index 9a7ffa8c..fdf6dc79 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/IMagicals.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/IMagicals.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; /** * Any entities with magical abilities. diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/InAnimate.java b/src/main/java/com/minelittlepony/unicopia/entity/InAnimate.java similarity index 74% rename from src/main/java/com/minelittlepony/unicopia/core/entity/InAnimate.java rename to src/main/java/com/minelittlepony/unicopia/entity/InAnimate.java index c79a70a6..7393f46b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/InAnimate.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/InAnimate.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; -import com.minelittlepony.unicopia.core.Race; +import com.minelittlepony.unicopia.Race; /** * This interface is for any entities that are categorised as inanimated, diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/ItemEntityCapabilities.java b/src/main/java/com/minelittlepony/unicopia/entity/ItemEntityCapabilities.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/core/entity/ItemEntityCapabilities.java rename to src/main/java/com/minelittlepony/unicopia/entity/ItemEntityCapabilities.java index bbd7a943..9e39ec0d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/ItemEntityCapabilities.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/ItemEntityCapabilities.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.ducks.IItemEntity; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.ducks.IItemEntity; import net.minecraft.entity.ItemEntity; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/LivingEntityCapabilities.java b/src/main/java/com/minelittlepony/unicopia/entity/LivingEntityCapabilities.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/core/entity/LivingEntityCapabilities.java rename to src/main/java/com/minelittlepony/unicopia/entity/LivingEntityCapabilities.java index ad91575b..4ae627a7 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/LivingEntityCapabilities.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/LivingEntityCapabilities.java @@ -1,13 +1,13 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.IAffine; -import com.minelittlepony.unicopia.core.magic.IAttachedEffect; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.core.network.EffectSync; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.IAffine; +import com.minelittlepony.unicopia.magic.IAttachedEffect; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.network.EffectSync; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.data.DataTracker; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/Owned.java b/src/main/java/com/minelittlepony/unicopia/entity/Owned.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/core/entity/Owned.java rename to src/main/java/com/minelittlepony/unicopia/entity/Owned.java index 0cb65139..aaea3e6b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/Owned.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/Owned.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; /** * Interface for things that can be owned. diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/ProjectileEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/ProjectileEntity.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/ProjectileEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/ProjectileEntity.java index 004f3bc3..153e674d 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/ProjectileEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/ProjectileEntity.java @@ -1,17 +1,16 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; import java.util.UUID; -import com.minelittlepony.unicopia.core.entity.IMagicals; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.core.network.EffectSync; -import com.minelittlepony.unicopia.core.util.projectile.ITossable; -import com.minelittlepony.unicopia.redux.magic.ITossedEffect; -import com.minelittlepony.unicopia.redux.util.projectile.IAdvancedProjectile; -import com.minelittlepony.unicopia.redux.util.projectile.ITossableItem; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.ITossedEffect; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.network.EffectSync; +import com.minelittlepony.unicopia.util.projectile.IAdvancedProjectile; +import com.minelittlepony.unicopia.util.projectile.ITossable; +import com.minelittlepony.unicopia.util.projectile.ITossableItem; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/RaceContainer.java b/src/main/java/com/minelittlepony/unicopia/entity/RaceContainer.java similarity index 80% rename from src/main/java/com/minelittlepony/unicopia/core/entity/RaceContainer.java rename to src/main/java/com/minelittlepony/unicopia/entity/RaceContainer.java index 6f4f636f..5acda09e 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/RaceContainer.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/RaceContainer.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/RacingCloudEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/RacingCloudEntity.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/RacingCloudEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/RacingCloudEntity.java index 3227806f..d7687362 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/RacingCloudEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/RacingCloudEntity.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; import java.util.List; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; +import com.minelittlepony.unicopia.EquinePredicates; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/RainbowEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/RainbowEntity.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/RainbowEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/RainbowEntity.java index 7015ad33..3cb2b6fb 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/RainbowEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/RainbowEntity.java @@ -1,8 +1,7 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.entity.InAnimate; -import com.minelittlepony.unicopia.redux.UEntities; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.UEntities; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.packet.EntitySpawnGlobalS2CPacket; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/SpearEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/SpearEntity.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/SpearEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/SpearEntity.java index e36954d3..c2b5abba 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/SpearEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/SpearEntity.java @@ -1,8 +1,8 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.redux.magic.ITossedEffect; -import com.minelittlepony.unicopia.redux.util.projectile.IAdvancedProjectile; +import com.minelittlepony.unicopia.magic.ITossedEffect; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.projectile.IAdvancedProjectile; import net.minecraft.client.network.packet.GameStateChangeS2CPacket; import net.minecraft.enchantment.EnchantmentHelper; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/SpellbookEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/SpellbookEntity.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/SpellbookEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/SpellbookEntity.java index 72299eda..aa602aa1 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/SpellbookEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/SpellbookEntity.java @@ -1,8 +1,7 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.entity.IMagicals; -import com.minelittlepony.unicopia.redux.item.UItems; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.item.UItems; import net.minecraft.container.Container; import net.minecraft.container.NameableContainerProvider; @@ -194,7 +193,7 @@ public class SpellbookEntity extends MobEntity implements NameableContainerProvi } } - // TODO: + // TODO: getPickStack /*@Override public ItemStack getPickStack(HitResult target) { return new ItemStack(UItems.spellbook); diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/SpellcastEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/SpellcastEntity.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/SpellcastEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/SpellcastEntity.java index ae30b003..3b0ea9e6 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/SpellcastEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/SpellcastEntity.java @@ -1,21 +1,19 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; import java.util.Optional; import java.util.UUID; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.entity.InAnimate; -import com.minelittlepony.unicopia.core.entity.IMagicals; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.core.network.EffectSync; -import com.minelittlepony.unicopia.redux.item.UItems; -import com.minelittlepony.unicopia.redux.magic.ICastable; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.item.UItems; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICastable; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.network.EffectSync; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; @@ -134,7 +132,7 @@ public class SpellcastEntity extends MobEntityWithAi implements IMagicals, ICast dataTracker.startTracking(AFFINITY, Affinity.NEUTRAL.ordinal()); } - // TODO: + // TODO: getPickedStack /*@Override public ItemStack getPickedStack(HitResult target) { return SpellRegistry.instance().enchantStack(new ItemStack(getItem()), getEffect().getName()); diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/Trap.java b/src/main/java/com/minelittlepony/unicopia/entity/Trap.java similarity index 69% rename from src/main/java/com/minelittlepony/unicopia/core/entity/Trap.java rename to src/main/java/com/minelittlepony/unicopia/entity/Trap.java index f626726e..56ad9f1b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/Trap.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/Trap.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/Updatable.java b/src/main/java/com/minelittlepony/unicopia/entity/Updatable.java similarity index 80% rename from src/main/java/com/minelittlepony/unicopia/core/entity/Updatable.java rename to src/main/java/com/minelittlepony/unicopia/entity/Updatable.java index 1880547e..3876559d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/Updatable.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/Updatable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.entity; +package com.minelittlepony.unicopia.entity; /** * Interface for objects that receive regular updates. diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/WildCloudEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/WildCloudEntity.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/WildCloudEntity.java rename to src/main/java/com/minelittlepony/unicopia/entity/WildCloudEntity.java index aadcbe29..78c026bb 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/WildCloudEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/WildCloudEntity.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.entity; +package com.minelittlepony.unicopia.entity; import java.util.Iterator; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.redux.UEntities; +import com.minelittlepony.unicopia.UEntities; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityData; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/entity/ai/FollowCasterGoal.java b/src/main/java/com/minelittlepony/unicopia/entity/ai/FollowCasterGoal.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/entity/ai/FollowCasterGoal.java rename to src/main/java/com/minelittlepony/unicopia/entity/ai/FollowCasterGoal.java index 0854cc9a..7eeb0d47 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/entity/ai/FollowCasterGoal.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/ai/FollowCasterGoal.java @@ -1,8 +1,8 @@ -package com.minelittlepony.unicopia.redux.entity.ai; +package com.minelittlepony.unicopia.entity.ai; import java.util.EnumSet; -import com.minelittlepony.unicopia.core.magic.ICaster; +import com.minelittlepony.unicopia.magic.ICaster; import net.minecraft.block.BlockState; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/player/AbilityDelegate.java b/src/main/java/com/minelittlepony/unicopia/entity/player/AbilityDelegate.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/core/entity/player/AbilityDelegate.java rename to src/main/java/com/minelittlepony/unicopia/entity/player/AbilityDelegate.java index a1e8d588..19387e0a 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/player/AbilityDelegate.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/AbilityDelegate.java @@ -1,16 +1,16 @@ -package com.minelittlepony.unicopia.core.entity.player; +package com.minelittlepony.unicopia.entity.player; import javax.annotation.Nonnull; import javax.annotation.Nullable; import com.minelittlepony.jumpingcastle.api.Target; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.core.ability.IAbilityReceiver; -import com.minelittlepony.unicopia.core.ability.IPower; -import com.minelittlepony.unicopia.core.ability.PowersRegistry; -import com.minelittlepony.unicopia.core.entity.Updatable; -import com.minelittlepony.unicopia.core.network.MsgPlayerAbility; -import com.minelittlepony.unicopia.core.util.InbtSerialisable; +import com.minelittlepony.unicopia.UnicopiaCore; +import com.minelittlepony.unicopia.ability.IAbilityReceiver; +import com.minelittlepony.unicopia.ability.IPower; +import com.minelittlepony.unicopia.ability.PowersRegistry; +import com.minelittlepony.unicopia.entity.Updatable; +import com.minelittlepony.unicopia.network.MsgPlayerAbility; +import com.minelittlepony.unicopia.util.InbtSerialisable; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/player/GravityDelegate.java b/src/main/java/com/minelittlepony/unicopia/entity/player/GravityDelegate.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/entity/player/GravityDelegate.java rename to src/main/java/com/minelittlepony/unicopia/entity/player/GravityDelegate.java index 5b89824b..6519b630 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/player/GravityDelegate.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/GravityDelegate.java @@ -1,18 +1,18 @@ -package com.minelittlepony.unicopia.core.entity.player; +package com.minelittlepony.unicopia.entity.player; import java.util.Random; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.USounds; -import com.minelittlepony.unicopia.core.ability.IFlyingPredicate; -import com.minelittlepony.unicopia.core.ability.IHeightPredicate; -import com.minelittlepony.unicopia.core.entity.FlightControl; -import com.minelittlepony.unicopia.core.entity.Updatable; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.mixin.MixinEntity; -import com.minelittlepony.unicopia.core.util.InbtSerialisable; -import com.minelittlepony.unicopia.core.util.MutableVector; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.USounds; +import com.minelittlepony.unicopia.ability.IFlyingPredicate; +import com.minelittlepony.unicopia.ability.IHeightPredicate; +import com.minelittlepony.unicopia.entity.FlightControl; +import com.minelittlepony.unicopia.entity.Updatable; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.mixin.MixinEntity; +import com.minelittlepony.unicopia.util.InbtSerialisable; +import com.minelittlepony.unicopia.util.MutableVector; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/player/IPlayer.java b/src/main/java/com/minelittlepony/unicopia/entity/player/IPlayer.java similarity index 85% rename from src/main/java/com/minelittlepony/unicopia/core/entity/player/IPlayer.java rename to src/main/java/com/minelittlepony/unicopia/entity/player/IPlayer.java index 89a27c81..ed1c3615 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/player/IPlayer.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/IPlayer.java @@ -1,15 +1,15 @@ -package com.minelittlepony.unicopia.core.entity.player; +package com.minelittlepony.unicopia.entity.player; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.InteractionManager; -import com.minelittlepony.unicopia.core.ability.IAbilityReceiver; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.entity.FlightControl; -import com.minelittlepony.unicopia.core.entity.RaceContainer; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IHeldEffect; -import com.minelittlepony.unicopia.core.network.ITransmittable; +import com.minelittlepony.unicopia.InteractionManager; +import com.minelittlepony.unicopia.ability.IAbilityReceiver; +import com.minelittlepony.unicopia.enchanting.IPageOwner; +import com.minelittlepony.unicopia.entity.FlightControl; +import com.minelittlepony.unicopia.entity.RaceContainer; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IHeldEffect; +import com.minelittlepony.unicopia.network.ITransmittable; import com.minelittlepony.util.IInterpolator; import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerAttributes.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerAttributes.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerAttributes.java rename to src/main/java/com/minelittlepony/unicopia/entity/player/PlayerAttributes.java index 75aded33..0531613e 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerAttributes.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerAttributes.java @@ -1,10 +1,11 @@ -package com.minelittlepony.unicopia.core.entity.player; +package com.minelittlepony.unicopia.entity.player; import java.util.UUID; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.mixin.Walker; -import com.minelittlepony.unicopia.core.util.HeavyInventoryUtils; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.mixin.Walker; +import com.minelittlepony.unicopia.util.HeavyInventoryUtils; + import net.minecraft.entity.attribute.EntityAttribute; import net.minecraft.entity.attribute.EntityAttributeInstance; import net.minecraft.entity.attribute.EntityAttributeModifier; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerCamera.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerCamera.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerCamera.java rename to src/main/java/com/minelittlepony/unicopia/entity/player/PlayerCamera.java index 9d4fae33..5d234c43 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerCamera.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerCamera.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.entity.player; +package com.minelittlepony.unicopia.entity.player; import com.minelittlepony.util.MotionCompositor; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerCapabilities.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerCapabilities.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerCapabilities.java rename to src/main/java/com/minelittlepony/unicopia/entity/player/PlayerCapabilities.java index fb5d21cc..97f0345d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerCapabilities.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerCapabilities.java @@ -1,26 +1,26 @@ -package com.minelittlepony.unicopia.core.entity.player; +package com.minelittlepony.unicopia.entity.player; import java.util.Map; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UEffects; -import com.minelittlepony.unicopia.core.UTags; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.core.ability.IAbilityReceiver; -import com.minelittlepony.unicopia.core.enchanting.PageState; -import com.minelittlepony.unicopia.core.entity.FlightControl; -import com.minelittlepony.unicopia.core.entity.Trap; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.IAttachedEffect; -import com.minelittlepony.unicopia.core.magic.IHeldEffect; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.IMagicalItem; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.core.network.EffectSync; -import com.minelittlepony.unicopia.core.network.MsgPlayerCapabilities; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UEffects; +import com.minelittlepony.unicopia.UTags; +import com.minelittlepony.unicopia.UnicopiaCore; +import com.minelittlepony.unicopia.ability.IAbilityReceiver; +import com.minelittlepony.unicopia.enchanting.PageState; +import com.minelittlepony.unicopia.entity.FlightControl; +import com.minelittlepony.unicopia.entity.Trap; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.IAttachedEffect; +import com.minelittlepony.unicopia.magic.IHeldEffect; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.IMagicalItem; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.network.EffectSync; +import com.minelittlepony.unicopia.network.MsgPlayerCapabilities; import com.minelittlepony.util.BasicEasingInterpolator; import com.minelittlepony.util.IInterpolator; import com.mojang.datafixers.util.Either; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerInventory.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerInventory.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerInventory.java rename to src/main/java/com/minelittlepony/unicopia/entity/player/PlayerInventory.java index d14703c7..07406578 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerInventory.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerInventory.java @@ -1,13 +1,13 @@ -package com.minelittlepony.unicopia.core.entity.player; +package com.minelittlepony.unicopia.entity.player; import java.util.Iterator; import java.util.Map; import com.google.common.collect.Maps; -import com.minelittlepony.unicopia.core.entity.Updatable; -import com.minelittlepony.unicopia.core.magic.IDependable; -import com.minelittlepony.unicopia.core.magic.IMagicalItem; -import com.minelittlepony.unicopia.core.util.InbtSerialisable; +import com.minelittlepony.unicopia.entity.Updatable; +import com.minelittlepony.unicopia.magic.IDependable; +import com.minelittlepony.unicopia.magic.IMagicalItem; +import com.minelittlepony.unicopia.util.InbtSerialisable; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerPageStats.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPageStats.java similarity index 86% rename from src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerPageStats.java rename to src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPageStats.java index b73dbb90..7602729a 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/entity/player/PlayerPageStats.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPageStats.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.core.entity.player; +package com.minelittlepony.unicopia.entity.player; import java.util.HashMap; import java.util.Map; -import com.minelittlepony.unicopia.core.enchanting.IPageOwner; -import com.minelittlepony.unicopia.core.enchanting.PageState; -import com.minelittlepony.unicopia.core.util.InbtSerialisable; +import com.minelittlepony.unicopia.enchanting.IPageOwner; +import com.minelittlepony.unicopia.enchanting.PageState; +import com.minelittlepony.unicopia.util.InbtSerialisable; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/AlicornAmuletItem.java b/src/main/java/com/minelittlepony/unicopia/item/AlicornAmuletItem.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/item/AlicornAmuletItem.java rename to src/main/java/com/minelittlepony/unicopia/item/AlicornAmuletItem.java index af563411..91a3e6c2 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/AlicornAmuletItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/AlicornAmuletItem.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import java.util.List; import java.util.UUID; @@ -6,15 +6,16 @@ import java.util.UUID; import javax.annotation.Nullable; import com.google.common.collect.Multimap; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.ducks.IItemEntity; -import com.minelittlepony.unicopia.core.entity.ItemEntityCapabilities; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.IDependable; -import com.minelittlepony.unicopia.core.util.AwaitTickQueue; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.VecHelper; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.ducks.IItemEntity; +import com.minelittlepony.unicopia.entity.ItemEntityCapabilities; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.IDependable; +import com.minelittlepony.unicopia.util.AwaitTickQueue; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.VecHelper; + import net.minecraft.util.ChatUtil; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/AppleItem.java b/src/main/java/com/minelittlepony/unicopia/item/AppleItem.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/item/AppleItem.java rename to src/main/java/com/minelittlepony/unicopia/item/AppleItem.java index 4b4b8ae1..987b0a71 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/AppleItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/AppleItem.java @@ -1,12 +1,12 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import java.util.List; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.ducks.IItemEntity; -import com.minelittlepony.unicopia.core.entity.ItemEntityCapabilities; -import com.minelittlepony.unicopia.redux.toxin.Toxic; -import com.minelittlepony.unicopia.redux.toxin.Toxicity; +import com.minelittlepony.unicopia.ducks.IItemEntity; +import com.minelittlepony.unicopia.entity.ItemEntityCapabilities; +import com.minelittlepony.unicopia.toxin.Toxic; +import com.minelittlepony.unicopia.toxin.Toxicity; import net.minecraft.client.item.TooltipContext; import net.minecraft.entity.EntityType; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/BagOfHoldingItem.java b/src/main/java/com/minelittlepony/unicopia/item/BagOfHoldingItem.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/redux/item/BagOfHoldingItem.java rename to src/main/java/com/minelittlepony/unicopia/item/BagOfHoldingItem.java index f9673db8..f5471d4d 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/BagOfHoldingItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/BagOfHoldingItem.java @@ -1,17 +1,17 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.IMagicalItem; -import com.minelittlepony.unicopia.core.util.VecHelper; -import com.minelittlepony.unicopia.redux.UContainers; -import com.minelittlepony.unicopia.redux.container.BagOfHoldingContainer; -import com.minelittlepony.unicopia.redux.container.BagOfHoldingInventory; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.UContainers; +import com.minelittlepony.unicopia.container.BagOfHoldingContainer; +import com.minelittlepony.unicopia.container.BagOfHoldingInventory; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.IMagicalItem; +import com.minelittlepony.unicopia.util.VecHelper; import net.fabricmc.fabric.api.container.ContainerProviderRegistry; import net.minecraft.block.entity.BlockEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/CloudPlacerItem.java b/src/main/java/com/minelittlepony/unicopia/item/CloudPlacerItem.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/redux/item/CloudPlacerItem.java rename to src/main/java/com/minelittlepony/unicopia/item/CloudPlacerItem.java index f688fd9b..cb63361e 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/CloudPlacerItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/CloudPlacerItem.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; -import com.minelittlepony.unicopia.core.magic.IDispensable; -import com.minelittlepony.unicopia.redux.entity.CloudEntity; +import com.minelittlepony.unicopia.entity.CloudEntity; +import com.minelittlepony.unicopia.magic.IDispensable; import net.minecraft.block.DispenserBlock; import net.minecraft.entity.EntityType; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/CursedMagicGemItem.java b/src/main/java/com/minelittlepony/unicopia/item/CursedMagicGemItem.java similarity index 80% rename from src/main/java/com/minelittlepony/unicopia/redux/item/CursedMagicGemItem.java rename to src/main/java/com/minelittlepony/unicopia/item/CursedMagicGemItem.java index 6e66f309..1f01716c 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/CursedMagicGemItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/CursedMagicGemItem.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CastResult; -import com.minelittlepony.unicopia.core.magic.IDispenceable; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CastResult; +import com.minelittlepony.unicopia.magic.IDispenceable; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.util.MagicalDamageSource; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUsageContext; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/EnchantedStaffItem.java b/src/main/java/com/minelittlepony/unicopia/item/EnchantedStaffItem.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/redux/item/EnchantedStaffItem.java rename to src/main/java/com/minelittlepony/unicopia/item/EnchantedStaffItem.java index 91b0ff6c..e29cb2b5 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/EnchantedStaffItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/EnchantedStaffItem.java @@ -1,19 +1,19 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import java.util.List; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CasterUtils; -import com.minelittlepony.unicopia.core.magic.IAffine; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.redux.magic.ITossedEffect; -import com.minelittlepony.unicopia.redux.util.projectile.ITossableItem; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CasterUtils; +import com.minelittlepony.unicopia.magic.IAffine; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.ITossedEffect; +import com.minelittlepony.unicopia.util.projectile.ITossableItem; import net.minecraft.block.BlockState; import net.minecraft.client.item.TooltipContext; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/ExtendedShearsItem.java b/src/main/java/com/minelittlepony/unicopia/item/ExtendedShearsItem.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/item/ExtendedShearsItem.java rename to src/main/java/com/minelittlepony/unicopia/item/ExtendedShearsItem.java index 2352cf11..6e8c54e2 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/ExtendedShearsItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/ExtendedShearsItem.java @@ -1,8 +1,8 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.IDispensable; +import com.minelittlepony.unicopia.magic.IDispensable; import net.minecraft.block.BlockState; import net.minecraft.block.DispenserBlock; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/MagicGemItem.java b/src/main/java/com/minelittlepony/unicopia/item/MagicGemItem.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/redux/item/MagicGemItem.java rename to src/main/java/com/minelittlepony/unicopia/item/MagicGemItem.java index 25297eb9..91090c38 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/MagicGemItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/MagicGemItem.java @@ -1,19 +1,19 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import java.util.List; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CastResult; -import com.minelittlepony.unicopia.core.magic.IDispenceable; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.IUseable; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.core.util.VecHelper; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; -import com.minelittlepony.unicopia.redux.magic.ICastable; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CastResult; +import com.minelittlepony.unicopia.magic.ICastable; +import com.minelittlepony.unicopia.magic.IDispenceable; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.IUseable; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.util.VecHelper; import net.minecraft.block.DispenserBlock; import net.minecraft.client.item.TooltipContext; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/MossItem.java b/src/main/java/com/minelittlepony/unicopia/item/MossItem.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/redux/item/MossItem.java rename to src/main/java/com/minelittlepony/unicopia/item/MossItem.java index 916eb4db..58e2f259 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/MossItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/MossItem.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.util.collection.ReversableStateMapList; -import com.minelittlepony.unicopia.redux.toxin.ToxicItem; -import com.minelittlepony.unicopia.redux.toxin.Toxicity; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.toxin.ToxicItem; +import com.minelittlepony.unicopia.toxin.Toxicity; +import com.minelittlepony.unicopia.util.collection.ReversableStateMapList; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/PredicatedBlockItem.java b/src/main/java/com/minelittlepony/unicopia/item/PredicatedBlockItem.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/item/PredicatedBlockItem.java rename to src/main/java/com/minelittlepony/unicopia/item/PredicatedBlockItem.java index 7d320d72..d1812c1a 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/PredicatedBlockItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/PredicatedBlockItem.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import java.util.function.Predicate; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/RottenAppleItem.java b/src/main/java/com/minelittlepony/unicopia/item/RottenAppleItem.java similarity index 80% rename from src/main/java/com/minelittlepony/unicopia/redux/item/RottenAppleItem.java rename to src/main/java/com/minelittlepony/unicopia/item/RottenAppleItem.java index 16390a03..19ffd0cd 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/RottenAppleItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/RottenAppleItem.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; -import com.minelittlepony.unicopia.core.ducks.IItemEntity; +import com.minelittlepony.unicopia.ducks.IItemEntity; import net.fabricmc.fabric.api.registry.FuelRegistry; import net.minecraft.item.FoodComponent; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/RottenTomatoItem.java b/src/main/java/com/minelittlepony/unicopia/item/RottenTomatoItem.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/redux/item/RottenTomatoItem.java rename to src/main/java/com/minelittlepony/unicopia/item/RottenTomatoItem.java index c942bfd0..395a4241 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/RottenTomatoItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/RottenTomatoItem.java @@ -1,8 +1,8 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.redux.util.projectile.ITossableItem; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.projectile.ITossableItem; import net.minecraft.block.BlockState; import net.minecraft.block.Material; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/SpearItem.java b/src/main/java/com/minelittlepony/unicopia/item/SpearItem.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/redux/item/SpearItem.java rename to src/main/java/com/minelittlepony/unicopia/item/SpearItem.java index cdf5b2f3..6ae61d46 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/SpearItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/SpearItem.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.redux.entity.SpearEntity; -import com.minelittlepony.unicopia.redux.util.projectile.IAdvancedProjectile; -import com.minelittlepony.unicopia.redux.util.projectile.ITossableItem; +import com.minelittlepony.unicopia.entity.SpearEntity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.projectile.IAdvancedProjectile; +import com.minelittlepony.unicopia.util.projectile.ITossableItem; import net.minecraft.block.BlockState; import net.minecraft.entity.EquipmentSlot; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/SpellbookItem.java b/src/main/java/com/minelittlepony/unicopia/item/SpellbookItem.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/redux/item/SpellbookItem.java rename to src/main/java/com/minelittlepony/unicopia/item/SpellbookItem.java index c9d1088a..7d251b81 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/SpellbookItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/SpellbookItem.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.magic.IDispensable; -import com.minelittlepony.unicopia.redux.UEntities; -import com.minelittlepony.unicopia.redux.entity.SpellbookEntity; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.UEntities; +import com.minelittlepony.unicopia.entity.SpellbookEntity; +import com.minelittlepony.unicopia.magic.IDispensable; import net.minecraft.block.DispenserBlock; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/StaffItem.java b/src/main/java/com/minelittlepony/unicopia/item/StaffItem.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/item/StaffItem.java rename to src/main/java/com/minelittlepony/unicopia/item/StaffItem.java index 251007c9..9e44219a 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/StaffItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/StaffItem.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import java.util.List; import java.util.UUID; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import com.minelittlepony.unicopia.core.EquinePredicates; +import com.minelittlepony.unicopia.EquinePredicates; import net.minecraft.block.Blocks; import net.minecraft.client.item.TooltipContext; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/StickItem.java b/src/main/java/com/minelittlepony/unicopia/item/StickItem.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/item/StickItem.java rename to src/main/java/com/minelittlepony/unicopia/item/StickItem.java index d3b74e74..6888f657 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/StickItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/StickItem.java @@ -1,8 +1,8 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.redux.UBlocks; +import com.minelittlepony.unicopia.UBlocks; import net.minecraft.advancement.criterion.Criterions; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/SugaryItem.java b/src/main/java/com/minelittlepony/unicopia/item/SugaryItem.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/redux/item/SugaryItem.java rename to src/main/java/com/minelittlepony/unicopia/item/SugaryItem.java index 5468bbaf..76f9a05c 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/SugaryItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/SugaryItem.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; -import com.minelittlepony.unicopia.core.SpeciesList; +import com.minelittlepony.unicopia.SpeciesList; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/TomatoItem.java b/src/main/java/com/minelittlepony/unicopia/item/TomatoItem.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/item/TomatoItem.java rename to src/main/java/com/minelittlepony/unicopia/item/TomatoItem.java index 5c31b30d..3d463bef 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/TomatoItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/TomatoItem.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffects; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/TomatoSeedsItem.java b/src/main/java/com/minelittlepony/unicopia/item/TomatoSeedsItem.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/redux/item/TomatoSeedsItem.java rename to src/main/java/com/minelittlepony/unicopia/item/TomatoSeedsItem.java index 402d1539..4843b11e 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/TomatoSeedsItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/TomatoSeedsItem.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; -import com.minelittlepony.unicopia.redux.UBlocks; -import com.minelittlepony.unicopia.redux.block.StickBlock; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.block.StickBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/UItems.java b/src/main/java/com/minelittlepony/unicopia/item/UItems.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/redux/item/UItems.java rename to src/main/java/com/minelittlepony/unicopia/item/UItems.java index 4a85f96b..469b3942 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/UItems.java +++ b/src/main/java/com/minelittlepony/unicopia/item/UItems.java @@ -1,14 +1,17 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; -import com.minelittlepony.unicopia.redux.UBlocks; -import com.minelittlepony.unicopia.redux.UEntities; -import com.minelittlepony.unicopia.redux.magic.spells.ScorchSpell; -import com.minelittlepony.unicopia.redux.toxin.DynamicToxicBlockItem; -import com.minelittlepony.unicopia.redux.toxin.DynamicToxicItem; -import com.minelittlepony.unicopia.redux.toxin.ToxicBlockItem; -import com.minelittlepony.unicopia.redux.toxin.ToxicItem; -import com.minelittlepony.unicopia.redux.toxin.Toxicity; -import com.minelittlepony.unicopia.redux.toxin.Toxin; +import static com.minelittlepony.unicopia.EquinePredicates.*; + +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.UEntities; +import com.minelittlepony.unicopia.USounds; +import com.minelittlepony.unicopia.magic.spell.ScorchSpell; +import com.minelittlepony.unicopia.toxin.DynamicToxicBlockItem; +import com.minelittlepony.unicopia.toxin.DynamicToxicItem; +import com.minelittlepony.unicopia.toxin.ToxicBlockItem; +import com.minelittlepony.unicopia.toxin.ToxicItem; +import com.minelittlepony.unicopia.toxin.Toxicity; +import com.minelittlepony.unicopia.toxin.Toxin; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; @@ -18,14 +21,13 @@ import net.minecraft.item.BlockItem; import net.minecraft.item.FoodComponent; import net.minecraft.item.FoodComponents; import net.minecraft.item.Items; +import net.minecraft.item.MusicDiscItem; import net.minecraft.item.TallBlockItem; +import net.minecraft.sound.SoundEvent; +import net.minecraft.util.Rarity; import net.minecraft.util.UseAction; import net.minecraft.util.registry.Registry; -import static com.minelittlepony.unicopia.core.EquinePredicates.*; - -import com.minelittlepony.unicopia.core.USounds; - public class UItems { public static final AppleItem green_apple = register(new AppleItem(FoodComponents.APPLE), "apple_green"); @@ -54,10 +56,10 @@ public class UItems { public static final Item anvil = register(new PredicatedBlockItem(UBlocks.anvil, new Item.Settings().group(ItemGroup.DECORATIONS), INTERACT_WITH_CLOUDS), "cloud_anvil"); - public static final Item record_crusade = register(new URecord(USounds.RECORD_CRUSADE), "crusade"); - public static final Item record_pet = register(new URecord(USounds.RECORD_PET), "pet"); - public static final Item record_popular = register(new URecord(USounds.RECORD_POPULAR), "popular"); - public static final Item record_funk = register(new URecord(USounds.RECORD_FUNK), "funk"); + public static final Item record_crusade = register(createRecord(USounds.RECORD_CRUSADE), "crusade"); + public static final Item record_pet = register(createRecord(USounds.RECORD_PET), "pet"); + public static final Item record_popular = register(createRecord(USounds.RECORD_POPULAR), "popular"); + public static final Item record_funk = register(createRecord(USounds.RECORD_FUNK), "funk"); public static final Item hive = register(new BlockItem(UBlocks.hive, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)), "hive"); public static final Item chitin_shell = register(new Item(new Item.Settings().group(ItemGroup.MATERIALS)), "chitin_shell"); @@ -154,6 +156,14 @@ public class UItems { return register(item, name); } + static MusicDiscItem createRecord(SoundEvent sound) { + return new MusicDiscItem(1, sound, new Item.Settings() + .maxCount(1) + .group(ItemGroup.MISC) + .rarity(Rarity.RARE) + ) {}; + } + public static void bootstrap() { // FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(zap_apple), new ItemStack(cooked_zap_apple), 0.1F); // FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(juice), new ItemStack(burned_juice), 0); diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/ZapAppleItem.java b/src/main/java/com/minelittlepony/unicopia/item/ZapAppleItem.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/item/ZapAppleItem.java rename to src/main/java/com/minelittlepony/unicopia/item/ZapAppleItem.java index 259c83fb..9c62e648 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/ZapAppleItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/ZapAppleItem.java @@ -1,12 +1,12 @@ -package com.minelittlepony.unicopia.redux.item; +package com.minelittlepony.unicopia.item; import java.util.List; import com.google.common.collect.Lists; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.VecHelper; -import com.minelittlepony.unicopia.redux.toxin.Toxicity; +import com.minelittlepony.unicopia.toxin.Toxicity; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.VecHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.LightningEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/AbstractSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/AbstractSpell.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/core/magic/AbstractSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/AbstractSpell.java index 8b364ed1..9032b7c4 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/AbstractSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/AbstractSpell.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/Affinity.java b/src/main/java/com/minelittlepony/unicopia/magic/Affinity.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/core/magic/Affinity.java rename to src/main/java/com/minelittlepony/unicopia/magic/Affinity.java index 9c9fd9ae..b803f86d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/Affinity.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/Affinity.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import net.minecraft.text.Text; import net.minecraft.text.TranslatableText; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/CastResult.java b/src/main/java/com/minelittlepony/unicopia/magic/CastResult.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/core/magic/CastResult.java rename to src/main/java/com/minelittlepony/unicopia/magic/CastResult.java index dba91598..257e91b3 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/CastResult.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/CastResult.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; /** * A type of action to perform after a spell has completed its handling. diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/CasterUtils.java b/src/main/java/com/minelittlepony/unicopia/magic/CasterUtils.java similarity index 78% rename from src/main/java/com/minelittlepony/unicopia/core/magic/CasterUtils.java rename to src/main/java/com/minelittlepony/unicopia/magic/CasterUtils.java index ee821e5b..0e043be3 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/CasterUtils.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/CasterUtils.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import java.util.Optional; import java.util.stream.Stream; @@ -6,11 +6,11 @@ import java.util.stream.Stream; import javax.annotation.Nullable; import com.google.common.collect.Streams; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.ducks.IRaceContainerHolder; -import com.minelittlepony.unicopia.core.entity.IMagicals; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.ducks.IRaceContainerHolder; +import com.minelittlepony.unicopia.entity.IMagicals; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; @@ -19,7 +19,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; public class CasterUtils { - /** * Finds all surrounding spells withing range from the given caster. */ @@ -45,20 +44,6 @@ public class CasterUtils { .map(Optional::get); } - /** - * Finds all magically capabable entities in the world. - */ - @Deprecated - static Stream> findAllSpells(ICaster source) { - // TODO: - return source.getWorld().getEntities(LivingEntity.class, new Box(0, 0, 0, 0, 0, 0), e -> { - return e instanceof ICaster || e instanceof PlayerEntity; - }).stream() - .map(CasterUtils::toCaster) - .filter(Optional::isPresent) - .map(Optional::get); - } - static Stream> findAllSpellsInRange(ICaster source, Box bb) { return source.getWorld().getEntities(source.getEntity(), bb, e -> !e.removed && (e instanceof ICaster || EquinePredicates.MAGI.test(e))).stream() .map(CasterUtils::toCaster) diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/GenericSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/GenericSpell.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/magic/GenericSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/GenericSpell.java index ceb4a807..c028bf45 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/GenericSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/GenericSpell.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import java.util.function.Supplier; @@ -37,7 +37,7 @@ public class GenericSpell extends AbstractSpell { @Override public void render(ICaster source) { - // TODO: + // TODO: ParticleTypeRegistry // source.spawnParticles(UParticles.UNICORN_MAGIC, 1, getTint()); } diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IAffine.java b/src/main/java/com/minelittlepony/unicopia/magic/IAffine.java similarity index 80% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IAffine.java rename to src/main/java/com/minelittlepony/unicopia/magic/IAffine.java index b6f7657f..7b04fd22 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IAffine.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IAffine.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; /** * Interface for things that have an affine alignment. diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IAttachedEffect.java b/src/main/java/com/minelittlepony/unicopia/magic/IAttachedEffect.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IAttachedEffect.java rename to src/main/java/com/minelittlepony/unicopia/magic/IAttachedEffect.java index cebe3852..35f1b1b9 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IAttachedEffect.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IAttachedEffect.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; public interface IAttachedEffect extends IMagicEffect { /** diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/ICastable.java b/src/main/java/com/minelittlepony/unicopia/magic/ICastable.java similarity index 79% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/ICastable.java rename to src/main/java/com/minelittlepony/unicopia/magic/ICastable.java index 2a2f6739..10a2d067 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/ICastable.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/ICastable.java @@ -1,12 +1,7 @@ -package com.minelittlepony.unicopia.redux.magic; +package com.minelittlepony.unicopia.magic; -import com.minelittlepony.unicopia.core.magic.CastResult; -import com.minelittlepony.unicopia.core.magic.IDispenceable; -import com.minelittlepony.unicopia.core.magic.IDispensable; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.IMagicalItem; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUsageContext; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/ICaster.java b/src/main/java/com/minelittlepony/unicopia/magic/ICaster.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/core/magic/ICaster.java rename to src/main/java/com/minelittlepony/unicopia/magic/ICaster.java index bbca820a..15a1a291 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/ICaster.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/ICaster.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import java.util.Optional; import java.util.UUID; @@ -6,8 +6,9 @@ import java.util.stream.Stream; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.entity.Owned; -import com.minelittlepony.unicopia.core.util.VecHelper; +import com.minelittlepony.unicopia.entity.Owned; +import com.minelittlepony.unicopia.util.VecHelper; +import com.minelittlepony.unicopia.util.particles.ParticleSource; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; @@ -20,7 +21,7 @@ import net.minecraft.world.World; /** * Interface for any magically capable entities that can cast and persist spells. */ -public interface ICaster extends Owned, ILevelled, IAffine, IMagicals, IParticleSource { +public interface ICaster extends Owned, ILevelled, IAffine, IMagicals, ParticleSource { void setEffect(@Nullable IMagicEffect effect); @@ -66,6 +67,7 @@ public interface ICaster extends Owned, ILevelled, IA /** * Gets the entity directly responsible for casting. */ + @Override default Entity getEntity() { return getOwner(); } @@ -80,6 +82,7 @@ public interface ICaster extends Owned, ILevelled, IA /** * gets the minecraft world */ + @Override default World getWorld() { return getEntity().getEntityWorld(); } @@ -108,6 +111,7 @@ public interface ICaster extends Owned, ILevelled, IA /** * Gets the center position where this caster is located. */ + @Override default Vec3d getOriginVector() { return getEntity().getPos(); } @@ -118,11 +122,6 @@ public interface ICaster extends Owned, ILevelled, IA return getOwner().getHealth() > 0; } - @Deprecated - default Stream> findAllSpells() { - return CasterUtils.findAllSpells(this); - } - default Stream> findAllSpellsInRange(double radius) { return CasterUtils.findAllSpellsInRange(this, radius); } diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IDependable.java b/src/main/java/com/minelittlepony/unicopia/magic/IDependable.java similarity index 50% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IDependable.java rename to src/main/java/com/minelittlepony/unicopia/magic/IDependable.java index cbcd8b1b..23eb6607 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IDependable.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IDependable.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.entity.player.IPlayer; public interface IDependable extends IMagicalItem { void onRemoved(IPlayer player, float needfulness); diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IDispenceable.java b/src/main/java/com/minelittlepony/unicopia/magic/IDispenceable.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IDispenceable.java rename to src/main/java/com/minelittlepony/unicopia/magic/IDispenceable.java index 8f91f473..51ed490f 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IDispenceable.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IDispenceable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import net.minecraft.util.math.BlockPointer; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IDispensable.java b/src/main/java/com/minelittlepony/unicopia/magic/IDispensable.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IDispensable.java rename to src/main/java/com/minelittlepony/unicopia/magic/IDispensable.java index 303af4cb..572cdf99 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IDispensable.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IDispensable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import net.minecraft.block.Block; import net.minecraft.block.DispenserBlock; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IHeldEffect.java b/src/main/java/com/minelittlepony/unicopia/magic/IHeldEffect.java similarity index 76% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IHeldEffect.java rename to src/main/java/com/minelittlepony/unicopia/magic/IHeldEffect.java index 8bfee71d..83d32728 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IHeldEffect.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IHeldEffect.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.entity.player.IPlayer; /** * Represents a passive spell that does something when held in the player's hand. diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/ILevelled.java b/src/main/java/com/minelittlepony/unicopia/magic/ILevelled.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/magic/ILevelled.java rename to src/main/java/com/minelittlepony/unicopia/magic/ILevelled.java index cd01d5b6..19ae0586 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/ILevelled.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/ILevelled.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; /** * Object with levelling capabilities. diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IMagicEffect.java b/src/main/java/com/minelittlepony/unicopia/magic/IMagicEffect.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IMagicEffect.java rename to src/main/java/com/minelittlepony/unicopia/magic/IMagicEffect.java index 66ebc396..b2bb739b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IMagicEffect.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IMagicEffect.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.core.util.InbtSerialisable; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.util.InbtSerialisable; import net.minecraft.entity.projectile.ProjectileEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IMagicalItem.java b/src/main/java/com/minelittlepony/unicopia/magic/IMagicalItem.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IMagicalItem.java rename to src/main/java/com/minelittlepony/unicopia/magic/IMagicalItem.java index a211448e..0910c6f7 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IMagicalItem.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IMagicalItem.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/minelittlepony/unicopia/magic/IMagicals.java b/src/main/java/com/minelittlepony/unicopia/magic/IMagicals.java new file mode 100644 index 00000000..7ac13a6a --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/magic/IMagicals.java @@ -0,0 +1,5 @@ +package com.minelittlepony.unicopia.magic; + +public interface IMagicals { + +} diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/ISuppressable.java b/src/main/java/com/minelittlepony/unicopia/magic/ISuppressable.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/core/magic/ISuppressable.java rename to src/main/java/com/minelittlepony/unicopia/magic/ISuppressable.java index 6a9b858e..12f57da7 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/ISuppressable.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/ISuppressable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; /** * Magic effects that can be suppressed by other nearby effects. diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/ITossedEffect.java b/src/main/java/com/minelittlepony/unicopia/magic/ITossedEffect.java similarity index 77% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/ITossedEffect.java rename to src/main/java/com/minelittlepony/unicopia/magic/ITossedEffect.java index c6a77e2e..079a29d9 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/ITossedEffect.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/ITossedEffect.java @@ -1,15 +1,12 @@ -package com.minelittlepony.unicopia.redux.magic; +package com.minelittlepony.unicopia.magic; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.core.util.projectile.ITossable; -import com.minelittlepony.unicopia.redux.entity.ProjectileEntity; -import com.minelittlepony.unicopia.redux.item.UItems; -import com.minelittlepony.unicopia.redux.util.projectile.IAdvancedProjectile; +import com.minelittlepony.unicopia.entity.ProjectileEntity; +import com.minelittlepony.unicopia.item.UItems; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.util.projectile.IAdvancedProjectile; +import com.minelittlepony.unicopia.util.projectile.ITossable; import net.minecraft.entity.Entity; import net.minecraft.item.Item; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IUseable.java b/src/main/java/com/minelittlepony/unicopia/magic/IUseable.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IUseable.java rename to src/main/java/com/minelittlepony/unicopia/magic/IUseable.java index 3bd0d4ed..a6b48aa8 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IUseable.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/IUseable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.magic; import javax.annotation.Nullable; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/AbstractAttachableSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/AbstractAttachableSpell.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/AbstractAttachableSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/AbstractAttachableSpell.java index e65a3058..dac65afc 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/AbstractAttachableSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/AbstractAttachableSpell.java @@ -1,13 +1,13 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import java.util.UUID; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.ICaster; import net.minecraft.entity.Entity; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/AttractiveSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/AttractiveSpell.java similarity index 83% rename from src/main/java/com/minelittlepony/unicopia/core/magic/spell/AttractiveSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/AttractiveSpell.java index 180fe932..61f82dab 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/AttractiveSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/AttractiveSpell.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.core.magic.spell; +package com.minelittlepony.unicopia.magic.spell; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.shape.Sphere; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/AwkwardSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/AwkwardSpell.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/AwkwardSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/AwkwardSpell.java index 92502441..96a675e0 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/AwkwardSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/AwkwardSpell.java @@ -1,18 +1,18 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import java.util.ArrayList; import java.util.List; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CastResult; -import com.minelittlepony.unicopia.core.magic.CasterUtils; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IUseable; -import com.minelittlepony.unicopia.core.util.shape.Sphere; -import com.minelittlepony.unicopia.redux.magic.ITossedEffect; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CastResult; +import com.minelittlepony.unicopia.magic.CasterUtils; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.ITossedEffect; +import com.minelittlepony.unicopia.magic.IUseable; +import com.minelittlepony.unicopia.util.shape.Sphere; import com.mojang.brigadier.StringReader; import com.mojang.brigadier.exceptions.CommandSyntaxException; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ChangelingTrapSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/ChangelingTrapSpell.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ChangelingTrapSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/ChangelingTrapSpell.java index b7fda79a..809762fd 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ChangelingTrapSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/ChangelingTrapSpell.java @@ -1,19 +1,19 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import java.util.Optional; -import com.minelittlepony.unicopia.core.USounds; -import com.minelittlepony.unicopia.core.entity.IMagicals; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CasterUtils; -import com.minelittlepony.unicopia.core.magic.IAttachedEffect; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.util.WorldEvent; -import com.minelittlepony.unicopia.redux.UBlocks; -import com.minelittlepony.unicopia.redux.UEntities; -import com.minelittlepony.unicopia.redux.entity.CuccoonEntity; -import com.minelittlepony.unicopia.redux.magic.ITossedEffect; +import com.minelittlepony.unicopia.UBlocks; +import com.minelittlepony.unicopia.UEntities; +import com.minelittlepony.unicopia.USounds; +import com.minelittlepony.unicopia.entity.CuccoonEntity; +import com.minelittlepony.unicopia.entity.IMagicals; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CasterUtils; +import com.minelittlepony.unicopia.magic.IAttachedEffect; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.ITossedEffect; +import com.minelittlepony.unicopia.util.WorldEvent; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ChargingSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/ChargingSpell.java similarity index 82% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ChargingSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/ChargingSpell.java index 4a54a7fe..fee369d4 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ChargingSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/ChargingSpell.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Line; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Line; import net.minecraft.util.math.Box; import net.minecraft.util.math.Vec3d; @@ -49,7 +49,7 @@ public class ChargingSpell extends AbstractAttachableSpell { IShape line = new Line(start, target.getPos()); source.spawnParticles(line, (int)line.getVolumeOfSpawnableSpace(), pos -> { - // TODO: + // TODO: ParticleTypeRegistry // ParticleTypeRegistry.getTnstance().spawnParticle(UParticles.UNICORN_MAGIC, false, pos.add(start), 0, 0, 0, getTint()); }); } diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/DarknessSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/DarknessSpell.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/DarknessSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/DarknessSpell.java index 8dc2f7c2..b4fc72f6 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/DarknessSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/DarknessSpell.java @@ -1,18 +1,17 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import java.util.Random; import java.util.function.Consumer; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CasterUtils; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.spell.ShieldSpell; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.PosHelper; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CasterUtils; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.PosHelper; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.block.BlockState; import net.minecraft.block.Fertilizable; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/DisguiseSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/DisguiseSpell.java similarity index 93% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/DisguiseSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/DisguiseSpell.java index 0a7bbec1..52b7e86f 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/DisguiseSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/DisguiseSpell.java @@ -1,26 +1,26 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import java.util.UUID; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.InteractionManager; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.ability.IFlyingPredicate; -import com.minelittlepony.unicopia.core.ability.IHeightPredicate; -import com.minelittlepony.unicopia.core.entity.Owned; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CasterUtils; -import com.minelittlepony.unicopia.core.magic.IAttachedEffect; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.ISuppressable; -import com.minelittlepony.unicopia.core.util.projectile.ProjectileUtil; +import com.minelittlepony.unicopia.InteractionManager; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.ability.IFlyingPredicate; +import com.minelittlepony.unicopia.ability.IHeightPredicate; +import com.minelittlepony.unicopia.entity.Owned; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CasterUtils; +import com.minelittlepony.unicopia.magic.IAttachedEffect; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.ISuppressable; +import com.minelittlepony.unicopia.util.projectile.ProjectileUtil; import com.mojang.authlib.GameProfile; import net.minecraft.block.entity.SkullBlockEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/FaithfulAssistantSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/FaithfulAssistantSpell.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/FaithfulAssistantSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/FaithfulAssistantSpell.java index ca8aa1f3..a1f45651 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/FaithfulAssistantSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/FaithfulAssistantSpell.java @@ -1,14 +1,13 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; -import com.minelittlepony.unicopia.redux.entity.ai.FollowCasterGoal; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.unicopia.entity.ai.FollowCasterGoal; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IMagicEffect; import net.minecraft.entity.ai.goal.SwimGoal; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/FireSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/FireSpell.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/core/magic/spell/FireSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/FireSpell.java index b788b7c7..cafb2d1f 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/FireSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/FireSpell.java @@ -1,22 +1,22 @@ -package com.minelittlepony.unicopia.core.magic.spell; +package com.minelittlepony.unicopia.magic.spell; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.entity.IMagicals; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CastResult; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IDispenceable; -import com.minelittlepony.unicopia.core.magic.IUseable; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.PosHelper; -import com.minelittlepony.unicopia.core.util.VecHelper; -import com.minelittlepony.unicopia.core.util.collection.IStateMapping; -import com.minelittlepony.unicopia.core.util.collection.StateMapList; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.entity.IMagicals; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CastResult; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IDispenceable; +import com.minelittlepony.unicopia.magic.IUseable; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.PosHelper; +import com.minelittlepony.unicopia.util.VecHelper; +import com.minelittlepony.unicopia.util.collection.IStateMapping; +import com.minelittlepony.unicopia.util.collection.StateMapList; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/FlameSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/FlameSpell.java similarity index 73% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/FlameSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/FlameSpell.java index 00a9d18e..46b63a46 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/FlameSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/FlameSpell.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IHeldEffect; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IHeldEffect; import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/GlowingSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/GlowingSpell.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/GlowingSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/GlowingSpell.java index c56c42d7..3b733eeb 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/GlowingSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/GlowingSpell.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.GenericSpell; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IHeldEffect; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.GenericSpell; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IHeldEffect; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/IceSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/IceSpell.java similarity index 86% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/IceSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/IceSpell.java index 8849c30d..a036d07f 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/IceSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/IceSpell.java @@ -1,21 +1,21 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CastResult; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IDispenceable; -import com.minelittlepony.unicopia.core.magic.IUseable; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.PosHelper; -import com.minelittlepony.unicopia.core.util.VecHelper; -import com.minelittlepony.unicopia.core.util.collection.IStateMapping; -import com.minelittlepony.unicopia.core.util.collection.StateMapList; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; -import com.minelittlepony.unicopia.redux.UMaterials; +import com.minelittlepony.unicopia.UMaterials; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CastResult; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IDispenceable; +import com.minelittlepony.unicopia.magic.IUseable; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.PosHelper; +import com.minelittlepony.unicopia.util.VecHelper; +import com.minelittlepony.unicopia.util.collection.IStateMapping; +import com.minelittlepony.unicopia.util.collection.StateMapList; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/InfernoSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/InfernoSpell.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/InfernoSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/InfernoSpell.java index ab39d693..da888663 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/InfernoSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/InfernoSpell.java @@ -1,14 +1,13 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CastResult; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.spell.FireSpell; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.collection.IStateMapping; -import com.minelittlepony.unicopia.core.util.collection.StateMapList; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CastResult; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.collection.IStateMapping; +import com.minelittlepony.unicopia.util.collection.StateMapList; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/NecromancySpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/NecromancySpell.java similarity index 86% rename from src/main/java/com/minelittlepony/unicopia/core/magic/spell/NecromancySpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/NecromancySpell.java index f85d916f..7fd78019 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/NecromancySpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/NecromancySpell.java @@ -1,15 +1,15 @@ -package com.minelittlepony.unicopia.core.magic.spell; +package com.minelittlepony.unicopia.magic.spell; import java.util.List; import com.google.common.collect.Lists; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.util.VecHelper; -import com.minelittlepony.unicopia.core.util.WorldEvent; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.VecHelper; +import com.minelittlepony.unicopia.util.WorldEvent; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/PortalSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/PortalSpell.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/PortalSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/PortalSpell.java index 67802a31..b4d43345 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/PortalSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/PortalSpell.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import java.util.Locale; import java.util.Optional; @@ -6,19 +6,19 @@ import java.util.UUID; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.IMagicals; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.CastResult; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.IUseable; -import com.minelittlepony.unicopia.core.util.InbtSerialisable; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.entity.IMagicals; +import com.minelittlepony.unicopia.entity.SpellcastEntity; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.CastResult; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.IUseable; +import com.minelittlepony.unicopia.util.InbtSerialisable; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; @@ -162,7 +162,7 @@ public class PortalSpell extends AbstractSpell.RangedAreaSpell implements IUseab @Override public void render(ICaster source) { - // TODO: + // TODO: ParticleTypeRegistry /*source.spawnParticles(getPortalZone(), 10, pos -> { ParticleTypeRegistry.getTnstance().spawnParticle(UParticles.UNICORN_MAGIC, false, pos, 0, 0, 0, getTint()); });*/ diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/RevealingSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/RevealingSpell.java similarity index 74% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/RevealingSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/RevealingSpell.java index e3c571a0..16816c0f 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/RevealingSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/RevealingSpell.java @@ -1,12 +1,12 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.ISuppressable; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.ISuppressable; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ScorchSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/ScorchSpell.java similarity index 78% rename from src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ScorchSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/ScorchSpell.java index adaa490d..272c7cc3 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/magic/spells/ScorchSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/ScorchSpell.java @@ -1,15 +1,14 @@ -package com.minelittlepony.unicopia.redux.magic.spells; +package com.minelittlepony.unicopia.magic.spell; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.spell.FireSpell; -import com.minelittlepony.unicopia.core.util.PosHelper; -import com.minelittlepony.unicopia.core.util.shape.Sphere; -import com.minelittlepony.unicopia.redux.magic.ITossedEffect; -import com.minelittlepony.unicopia.redux.util.projectile.IAdvancedProjectile; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.ITossedEffect; +import com.minelittlepony.unicopia.util.PosHelper; +import com.minelittlepony.unicopia.util.projectile.IAdvancedProjectile; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.block.BlockState; import net.minecraft.particle.ParticleTypes; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/ShieldSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/ShieldSpell.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/core/magic/spell/ShieldSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/ShieldSpell.java index a780db7b..8f0de673 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/ShieldSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/ShieldSpell.java @@ -1,19 +1,19 @@ -package com.minelittlepony.unicopia.core.magic.spell; +package com.minelittlepony.unicopia.magic.spell; import java.util.List; import java.util.stream.Collectors; -import com.minelittlepony.unicopia.core.EquinePredicates; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.IAttachedEffect; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.util.particles.ParticleConnection; -import com.minelittlepony.unicopia.core.util.projectile.ProjectileUtil; -import com.minelittlepony.unicopia.core.util.shape.Sphere; +import com.minelittlepony.unicopia.EquinePredicates; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UParticles; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.IAttachedEffect; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.particles.ParticleConnection; +import com.minelittlepony.unicopia.util.projectile.ProjectileUtil; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/SiphoningSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/SiphoningSpell.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/core/magic/spell/SiphoningSpell.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/SiphoningSpell.java index 65431c94..d8a88fe3 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/SiphoningSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/SiphoningSpell.java @@ -1,16 +1,16 @@ -package com.minelittlepony.unicopia.core.magic.spell; +package com.minelittlepony.unicopia.magic.spell; import java.util.List; import java.util.stream.Collectors; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.magic.AbstractSpell; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.util.MagicalDamageSource; -import com.minelittlepony.unicopia.core.util.shape.Sphere; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.magic.AbstractSpell; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.util.MagicalDamageSource; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.damage.DamageSource; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/SpellRegistry.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/SpellRegistry.java similarity index 83% rename from src/main/java/com/minelittlepony/unicopia/core/magic/spell/SpellRegistry.java rename to src/main/java/com/minelittlepony/unicopia/magic/spell/SpellRegistry.java index c52361c6..a0e65212 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/spell/SpellRegistry.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/SpellRegistry.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.magic.spell; +package com.minelittlepony.unicopia.magic.spell; import java.util.HashMap; import java.util.HashSet; @@ -11,11 +11,12 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; -import com.minelittlepony.unicopia.core.magic.Affinity; -import com.minelittlepony.unicopia.core.magic.IDispenceable; -import com.minelittlepony.unicopia.core.magic.IHeldEffect; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.IUseable; +import com.minelittlepony.unicopia.magic.Affinity; +import com.minelittlepony.unicopia.magic.IDispenceable; +import com.minelittlepony.unicopia.magic.IHeldEffect; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.IUseable; + import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundTag; @@ -32,11 +33,24 @@ public class SpellRegistry { private final Map> keysByAffinity = new HashMap<>(); private SpellRegistry() { - registerSpell(ShieldSpell::new); - registerSpell(FireSpell::new); - registerSpell(AttractiveSpell::new); - registerSpell(NecromancySpell::new); - registerSpell(SiphoningSpell::new); + register(ShieldSpell::new); + register(FireSpell::new); + register(AttractiveSpell::new); + register(NecromancySpell::new); + register(SiphoningSpell::new); + register(ChargingSpell::new); + register(IceSpell::new); + register(PortalSpell::new); + register(AwkwardSpell::new); + register(InfernoSpell::new); + register(FaithfulAssistantSpell::new); + register(RevealingSpell::new); + register(DarknessSpell::new); + register(FlameSpell::new); + register(GlowingSpell::new); + register(ChangelingTrapSpell::new); + register(ScorchSpell::new); + register(DisguiseSpell::new); } @Nullable @@ -100,7 +114,7 @@ public class SpellRegistry { return getSpellFromName(getKeyFromStack(stack)); } - public void registerSpell(Supplier factory) { + public void register(Supplier factory) { try { new Entry<>(factory); } catch (Exception e) { diff --git a/src/main/java/com/minelittlepony/unicopia/magic/spell/package-info.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/package-info.java new file mode 100644 index 00000000..22dd1a84 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/package-info.java @@ -0,0 +1 @@ +package com.minelittlepony.unicopia.magic.spell; \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinEntity.java b/src/main/java/com/minelittlepony/unicopia/mixin/MixinEntity.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/MixinEntity.java rename to src/main/java/com/minelittlepony/unicopia/mixin/MixinEntity.java index 06e018cf..6cfcd9b8 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/mixin/MixinEntity.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.mixin; +package com.minelittlepony.unicopia.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinFarmlandBlock.java b/src/main/java/com/minelittlepony/unicopia/mixin/MixinFarmlandBlock.java similarity index 90% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/MixinFarmlandBlock.java rename to src/main/java/com/minelittlepony/unicopia/mixin/MixinFarmlandBlock.java index e3f61eb9..3b4a446d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinFarmlandBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/mixin/MixinFarmlandBlock.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.core.mixin; +package com.minelittlepony.unicopia.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import com.minelittlepony.unicopia.core.ducks.IFarmland; +import com.minelittlepony.unicopia.ducks.IFarmland; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinItemEntity.java b/src/main/java/com/minelittlepony/unicopia/mixin/MixinItemEntity.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/MixinItemEntity.java rename to src/main/java/com/minelittlepony/unicopia/mixin/MixinItemEntity.java index a2392c50..374f9178 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinItemEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/mixin/MixinItemEntity.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.mixin; +package com.minelittlepony.unicopia.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; @@ -6,8 +6,8 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import com.minelittlepony.unicopia.core.ducks.IItemEntity; -import com.minelittlepony.unicopia.core.entity.ItemEntityCapabilities; +import com.minelittlepony.unicopia.ducks.IItemEntity; +import com.minelittlepony.unicopia.entity.ItemEntityCapabilities; import net.minecraft.entity.Entity; import net.minecraft.entity.ItemEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinLivingEntity.java b/src/main/java/com/minelittlepony/unicopia/mixin/MixinLivingEntity.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/MixinLivingEntity.java rename to src/main/java/com/minelittlepony/unicopia/mixin/MixinLivingEntity.java index ecbde695..85948381 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinLivingEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/mixin/MixinLivingEntity.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.mixin; +package com.minelittlepony.unicopia.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -6,9 +6,9 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import com.minelittlepony.unicopia.core.ducks.IRaceContainerHolder; -import com.minelittlepony.unicopia.core.entity.IEntity; -import com.minelittlepony.unicopia.core.entity.LivingEntityCapabilities; +import com.minelittlepony.unicopia.ducks.IRaceContainerHolder; +import com.minelittlepony.unicopia.entity.IEntity; +import com.minelittlepony.unicopia.entity.LivingEntityCapabilities; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinPlayerEntity.java b/src/main/java/com/minelittlepony/unicopia/mixin/MixinPlayerEntity.java similarity index 86% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/MixinPlayerEntity.java rename to src/main/java/com/minelittlepony/unicopia/mixin/MixinPlayerEntity.java index 1b5a1d31..72ff1814 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinPlayerEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/mixin/MixinPlayerEntity.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.mixin; +package com.minelittlepony.unicopia.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -7,11 +7,11 @@ import org.spongepowered.asm.mixin.injection.ModifyArg; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.ducks.IRaceContainerHolder; -import com.minelittlepony.unicopia.core.entity.IEntity; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; -import com.minelittlepony.unicopia.core.entity.player.PlayerCapabilities; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.ducks.IRaceContainerHolder; +import com.minelittlepony.unicopia.entity.IEntity; +import com.minelittlepony.unicopia.entity.player.IPlayer; +import com.minelittlepony.unicopia.entity.player.PlayerCapabilities; import com.mojang.datafixers.util.Either; import net.minecraft.entity.ItemEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinProjectileEntity.java b/src/main/java/com/minelittlepony/unicopia/mixin/MixinProjectileEntity.java similarity index 91% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/MixinProjectileEntity.java rename to src/main/java/com/minelittlepony/unicopia/mixin/MixinProjectileEntity.java index 528114d2..8e7019bb 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/MixinProjectileEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/mixin/MixinProjectileEntity.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.core.mixin; +package com.minelittlepony.unicopia.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import com.minelittlepony.unicopia.core.SpeciesList; +import com.minelittlepony.unicopia.SpeciesList; import net.minecraft.entity.Entity; import net.minecraft.entity.projectile.Projectile; diff --git a/src/main/java/com/minelittlepony/unicopia/core/mixin/Walker.java b/src/main/java/com/minelittlepony/unicopia/mixin/Walker.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/core/mixin/Walker.java rename to src/main/java/com/minelittlepony/unicopia/mixin/Walker.java index c733021a..f5f72a20 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/mixin/Walker.java +++ b/src/main/java/com/minelittlepony/unicopia/mixin/Walker.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.mixin; +package com.minelittlepony.unicopia.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; diff --git a/src/main/java/com/minelittlepony/unicopia/core/network/EffectSync.java b/src/main/java/com/minelittlepony/unicopia/network/EffectSync.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/network/EffectSync.java rename to src/main/java/com/minelittlepony/unicopia/network/EffectSync.java index 404d8c1d..fdefea27 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/network/EffectSync.java +++ b/src/main/java/com/minelittlepony/unicopia/network/EffectSync.java @@ -1,10 +1,10 @@ -package com.minelittlepony.unicopia.core.network; +package com.minelittlepony.unicopia.network; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.ICaster; -import com.minelittlepony.unicopia.core.magic.IMagicEffect; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.magic.ICaster; +import com.minelittlepony.unicopia.magic.IMagicEffect; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; import net.minecraft.entity.data.TrackedData; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/minelittlepony/unicopia/core/network/ITransmittable.java b/src/main/java/com/minelittlepony/unicopia/network/ITransmittable.java similarity index 60% rename from src/main/java/com/minelittlepony/unicopia/core/network/ITransmittable.java rename to src/main/java/com/minelittlepony/unicopia/network/ITransmittable.java index c1c0a2de..a844f258 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/network/ITransmittable.java +++ b/src/main/java/com/minelittlepony/unicopia/network/ITransmittable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.network; +package com.minelittlepony.unicopia.network; public interface ITransmittable { void sendCapabilities(boolean full); diff --git a/src/main/java/com/minelittlepony/unicopia/core/network/MsgPlayerAbility.java b/src/main/java/com/minelittlepony/unicopia/network/MsgPlayerAbility.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/core/network/MsgPlayerAbility.java rename to src/main/java/com/minelittlepony/unicopia/network/MsgPlayerAbility.java index 0cd14689..22a59937 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/network/MsgPlayerAbility.java +++ b/src/main/java/com/minelittlepony/unicopia/network/MsgPlayerAbility.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.network; +package com.minelittlepony.unicopia.network; import java.util.UUID; @@ -7,10 +7,10 @@ import com.google.gson.GsonBuilder; import com.google.gson.annotations.Expose; import com.minelittlepony.jumpingcastle.api.Channel; import com.minelittlepony.jumpingcastle.api.Message; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.ability.IPower; -import com.minelittlepony.unicopia.core.ability.PowersRegistry; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.ability.IPower; +import com.minelittlepony.unicopia.ability.PowersRegistry; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.MinecraftServer; diff --git a/src/main/java/com/minelittlepony/unicopia/core/network/MsgPlayerCapabilities.java b/src/main/java/com/minelittlepony/unicopia/network/MsgPlayerCapabilities.java similarity index 89% rename from src/main/java/com/minelittlepony/unicopia/core/network/MsgPlayerCapabilities.java rename to src/main/java/com/minelittlepony/unicopia/network/MsgPlayerCapabilities.java index 5d725db1..30d8321f 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/network/MsgPlayerCapabilities.java +++ b/src/main/java/com/minelittlepony/unicopia/network/MsgPlayerCapabilities.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.network; +package com.minelittlepony.unicopia.network; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -10,10 +10,10 @@ import java.util.UUID; import com.google.gson.annotations.Expose; import com.minelittlepony.jumpingcastle.api.Channel; import com.minelittlepony.jumpingcastle.api.Message; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UnicopiaCore; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.MinecraftServer; diff --git a/src/main/java/com/minelittlepony/unicopia/core/network/MsgRequestCapabilities.java b/src/main/java/com/minelittlepony/unicopia/network/MsgRequestCapabilities.java similarity index 81% rename from src/main/java/com/minelittlepony/unicopia/core/network/MsgRequestCapabilities.java rename to src/main/java/com/minelittlepony/unicopia/network/MsgRequestCapabilities.java index fee6b854..80d2d942 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/network/MsgRequestCapabilities.java +++ b/src/main/java/com/minelittlepony/unicopia/network/MsgRequestCapabilities.java @@ -1,14 +1,14 @@ -package com.minelittlepony.unicopia.core.network; +package com.minelittlepony.unicopia.network; import java.util.UUID; import com.google.gson.annotations.Expose; import com.minelittlepony.jumpingcastle.api.Channel; import com.minelittlepony.jumpingcastle.api.Message; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.core.entity.player.IPlayer; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UnicopiaCore; +import com.minelittlepony.unicopia.entity.player.IPlayer; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.MinecraftServer; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/UnicopiaRedux.java b/src/main/java/com/minelittlepony/unicopia/redux/UnicopiaRedux.java deleted file mode 100644 index 396ad167..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/UnicopiaRedux.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.minelittlepony.unicopia.redux; - -import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.registry.CommandRegistry; - -import com.minelittlepony.unicopia.core.ability.PowersRegistry; -import com.minelittlepony.unicopia.core.magic.spell.SpellRegistry; -import com.minelittlepony.unicopia.redux.UContainers; -import com.minelittlepony.unicopia.redux.ability.PowerCloudBase; -import com.minelittlepony.unicopia.redux.ability.PowerDisguise; -import com.minelittlepony.unicopia.redux.ability.PowerEngulf; -import com.minelittlepony.unicopia.redux.ability.PowerStomp; -import com.minelittlepony.unicopia.redux.command.DisguiseCommand; -import com.minelittlepony.unicopia.redux.enchanting.Pages; -import com.minelittlepony.unicopia.redux.item.UItems; -import com.minelittlepony.unicopia.redux.magic.spells.AwkwardSpell; -import com.minelittlepony.unicopia.redux.magic.spells.ChangelingTrapSpell; -import com.minelittlepony.unicopia.redux.magic.spells.ChargingSpell; -import com.minelittlepony.unicopia.redux.magic.spells.DarknessSpell; -import com.minelittlepony.unicopia.redux.magic.spells.DisguiseSpell; -import com.minelittlepony.unicopia.redux.magic.spells.FaithfulAssistantSpell; -import com.minelittlepony.unicopia.redux.magic.spells.FlameSpell; -import com.minelittlepony.unicopia.redux.magic.spells.GlowingSpell; -import com.minelittlepony.unicopia.redux.magic.spells.IceSpell; -import com.minelittlepony.unicopia.redux.magic.spells.InfernoSpell; -import com.minelittlepony.unicopia.redux.magic.spells.PortalSpell; -import com.minelittlepony.unicopia.redux.magic.spells.RevealingSpell; -import com.minelittlepony.unicopia.redux.magic.spells.ScorchSpell; -import com.minelittlepony.unicopia.redux.structure.UStructures; - -public class UnicopiaRedux implements ModInitializer { - @Override - public void onInitialize() { - Pages.instance().load(); - - UBlocks.bootstrap(); - UItems.bootstrap(); - UContainers.bootstrap(); - UStructures.bootstrap(); - - CommandRegistry.INSTANCE.register(false, DisguiseCommand::register); - - PowersRegistry.instance().registerPower(new PowerCloudBase()); - PowersRegistry.instance().registerPower(new PowerEngulf()); - PowersRegistry.instance().registerPower(new PowerStomp()); - PowersRegistry.instance().registerPower(new PowerDisguise()); - - SpellRegistry.instance().registerSpell(ChargingSpell::new); - SpellRegistry.instance().registerSpell(IceSpell::new); - SpellRegistry.instance().registerSpell(PortalSpell::new); - SpellRegistry.instance().registerSpell(AwkwardSpell::new); - SpellRegistry.instance().registerSpell(InfernoSpell::new); - SpellRegistry.instance().registerSpell(FaithfulAssistantSpell::new); - SpellRegistry.instance().registerSpell(RevealingSpell::new); - SpellRegistry.instance().registerSpell(DarknessSpell::new); - SpellRegistry.instance().registerSpell(FlameSpell::new); - SpellRegistry.instance().registerSpell(GlowingSpell::new); - SpellRegistry.instance().registerSpell(ChangelingTrapSpell::new); - SpellRegistry.instance().registerSpell(ScorchSpell::new); - SpellRegistry.instance().registerSpell(DisguiseSpell::new); - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/URenderers.java b/src/main/java/com/minelittlepony/unicopia/redux/client/URenderers.java deleted file mode 100644 index aae9c3ee..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/URenderers.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.minelittlepony.unicopia.redux.client; - -import com.minelittlepony.unicopia.core.UParticles; -import com.minelittlepony.unicopia.core.client.particle.ChangelingMagicParticle; -import com.minelittlepony.unicopia.core.client.particle.DiskParticle; -import com.minelittlepony.unicopia.core.client.particle.RaindropsParticle; -import com.minelittlepony.unicopia.core.client.particle.SphereParticle; -import com.minelittlepony.unicopia.core.client.particle.MagicParticle; -import com.minelittlepony.unicopia.core.util.collection.ListHelper; -import com.minelittlepony.unicopia.redux.client.render.ButterflyEntityRenderer; -import com.minelittlepony.unicopia.redux.client.render.RenderCloud; -import com.minelittlepony.unicopia.redux.client.render.RenderCuccoon; -import com.minelittlepony.unicopia.redux.client.render.RenderRainbow; -import com.minelittlepony.unicopia.redux.client.render.RenderSpear; -import com.minelittlepony.unicopia.redux.client.render.RenderSpellbook; -import com.minelittlepony.unicopia.redux.client.render.SpellcastEntityRenderer; -import com.minelittlepony.unicopia.redux.entity.ButterflyEntity; -import com.minelittlepony.unicopia.redux.entity.CloudEntity; -import com.minelittlepony.unicopia.redux.entity.CuccoonEntity; -import com.minelittlepony.unicopia.redux.entity.ProjectileEntity; -import com.minelittlepony.unicopia.redux.entity.RainbowEntity; -import com.minelittlepony.unicopia.redux.entity.SpearEntity; -import com.minelittlepony.unicopia.redux.entity.SpellbookEntity; -import com.minelittlepony.unicopia.redux.entity.SpellcastEntity; -import com.minelittlepony.unicopia.redux.entity.WildCloudEntity; - -import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.render.entity.FlyingItemEntityRenderer; -import net.minecraft.entity.EntityCategory; -import net.minecraft.util.registry.Registry; -import net.minecraft.world.biome.EndBiome; -import net.minecraft.world.biome.ForestBiome; -import net.minecraft.world.biome.MountainsBiome; -import net.minecraft.world.biome.NetherBiome; -import net.minecraft.world.biome.OceanBiome; -import net.minecraft.world.biome.PlainsBiome; -import net.minecraft.world.biome.RiverBiome; - -public interface URenderers { - static void bootstrap() { - EntityRendererRegistry.INSTANCE.register(CloudEntity.class, RenderCloud::new); - EntityRendererRegistry.INSTANCE.register(SpellcastEntity.class, SpellcastEntityRenderer::new); - EntityRendererRegistry.INSTANCE.register(ProjectileEntity.class, (manager, context) -> new FlyingItemEntityRenderer<>(manager, MinecraftClient.getInstance().getItemRenderer())); - EntityRendererRegistry.INSTANCE.register(SpellbookEntity.class, RenderSpellbook::new); - EntityRendererRegistry.INSTANCE.register(RainbowEntity.class, RenderRainbow::new); - EntityRendererRegistry.INSTANCE.register(ButterflyEntity.class, ButterflyEntityRenderer::new); - EntityRendererRegistry.INSTANCE.register(CuccoonEntity.class, RenderCuccoon::new); - EntityRendererRegistry.INSTANCE.register(SpearEntity.class, RenderSpear::new); - - ParticleFactoryRegistry.instance().register(UParticles.UNICORN_MAGIC, MagicParticle::new); - ParticleFactoryRegistry.instance().register(UParticles.CHANGELING_MAGIC, ChangelingMagicParticle::new); - ParticleFactoryRegistry.instance().register(UParticles.RAIN_DROPS, RaindropsParticle::new); - ParticleFactoryRegistry.instance().register(UParticles.SPHERE, SphereParticle::new); - ParticleFactoryRegistry.instance().register(UParticles.DISK, DiskParticle::new); - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderCloud.java b/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderCloud.java deleted file mode 100644 index 798d4fdf..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderCloud.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.minelittlepony.unicopia.redux.client.render; - -import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; -import net.minecraft.client.render.entity.EntityRenderDispatcher; -import net.minecraft.client.render.entity.LivingEntityRenderer; -import net.minecraft.util.Identifier; - -import org.lwjgl.opengl.GL11; - -import com.minelittlepony.unicopia.core.util.WorldHelper; -import com.minelittlepony.unicopia.redux.client.render.model.ModelCloud; -import com.minelittlepony.unicopia.redux.entity.CloudEntity; - -public class RenderCloud extends LivingEntityRenderer { - private static final Identifier cloud = new Identifier("unicopia", "textures/entity/clouds.png"); - private static final Identifier rainCloud = new Identifier("unicopia", "textures/entity/clouds_storm.png"); - - public RenderCloud(EntityRenderDispatcher manager, EntityRendererRegistry.Context context) { - super(manager, new ModelCloud(), 1f); - } - - @Override - public float prepareScale(CloudEntity entity, float par2) { - float scale = entity.getCloudSize(); - - GL11.glScalef(scale, scale, scale); - return 0.0625F; - } - - @Override - protected void renderModel(CloudEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { - - if (!entity.isDead) { - GlStateManager.pushMatrix(); - GlStateManager.translate(0, -entity.height/entity.getCloudSize() + 0.3F, 0); - - GlStateManager.disableLighting(); - GlStateManager.enableBlend(); - - float brightness = Math.max(WorldHelper.getDaylightBrightness(entity.getEntityWorld(), 0) * 3, 0.05F); - - GlStateManager.color(brightness, brightness, brightness, entity.getOpaque() ? 1 : 0.8F); - - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - - super.renderModel(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); - - GlStateManager.disableBlend(); - GlStateManager.enableLighting(); - GlStateManager.color(1, 1, 1, 1); - - GlStateManager.popMatrix(); - } - } - - @Override - protected Identifier getEntityTexture(CloudEntity entity) { - if (entity.getIsRaining() && entity.getIsThundering()) { - return rainCloud; - } - return cloud; - } - - @Override - protected int getColorMultiplier(CloudEntity par1LivingEntity, float yaw, float pitch) { - return 0; - } - - @Override - protected float getDeathMaxRotation(CloudEntity par1LivingEntity) { - return 0; - } -} - - - - - - - - - - diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderCuccoon.java b/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderCuccoon.java deleted file mode 100644 index 24dc1d0a..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderCuccoon.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.minelittlepony.unicopia.redux.client.render; - -import com.minelittlepony.unicopia.core.InteractionManager; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.redux.client.render.model.ModelCuccoon; -import com.minelittlepony.unicopia.redux.entity.CuccoonEntity; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderLivingBase; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.entity.Entity; -import net.minecraft.util.Identifier; - -public class RenderCuccoon extends RenderLivingBase { - - private static final Identifier TEXTURE = new Identifier(UnicopiaCore.MODID, "textures/entity/cuccoon.png"); - - public RenderCuccoon(RenderManager manager) { - super(manager, new ModelCuccoon(), 1); - } - - @Override - protected Identifier getEntityTexture(CuccoonEntity entity) { - return TEXTURE; - } - - @Override - protected float getDeathMaxRotation(CuccoonEntity entity) { - return 0; - } - - @Override - public void doRender(CuccoonEntity entity, double x, double y, double z, float entityYaw, float partialTicks) { - - if (entity.isBeingRidden()) { - Entity rider = entity.getPassengers().get(0); - - if (!(rider == MinecraftClient.instance().player) || InteractionManager.instance().getViewMode() != 0) { - GlStateManager.enableAlpha(); - GlStateManager.enableBlend(); - - renderManager.renderEntity(rider, x, y + rider.getYOffset(), z, entityYaw, partialTicks, true); - - GlStateManager.disableBlend(); - GlStateManager.disableAlpha(); - } - - - } - - super.doRender(entity, x, y, z, entityYaw, partialTicks); - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderRainbow.java b/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderRainbow.java deleted file mode 100644 index d806c88e..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderRainbow.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.minelittlepony.unicopia.redux.client.render; - -import org.lwjgl.opengl.GL11; - -import com.minelittlepony.unicopia.core.util.WorldHelper; -import com.minelittlepony.unicopia.redux.entity.RainbowEntity; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.util.Identifier; - -public class RenderRainbow extends Render { - - public RenderRainbow(RenderManager renderManager) { - super(renderManager); - } - - private static final Identifier TEXTURE = new Identifier("unicopia", "textures/environment/rainbow.png"); - - public void doRender(RainbowEntity entity, double x, double y, double z, float entityYaw, float partialTicks) { - float distance = MinecraftClient.instance().getRenderViewEntity().getDistance(entity); - float maxDistance = 16 * MinecraftClient.instance().gameSettings.renderDistanceChunks; - double r = entity.getRadius(); - float light = WorldHelper.getDaylightBrightness(entity.getEntityWorld(), partialTicks); - - float opacity = ((maxDistance - distance) / maxDistance); - - opacity *= light; - - if (opacity <= 0) { - return; - } - - bindEntityTexture(entity); - - GlStateManager.pushMatrix(); - GlStateManager.disableLighting(); - GlStateManager.disableCull(); - GlStateManager.enableBlend(); - GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); - - GlStateManager.translate(x, y, z); - GlStateManager.rotate(entityYaw, 0, 1, 0); - - GlStateManager.color(1, 1, 1, opacity); - - Tessellator tessellator = Tessellator.instance(); - BufferBuilder bufferbuilder = tessellator.getBuffer(); - - bufferbuilder.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX); - bufferbuilder.pos(-r, r, 0).tex(1, 0).endVertex(); - bufferbuilder.pos( r, r, 0).tex(0, 0).endVertex(); - bufferbuilder.pos( r, 0, 0).tex(0, 1).endVertex(); - bufferbuilder.pos(-r, 0, 0).tex(1, 1).endVertex(); - - tessellator.draw(); - - GlStateManager.disableBlend(); - GlStateManager.enableCull(); - GlStateManager.enableLighting(); - GlStateManager.popMatrix(); - } - - @Override - protected Identifier getEntityTexture(RainbowEntity entity) { - return TEXTURE; - } - -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderSpear.java b/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderSpear.java deleted file mode 100644 index 5a0080d0..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/RenderSpear.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.minelittlepony.unicopia.redux.client.render; - -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.redux.entity.SpearEntity; - -import net.minecraft.client.renderer.entity.RenderArrow; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.util.Identifier; - -public class RenderSpear extends RenderArrow { - public static final Identifier TEXTURE = new Identifier(UnicopiaCore.MODID, "textures/entity/projectiles/spear.png"); - - public RenderSpear(RenderManager manager) { - super(manager); - } - - @Override - protected Identifier getEntityTexture(SpearEntity entity) { - return TEXTURE; - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelCloud.java b/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelCloud.java deleted file mode 100644 index bec8e6f1..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/ModelCloud.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.minelittlepony.unicopia.redux.client.render.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelCloud extends ModelBase { - - private final ModelRenderer body; - - public ModelCloud() { - body = new ModelRenderer(this, 0, 0); - body.setTextureSize(250, 90); - - body.setTextureOffset(0, 0); - body.addBox(-24, 5, -24, 48, 10, 48); - - body.setTextureOffset(0, 58); - body.addBox(-10, 14.999F, -10, 30, 2, 30); - - body.setTextureOffset(120, 58); - body.addBox(-10, 3.001F, -10, 30, 2, 30); - - body.rotationPointY += 4.2; - } - - public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { - body.render(scale); - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/SpellbookModel.java b/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/SpellbookModel.java deleted file mode 100644 index bce502d9..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/client/render/model/SpellbookModel.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.minelittlepony.unicopia.redux.client.render.model; - -import net.minecraft.client.render.entity.model.BookModel; - -public class SpellbookModel extends BookModel { - - public SpellbookModel() { - - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AffineIngredients.java b/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AffineIngredients.java deleted file mode 100644 index 6a90e286..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/enchanting/recipe/AffineIngredients.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.minelittlepony.unicopia.redux.enchanting.recipe; - -import java.util.Map; - -import com.google.common.collect.Maps; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.minelittlepony.unicopia.core.UnicopiaCore; -import com.minelittlepony.unicopia.core.util.AssetWalker; - -import net.minecraft.util.Identifier; - -public class AffineIngredients { - - private static final AffineIngredients instance = new AffineIngredients(); - - public static AffineIngredients instance() { - return instance; - } - - private final Map storedIngredients = Maps.newHashMap(); - - private final AssetWalker walker = new AssetWalker(new Identifier(UnicopiaCore.MODID, "enchanting/ingredients"), this::handleJson); - - public void load() { - storedIngredients.clear(); - - walker.walk(); - } - - public SpellIngredient getIngredient(Identifier res) { - SpellIngredient result = storedIngredients.get(res); - - if (result == null) { - new RuntimeException("Ingredient `" + res + "` was not found.").printStackTrace(); - return SpellIngredient.EMPTY; - } - - return result; - } - - protected void handleJson(Identifier id, JsonObject json) throws JsonParseException { - SpellIngredient ingredient = SpellIngredient.parse(json.get("items")); - - if (ingredient != null) { - storedIngredients.put(id, ingredient); - } - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/item/URecord.java b/src/main/java/com/minelittlepony/unicopia/redux/item/URecord.java deleted file mode 100644 index dbc38e6b..00000000 --- a/src/main/java/com/minelittlepony/unicopia/redux/item/URecord.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.minelittlepony.unicopia.redux.item; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemGroup; -import net.minecraft.item.MusicDiscItem; -import net.minecraft.sound.SoundEvent; -import net.minecraft.util.Rarity; -public class URecord extends MusicDiscItem { - - public URecord(SoundEvent sound) { - super(1, sound, new Item.Settings() - .maxCount(1) - .group(ItemGroup.MISC) - .rarity(Rarity.RARE) - ); - } - -} diff --git a/src/main/java/com/minelittlepony/unicopia/redux/structure/BiomeWhitelistedFeature.java b/src/main/java/com/minelittlepony/unicopia/structure/BiomeWhitelistedFeature.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/redux/structure/BiomeWhitelistedFeature.java rename to src/main/java/com/minelittlepony/unicopia/structure/BiomeWhitelistedFeature.java index 9479763d..f2e5a2fa 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/structure/BiomeWhitelistedFeature.java +++ b/src/main/java/com/minelittlepony/unicopia/structure/BiomeWhitelistedFeature.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.structure; +package com.minelittlepony.unicopia.structure; import java.util.Random; import java.util.function.Function; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/structure/CloudDungeonFeature.java b/src/main/java/com/minelittlepony/unicopia/structure/CloudDungeonFeature.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/structure/CloudDungeonFeature.java rename to src/main/java/com/minelittlepony/unicopia/structure/CloudDungeonFeature.java index 5d6ab2c9..37c888f3 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/structure/CloudDungeonFeature.java +++ b/src/main/java/com/minelittlepony/unicopia/structure/CloudDungeonFeature.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.structure; +package com.minelittlepony.unicopia.structure; import java.util.Arrays; import java.util.List; @@ -7,7 +7,7 @@ import java.util.function.Function; import javax.annotation.Nonnull; -import com.minelittlepony.unicopia.core.UnicopiaCore; +import com.minelittlepony.unicopia.UnicopiaCore; import com.mojang.datafixers.Dynamic; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/structure/CustomSaplingGenerator.java b/src/main/java/com/minelittlepony/unicopia/structure/CustomSaplingGenerator.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/structure/CustomSaplingGenerator.java rename to src/main/java/com/minelittlepony/unicopia/structure/CustomSaplingGenerator.java index 3b350118..bd7ec0f0 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/structure/CustomSaplingGenerator.java +++ b/src/main/java/com/minelittlepony/unicopia/structure/CustomSaplingGenerator.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.structure; +package com.minelittlepony.unicopia.structure; import java.util.Random; import javax.annotation.Nullable; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/structure/RuinFeature.java b/src/main/java/com/minelittlepony/unicopia/structure/RuinFeature.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/redux/structure/RuinFeature.java rename to src/main/java/com/minelittlepony/unicopia/structure/RuinFeature.java index 0f7ad0ec..1bf73cf4 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/structure/RuinFeature.java +++ b/src/main/java/com/minelittlepony/unicopia/structure/RuinFeature.java @@ -1,11 +1,11 @@ -package com.minelittlepony.unicopia.redux.structure; +package com.minelittlepony.unicopia.structure; import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.function.Function; -import com.minelittlepony.unicopia.core.UnicopiaCore; +import com.minelittlepony.unicopia.UnicopiaCore; import com.mojang.datafixers.Dynamic; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/structure/UStructures.java b/src/main/java/com/minelittlepony/unicopia/structure/UStructures.java similarity index 84% rename from src/main/java/com/minelittlepony/unicopia/redux/structure/UStructures.java rename to src/main/java/com/minelittlepony/unicopia/structure/UStructures.java index e693ebb4..ccdaeb18 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/structure/UStructures.java +++ b/src/main/java/com/minelittlepony/unicopia/structure/UStructures.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.redux.structure; +package com.minelittlepony.unicopia.structure; -import com.minelittlepony.unicopia.core.UnicopiaCore; +import com.minelittlepony.unicopia.UnicopiaCore; import net.minecraft.structure.StructurePieceType; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/toxin/DynamicToxicBlockItem.java b/src/main/java/com/minelittlepony/unicopia/toxin/DynamicToxicBlockItem.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/toxin/DynamicToxicBlockItem.java rename to src/main/java/com/minelittlepony/unicopia/toxin/DynamicToxicBlockItem.java index 4df04739..a41f6778 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/toxin/DynamicToxicBlockItem.java +++ b/src/main/java/com/minelittlepony/unicopia/toxin/DynamicToxicBlockItem.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.toxin; +package com.minelittlepony.unicopia.toxin; import javax.annotation.Nonnull; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/toxin/DynamicToxicItem.java b/src/main/java/com/minelittlepony/unicopia/toxin/DynamicToxicItem.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/toxin/DynamicToxicItem.java rename to src/main/java/com/minelittlepony/unicopia/toxin/DynamicToxicItem.java index c45f7efc..35bad2c5 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/toxin/DynamicToxicItem.java +++ b/src/main/java/com/minelittlepony/unicopia/toxin/DynamicToxicItem.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.toxin; +package com.minelittlepony.unicopia.toxin; import javax.annotation.Nonnull; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxic.java b/src/main/java/com/minelittlepony/unicopia/toxin/Toxic.java similarity index 72% rename from src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxic.java rename to src/main/java/com/minelittlepony/unicopia/toxin/Toxic.java index 909e80ea..93220731 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxic.java +++ b/src/main/java/com/minelittlepony/unicopia/toxin/Toxic.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.toxin; +package com.minelittlepony.unicopia.toxin; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/toxin/ToxicBlockItem.java b/src/main/java/com/minelittlepony/unicopia/toxin/ToxicBlockItem.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/toxin/ToxicBlockItem.java rename to src/main/java/com/minelittlepony/unicopia/toxin/ToxicBlockItem.java index 01111269..4759de63 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/toxin/ToxicBlockItem.java +++ b/src/main/java/com/minelittlepony/unicopia/toxin/ToxicBlockItem.java @@ -1,12 +1,12 @@ -package com.minelittlepony.unicopia.redux.toxin; +package com.minelittlepony.unicopia.toxin; import java.util.List; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UEffects; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UEffects; import net.minecraft.block.Block; import net.minecraft.client.item.TooltipContext; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/toxin/ToxicItem.java b/src/main/java/com/minelittlepony/unicopia/toxin/ToxicItem.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/redux/toxin/ToxicItem.java rename to src/main/java/com/minelittlepony/unicopia/toxin/ToxicItem.java index abc337e9..6baedc10 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/toxin/ToxicItem.java +++ b/src/main/java/com/minelittlepony/unicopia/toxin/ToxicItem.java @@ -1,12 +1,12 @@ -package com.minelittlepony.unicopia.redux.toxin; +package com.minelittlepony.unicopia.toxin; import java.util.List; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.Race; -import com.minelittlepony.unicopia.core.SpeciesList; -import com.minelittlepony.unicopia.core.UEffects; +import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.SpeciesList; +import com.minelittlepony.unicopia.UEffects; import net.minecraft.client.item.TooltipContext; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxicity.java b/src/main/java/com/minelittlepony/unicopia/toxin/Toxicity.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxicity.java rename to src/main/java/com/minelittlepony/unicopia/toxin/Toxicity.java index 00f377b0..13eba557 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxicity.java +++ b/src/main/java/com/minelittlepony/unicopia/toxin/Toxicity.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.toxin; +package com.minelittlepony.unicopia.toxin; import java.util.Arrays; import java.util.Map; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxin.java b/src/main/java/com/minelittlepony/unicopia/toxin/Toxin.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxin.java rename to src/main/java/com/minelittlepony/unicopia/toxin/Toxin.java index a518f899..8f492bfe 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/toxin/Toxin.java +++ b/src/main/java/com/minelittlepony/unicopia/toxin/Toxin.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux.toxin; +package com.minelittlepony.unicopia.toxin; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffects; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/AwaitTickQueue.java b/src/main/java/com/minelittlepony/unicopia/util/AwaitTickQueue.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/util/AwaitTickQueue.java rename to src/main/java/com/minelittlepony/unicopia/util/AwaitTickQueue.java index 17a39890..deafcebe 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/AwaitTickQueue.java +++ b/src/main/java/com/minelittlepony/unicopia/util/AwaitTickQueue.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import java.util.List; import java.util.Queue; @@ -7,7 +7,8 @@ import java.util.stream.Collectors; import com.google.common.collect.Lists; import com.google.common.collect.Queues; -import com.minelittlepony.unicopia.core.UnicopiaCore; +import com.minelittlepony.unicopia.UnicopiaCore; + import net.minecraft.world.World; public class AwaitTickQueue { diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/CustomStatusEffect.java b/src/main/java/com/minelittlepony/unicopia/util/CustomStatusEffect.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/util/CustomStatusEffect.java rename to src/main/java/com/minelittlepony/unicopia/util/CustomStatusEffect.java index ac01bd7c..e90b5d86 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/CustomStatusEffect.java +++ b/src/main/java/com/minelittlepony/unicopia/util/CustomStatusEffect.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/HeavyInventoryUtils.java b/src/main/java/com/minelittlepony/unicopia/util/HeavyInventoryUtils.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/util/HeavyInventoryUtils.java rename to src/main/java/com/minelittlepony/unicopia/util/HeavyInventoryUtils.java index 79c336ac..1c72a914 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/HeavyInventoryUtils.java +++ b/src/main/java/com/minelittlepony/unicopia/util/HeavyInventoryUtils.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/InbtSerialisable.java b/src/main/java/com/minelittlepony/unicopia/util/InbtSerialisable.java similarity index 95% rename from src/main/java/com/minelittlepony/unicopia/core/util/InbtSerialisable.java rename to src/main/java/com/minelittlepony/unicopia/util/InbtSerialisable.java index a9aa4465..8e58e752 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/InbtSerialisable.java +++ b/src/main/java/com/minelittlepony/unicopia/util/InbtSerialisable.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/Iterators.java b/src/main/java/com/minelittlepony/unicopia/util/Iterators.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/core/util/Iterators.java rename to src/main/java/com/minelittlepony/unicopia/util/Iterators.java index a61ece5e..1c3f2859 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/Iterators.java +++ b/src/main/java/com/minelittlepony/unicopia/util/Iterators.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import java.util.function.Supplier; import java.util.stream.Stream; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/MagicalDamageSource.java b/src/main/java/com/minelittlepony/unicopia/util/MagicalDamageSource.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/util/MagicalDamageSource.java rename to src/main/java/com/minelittlepony/unicopia/util/MagicalDamageSource.java index c93b54a2..a2b7d516 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/MagicalDamageSource.java +++ b/src/main/java/com/minelittlepony/unicopia/util/MagicalDamageSource.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import javax.annotation.Nullable; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/MineLPConnector.java b/src/main/java/com/minelittlepony/unicopia/util/MineLPConnector.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/util/MineLPConnector.java rename to src/main/java/com/minelittlepony/unicopia/util/MineLPConnector.java index 43a872c4..7991f9c0 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/MineLPConnector.java +++ b/src/main/java/com/minelittlepony/unicopia/util/MineLPConnector.java @@ -1,12 +1,12 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; -import com.minelittlepony.unicopia.core.Race; +import com.minelittlepony.unicopia.Race; public final class MineLPConnector { private static boolean checkComplete; private static boolean modIsActive; - // TODO: + // TODO: MineLP /** * Returns true if mine little pony is present. That's all we need. */ diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/MutableVector.java b/src/main/java/com/minelittlepony/unicopia/util/MutableVector.java similarity index 86% rename from src/main/java/com/minelittlepony/unicopia/core/util/MutableVector.java rename to src/main/java/com/minelittlepony/unicopia/util/MutableVector.java index 49083342..c982cd97 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/MutableVector.java +++ b/src/main/java/com/minelittlepony/unicopia/util/MutableVector.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import net.minecraft.util.math.Vec3d; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/OreReplacer.java b/src/main/java/com/minelittlepony/unicopia/util/OreReplacer.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/redux/OreReplacer.java rename to src/main/java/com/minelittlepony/unicopia/util/OreReplacer.java index 85e34c85..a37596c2 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/OreReplacer.java +++ b/src/main/java/com/minelittlepony/unicopia/util/OreReplacer.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.redux; +package com.minelittlepony.unicopia.util; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/PosHelper.java b/src/main/java/com/minelittlepony/unicopia/util/PosHelper.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/core/util/PosHelper.java rename to src/main/java/com/minelittlepony/unicopia/util/PosHelper.java index 4290505f..2eef2b6b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/PosHelper.java +++ b/src/main/java/com/minelittlepony/unicopia/util/PosHelper.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import java.util.Iterator; import java.util.function.Consumer; @@ -6,7 +6,7 @@ import java.util.function.Predicate; import java.util.stream.Stream; import com.google.common.collect.Lists; -import com.minelittlepony.unicopia.core.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.IShape; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/VecHelper.java b/src/main/java/com/minelittlepony/unicopia/util/VecHelper.java similarity index 99% rename from src/main/java/com/minelittlepony/unicopia/core/util/VecHelper.java rename to src/main/java/com/minelittlepony/unicopia/util/VecHelper.java index 3e158b3e..a4eb0f13 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/VecHelper.java +++ b/src/main/java/com/minelittlepony/unicopia/util/VecHelper.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import java.util.List; import java.util.Optional; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/WorldEvent.java b/src/main/java/com/minelittlepony/unicopia/util/WorldEvent.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/core/util/WorldEvent.java rename to src/main/java/com/minelittlepony/unicopia/util/WorldEvent.java index f589135d..1b959f0e 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/WorldEvent.java +++ b/src/main/java/com/minelittlepony/unicopia/util/WorldEvent.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/WorldHelper.java b/src/main/java/com/minelittlepony/unicopia/util/WorldHelper.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/core/util/WorldHelper.java rename to src/main/java/com/minelittlepony/unicopia/util/WorldHelper.java index a8601188..5524491b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/WorldHelper.java +++ b/src/main/java/com/minelittlepony/unicopia/util/WorldHelper.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util; +package com.minelittlepony.unicopia.util; import net.minecraft.world.World; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/collection/IStateMapping.java b/src/main/java/com/minelittlepony/unicopia/util/collection/IStateMapping.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/util/collection/IStateMapping.java rename to src/main/java/com/minelittlepony/unicopia/util/collection/IStateMapping.java index b68f6b9f..0565a1b8 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/collection/IStateMapping.java +++ b/src/main/java/com/minelittlepony/unicopia/util/collection/IStateMapping.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.collection; +package com.minelittlepony.unicopia.util.collection; import java.util.function.Function; import java.util.function.Predicate; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/collection/ListHelper.java b/src/main/java/com/minelittlepony/unicopia/util/collection/ListHelper.java similarity index 82% rename from src/main/java/com/minelittlepony/unicopia/core/util/collection/ListHelper.java rename to src/main/java/com/minelittlepony/unicopia/util/collection/ListHelper.java index 68d7c004..4391ab11 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/collection/ListHelper.java +++ b/src/main/java/com/minelittlepony/unicopia/util/collection/ListHelper.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.collection; +package com.minelittlepony.unicopia.util.collection; import java.util.List; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/collection/Pool.java b/src/main/java/com/minelittlepony/unicopia/util/collection/Pool.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/util/collection/Pool.java rename to src/main/java/com/minelittlepony/unicopia/util/collection/Pool.java index 08a5d5d2..eb8e2de1 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/collection/Pool.java +++ b/src/main/java/com/minelittlepony/unicopia/util/collection/Pool.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.collection; +package com.minelittlepony.unicopia.util.collection; import java.util.HashMap; import java.util.Optional; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/collection/ReversableStateMapList.java b/src/main/java/com/minelittlepony/unicopia/util/collection/ReversableStateMapList.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/core/util/collection/ReversableStateMapList.java rename to src/main/java/com/minelittlepony/unicopia/util/collection/ReversableStateMapList.java index 5e6e8fc9..8dd91e75 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/collection/ReversableStateMapList.java +++ b/src/main/java/com/minelittlepony/unicopia/util/collection/ReversableStateMapList.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.collection; +package com.minelittlepony.unicopia.util.collection; public class ReversableStateMapList extends StateMapList { private static final long serialVersionUID = 6154365988455383098L; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/collection/StateMapList.java b/src/main/java/com/minelittlepony/unicopia/util/collection/StateMapList.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/core/util/collection/StateMapList.java rename to src/main/java/com/minelittlepony/unicopia/util/collection/StateMapList.java index 22528a69..8ec83ff7 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/collection/StateMapList.java +++ b/src/main/java/com/minelittlepony/unicopia/util/collection/StateMapList.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.collection; +package com.minelittlepony.unicopia.util.collection; import java.util.ArrayList; import java.util.function.Predicate; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/collection/Weighted.java b/src/main/java/com/minelittlepony/unicopia/util/collection/Weighted.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/core/util/collection/Weighted.java rename to src/main/java/com/minelittlepony/unicopia/util/collection/Weighted.java index e64feedd..d5927fe8 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/collection/Weighted.java +++ b/src/main/java/com/minelittlepony/unicopia/util/collection/Weighted.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.collection; +package com.minelittlepony.unicopia.util.collection; import java.util.List; import java.util.Optional; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyClientPlayerEntity.java b/src/main/java/com/minelittlepony/unicopia/util/dummy/DummyClientPlayerEntity.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyClientPlayerEntity.java rename to src/main/java/com/minelittlepony/unicopia/util/dummy/DummyClientPlayerEntity.java index 0b935de9..842084fc 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyClientPlayerEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/util/dummy/DummyClientPlayerEntity.java @@ -1,9 +1,9 @@ -package com.minelittlepony.unicopia.core.util.dummy; +package com.minelittlepony.unicopia.util.dummy; import javax.annotation.Nonnull; -import com.minelittlepony.unicopia.core.InteractionManager; -import com.minelittlepony.unicopia.core.entity.Owned; +import com.minelittlepony.unicopia.InteractionManager; +import com.minelittlepony.unicopia.entity.Owned; import com.mojang.authlib.GameProfile; import net.minecraft.client.MinecraftClient; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyPlayerEntity.java b/src/main/java/com/minelittlepony/unicopia/util/dummy/DummyPlayerEntity.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyPlayerEntity.java rename to src/main/java/com/minelittlepony/unicopia/util/dummy/DummyPlayerEntity.java index c3f60254..f176d561 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyPlayerEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/util/dummy/DummyPlayerEntity.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.util.dummy; +package com.minelittlepony.unicopia.util.dummy; -import com.minelittlepony.unicopia.core.InteractionManager; -import com.minelittlepony.unicopia.core.entity.Owned; +import com.minelittlepony.unicopia.InteractionManager; +import com.minelittlepony.unicopia.entity.Owned; import com.mojang.authlib.GameProfile; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyServerPlayerEntity.java b/src/main/java/com/minelittlepony/unicopia/util/dummy/DummyServerPlayerEntity.java similarity index 87% rename from src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyServerPlayerEntity.java rename to src/main/java/com/minelittlepony/unicopia/util/dummy/DummyServerPlayerEntity.java index c3d95e9b..e2200b5a 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/dummy/DummyServerPlayerEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/util/dummy/DummyServerPlayerEntity.java @@ -1,7 +1,7 @@ -package com.minelittlepony.unicopia.core.util.dummy; +package com.minelittlepony.unicopia.util.dummy; -import com.minelittlepony.unicopia.core.InteractionManager; -import com.minelittlepony.unicopia.core.entity.Owned; +import com.minelittlepony.unicopia.InteractionManager; +import com.minelittlepony.unicopia.entity.Owned; import com.mojang.authlib.GameProfile; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleConnection.java b/src/main/java/com/minelittlepony/unicopia/util/particles/ParticleConnection.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleConnection.java rename to src/main/java/com/minelittlepony/unicopia/util/particles/ParticleConnection.java index 317473e3..1099a281 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleConnection.java +++ b/src/main/java/com/minelittlepony/unicopia/util/particles/ParticleConnection.java @@ -1,9 +1,9 @@ -package com.minelittlepony.unicopia.core.util.particles; +package com.minelittlepony.unicopia.util.particles; import java.util.Optional; import java.util.function.Supplier; -import com.minelittlepony.unicopia.core.magic.ICaster; +import com.minelittlepony.unicopia.magic.ICaster; /** * A connection class for updating and persisting an attached particle effect. diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleEmitter.java b/src/main/java/com/minelittlepony/unicopia/util/particles/ParticleEmitter.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleEmitter.java rename to src/main/java/com/minelittlepony/unicopia/util/particles/ParticleEmitter.java index 195eb177..b9ad4e86 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleEmitter.java +++ b/src/main/java/com/minelittlepony/unicopia/util/particles/ParticleEmitter.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.particles; +package com.minelittlepony.unicopia.util.particles; import java.util.EnumSet; import java.util.Random; diff --git a/src/main/java/com/minelittlepony/unicopia/core/magic/IParticleSource.java b/src/main/java/com/minelittlepony/unicopia/util/particles/ParticleSource.java similarity index 76% rename from src/main/java/com/minelittlepony/unicopia/core/magic/IParticleSource.java rename to src/main/java/com/minelittlepony/unicopia/util/particles/ParticleSource.java index cc45fd83..cca28e7c 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/magic/IParticleSource.java +++ b/src/main/java/com/minelittlepony/unicopia/util/particles/ParticleSource.java @@ -1,14 +1,15 @@ -package com.minelittlepony.unicopia.core.magic; +package com.minelittlepony.unicopia.util.particles; import java.util.function.Consumer; -import com.minelittlepony.unicopia.core.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.IShape; +import net.minecraft.entity.Entity; import net.minecraft.particle.ParticleEffect; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -public interface IParticleSource { +public interface ParticleSource { /** * gets the minecraft world @@ -20,9 +21,10 @@ public interface IParticleSource { */ Vec3d getOriginVector(); + Entity getEntity(); + default void spawnParticles(ParticleEffect particleId, int count) { - // TODO: - // ParticleTypeRegistry.getInstance().getSpawner().spawnParticles(particleId, getEntity(), count); + ParticleUtils.spawnParticles(particleId, getEntity(), count); } default void spawnParticles(IShape area, int count, Consumer particleSpawner) { diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleUtils.java b/src/main/java/com/minelittlepony/unicopia/util/particles/ParticleUtils.java similarity index 76% rename from src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleUtils.java rename to src/main/java/com/minelittlepony/unicopia/util/particles/ParticleUtils.java index 396e7d51..a52708d4 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/particles/ParticleUtils.java +++ b/src/main/java/com/minelittlepony/unicopia/util/particles/ParticleUtils.java @@ -1,13 +1,13 @@ -package com.minelittlepony.unicopia.core.util.particles; +package com.minelittlepony.unicopia.util.particles; -import com.minelittlepony.unicopia.core.util.shape.IShape; -import com.minelittlepony.unicopia.core.util.shape.Sphere; +import com.minelittlepony.unicopia.util.shape.IShape; +import com.minelittlepony.unicopia.util.shape.Sphere; import net.minecraft.entity.Entity; import net.minecraft.particle.ParticleEffect; /** - * Utility interface for spawning particles. + * Utility for spawning particles. */ public final class ParticleUtils { diff --git a/src/main/java/com/minelittlepony/unicopia/redux/util/projectile/IAdvancedProjectile.java b/src/main/java/com/minelittlepony/unicopia/util/projectile/IAdvancedProjectile.java similarity index 88% rename from src/main/java/com/minelittlepony/unicopia/redux/util/projectile/IAdvancedProjectile.java rename to src/main/java/com/minelittlepony/unicopia/util/projectile/IAdvancedProjectile.java index 420963a1..23f2f45e 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/util/projectile/IAdvancedProjectile.java +++ b/src/main/java/com/minelittlepony/unicopia/util/projectile/IAdvancedProjectile.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.redux.util.projectile; +package com.minelittlepony.unicopia.util.projectile; -import com.minelittlepony.unicopia.redux.magic.ITossedEffect; +import com.minelittlepony.unicopia.magic.ITossedEffect; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/projectile/ITossable.java b/src/main/java/com/minelittlepony/unicopia/util/projectile/ITossable.java similarity index 85% rename from src/main/java/com/minelittlepony/unicopia/core/util/projectile/ITossable.java rename to src/main/java/com/minelittlepony/unicopia/util/projectile/ITossable.java index e5641d84..5a8f5cd1 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/projectile/ITossable.java +++ b/src/main/java/com/minelittlepony/unicopia/util/projectile/ITossable.java @@ -1,6 +1,6 @@ -package com.minelittlepony.unicopia.core.util.projectile; +package com.minelittlepony.unicopia.util.projectile; -import com.minelittlepony.unicopia.core.magic.ICaster; +import com.minelittlepony.unicopia.magic.ICaster; import net.minecraft.block.BlockState; import net.minecraft.sound.SoundEvent; diff --git a/src/main/java/com/minelittlepony/unicopia/redux/util/projectile/ITossableItem.java b/src/main/java/com/minelittlepony/unicopia/util/projectile/ITossableItem.java similarity index 92% rename from src/main/java/com/minelittlepony/unicopia/redux/util/projectile/ITossableItem.java rename to src/main/java/com/minelittlepony/unicopia/util/projectile/ITossableItem.java index e9331e16..d6c24471 100644 --- a/src/main/java/com/minelittlepony/unicopia/redux/util/projectile/ITossableItem.java +++ b/src/main/java/com/minelittlepony/unicopia/util/projectile/ITossableItem.java @@ -1,10 +1,9 @@ -package com.minelittlepony.unicopia.redux.util.projectile; +package com.minelittlepony.unicopia.util.projectile; import javax.annotation.Nullable; -import com.minelittlepony.unicopia.core.magic.IDispensable; -import com.minelittlepony.unicopia.core.util.projectile.ITossable; -import com.minelittlepony.unicopia.redux.entity.ProjectileEntity; +import com.minelittlepony.unicopia.entity.ProjectileEntity; +import com.minelittlepony.unicopia.magic.IDispensable; import net.minecraft.block.DispenserBlock; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/projectile/ProjectileUtil.java b/src/main/java/com/minelittlepony/unicopia/util/projectile/ProjectileUtil.java similarity index 97% rename from src/main/java/com/minelittlepony/unicopia/core/util/projectile/ProjectileUtil.java rename to src/main/java/com/minelittlepony/unicopia/util/projectile/ProjectileUtil.java index 72336d31..8feb9a0b 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/projectile/ProjectileUtil.java +++ b/src/main/java/com/minelittlepony/unicopia/util/projectile/ProjectileUtil.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.projectile; +package com.minelittlepony.unicopia.util.projectile; import javax.annotation.Nullable; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/shape/IShape.java b/src/main/java/com/minelittlepony/unicopia/util/shape/IShape.java similarity index 94% rename from src/main/java/com/minelittlepony/unicopia/core/util/shape/IShape.java rename to src/main/java/com/minelittlepony/unicopia/util/shape/IShape.java index 604e3342..3261b545 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/shape/IShape.java +++ b/src/main/java/com/minelittlepony/unicopia/util/shape/IShape.java @@ -1,9 +1,9 @@ -package com.minelittlepony.unicopia.core.util.shape; +package com.minelittlepony.unicopia.util.shape; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; -import com.minelittlepony.unicopia.core.util.Iterators; +import com.minelittlepony.unicopia.util.Iterators; import net.minecraft.util.math.Vec3d; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/shape/Line.java b/src/main/java/com/minelittlepony/unicopia/util/shape/Line.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/util/shape/Line.java rename to src/main/java/com/minelittlepony/unicopia/util/shape/Line.java index e591bf20..c1c4e24d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/shape/Line.java +++ b/src/main/java/com/minelittlepony/unicopia/util/shape/Line.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.shape; +package com.minelittlepony.unicopia.util.shape; import java.util.Random; diff --git a/src/main/java/com/minelittlepony/unicopia/core/util/shape/Sphere.java b/src/main/java/com/minelittlepony/unicopia/util/shape/Sphere.java similarity index 98% rename from src/main/java/com/minelittlepony/unicopia/core/util/shape/Sphere.java rename to src/main/java/com/minelittlepony/unicopia/util/shape/Sphere.java index 93810c5f..5c3f497d 100644 --- a/src/main/java/com/minelittlepony/unicopia/core/util/shape/Sphere.java +++ b/src/main/java/com/minelittlepony/unicopia/util/shape/Sphere.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.core.util.shape; +package com.minelittlepony.unicopia.util.shape; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; diff --git a/src/main/java/com/minelittlepony/util/Color.java b/src/main/java/com/minelittlepony/util/Color.java new file mode 100644 index 00000000..0891e0a7 --- /dev/null +++ b/src/main/java/com/minelittlepony/util/Color.java @@ -0,0 +1,56 @@ +package com.minelittlepony.util; + +/** + * Colouration Utilities + */ +public interface Color { + + /** + * Returns the ALPHA channel for the given colour hex code. + */ + static float a(int hex) { + return (hex >> 24 & 255) / 255F; + } + + /** + * Returns the RED channel for the given colour hex code. + */ + static float r(int hex) { + return (hex >> 16 & 255) / 255F; + } + + /** + * Returns the GREEN channel for the given colour hex code. + */ + static float g(int hex) { + return (hex >> 8 & 255) / 255F; + } + + /** + * Returns the BLUE channel for the given colour hex code. + */ + static float b(int hex) { + return (hex & 255) / 255F; + } + + /** + * Converts the given rgb floats on a range of 0-1 into a colour hex code. + */ + static int argbToHex(float a, float r, float g, float b) { + return argbToHex((int)(a * 255), (int) (r * 255), (int) (g * 255), (int) (b * 255)); + } + + /** + * Converts the given rbg int on a range of 0-255 into a colour hex code. + */ + static int argbToHex(int a, int r, int g, int b) { + return (a << 24) | (r << 16) | (g << 8) | (b); + } + + /** + * Converts a colour hex code from BGR to RGB (and back). + */ + static int abgrToArgb(int color) { + return argbToHex(a(color), b(color), g(color), r(color)); + } +}