Skip to content

Commit

Permalink
feat: Possessed Update (#1008)
Browse files Browse the repository at this point in the history
* Possessed Ghast Spawn Egg

* Possessed Phantom

* Possessed Phantom

* Weak Possessed Shulker

* Wild Parrot Really Foliot

* Possessed Elder Guardian
Possessed Shulker
Weak Possessed Shulker -> Possessed Weak Shulker

* Rituals for new possessed mobs

* (and the respective generated files)

Closes #104
  • Loading branch information
Eqis-Edu authored and klikli-dev committed Dec 7, 2023
1 parent 7da15d4 commit 76d49f4
Show file tree
Hide file tree
Showing 37 changed files with 1,299 additions and 20 deletions.
56 changes: 52 additions & 4 deletions src/generated/resources/assets/occultism/lang/en_us.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "occultism:item/ritual_dummy"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "occultism:item/ritual_dummy"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "occultism:item/ritual_dummy"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "occultism:item/ritual_dummy"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"type": "minecraft:entity",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 4.0,
"min": 1.0
},
"function": "minecraft:set_count"
},
{
"count": {
"type": "minecraft:uniform",
"max": 1.0,
"min": 0.0
},
"function": "minecraft:looting_enchant"
}
],
"name": "minecraft:phantom_membrane"
}
],
"rolls": 1.0
}
],
"random_sequence": "occultism:entities/possessed_phantom"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"background_u_index": 0,
"background_v_index": 0,
"category": "occultism:possession_rituals",
"condition": {
"type": "modonomicon:true"
},
"description": "",
"hide_while_locked": false,
"icon": "minecraft:heart_of_the_sea",
"name": "book.occultism.dictionary_of_spirits.possession_rituals.possess_elder_guardian.name",
"pages": [
{
"type": "modonomicon:entity",
"anchor": "",
"default_rotation": -45.0,
"entity_id": "occultism:possessed_elder_guardian",
"name": "",
"offset": 0.0,
"rotate": true,
"scale": 0.5,
"text": "book.occultism.dictionary_of_spirits.possession_rituals.possess_elder_guardian.entity.text"
},
{
"type": "occultism:ritual_recipe",
"anchor": "",
"recipe_id_1": "occultism:ritual/possess_elder_guardian",
"text": "",
"title1": "",
"title2": ""
},
{
"type": "modonomicon:text",
"anchor": "",
"show_title_separator": true,
"text": "book.occultism.dictionary_of_spirits.possession_rituals.possess_elder_guardian.description.text",
"title": "",
"use_markdown_in_title": false
}
],
"parents": [
{
"draw_arrow": true,
"entry": "occultism:possession_rituals/overview",
"line_enabled": true,
"line_reversed": false
}
],
"x": 2,
"y": -1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"background_u_index": 0,
"background_v_index": 0,
"category": "occultism:possession_rituals",
"condition": {
"type": "modonomicon:true"
},
"description": "",
"hide_while_locked": false,
"icon": "minecraft:phantom_membrane",
"name": "book.occultism.dictionary_of_spirits.possession_rituals.possess_phantom.name",
"pages": [
{
"type": "modonomicon:entity",
"anchor": "",
"default_rotation": -45.0,
"entity_id": "occultism:possessed_phantom",
"name": "",
"offset": 0.0,
"rotate": true,
"scale": 0.5,
"text": "book.occultism.dictionary_of_spirits.possession_rituals.possess_phantom.entity.text"
},
{
"type": "occultism:ritual_recipe",
"anchor": "",
"recipe_id_1": "occultism:ritual/possess_phantom",
"text": "",
"title1": "",
"title2": ""
},
{
"type": "modonomicon:text",
"anchor": "",
"show_title_separator": true,
"text": "book.occultism.dictionary_of_spirits.possession_rituals.possess_phantom.description.text",
"title": "",
"use_markdown_in_title": false
}
],
"parents": [
{
"draw_arrow": true,
"entry": "occultism:possession_rituals/overview",
"line_enabled": true,
"line_reversed": false
}
],
"x": 0,
"y": -1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"background_u_index": 0,
"background_v_index": 0,
"category": "occultism:possession_rituals",
"condition": {
"type": "modonomicon:true"
},
"description": "",
"hide_while_locked": false,
"icon": "minecraft:shulker_shell",
"name": "book.occultism.dictionary_of_spirits.possession_rituals.possess_shulker.name",
"pages": [
{
"type": "modonomicon:entity",
"anchor": "",
"default_rotation": -45.0,
"entity_id": "occultism:possessed_shulker",
"name": "",
"offset": 0.0,
"rotate": true,
"scale": 0.5,
"text": "book.occultism.dictionary_of_spirits.possession_rituals.possess_shulker.entity.text"
},
{
"type": "occultism:ritual_recipe",
"anchor": "",
"recipe_id_1": "occultism:ritual/possess_shulker",
"text": "",
"title1": "",
"title2": ""
},
{
"type": "modonomicon:text",
"anchor": "",
"show_title_separator": true,
"text": "book.occultism.dictionary_of_spirits.possession_rituals.possess_shulker.description.text",
"title": "",
"use_markdown_in_title": false
}
],
"parents": [
{
"draw_arrow": true,
"entry": "occultism:possession_rituals/overview",
"line_enabled": true,
"line_reversed": false
}
],
"x": 2,
"y": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"background_u_index": 0,
"background_v_index": 0,
"category": "occultism:possession_rituals",
"condition": {
"type": "modonomicon:true"
},
"description": "",
"hide_while_locked": false,
"icon": "minecraft:chorus_fruit",
"name": "book.occultism.dictionary_of_spirits.possession_rituals.possess_weak_shulker.name",
"pages": [
{
"type": "modonomicon:entity",
"anchor": "",
"default_rotation": -45.0,
"entity_id": "occultism:possessed_weak_shulker",
"name": "",
"offset": 0.0,
"rotate": true,
"scale": 0.5,
"text": "book.occultism.dictionary_of_spirits.possession_rituals.possess_weak_shulker.entity.text"
},
{
"type": "occultism:ritual_recipe",
"anchor": "",
"recipe_id_1": "occultism:ritual/possess_weak_shulker",
"text": "",
"title1": "",
"title2": ""
},
{
"type": "modonomicon:text",
"anchor": "",
"show_title_separator": true,
"text": "book.occultism.dictionary_of_spirits.possession_rituals.possess_weak_shulker.description.text",
"title": "",
"use_markdown_in_title": false
}
],
"parents": [
{
"draw_arrow": true,
"entry": "occultism:possession_rituals/overview",
"line_enabled": true,
"line_reversed": false
}
],
"x": 0,
"y": 1
}
9 changes: 5 additions & 4 deletions src/main/java/com/klikli_dev/occultism/Occultism.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
import com.klikli_dev.occultism.client.render.ThirdEyeEffectRenderer;
import com.klikli_dev.occultism.common.DebugHelper;
import com.klikli_dev.occultism.common.entity.familiar.*;
import com.klikli_dev.occultism.common.entity.possessed.PossessedEndermanEntity;
import com.klikli_dev.occultism.common.entity.possessed.PossessedEndermiteEntity;
import com.klikli_dev.occultism.common.entity.possessed.PossessedGhastEntity;
import com.klikli_dev.occultism.common.entity.possessed.PossessedSkeletonEntity;
import com.klikli_dev.occultism.common.entity.possessed.*;
import com.klikli_dev.occultism.common.entity.spirit.*;
import com.klikli_dev.occultism.config.OccultismClientConfig;
import com.klikli_dev.occultism.config.OccultismCommonConfig;
Expand Down Expand Up @@ -134,6 +131,10 @@ private void onEntityAttributeCreation(final EntityAttributeCreationEvent event)
event.put(OccultismEntities.POSSESSED_SKELETON_TYPE.get(), PossessedSkeletonEntity.createAttributes().build());
event.put(OccultismEntities.POSSESSED_ENDERMAN_TYPE.get(), PossessedEndermanEntity.createAttributes().build());
event.put(OccultismEntities.POSSESSED_GHAST_TYPE.get(), PossessedGhastEntity.createAttributes().build());
event.put(OccultismEntities.POSSESSED_PHANTOM_TYPE.get(), PossessedPhantomEntity.createAttributes().build());
event.put(OccultismEntities.POSSESSED_WEAK_SHULKER_TYPE.get(), PossessedWeakShulkerEntity.createAttributes().build());
event.put(OccultismEntities.POSSESSED_SHULKER_TYPE.get(), PossessedShulkerEntity.createAttributes().build());
event.put(OccultismEntities.POSSESSED_ELDER_GUARDIAN_TYPE.get(), PossessedElderGuardianEntity.createAttributes().build());
event.put(OccultismEntities.WILD_HUNT_SKELETON_TYPE.get(), WildHuntSkeletonEntity.createAttributes().build());
event.put(OccultismEntities.WILD_HUNT_WITHER_SKELETON_TYPE.get(), WildHuntWitherSkeletonEntity.createAttributes().build());
event.put(OccultismEntities.OTHERWORLD_BIRD_TYPE.get(), OtherworldBirdEntity.createAttributes().build());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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.klikli_dev.occultism.common.entity.possessed;

