diff --git a/build.gradle b/build.gradle index dc07a56..b5e2268 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ plugins { apply plugin: 'net.minecraftforge.gradle' -version = '1.1.0' +version = '1.1.1' group = 'dev.zontreck.shapedaionresources' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'shapedaionresources' diff --git a/src/main/java/dev/zontreck/shapedaionresources/ShapedAionResources.java b/src/main/java/dev/zontreck/shapedaionresources/ShapedAionResources.java index bbc47f0..f0f9531 100644 --- a/src/main/java/dev/zontreck/shapedaionresources/ShapedAionResources.java +++ b/src/main/java/dev/zontreck/shapedaionresources/ShapedAionResources.java @@ -1,30 +1,65 @@ package dev.zontreck.shapedaionresources; +import java.util.Set; +import java.util.Map.Entry; + import com.mojang.logging.LogUtils; +import net.minecraft.core.Registry; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.server.ServerStartingEvent; +import net.minecraftforge.event.world.BiomeLoadingEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.slf4j.Logger; +import dev.zontreck.shapedaionresources.blocks.ModBlocks; +import dev.zontreck.shapedaionresources.configs.SARServerConfig; +import dev.zontreck.shapedaionresources.items.ModItems; +import dev.zontreck.shapedaionresources.ore.OreGenerator; + // The value here should match an entry in the META-INF/mods.toml file @Mod("shapedaionresources") public class ShapedAionResources { // Directly reference a slf4j logger public static final Logger LOGGER = LogUtils.getLogger(); + public static final String FIRST_JOIN_TAG = "dev.zontreck.shapedaionresources.firstjoin"; + public static final String MOD_ID = "shapedaionresources"; public ShapedAionResources() { + IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); // Register the setup method for modloading - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); + bus.addListener(this::setup); + ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, SARServerConfig.SPEC, "aion-rss-server.toml"); + + + // Register ourselves for server and other game events we are interested in + + + MinecraftForge.EVENT_BUS.register(this); + + + ModBlocks.register(bus); + ModItems.register(bus); } private void setup(final FMLCommonSetupEvent event) @@ -39,5 +74,49 @@ public class ShapedAionResources } + @SubscribeEvent + public static void biomeLoadingEvent(final BiomeLoadingEvent ev){ + //OreGenerator.generateOres(ev); + } + + @SubscribeEvent + public void onSpawn(EntityJoinWorldEvent ev){ + Level w = ev.getWorld(); + if(w.isClientSide){ + return; + } + + Entity e = ev.getEntity(); + if(!(e instanceof Player))return; + + Player p = (Player)e; + + if(firstJoin(p)){ + // Do first join actions here + + /*for (Entry ent : SARServerConfig.INITIAL_ITEMS_TO_GIVE_ON_FIRST_JOIN.get().entrySet()) { + + Inventory i = p.getInventory(); + + + }*/ + } + + } + + public boolean firstJoin(Player p){ + + Set tags = p.getTags(); + + if(tags.contains(ShapedAionResources.FIRST_JOIN_TAG)){ + return false; + } + + //p.addTag(ShapedAionResources.FIRST_JOIN_TAG); + + + return true; + } + } diff --git a/src/main/java/dev/zontreck/shapedaionresources/blocks/ModBlocks.java b/src/main/java/dev/zontreck/shapedaionresources/blocks/ModBlocks.java new file mode 100644 index 0000000..3bf9b58 --- /dev/null +++ b/src/main/java/dev/zontreck/shapedaionresources/blocks/ModBlocks.java @@ -0,0 +1,40 @@ +package dev.zontreck.shapedaionresources.blocks; + +import java.util.function.Supplier; + +import dev.zontreck.shapedaionresources.ShapedAionResources; +import dev.zontreck.shapedaionresources.items.ModItems; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.OreBlock; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.material.Material; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModBlocks { + public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ShapedAionResources.MOD_ID); + public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ShapedAionResources.MOD_ID); + + public static void register(IEventBus bus){ + BLOCKS.register(bus); + ITEMS.register(bus); + ShapedAionResources.LOGGER.info("Registering all blocks..."); + } + + + + public static final RegistryObject AION_ORE_BLOCK = BLOCKS.register("aion_ore_block", () -> new OreBlock(BlockBehaviour.Properties.of(Material.METAL))); + + public static final RegistryObject AION_ORE_BLOCK_I = ITEMS.register("aion_ore_block", () -> new BlockItem(AION_ORE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC))); + + public static final RegistryObject AION_BLOCK = BLOCKS.register("aion_block", () -> new Block(BlockBehaviour.Properties.of(Material.HEAVY_METAL).explosionResistance(10000).requiresCorrectToolForDrops().strength(9f))); + + public static final RegistryObject AION_BLOCK_I = ITEMS.register("aion_block", () -> new BlockItem(AION_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC))); + +} diff --git a/src/main/java/dev/zontreck/shapedaionresources/configs/SARServerConfig.java b/src/main/java/dev/zontreck/shapedaionresources/configs/SARServerConfig.java new file mode 100644 index 0000000..2988708 --- /dev/null +++ b/src/main/java/dev/zontreck/shapedaionresources/configs/SARServerConfig.java @@ -0,0 +1,28 @@ +package dev.zontreck.shapedaionresources.configs; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.world.item.ItemStack; +import net.minecraftforge.common.ForgeConfigSpec; + +public class SARServerConfig { + public static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder(); + public static final ForgeConfigSpec SPEC; + + public static final ForgeConfigSpec.ConfigValue> INITIAL_ITEMS_TO_GIVE_ON_FIRST_JOIN; + + + static { + List defaults = new ArrayList(); + + BUILDER.push("Configuration for Shaped Aion Cubes Resources"); + INITIAL_ITEMS_TO_GIVE_ON_FIRST_JOIN = BUILDER.comment("What items, identified by modid:item, to give to a brand new user on the server").define("New Player Gear", defaults); + + BUILDER.pop(); + SPEC=BUILDER.build(); + } +} diff --git a/src/main/java/dev/zontreck/shapedaionresources/items/ModItems.java b/src/main/java/dev/zontreck/shapedaionresources/items/ModItems.java new file mode 100644 index 0000000..abc8998 --- /dev/null +++ b/src/main/java/dev/zontreck/shapedaionresources/items/ModItems.java @@ -0,0 +1,26 @@ +package dev.zontreck.shapedaionresources.items; + +import dev.zontreck.shapedaionresources.ShapedAionResources; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModItems { + public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ShapedAionResources.MOD_ID); + + public static final RegistryObject AION_FRAGMENT = ITEMS.register("aion_fragment", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC))); + + public static final RegistryObject AION_CRYSTAL = ITEMS.register("aion_crystal", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC))); + + + public static final RegistryObject AION_RAW_ORE = ITEMS.register("aion_ore", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC))); + + + public static void register(IEventBus bus){ + ITEMS.register(bus); + } + +} diff --git a/src/main/java/dev/zontreck/shapedaionresources/ore/ModdedOrePlacement.java b/src/main/java/dev/zontreck/shapedaionresources/ore/ModdedOrePlacement.java new file mode 100644 index 0000000..2e8d70f --- /dev/null +++ b/src/main/java/dev/zontreck/shapedaionresources/ore/ModdedOrePlacement.java @@ -0,0 +1,24 @@ +package dev.zontreck.shapedaionresources.ore; + +import java.util.List; + +import net.minecraft.world.level.levelgen.placement.BiomeFilter; +import net.minecraft.world.level.levelgen.placement.CountPlacement; +import net.minecraft.world.level.levelgen.placement.InSquarePlacement; +import net.minecraft.world.level.levelgen.placement.PlacementModifier; +import net.minecraft.world.level.levelgen.placement.RarityFilter; + +public class ModdedOrePlacement { + public static List orePlacement(PlacementModifier p_195347_, PlacementModifier p_195348_) { + return List.of(p_195347_, InSquarePlacement.spread(), p_195348_, BiomeFilter.biome()); + } + + public static List commonOrePlacement(int p_195344_, PlacementModifier p_195345_) { + return orePlacement(CountPlacement.of(p_195344_), p_195345_); + } + + public static List rareOrePlacement(int p_195350_, PlacementModifier p_195351_) { + return orePlacement(RarityFilter.onAverageOnceEvery(p_195350_), p_195351_); + } + +} diff --git a/src/main/java/dev/zontreck/shapedaionresources/ore/OreGenerator.java b/src/main/java/dev/zontreck/shapedaionresources/ore/OreGenerator.java new file mode 100644 index 0000000..dc03174 --- /dev/null +++ b/src/main/java/dev/zontreck/shapedaionresources/ore/OreGenerator.java @@ -0,0 +1,48 @@ +package dev.zontreck.shapedaionresources.ore; + +import java.util.ArrayList; +import java.util.List; + +import dev.zontreck.shapedaionresources.blocks.ModBlocks; +import net.minecraft.core.Holder; +import net.minecraft.data.worldgen.features.FeatureUtils; +import net.minecraft.data.worldgen.features.OreFeatures; +import net.minecraft.data.worldgen.placement.PlacementUtils; +import net.minecraft.data.worldgen.placement.VegetationPlacements; +import net.minecraft.world.level.levelgen.GenerationStep; +import net.minecraft.world.level.levelgen.VerticalAnchor; +import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.feature.OreFeature; +import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration; +import net.minecraft.world.level.levelgen.placement.HeightRangePlacement; +import net.minecraft.world.level.levelgen.placement.PlacedFeature; +import net.minecraftforge.event.world.BiomeLoadingEvent; + +public class OreGenerator { + public static final List> OVERWORLD_ORES = new ArrayList(); + + + public static final List OVERWORLD_AION_ORE = List.of(OreConfiguration.target(OreFeatures.STONE_ORE_REPLACEABLES, ModBlocks.AION_ORE_BLOCK.get().defaultBlockState()), OreConfiguration.target(OreFeatures.DEEPSLATE_ORE_REPLACEABLES, ModBlocks.AION_ORE_BLOCK.get().defaultBlockState())); + + public static final Holder> AION_ORE = FeatureUtils.register("aion_ore_block", Feature.ORE, new OreConfiguration(OVERWORLD_AION_ORE, 9)); + + + //public static final Holder EBONY_PLACED = PlacementUtils.register("ebony_placed", + //ModConfiguredFeatures.EBONY_SPAWN, VegetationPlacements.treePlacement( + //PlacementUtils.countExtra(3, 0.1f, 2))); + + //public static final Holder PINK_ROSE_PLACED = PlacementUtils.register("pink_rose_placed", + //ModConfiguredFeatures.PINK_ROSE, RarityFilter.onAverageOnceEvery(16), + //InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome()); + + public static final Holder AION_ORE_PLACED = PlacementUtils.register("aion_ore_placed", + AION_ORE, ModdedOrePlacement.commonOrePlacement(6, // VeinsPerChunk + HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-40), VerticalAnchor.aboveBottom(40)))); + + public static void generateOres(final BiomeLoadingEvent ev){ + List> base = ev.getGeneration().getFeatures(GenerationStep.Decoration.UNDERGROUND_ORES); + + base.add(AION_ORE_PLACED); + } +} diff --git a/src/main/resources/assets/shapedaionresources/blockstates/aion_block.json b/src/main/resources/assets/shapedaionresources/blockstates/aion_block.json new file mode 100644 index 0000000..8a4e692 --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/blockstates/aion_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "shapedaionresources:block/aion_block" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/shapedaionresources/blockstates/aion_ore_block.json b/src/main/resources/assets/shapedaionresources/blockstates/aion_ore_block.json new file mode 100644 index 0000000..8a71832 --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/blockstates/aion_ore_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "shapedaionresources:block/aion_ore_block" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/shapedaionresources/icon.png b/src/main/resources/assets/shapedaionresources/icon.png new file mode 100644 index 0000000..812932a Binary files /dev/null and b/src/main/resources/assets/shapedaionresources/icon.png differ diff --git a/src/main/resources/assets/shapedaionresources/lang/en_us.json b/src/main/resources/assets/shapedaionresources/lang/en_us.json new file mode 100644 index 0000000..afa6ec0 --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/lang/en_us.json @@ -0,0 +1,16 @@ +{ + "itemGroup.refinedfabric.materials": "RefinedFabric Materials", + "itemGroup.refinedfabric.tools": "RefinedFabric Utilities", + "itemGroup.refinedfabric.blocks": "RefinedFabric Blocks", + + "item.shapedaionresources.aion_ore": "Raw Aion Ore", + "item.shapedaionresources.aion_crystal": "Aion Crystal", + "item.shapedaionresources.aion_crystal.levels": "Stored XP: ", + "item.shapedaionresources.aion_crystal.empty": "* Crystal Is Empty *", + "item.shapedaionresources.aion_crystal.need_repair": "Aion Crystal must now be repaired", + "item.shapedaionresources.aion_crystal.durability": "Durability: ", + "item.shapedaionresources.aion_fragment": "Fragmented Aion Crystal", + + "block.shapedaionresources.aion_ore_block": "Aion Ore", + "block.shapedaionresources.aion_block": "Aion Block" +} \ No newline at end of file diff --git a/src/main/resources/assets/shapedaionresources/models/block/aion_block.json b/src/main/resources/assets/shapedaionresources/models/block/aion_block.json new file mode 100644 index 0000000..96ba5da --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/models/block/aion_block.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "shapedaionresources:block/aion_block" + } +} diff --git a/src/main/resources/assets/shapedaionresources/models/block/aion_ore_block.json b/src/main/resources/assets/shapedaionresources/models/block/aion_ore_block.json new file mode 100644 index 0000000..86ec084 --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/models/block/aion_ore_block.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "shapedaionresources:block/aion_ore_block" + } +} diff --git a/src/main/resources/assets/shapedaionresources/models/item/aion_block.json b/src/main/resources/assets/shapedaionresources/models/item/aion_block.json new file mode 100644 index 0000000..0fb860a --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/models/item/aion_block.json @@ -0,0 +1,3 @@ +{ + "parent": "shapedaionresources:block/aion_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/shapedaionresources/models/item/aion_crystal.json b/src/main/resources/assets/shapedaionresources/models/item/aion_crystal.json new file mode 100644 index 0000000..b619034 --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/models/item/aion_crystal.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "shapedaionresources:item/aion_crystal" + } +} diff --git a/src/main/resources/assets/shapedaionresources/models/item/aion_fragment.json b/src/main/resources/assets/shapedaionresources/models/item/aion_fragment.json new file mode 100644 index 0000000..e94c53d --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/models/item/aion_fragment.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "shapedaionresources:item/aion_fragment" + } +} diff --git a/src/main/resources/assets/shapedaionresources/models/item/aion_ore.json b/src/main/resources/assets/shapedaionresources/models/item/aion_ore.json new file mode 100644 index 0000000..7143fc1 --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/models/item/aion_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "shapedaionresources:item/aion_ore" + } +} diff --git a/src/main/resources/assets/shapedaionresources/models/item/aion_ore_block.json b/src/main/resources/assets/shapedaionresources/models/item/aion_ore_block.json new file mode 100644 index 0000000..4daa4e9 --- /dev/null +++ b/src/main/resources/assets/shapedaionresources/models/item/aion_ore_block.json @@ -0,0 +1,3 @@ +{ + "parent": "shapedaionresources:block/aion_ore_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/shapedaionresources/textures/block/aion_block.png b/src/main/resources/assets/shapedaionresources/textures/block/aion_block.png new file mode 100644 index 0000000..4483b1c Binary files /dev/null and b/src/main/resources/assets/shapedaionresources/textures/block/aion_block.png differ diff --git a/src/main/resources/assets/shapedaionresources/textures/block/aion_ore_block.png b/src/main/resources/assets/shapedaionresources/textures/block/aion_ore_block.png new file mode 100644 index 0000000..b6d43dd Binary files /dev/null and b/src/main/resources/assets/shapedaionresources/textures/block/aion_ore_block.png differ diff --git a/src/main/resources/assets/shapedaionresources/textures/entity/elytra.png b/src/main/resources/assets/shapedaionresources/textures/entity/elytra.png new file mode 100644 index 0000000..0390b25 Binary files /dev/null and b/src/main/resources/assets/shapedaionresources/textures/entity/elytra.png differ diff --git a/src/main/resources/assets/shapedaionresources/textures/item/aion_crystal.png b/src/main/resources/assets/shapedaionresources/textures/item/aion_crystal.png new file mode 100644 index 0000000..18d53b7 Binary files /dev/null and b/src/main/resources/assets/shapedaionresources/textures/item/aion_crystal.png differ diff --git a/src/main/resources/assets/shapedaionresources/textures/item/aion_fragment.png b/src/main/resources/assets/shapedaionresources/textures/item/aion_fragment.png new file mode 100644 index 0000000..bc03c74 Binary files /dev/null and b/src/main/resources/assets/shapedaionresources/textures/item/aion_fragment.png differ diff --git a/src/main/resources/assets/shapedaionresources/textures/item/aion_ore.png b/src/main/resources/assets/shapedaionresources/textures/item/aion_ore.png new file mode 100644 index 0000000..9db390f Binary files /dev/null and b/src/main/resources/assets/shapedaionresources/textures/item/aion_ore.png differ diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json new file mode 100644 index 0000000..69504c5 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "shapedaionresources:aion_ore_block" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/needs_iron_tool.json b/src/main/resources/data/minecraft/tags/blocks/needs_iron_tool.json new file mode 100644 index 0000000..69504c5 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/needs_iron_tool.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "shapedaionresources:aion_ore_block" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/origins/origin_layers/origin.json b/src/main/resources/data/origins/origin_layers/origin.json new file mode 100644 index 0000000..83da51d --- /dev/null +++ b/src/main/resources/data/origins/origin_layers/origin.json @@ -0,0 +1,7 @@ +{ + "origins": [ + "shapedaionresources:flutterling" + ], + "enabled": true, + "allow_random": true +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/loot_tables/blocks/aion_block.json b/src/main/resources/data/shapedaionresources/loot_tables/blocks/aion_block.json new file mode 100644 index 0000000..70ab8e1 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/loot_tables/blocks/aion_block.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "shapedaionresources:aion_block" + } + ] + } + ] + } + \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/loot_tables/blocks/aion_ore_block.json b/src/main/resources/data/shapedaionresources/loot_tables/blocks/aion_ore_block.json new file mode 100644 index 0000000..ecb975e --- /dev/null +++ b/src/main/resources/data/shapedaionresources/loot_tables/blocks/aion_ore_block.json @@ -0,0 +1,50 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "shapedaionresources:aion_ore_block" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:ore_drops" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "shapedaionresources:aion_ore" + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/origins/flutterling.json b/src/main/resources/data/shapedaionresources/origins/flutterling.json new file mode 100644 index 0000000..a258d9e --- /dev/null +++ b/src/main/resources/data/shapedaionresources/origins/flutterling.json @@ -0,0 +1,23 @@ +{ + "name": "Flutterling", + "description": "Flutterlings are tiny, moth-like fae creatures that love living in the hollows of trees. While they are weak and fragile, they can easily climb or fly out of danger when faced with it.", + "powers": [ + "flutterling:flutter", + "flutterling:night_vision", + "flutterling:flight", + "flutterling:nocturnal", + "flutterling:soundeffect", + "flutterling:armor_allergy", + "flutterling:armor_weight", + "flutterling:fae_weakness", + "flutterling:soul_lantern_allergy", + "flutterling:tiny_fae", + "extraorigins:nimble", + "extraorigins:small_appetite", + "origins:climbing" + ], + "icon": { + "item": "minecraft:feather" + }, + "impact": 3 +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/armor_allergy.json b/src/main/resources/data/shapedaionresources/powers/armor_allergy.json new file mode 100644 index 0000000..603e2cf --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/armor_allergy.json @@ -0,0 +1,31 @@ +{ + "name": "Armor allergy", + "description": "You are very small, and struggle to wear armor without being weighed down. Additionally, you are allergic to pure iron armor, and cannot wear it.", + "hidden": true, + "type": "origins:conditioned_restrict_armor", + "head": { + "type": "origins:ingredient", + "ingredient": { + "item": "minecraft:iron_helmet" + } + }, + "chest": { + "type": "origins:ingredient", + "ingredient": { + "item": "minecraft:iron_chestplate" + } + }, + "legs": { + "type": "origins:ingredient", + "ingredient": { + "item": "minecraft:iron_leggings" + } + }, + "feet": { + "type": "origins:ingredient", + "ingredient": { + "item": "minecraft:iron_boots" + } + }, + "tick_rate": 80 +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/armor_weight.json b/src/main/resources/data/shapedaionresources/powers/armor_weight.json new file mode 100644 index 0000000..c501f94 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/armor_weight.json @@ -0,0 +1,26 @@ +{ + "name": "Armor Difficulties", + "description": "You are very small, and struggle to wear armor without being weighed down. Additionally, you are allergic to pure iron armor, and cannot wear it.", + "type": "origins:conditioned_restrict_armor", + "head": { + "type": "origins:armor_value", + "comparison": ">", + "compare_to": 2 + }, + "chest": { + "type": "origins:armor_value", + "comparison": ">", + "compare_to": 6 + }, + "legs": { + "type": "origins:armor_value", + "comparison": ">", + "compare_to": 5 + }, + "feet": { + "type": "origins:armor_value", + "comparison": ">", + "compare_to": 2 + }, + "tick_rate": 80 +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/fae_weakness.json b/src/main/resources/data/shapedaionresources/powers/fae_weakness.json new file mode 100644 index 0000000..cf4e664 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/fae_weakness.json @@ -0,0 +1,27 @@ +{ + "name": "Fae Weakness", + "description": "Your fae nature means that you are allergic to some variants of iron. The heat of fire within lanterns make you feel weak.", + "condition": { + "type": "origins:block_in_radius", + "block_condition": { + "type": "origins:block", + "block": "minecraft:lantern" + }, + "radius": 1, + "shape": "cube", + "comparison": ">=", + "compare_to": 1 + }, + "type": "origins:action_over_time", + "interval": 3, + "entity_action": { + "type": "origins:apply_effect", + "effect": { + "effect": "minecraft:mining_fatigue", + "duration": 10, + "amplifier": 1, + "show_particles": false, + "show_icon": false + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/flight.json b/src/main/resources/data/shapedaionresources/powers/flight.json new file mode 100644 index 0000000..bbe2bd4 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/flight.json @@ -0,0 +1,7 @@ +{ + "name": "Weak Wings", + "description": "While you can glide like the best of them, you can only fly with some effort, fluttering to slowly gain altitude while gliding.", + "type": "origins:elytra_flight", + "render_elytra": true, + "texture_location": "flutterling:textures/entity/elytra.png" +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/flutter.json b/src/main/resources/data/shapedaionresources/powers/flutter.json new file mode 100644 index 0000000..97daf04 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/flutter.json @@ -0,0 +1,20 @@ +{ + "name": "flutter", + "hidden": true, + "type": "origins:active_self", + "entity_action": { + "type": "origins:add_velocity", + "y": 0.3, + "space": "world", + "client": true, + "server": true + }, + "cooldown": 10, + "hud_render": { + "should_render": false + }, + "key": { + "key": "key.origins.secondary_active", + "continuous": true + } +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/night_vision.json b/src/main/resources/data/shapedaionresources/powers/night_vision.json new file mode 100644 index 0000000..9ac9bd0 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/night_vision.json @@ -0,0 +1,7 @@ +{ + "name": "Night Vision", + "description": "Your big eyes have adapted to see within dark spaces.", + "hidden": true, + "type": "origins:night_vision", + "strength": 1 +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/nocturnal.json b/src/main/resources/data/shapedaionresources/powers/nocturnal.json new file mode 100644 index 0000000..e445e84 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/nocturnal.json @@ -0,0 +1,27 @@ +{ + "name": "Nocturnal", + "description": "You are naturally nocturnal, and find yourself weaker when in the extreme brightness of sunlight. On the other hand, your adaptation to darkness means that you can see clearly even in pitch black.", + "condition": { + "type": "origins:and", + "conditions": [ + { + "type": "origins:exposed_to_sun" + } + ] + }, + "type": "origins:stacking_status_effect", + "min_stacks": 0, + "max_stacks": 2, + "duration_per_stack": 30, + "tick_rate": 10, + "effects": [ + { + "effect": "minecraft:weakness", + "duration": 100, + "amplifier": 0, + "is_ambient": true, + "show_particles": false, + "show_icon": true + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/soul_lantern_allergy.json b/src/main/resources/data/shapedaionresources/powers/soul_lantern_allergy.json new file mode 100644 index 0000000..8c61d92 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/soul_lantern_allergy.json @@ -0,0 +1,28 @@ +{ + "name": "lantern allergy", + "description": "Your fae nature means that you are allergic to some variants of iron. The heat of fire within lanterns make you feel weak.", + "hidden": true, + "condition": { + "type": "origins:block_in_radius", + "block_condition": { + "type": "origins:block", + "block": "minecraft:soul_lantern" + }, + "radius": 1, + "shape": "cube", + "comparison": ">=", + "compare_to": 1 + }, + "type": "origins:action_over_time", + "interval": 3, + "entity_action": { + "type": "origins:apply_effect", + "effect": { + "effect": "minecraft:mining_fatigue", + "duration": 10, + "amplifier": 1, + "show_particles": false, + "show_icon": false + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/soundeffect.json b/src/main/resources/data/shapedaionresources/powers/soundeffect.json new file mode 100644 index 0000000..55884d2 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/soundeffect.json @@ -0,0 +1,18 @@ +{ + "hidden": true, + "type": "origins:active_self", + "entity_action": { + "type": "origins:play_sound", + "sound": "minecraft:entity.parrot.fly", + "volume": 1, + "pitch": 1 + }, + "cooldown": 10, + "hud_render": { + "should_render": false + }, + "key": { + "key": "key.origins.secondary_active", + "continuous": true + } +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/powers/tiny_fae.json b/src/main/resources/data/shapedaionresources/powers/tiny_fae.json new file mode 100644 index 0000000..8b28941 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/powers/tiny_fae.json @@ -0,0 +1,53 @@ +{ + "name": "Tiny Faerie", + "description": "You are tiny due to being a magical moth-like creature. You have only 5 hearts and less reach, and are only half a block tall.", + + "type": "origins:multiple", + "modify_size": { + "type": "extraorigins:modify_size", + "scale": 0.25 + }, + "attribute_modifiers": { + "type": "origins:attribute", + "modifiers": [ + { + "name": "Origin modifier", + "attribute": "minecraft:generic.max_health", + "operation": "addition", + "value": -10 + }, + { + "name": "Origin modifier", + "attribute": "minecraft:generic.attack_speed", + "operation": "addition", + "value": 0.5 + }, + { + "name": "Origin modifier", + "attribute": "minecraft:generic.movement_speed", + "operation": "addition", + "value": -0.015 + }, + { + "name": "Origin modifier", + "attribute": "reach-entity-attributes:attack_range", + "operation": "addition", + "value": -0.25 + }, + { + "name": "Origin modifier", + "attribute": "reach-entity-attributes:reach", + "operation": "addition", + "value": -1 + } + ] + }, + "jump_modifier": { + "type": "origins:modify_jump", + "modifier": { + "name": "Origin modifier", + "operation": "multiply_total", + "value": -0.3333 + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/recipes/aion_block.json b/src/main/resources/data/shapedaionresources/recipes/aion_block.json new file mode 100644 index 0000000..51d238f --- /dev/null +++ b/src/main/resources/data/shapedaionresources/recipes/aion_block.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "CCC", + "CNC", + "CCC" + ], + "key": { + "C": { + "item": "shapedaionresources:aion_crystal" + }, + "N": { + "item": "minecraft:nether_star" + } + }, + "result": { + "item": "shapedaionresources:aion_block", + "count": 1 + } + } \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/recipes/aion_crystal.json b/src/main/resources/data/shapedaionresources/recipes/aion_crystal.json new file mode 100644 index 0000000..eb14b03 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/recipes/aion_crystal.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " F ", + "FGF", + " F " + ], + "key": { + "F": { + "item": "shapedaionresources:aion_fragment" + }, + "G": { + "item": "minecraft:emerald" + } + }, + "result": { + "item": "shapedaionresources:aion_crystal", + "count": 1 + } + } \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/recipes/aion_fragment.json b/src/main/resources/data/shapedaionresources/recipes/aion_fragment.json new file mode 100644 index 0000000..e316da3 --- /dev/null +++ b/src/main/resources/data/shapedaionresources/recipes/aion_fragment.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "item": "shapedaionresources:aion_ore_block" + }, + "result": "shapedaionresources:aion_fragment", + "experience": 0.5 +} \ No newline at end of file diff --git a/src/main/resources/data/shapedaionresources/recipes/aion_fragment_from_raw.json b/src/main/resources/data/shapedaionresources/recipes/aion_fragment_from_raw.json new file mode 100644 index 0000000..886649e --- /dev/null +++ b/src/main/resources/data/shapedaionresources/recipes/aion_fragment_from_raw.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "item": "shapedaionresources:aion_ore" + }, + "result": "shapedaionresources:aion_fragment", + "experience": 0.5 +} \ No newline at end of file