From c744963cfaf930c0c1619e3fedfe6cd15d3dfa52 Mon Sep 17 00:00:00 2001 From: klikli-dev Date: Wed, 25 Mar 2020 16:11:34 +0100 Subject: [PATCH 1/5] removed misleading comment --- .../klikli_dev/occultism/common/job/ChangeWeatherJob.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/com/github/klikli_dev/occultism/common/job/ChangeWeatherJob.java b/src/main/java/com/github/klikli_dev/occultism/common/job/ChangeWeatherJob.java index 8b61852b9..04e0720bc 100644 --- a/src/main/java/com/github/klikli_dev/occultism/common/job/ChangeWeatherJob.java +++ b/src/main/java/com/github/klikli_dev/occultism/common/job/ChangeWeatherJob.java @@ -34,9 +34,6 @@ public abstract class ChangeWeatherJob extends SpiritJob { //region Fields - /** - * The current ticks in the crushing, will crush once it reaches crushing_time * crushingTimeMultiplier - */ protected int currentChangeTicks; protected int requiredChangeTicks; //endregion Fields From ae06bbcca0639291b002212c6ff225f7290e5212 Mon Sep 17 00:00:00 2001 From: klikli-dev Date: Wed, 25 Mar 2020 16:12:21 +0100 Subject: [PATCH 2/5] added jobs for time changing --- .../occultism/common/job/ChangeTimeJob.java | 118 ++++++++++++++++++ .../occultism/common/job/DayTimeJob.java | 44 +++++++ .../occultism/common/job/NightTimeJob.java | 44 +++++++ .../registry/OccultismSpiritJobs.java | 7 ++ 4 files changed, 213 insertions(+) create mode 100644 src/main/java/com/github/klikli_dev/occultism/common/job/ChangeTimeJob.java create mode 100644 src/main/java/com/github/klikli_dev/occultism/common/job/DayTimeJob.java create mode 100644 src/main/java/com/github/klikli_dev/occultism/common/job/NightTimeJob.java diff --git a/src/main/java/com/github/klikli_dev/occultism/common/job/ChangeTimeJob.java b/src/main/java/com/github/klikli_dev/occultism/common/job/ChangeTimeJob.java new file mode 100644 index 000000000..900fd35fb --- /dev/null +++ b/src/main/java/com/github/klikli_dev/occultism/common/job/ChangeTimeJob.java @@ -0,0 +1,118 @@ +/* + * MIT License + * + * Copyright 2020 klikli-dev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT + * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.github.klikli_dev.occultism.common.job; + +import com.github.klikli_dev.occultism.common.entity.spirit.SpiritEntity; +import net.minecraft.entity.effect.LightningBoltEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.util.DamageSource; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.world.server.ServerWorld; + +public abstract class ChangeTimeJob extends SpiritJob { + + //region Fields + protected int currentChangeTicks; + protected int requiredChangeTicks; + //endregion Fields + + + //region Initialization + public ChangeTimeJob(SpiritEntity entity, int requiredChangeTicks) { + super(entity); + this.requiredChangeTicks = requiredChangeTicks; + } + //endregion Initialization + + //region Overrides + + @Override + public void init() { + + } + + @Override + public void cleanup() { + //in this case called on spirit death + for(int i = 0; i < 5; i++){ + ((ServerWorld) this.entity.world) + .spawnParticle(ParticleTypes.PORTAL, this.entity.getPosX() + this.entity.world.getRandom().nextGaussian(), + this.entity.getPosY() + 0.5 + this.entity.world.getRandom().nextGaussian(), this.entity.getPosZ()+ this.entity.world.getRandom().nextGaussian(), 5, + 0.0, 0.0, 0.0, + 0.0); + } + + } + + @Override + public void update() { + super.update(); + + this.currentChangeTicks++; + if(!this.entity.isSwingInProgress){ + this.entity.swingArm(Hand.MAIN_HAND); + } + if(this.entity.world.getGameTime() % 2 == 0){ + ((ServerWorld) this.entity.world) + .spawnParticle(ParticleTypes.PORTAL, this.entity.getPosX(), + this.entity.getPosY() + 0.5, this.entity.getPosZ(), 3, + 0.5, 0.0, 0.0, + 0.0); + } + + if (this.currentChangeTicks == this.requiredChangeTicks) { + this.changeTime(); + this.entity.world.playSound(null, this.entity.getPosition(), SoundEvents.BLOCK_BEACON_ACTIVATE, SoundCategory.NEUTRAL, 1, 1); + this.entity.onDeath(DamageSource.OUT_OF_WORLD); + this.entity.remove(); + } + } + + @Override + public CompoundNBT writeJobToNBT(CompoundNBT compound) { + compound.putInt("currentChangeTicks", this.currentChangeTicks); + compound.putInt("requiredChangeTicks", this.requiredChangeTicks); + return super.writeJobToNBT(compound); + } + + @Override + public void readJobFromNBT(CompoundNBT compound) { + super.readJobFromNBT(compound); + this.currentChangeTicks = compound.getInt("currentChangeTicks"); + this.requiredChangeTicks = compound.getInt("requiredChangeTicks"); + } + + @Override + public boolean canPickupItem(ItemStack stack) { + return false; + } + //endregion Overrides + + //region Methods + public abstract void changeTime(); + //endregion Methods +} diff --git a/src/main/java/com/github/klikli_dev/occultism/common/job/DayTimeJob.java b/src/main/java/com/github/klikli_dev/occultism/common/job/DayTimeJob.java new file mode 100644 index 000000000..27b438dc0 --- /dev/null +++ b/src/main/java/com/github/klikli_dev/occultism/common/job/DayTimeJob.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright 2020 klikli-dev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT + * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.github.klikli_dev.occultism.common.job; + +import com.github.klikli_dev.occultism.common.entity.spirit.SpiritEntity; +import net.minecraft.world.server.ServerWorld; + +public class DayTimeJob extends ChangeTimeJob { + + //region Initialization + public DayTimeJob(SpiritEntity entity, int ticksToClear) { + super(entity, ticksToClear); + } + //endregion Initialization + + //region Overrides + @Override + public void changeTime() { + ServerWorld world = (ServerWorld) this.entity.world; + world.setDayTime(1000); + } + //endregion Overrides + +} diff --git a/src/main/java/com/github/klikli_dev/occultism/common/job/NightTimeJob.java b/src/main/java/com/github/klikli_dev/occultism/common/job/NightTimeJob.java new file mode 100644 index 000000000..d024e2dc6 --- /dev/null +++ b/src/main/java/com/github/klikli_dev/occultism/common/job/NightTimeJob.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright 2020 klikli-dev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT + * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.github.klikli_dev.occultism.common.job; + +import com.github.klikli_dev.occultism.common.entity.spirit.SpiritEntity; +import net.minecraft.world.server.ServerWorld; + +public class NightTimeJob extends ChangeTimeJob { + + //region Initialization + public NightTimeJob(SpiritEntity entity, int ticksToClear) { + super(entity, ticksToClear); + } + //endregion Initialization + + //region Overrides + @Override + public void changeTime() { + ServerWorld world = (ServerWorld) this.entity.world; + world.setDayTime(13000); + } + //endregion Overrides + +} diff --git a/src/main/java/com/github/klikli_dev/occultism/registry/OccultismSpiritJobs.java b/src/main/java/com/github/klikli_dev/occultism/registry/OccultismSpiritJobs.java index e47d116c7..1caee268a 100644 --- a/src/main/java/com/github/klikli_dev/occultism/registry/OccultismSpiritJobs.java +++ b/src/main/java/com/github/klikli_dev/occultism/registry/OccultismSpiritJobs.java @@ -67,5 +67,12 @@ public class OccultismSpiritJobs { () -> new SpiritJobFactory((entity) -> new RainWeatherJob(entity, 20 * 30))); public static final RegistryObject THUNDER_WEATHER = JOBS.register("rain_thunder", () -> new SpiritJobFactory((entity) -> new ThunderWeatherJob(entity, 20 * 60))); + + //Time Jobs + public static final RegistryObject DAY_TIME = JOBS.register("day_time", + () -> new SpiritJobFactory((entity) -> new DayTimeJob(entity, 20 * 30))); + public static final RegistryObject NIGHT_TIME = JOBS.register("night_time", + () -> new SpiritJobFactory((entity) -> new NightTimeJob(entity, 20 * 60))); + //endregion Fields } From dbf220fe1e18f41e26b4801446e5f013c3b17741 Mon Sep 17 00:00:00 2001 From: klikli-dev Date: Wed, 25 Mar 2020 16:21:39 +0100 Subject: [PATCH 3/5] added night and day time rituals and config --- .../ritual/SummonDjinniDayTimeRitual.java | 88 +++++++++++++++++++ .../ritual/SummonDjinniNightTimeRitual.java | 88 +++++++++++++++++++ .../occultism/config/OccultismConfig.java | 9 +- .../occultism/registry/OccultismRituals.java | 5 ++ 4 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonDjinniDayTimeRitual.java create mode 100644 src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonDjinniNightTimeRitual.java diff --git a/src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonDjinniDayTimeRitual.java b/src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonDjinniDayTimeRitual.java new file mode 100644 index 000000000..f4a2599d8 --- /dev/null +++ b/src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonDjinniDayTimeRitual.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright 2020 klikli-dev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT + * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.github.klikli_dev.occultism.common.ritual; + +import com.github.klikli_dev.occultism.Occultism; +import com.github.klikli_dev.occultism.common.entity.spirit.SpiritEntity; +import com.github.klikli_dev.occultism.common.job.SpiritJob; +import com.github.klikli_dev.occultism.common.tile.GoldenSacrificialBowlTileEntity; +import com.github.klikli_dev.occultism.registry.OccultismEntities; +import com.github.klikli_dev.occultism.registry.OccultismItems; +import com.github.klikli_dev.occultism.registry.OccultismRituals; +import com.github.klikli_dev.occultism.registry.OccultismSpiritJobs; +import com.github.klikli_dev.occultism.util.ItemNBTUtil; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; + +public class SummonDjinniDayTimeRitual extends SummonSpiritRitual { + + //region Initialization + public SummonDjinniDayTimeRitual() { + super(null, + OccultismRituals.SUMMON_DJINNI_PENTACLE.get(), + Ingredient.fromItems(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()), + "summon_djinni_day_time", 60); + } + //endregion Initialization + + //region Overrides + @Override + public void finish(World world, BlockPos goldenBowlPosition, GoldenSacrificialBowlTileEntity tileEntity, + PlayerEntity castingPlayer, ItemStack activationItem) { + + super.finish(world, goldenBowlPosition, tileEntity, castingPlayer, activationItem); + + //consume activation item + ItemStack copy = activationItem.copy(); + activationItem.shrink(1); + + ((ServerWorld) world).spawnParticle(ParticleTypes.LARGE_SMOKE, goldenBowlPosition.getX() + 0.5, + goldenBowlPosition.getY() + 0.5, goldenBowlPosition.getZ() + 0.5, 1, 0, 0, 0, 0); + + //set up the djinni entity + SpiritEntity spirit = OccultismEntities.DJINNI.get().create(world); + this.prepareSpiritForSpawn(spirit, world, goldenBowlPosition, castingPlayer, + ItemNBTUtil.getBoundSpiritName(copy)); + + //set up the job + SpiritJob job = OccultismSpiritJobs.DAY_TIME.get().create(spirit); + job.init(); + spirit.setJob(job); + spirit.setSpiritMaxAge(60); + + //notify players nearby and spawn + this.spawnEntity(spirit, world); + } + + @Override + public boolean identify(World world, BlockPos goldenBowlPosition, ItemStack activationItem) { + return Occultism.CONFIG.rituals.enableDayTimeRitual.get() && + super.identify(world, goldenBowlPosition, activationItem); + } + //endregion Overrides +} diff --git a/src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonDjinniNightTimeRitual.java b/src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonDjinniNightTimeRitual.java new file mode 100644 index 000000000..1f29dd24e --- /dev/null +++ b/src/main/java/com/github/klikli_dev/occultism/common/ritual/SummonDjinniNightTimeRitual.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright 2020 klikli-dev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT + * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.github.klikli_dev.occultism.common.ritual; + +import com.github.klikli_dev.occultism.Occultism; +import com.github.klikli_dev.occultism.common.entity.spirit.SpiritEntity; +import com.github.klikli_dev.occultism.common.job.SpiritJob; +import com.github.klikli_dev.occultism.common.tile.GoldenSacrificialBowlTileEntity; +import com.github.klikli_dev.occultism.registry.OccultismEntities; +import com.github.klikli_dev.occultism.registry.OccultismItems; +import com.github.klikli_dev.occultism.registry.OccultismRituals; +import com.github.klikli_dev.occultism.registry.OccultismSpiritJobs; +import com.github.klikli_dev.occultism.util.ItemNBTUtil; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.server.ServerWorld; + +public class SummonDjinniNightTimeRitual extends SummonSpiritRitual { + + //region Initialization + public SummonDjinniNightTimeRitual() { + super(null, + OccultismRituals.SUMMON_DJINNI_PENTACLE.get(), + Ingredient.fromItems(OccultismItems.BOOK_OF_BINDING_BOUND_DJINNI.get()), + "summon_djinni_night_time", 60); + } + //endregion Initialization + + //region Overrides + @Override + public void finish(World world, BlockPos goldenBowlPosition, GoldenSacrificialBowlTileEntity tileEntity, + PlayerEntity castingPlayer, ItemStack activationItem) { + + super.finish(world, goldenBowlPosition, tileEntity, castingPlayer, activationItem); + + //consume activation item + ItemStack copy = activationItem.copy(); + activationItem.shrink(1); + + ((ServerWorld) world).spawnParticle(ParticleTypes.LARGE_SMOKE, goldenBowlPosition.getX() + 0.5, + goldenBowlPosition.getY() + 0.5, goldenBowlPosition.getZ() + 0.5, 1, 0, 0, 0, 0); + + //set up the djinni entity + SpiritEntity spirit = OccultismEntities.DJINNI.get().create(world); + this.prepareSpiritForSpawn(spirit, world, goldenBowlPosition, castingPlayer, + ItemNBTUtil.getBoundSpiritName(copy)); + + //set up the job + SpiritJob job = OccultismSpiritJobs.NIGHT_TIME.get().create(spirit); + job.init(); + spirit.setJob(job); + spirit.setSpiritMaxAge(60); + + //notify players nearby and spawn + this.spawnEntity(spirit, world); + } + + @Override + public boolean identify(World world, BlockPos goldenBowlPosition, ItemStack activationItem) { + return Occultism.CONFIG.rituals.enableNightTimeRitual.get() && + super.identify(world, goldenBowlPosition, activationItem); + } + //endregion Overrides +} diff --git a/src/main/java/com/github/klikli_dev/occultism/config/OccultismConfig.java b/src/main/java/com/github/klikli_dev/occultism/config/OccultismConfig.java index a038cd878..700358f49 100644 --- a/src/main/java/com/github/klikli_dev/occultism/config/OccultismConfig.java +++ b/src/main/java/com/github/klikli_dev/occultism/config/OccultismConfig.java @@ -112,6 +112,8 @@ public class RitualSettings extends ConfigCategoryBase { public final CachedBoolean enableClearWeatherRitual; public final CachedBoolean enableRainWeatherRitual; public final CachedBoolean enableThunderWeatherRitual; + public final CachedBoolean enableDayTimeRitual; + public final CachedBoolean enableNightTimeRitual; //endregion Fields //region Initialization @@ -128,7 +130,12 @@ public RitualSettings(IConfigCache parent, ForgeConfigSpec.Builder builder) { this.enableThunderWeatherRitual = CachedBoolean.cache(this, builder.comment("Enables the ritual to start a thunderstorm.") .define("enableThunderWeatherRitual", true)); - + this.enableDayTimeRitual = CachedBoolean.cache(this, + builder.comment("Enables the ritual to set time to day.") + .define("enableDayTimeRitual", true)); + this.enableNightTimeRitual = CachedBoolean.cache(this, + builder.comment("Enables the ritual to set time to night.") + .define("enableNightTimeRitual", true)); builder.pop(); } //endregion Initialization diff --git a/src/main/java/com/github/klikli_dev/occultism/registry/OccultismRituals.java b/src/main/java/com/github/klikli_dev/occultism/registry/OccultismRituals.java index cb3a1344b..2ae50e380 100644 --- a/src/main/java/com/github/klikli_dev/occultism/registry/OccultismRituals.java +++ b/src/main/java/com/github/klikli_dev/occultism/registry/OccultismRituals.java @@ -90,6 +90,11 @@ public class OccultismRituals { RITUALS.register("summon_wild_afrit", SummonWildAfritRitual::new); public static final RegistryObject SUMMON_WILD_HUNT_RITUAL = RITUALS.register("summon_wild_hunt", SummonWildAfritRitual::new); + public static final RegistryObject SUMMON_DJINNI_DAY_TIME_RITUAL = + RITUALS.register("summon_djinni_day_time", SummonDjinniDayTimeRitual::new); + public static final RegistryObject SUMMON_DJINNI_NIGHT_TIME_RITUAL = + RITUALS.register("summon_djinni_night_time", SummonDjinniNightTimeRitual::new); + //Crafting public static final RegistryObject CRAFT_STORAGE_CONTROLLER_BASE_RITUAL = RITUALS.register("craft_storage_controller_base", CraftStorageControllerBaseRitual::new); From 47be13ad908120da682e731797f83e8caf210379 Mon Sep 17 00:00:00 2001 From: klikli-dev Date: Wed, 25 Mar 2020 16:29:20 +0100 Subject: [PATCH 4/5] added recipes for ritual additional ingredients --- .../summon_djinni_day_time.json | 21 +++++++++++++++++++ .../summon_djinni_night_time.json | 21 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/main/resources/data/occultism/recipes/ritual_ingredients/summon_djinni_day_time.json create mode 100644 src/main/resources/data/occultism/recipes/ritual_ingredients/summon_djinni_night_time.json diff --git a/src/main/resources/data/occultism/recipes/ritual_ingredients/summon_djinni_day_time.json b/src/main/resources/data/occultism/recipes/ritual_ingredients/summon_djinni_day_time.json new file mode 100644 index 000000000..591c66609 --- /dev/null +++ b/src/main/resources/data/occultism/recipes/ritual_ingredients/summon_djinni_day_time.json @@ -0,0 +1,21 @@ +{ + "type": "occultism:spirit_trade", + "ingredients": [ + { + "item": "minecraft:torch" + }, + { + "tag": "minecraft:saplings" + }, + { + "item": "minecraft:wheat" + }, + { + "tag": "forge:dyes/yellow" + } + ], + "result": { + "_comment": "Unused", + "item": "occultism:pentacle" + } +} \ No newline at end of file diff --git a/src/main/resources/data/occultism/recipes/ritual_ingredients/summon_djinni_night_time.json b/src/main/resources/data/occultism/recipes/ritual_ingredients/summon_djinni_night_time.json new file mode 100644 index 000000000..fd6dfc984 --- /dev/null +++ b/src/main/resources/data/occultism/recipes/ritual_ingredients/summon_djinni_night_time.json @@ -0,0 +1,21 @@ +{ + "type": "occultism:spirit_trade", + "ingredients": [ + { + "tag": "minecraft:beds" + }, + { + "item": "minecraft:rotten_flesh" + }, + { + "tag": "forge:bones" + }, + { + "tag": "forge:dyes/black" + } + ], + "result": { + "_comment": "Unused", + "item": "occultism:pentacle" + } +} \ No newline at end of file From 2b7a6b957fca0f4f7d3a85ef998c65ff71606bff Mon Sep 17 00:00:00 2001 From: klikli-dev Date: Wed, 25 Mar 2020 16:49:44 +0100 Subject: [PATCH 5/5] added book page for day/night rituals --- .../entries/rituals/summoning/time_magic.json | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/main/resources/data/occultism/patchouli_books/dictionary_of_spirits/en_us/entries/rituals/summoning/time_magic.json diff --git a/src/main/resources/data/occultism/patchouli_books/dictionary_of_spirits/en_us/entries/rituals/summoning/time_magic.json b/src/main/resources/data/occultism/patchouli_books/dictionary_of_spirits/en_us/entries/rituals/summoning/time_magic.json new file mode 100644 index 000000000..38d3a8312 --- /dev/null +++ b/src/main/resources/data/occultism/patchouli_books/dictionary_of_spirits/en_us/entries/rituals/summoning/time_magic.json @@ -0,0 +1,31 @@ +{ + "name": "Time Magic", + "icon": "minecraft:clock", + "category": "rituals/summoning", + "sortnum": 31, + "pages": [ + { + "type": "text", + "text": "Time magic is limited in scope, it cannot send the magician back or forth in time, but rather allows to change time time of day. This is especially useful for rituals or other tasks requiring day or nighttime specifically." + }, + { + "type": "summoning", + "heading": "Summoning of Dawn", + "pentacle": "$(l:pentacles/summon_djinni)Ophyx' Calling$(/l)", + "activation_item": "occultism:book_of_binding_bound_djinni", + "ingredients": "$(li)1x $(item)Torch $()$(li)1x $(item)Any Sapling $()$(li)1x $(item)Wheat $()$(li)1x $(item)Any Yellow Dye $()" + }, + { + "type": "summoning", + "heading": "Summoning of Dusk", + "pentacle": "$(l:pentacles/summon_djinni)Ophyx' Calling$(/l)", + "activation_item": "occultism:book_of_binding_bound_djinni", + "ingredients": "$(li)1x $(item)Any Bed $()$(li)1x $(item)Rotten Flesh $()$(li)1x $(item)Bone $()$(li)1x $(item)Any Black Dye $()" + }, + { + "type": "empty", + "draw_filler": false + } + ] +} +