import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.monster.ElderGuardian;
import net.minecraft.world.level.Level;

public class PossessedElderGuardianEntity extends ElderGuardian {

public PossessedElderGuardianEntity(EntityType<? extends ElderGuardian> type,
Level worldIn) {
super(type, worldIn);
}

//region Static Methods
public static AttributeSupplier.Builder createAttributes() {
return ElderGuardian.createAttributes()
.add(Attributes.MAX_HEALTH, 160.0);
}

@Override
protected boolean shouldDespawnInPeaceful() {
return false;
}
//endregion Static Methods
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* 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.klikli_dev.occultism.common.entity.possessed;

import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.monster.Phantom;
import net.minecraft.world.entity.monster.Zombie;
import net.minecraft.world.level.Level;

public class PossessedPhantomEntity extends Phantom {

public PossessedPhantomEntity(EntityType<? extends Phantom> type,
Level worldIn) {
super(type, worldIn);
}

//region Static Methods
public static AttributeSupplier.Builder createAttributes() {
return Zombie.createAttributes();
}

@Override
protected boolean shouldDespawnInPeaceful() {
return false;
}

@Override
protected boolean isSunBurnTick() {
return false;
}
//endregion Static Methods
}
Loading

0 comments on commit 76d49f4

Please sign in to comment.