├── .github ├── no-response.yml ├── config.yml ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── bug_report.md │ ├── update_compat.md │ └── new_compat.md └── move.yml ├── src └── main │ ├── resources │ ├── data │ │ ├── vampirism │ │ │ └── weapon_attributes │ │ │ │ ├── pitchfork.json │ │ │ │ ├── stake.json │ │ │ │ ├── heart_seeker_normal.json │ │ │ │ ├── hunter_axe_normal.json │ │ │ │ ├── heart_seeker_enhanced.json │ │ │ │ ├── heart_seeker_ultimate.json │ │ │ │ ├── heart_striker_enhanced.json │ │ │ │ ├── heart_striker_normal.json │ │ │ │ ├── heart_striker_ultimate.json │ │ │ │ ├── hunter_axe_enhanced.json │ │ │ │ └── hunter_axe_ultimate.json │ │ ├── consecration │ │ │ └── tags │ │ │ │ ├── entity_types │ │ │ │ └── undead.json │ │ │ │ └── damage_type │ │ │ │ └── holy.json │ │ ├── ctov │ │ │ ├── structures │ │ │ │ └── village │ │ │ │ │ ├── beach │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── mesa │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── swamp │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── taiga │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── desert │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── jungle │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── mountain │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── mushroom │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── plains │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── savanna │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── christmas │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── halloween │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── savanna_na │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── desert_oasis │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── jungle_tree │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── snowy_igloo │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── mesa_fortified │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── mountain_alpine │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── swamp_fortified │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ ├── taiga_fortified │ │ │ │ │ └── jobsite │ │ │ │ │ │ └── hunter_trainer.nbt │ │ │ │ │ └── plains_fortified │ │ │ │ │ └── jobsite │ │ │ │ │ └── hunter_trainer.nbt │ │ │ └── lithostitched │ │ │ │ └── worldgen_modifier │ │ │ │ └── vampirism_totem │ │ │ │ ├── beach.json │ │ │ │ ├── desert.json │ │ │ │ ├── jungle.json │ │ │ │ ├── mesa.json │ │ │ │ ├── swamp.json │ │ │ │ ├── taiga.json │ │ │ │ ├── dark_forest.json │ │ │ │ ├── mushroom.json │ │ │ │ ├── plains.json │ │ │ │ ├── savanna.json │ │ │ │ ├── snowy.json │ │ │ │ ├── christmas.json │ │ │ │ ├── mountain.json │ │ │ │ ├── savanna_na.json │ │ │ │ ├── desert_oasis.json │ │ │ │ ├── jungle_tree.json │ │ │ │ ├── mesa_fortified.json │ │ │ │ ├── mountain_alpine.json │ │ │ │ ├── swamp_fortified.json │ │ │ │ ├── taiga_fortified.json │ │ │ │ └── plains_fortified.json │ │ └── vampirism_integrations │ │ │ ├── vampirism │ │ │ ├── bloodvalues │ │ │ │ ├── items │ │ │ │ │ └── evilcraft.json │ │ │ │ ├── entities │ │ │ │ │ ├── mca.json │ │ │ │ │ └── betteranimalsplus.json │ │ │ │ └── fluids │ │ │ │ │ └── integrations.json │ │ │ └── single_jigsaw_pieces.json │ │ │ └── scripts │ │ │ └── vampirism │ │ │ ├── alchemical_cauldron.zs │ │ │ └── weapon_table.zs │ ├── pack.mcmeta │ ├── assets │ │ └── vampirism_integrations │ │ │ ├── textures │ │ │ ├── mca │ │ │ │ └── overlay.png │ │ │ └── entity │ │ │ │ ├── betteranimals │ │ │ │ ├── cow_overlay.png │ │ │ │ ├── pig_overlay.png │ │ │ │ ├── ocelot_overlay.png │ │ │ │ ├── sheep_overlay.png │ │ │ │ └── polar_bear_overlay.png │ │ │ │ └── betteranimalsplus │ │ │ │ ├── boar_overlay.png │ │ │ │ ├── deer_overlay.png │ │ │ │ ├── goat_overlay.png │ │ │ │ ├── goose_overlay.png │ │ │ │ ├── moose_overlay.png │ │ │ │ ├── badger_overlay.png │ │ │ │ ├── coyote_overlay.png │ │ │ │ ├── pheasant_overlay.png │ │ │ │ ├── reindeer_overlay.png │ │ │ │ ├── turkey_overlay.png │ │ │ │ ├── walrus_overlay.png │ │ │ │ ├── blackbear_overlay.png │ │ │ │ ├── brownbear_overlay.png │ │ │ │ └── feralwolf_overlay.png │ │ │ └── lang │ │ │ └── en_us.json │ ├── waila_plugins.json │ ├── mca │ │ └── skin_overlay_assignment.txt │ └── META-INF │ │ ├── accesstransformer.cfg │ │ └── mods.toml │ └── java │ └── de │ └── teamlapen │ └── vampirism_integrations │ ├── bop │ ├── Biomes.java │ └── BOPCompat.java │ ├── evilcraft │ └── EvilCraftCompat.java │ ├── tconstruct │ └── TConstructCompat.java │ ├── crafttweaker │ ├── CrafttweakerCompat.java │ ├── zenscript │ │ ├── ExpandedISkill.java │ │ └── ExpandedIFactionPlayer.java │ ├── SkillBracket.java │ ├── CTAlchemicalCauldronRecipeManager.java │ └── CTWeaponTableRecipeManager.java │ ├── util │ ├── REFERENCE.java │ ├── IModCompat.java │ ├── NearestVampireSmartTargetGoal.java │ └── ModCompatLoader.java │ ├── jade │ ├── JadeModCompat.java │ ├── provider │ │ ├── AltarOfInfusionProvider.java │ │ ├── ResearchTableProvider.java │ │ ├── AltarOfInspirationProvider.java │ │ ├── EntityBloodProvider.java │ │ ├── WeaponTableProvider.java │ │ ├── AltarPillarProvider.java │ │ ├── PedestalProvider.java │ │ ├── AlchemyTableProvider.java │ │ ├── PotionTableProvider.java │ │ ├── GarlicDiffuserProvider.java │ │ ├── TotemProvider.java │ │ └── PlayerFactionProvider.java │ ├── elements │ │ └── BloodElement.java │ └── JadePlugin.java │ ├── consecration │ └── ConsecrationCompat.java │ ├── Config.java │ ├── bloodmagic │ └── BloodmagicCompat.java │ ├── betteranimals │ ├── BetterAnimalsCompat.java │ └── BetterAnimalsConvertibles.java │ ├── graveyard │ ├── Biomes.java │ └── GraveyardCompat.java │ ├── betteranimalsplus │ ├── BetterAnimalsPlusCompat.java │ └── BetterAnimalsPlusConvertibles.java │ ├── tan │ ├── TemperatureModifier.java │ ├── TANCompat.java │ └── ThirstHandler.java │ ├── player_companion │ ├── RespawnHandler.java │ └── PlayerCompanionCompat.java │ ├── mca │ ├── MCAEntityClassRedirect.java │ ├── client │ │ ├── ClientProxy.java │ │ ├── RenderVillagerMCAConverted.java │ │ └── LayerVampireFace.java │ ├── MCAEventHandler.java │ ├── MCACompat.java │ └── MCARegistration.java │ ├── waila │ ├── WailaModCompat.java │ ├── GarlicBeaconProvider.java │ ├── PlayerDataProvider.java │ ├── BloodComponent.java │ ├── TankDataProvider.java │ ├── WailaPlugin.java │ └── CreatureDataProvider.java │ ├── VampirismCompat.java │ ├── guardvillagers │ ├── GuardVillagerEventHandler.java │ ├── GuardVillagerCompat.java │ └── tasks │ │ └── GuardTargetNonFactionGoal.java │ ├── diet │ ├── DietCompat.java │ └── DietEventHandler.java │ ├── ctov │ └── ChoiceTheoremOverhauledVillage.java │ ├── survive │ ├── SurviveCompat.java │ └── SurviveHandler.java │ ├── coldsweat │ ├── ColdSweatCompat.java │ └── ColdSweatEventHandler.java │ └── EventHandler.java ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── artifacts.gradle └── versioning.gradle ├── .idea └── compiler.xml ├── settings.gradle ├── .travis.yml ├── gradlew.bat ├── .gitignore ├── gradle.properties ├── README.md └── gradlew /.github/no-response.yml: -------------------------------------------------------------------------------- 1 | daysUntilClose: 21 2 | 3 | responseRequiredLabel: NeedsInfo -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | 2 | todo: 3 | keyword: "@TODO-issue" 4 | 5 | reminders: 6 | label: reminder -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/pitchfork.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:spear" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/stake.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:soul_knife" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/heart_seeker_normal.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:claymore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/hunter_axe_normal.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:heavy_axe" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/consecration/tags/entity_types/undead.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "#vampirism:vampire" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/heart_seeker_enhanced.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:claymore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/heart_seeker_ultimate.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:claymore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/heart_striker_enhanced.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:claymore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/heart_striker_normal.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:claymore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/heart_striker_ultimate.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:claymore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/hunter_axe_enhanced.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:heavy_axe" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/vampirism/weapon_attributes/hunter_axe_ultimate.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "bettercombat:heavy_axe" 3 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "Vampirism Integrations Resources", 4 | "pack_format": 4 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/data/consecration/tags/damage_type/holy.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "vampirism:holy_water", 4 | "vampirism:vampire_on_fire", 5 | "vampirism:vampire_in_fire" 6 | ] 7 | } -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/mca/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/mca/overlay.png -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/beach/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/beach/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/mesa/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/mesa/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/swamp/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/swamp/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/taiga/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/taiga/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/desert/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/desert/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/jungle/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/jungle/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/mountain/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/mountain/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/mushroom/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/mushroom/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/plains/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/plains/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/savanna/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/savanna/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/christmas/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/christmas/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/halloween/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/halloween/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/savanna_na/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/savanna_na/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/vampirism_integrations/vampirism/bloodvalues/items/evilcraft.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | { 5 | "id": "evilcraft:blood_orb_filled", 6 | "value": 800 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/desert_oasis/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/desert_oasis/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/jungle_tree/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/jungle_tree/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/snowy_igloo/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/snowy_igloo/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/mesa_fortified/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/mesa_fortified/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/mountain_alpine/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/mountain_alpine/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/swamp_fortified/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/swamp_fortified/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/taiga_fortified/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/taiga_fortified/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/data/ctov/structures/village/plains_fortified/jobsite/hunter_trainer.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/data/ctov/structures/village/plains_fortified/jobsite/hunter_trainer.nbt -------------------------------------------------------------------------------- /src/main/resources/waila_plugins.json: -------------------------------------------------------------------------------- 1 | { 2 | "vampirism_integrations:plugin": { 3 | "initializer": "de.teamlapen.vampirism_integrations.waila.WailaPlugin", 4 | 5 | "side": "*", 6 | 7 | "required": ["vampirism"] 8 | } 9 | 10 | } -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/cow_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/cow_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/pig_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/pig_overlay.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/ocelot_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/ocelot_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/sheep_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/sheep_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/boar_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/boar_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/deer_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/deer_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/goat_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/goat_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/goose_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/goose_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/moose_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/moose_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/polar_bear_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimals/polar_bear_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/badger_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/badger_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/coyote_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/coyote_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/pheasant_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/pheasant_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/reindeer_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/reindeer_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/turkey_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/turkey_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/walrus_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/walrus_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/blackbear_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/blackbear_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/brownbear_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/brownbear_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/feralwolf_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamLapen/VampirismIntegrations/HEAD/src/main/resources/assets/vampirism_integrations/textures/entity/betteranimalsplus/feralwolf_overlay.png -------------------------------------------------------------------------------- /src/main/resources/data/vampirism_integrations/vampirism/bloodvalues/entities/mca.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "author": "Vampirism Team", 4 | "values": [ 5 | { 6 | "id": "mca:female_villager", 7 | "value": 15 8 | }, 9 | { 10 | "id": "mca:male_villager", 11 | "value": 15 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Mod Discord 4 | url: https://discord.gg/wuamm4P 5 | about: If you are not sure about something, ask on Discord 6 | - name: Vampirism repository 7 | url: https://github.com/TeamLapen/Vampirism 8 | about: Report mod incompatibilities (like crashes or exploits) on the main repository -------------------------------------------------------------------------------- /.github/move.yml: -------------------------------------------------------------------------------- 1 | # Configuration for move-issues - https://github.com/dessant/move-issues 2 | 3 | # Delete the command comment. Ignored when the comment also contains other content 4 | deleteCommand: true 5 | # Close the source issue after moving 6 | closeSourceIssue: true 7 | # Lock the source issue after moving 8 | lockSourceIssue: false 9 | # Set custom aliases for targets 10 | aliases: 11 | main: TeamLapen/Vampirism -------------------------------------------------------------------------------- /src/main/resources/data/vampirism_integrations/scripts/vampirism/alchemical_cauldron.zs: -------------------------------------------------------------------------------- 1 | .addRecipe("gold_nugget_from_flint_1", , , ,0,4,4,[]); 2 | 3 | .addRecipe("gold_nugget_from_flint_2", , , ,0,4,4,[]); -------------------------------------------------------------------------------- /src/main/resources/mca/skin_overlay_assignment.txt: -------------------------------------------------------------------------------- 1 | #MCA Texture -> Eye Fang Overlay assignment. Format: texture=eye,fang. Use -1 for fang or eye to disable 2 | mca:skins/female/baker/bakerf1_converted.png=2,3 3 | mca:skins/female/baker/bakerf2_converted.png=1,4 4 | mca:skins/female/baker/bakerf3_converted.png=11,0 5 | mca:skins/female/baker/bakerf4_converted.png=11,0 6 | mca:skins/female/baker/bakerf5_converted.png=8,-1 7 | mca:skins/female/baker/bakerf6_converted.png=5,0 -------------------------------------------------------------------------------- /src/main/resources/data/vampirism_integrations/vampirism/bloodvalues/fluids/integrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | { 5 | "id": "biomesoplenty:blood", 6 | "value": 0.4 7 | }, 8 | { 9 | "id": "evilcraft:blood", 10 | "value": 0.8 11 | }, 12 | { 13 | "id": "bloodmagic:life_essence_fluid", 14 | "value": 0.8 15 | }, 16 | { 17 | "id": "tconstruct:blood", 18 | "value": 0.8 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/bop/Biomes.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.bop; 2 | 3 | import biomesoplenty.api.biome.BOPBiomes; 4 | import de.teamlapen.vampirism.api.VampirismAPI; 5 | 6 | public class Biomes { 7 | static void registerNoSundamageBiomes(BOPCompat compat) { 8 | if (compat.disabled_sundamage_ominous_woods.get()) { 9 | VampirismAPI.sundamageRegistry().addNoSundamageBiomes(BOPBiomes.OMINOUS_WOODS.location()); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/evilcraft/EvilCraftCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.evilcraft; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | 6 | public class EvilCraftCompat implements IModCompat { 7 | 8 | @Override 9 | public String getModID() { 10 | return "evilcraft"; 11 | } 12 | 13 | @Override 14 | public void buildConfig(ForgeConfigSpec.Builder builder) { 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/accesstransformer.cfg: -------------------------------------------------------------------------------- 1 | ##Unused, it should be public anyway, but somehow mc keeps crashing without 2 | public net.minecraft.client.resources.model.ModelBakery f_119232_ # MODEL_GENERATED 3 | public net.minecraft.client.resources.model.ModelBakery f_119233_ # MODEL_ENTITY 4 | protected net.minecraft.world.entity.npc.Villager f_35367_ #MEMORY_TYPES 5 | protected net.minecraft.world.entity.npc.Villager f_35368_ #SENSOR_TYPES 6 | public-f mca.entity.VillagerEntityMCA m_7380_(Lnet/minecraft/nbt/CompoundTag;)V # addAdditionalSaveData -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/tconstruct/TConstructCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.tconstruct; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | 6 | 7 | public class TConstructCompat implements IModCompat { 8 | 9 | @Override 10 | public String getModID() { 11 | return "tconstruct"; 12 | } 13 | 14 | @Override 15 | public void buildConfig(ForgeConfigSpec.Builder builder) { 16 | 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/crafttweaker/CrafttweakerCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.crafttweaker; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | 6 | public class CrafttweakerCompat implements IModCompat { 7 | 8 | 9 | @Override 10 | public void buildConfig(ForgeConfigSpec.Builder builder) { 11 | 12 | } 13 | 14 | @Override 15 | public String getModID() { 16 | return "crafttweaker"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/util/REFERENCE.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.util; 2 | 3 | import org.apache.maven.artifact.versioning.ArtifactVersion; 4 | import org.apache.maven.artifact.versioning.DefaultArtifactVersion; 5 | 6 | public class REFERENCE { 7 | public static ArtifactVersion VERSION = new DefaultArtifactVersion("0.0.0"); 8 | public static final String MODID = "vampirism_integrations"; 9 | 10 | public static final String VAMPIRISM_ID = "vampirism"; 11 | public static final String VERSION_UPDATE_FILE = "http://maxanier.de/projects/vampirism/versions_integrations.json"; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/JadeModCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import org.jetbrains.annotations.Nullable; 6 | 7 | public class JadeModCompat implements IModCompat { 8 | @Override 9 | public void buildConfig(ForgeConfigSpec.Builder builder) { 10 | 11 | } 12 | 13 | @Override 14 | public String getModID() { 15 | return "jade"; 16 | } 17 | 18 | @Nullable 19 | @Override 20 | public String getAcceptedVersionRange() { 21 | return "[11.6.3,)"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/crafttweaker/zenscript/ExpandedISkill.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.crafttweaker.zenscript; 2 | 3 | import com.blamejared.crafttweaker.api.annotation.ZenRegister; 4 | import com.blamejared.crafttweaker_annotations.annotations.Document; 5 | import com.blamejared.crafttweaker_annotations.annotations.NativeTypeRegistration; 6 | import com.blamejared.crafttweaker_annotations.annotations.TaggableElement; 7 | import de.teamlapen.vampirism.api.entity.player.skills.ISkill; 8 | 9 | @ZenRegister 10 | @Document("mods/vampirism/skills/ISkill") 11 | @NativeTypeRegistration(value = ISkill.class, zenCodeName = "mods.vampirism.skills.ISkill") 12 | public class ExpandedISkill { 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/crafttweaker/zenscript/ExpandedIFactionPlayer.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.crafttweaker.zenscript; 2 | 3 | import com.blamejared.crafttweaker.api.annotation.ZenRegister; 4 | import com.blamejared.crafttweaker_annotations.annotations.Document; 5 | import com.blamejared.crafttweaker_annotations.annotations.NativeTypeRegistration; 6 | import de.teamlapen.vampirism.api.entity.player.IFactionPlayer; 7 | import de.teamlapen.vampirism.api.entity.player.skills.ISkill; 8 | 9 | @ZenRegister 10 | @Document("mods/vampirism/player/IFactionPlayer") 11 | @NativeTypeRegistration(value = IFactionPlayer.class, zenCodeName = "mods.vampirism.player.IFactionPlayer") 12 | public class ExpandedIFactionPlayer { 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/consecration/ConsecrationCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.consecration; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 6 | 7 | public class ConsecrationCompat implements IModCompat { 8 | public static final String ID = "consecration"; 9 | 10 | @Override 11 | public void buildConfig(ForgeConfigSpec.Builder builder) { 12 | 13 | } 14 | 15 | @Override 16 | public String getModID() { 17 | return ID; 18 | } 19 | 20 | @Override 21 | public void onInitStep(Step step, ParallelDispatchEvent event) { 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/Config.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations; 2 | 3 | import net.minecraftforge.common.ForgeConfigSpec; 4 | import net.minecraftforge.fml.ModLoadingContext; 5 | import net.minecraftforge.fml.config.ModConfig; 6 | 7 | 8 | public class Config { 9 | 10 | public static void buildConfiguration() { 11 | ForgeConfigSpec spec = new ForgeConfigSpec.Builder().configure(Config::buildConfiguration).getRight(); 12 | ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, spec); 13 | } 14 | 15 | private static Object buildConfiguration(ForgeConfigSpec.Builder builder) { 16 | VampirismIntegrationsMod.instance.compatLoader.buildConfig(builder); 17 | return null; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/beach.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/beach/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/desert.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/desert/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/jungle.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/jungle/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/mesa.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/mesa/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/swamp.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/swamp/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/taiga.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/taiga/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/dark_forest.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/halloween/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/mushroom.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/mushroom/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/plains.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/plains/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/savanna.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/savanna/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/snowy.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/snowy_igloo/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/bloodmagic/BloodmagicCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.bloodmagic; 2 | 3 | import de.teamlapen.lib.lib.util.IInitListener; 4 | import de.teamlapen.vampirism_integrations.util.IModCompat; 5 | import net.minecraftforge.common.ForgeConfigSpec; 6 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 7 | 8 | public class BloodmagicCompat implements IModCompat { 9 | 10 | @Override 11 | public String getModID() { 12 | return "bloodmagic"; 13 | } 14 | 15 | @Override 16 | public void buildConfig(ForgeConfigSpec.Builder builder) { 17 | } 18 | 19 | @Override 20 | public void onInitStep(IInitListener.Step step, ParallelDispatchEvent event) { 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/christmas.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/christmas/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/mountain.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/mountain/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/savanna_na.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/savanna_na/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/desert_oasis.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/desert_oasis/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/jungle_tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/jungle_tree/terminator", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/mesa_fortified.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/mesa_fortified/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/mountain_alpine.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/mountain_alpine/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/swamp_fortified.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/swamp_fortified/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/taiga_fortified.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/taiga_fortified/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /src/main/resources/data/ctov/lithostitched/worldgen_modifier/vampirism_totem/plains_fortified.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "lithostitched:add_template_pool_elements", 3 | "predicate": { 4 | "type": "lithostitched:all_of", 5 | "predicates": [ 6 | { 7 | "type": "lithostitched:mod_loaded", 8 | "mod_id": "vampirism" 9 | } 10 | ] 11 | }, 12 | "template_pools": "ctov:village/plains_fortified/deco", 13 | "elements": [ 14 | { 15 | "weight": 5, 16 | "element": { 17 | "element_type": "lithostitched:limited", 18 | "delegate": { 19 | "element_type": "minecraft:single_pool_element", 20 | "projection": "rigid", 21 | "processors": "vampirism:totem_faction", 22 | "location":"vampirism:village/totem" 23 | }, 24 | "limit": 1 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/betteranimals/BetterAnimalsCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.betteranimals; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 6 | 7 | public class BetterAnimalsCompat implements IModCompat { 8 | 9 | @Override 10 | public void buildConfig(ForgeConfigSpec.Builder builder) { 11 | 12 | } 13 | 14 | @Override 15 | public String getModID() { 16 | return "betteranimals"; 17 | } 18 | 19 | @Override 20 | public void onInitStep(Step step, ParallelDispatchEvent event) { 21 | if (step == Step.ENQUEUE_IMC) { 22 | BetterAnimalsConvertibles.changeConvertibles(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/graveyard/Biomes.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.graveyard; 2 | 3 | 4 | import de.teamlapen.vampirism.api.VampirismAPI; 5 | import net.finallion.nyctophobia.init.NBiomes; 6 | 7 | public class Biomes { 8 | 9 | static void registerNoSundamageBiomes(GraveyardCompat compat) { 10 | if (compat.disabled_sundamage_haunted.get()) { 11 | VampirismAPI.sundamageRegistry().addNoSundamageBiomes(NBiomes.ERODED_HAUNTED_FOREST_KEY.location(), NBiomes.HAUNTED_FOREST_KEY.location(), NBiomes.HAUNTED_LAKES_KEY.location()); 12 | } 13 | if (compat.disabled_sundamage_other.get()) { 14 | VampirismAPI.sundamageRegistry().addNoSundamageBiomes(NBiomes.DEEP_DARK_FOREST_KEY.location(), NBiomes.ANCIENT_DEAD_CORAL_REEF_KEY.location()); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/util/IModCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.util; 2 | 3 | 4 | import de.teamlapen.lib.lib.util.IInitListener; 5 | import net.minecraftforge.common.ForgeConfigSpec; 6 | 7 | import javax.annotation.Nullable; 8 | 9 | /** 10 | * Handles compatibility for a single mod. 11 | * Should not load any classes outside of init 12 | */ 13 | public interface IModCompat extends IInitListener { 14 | void buildConfig(ForgeConfigSpec.Builder builder); 15 | 16 | /** 17 | * Can be null if all versions are accepted 18 | * {@link org.apache.maven.artifact.versioning.VersionRange} String 19 | */ 20 | @SuppressWarnings("SameReturnValue") 21 | @Nullable 22 | default String getAcceptedVersionRange() { 23 | return null; 24 | } 25 | 26 | String getModID(); 27 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | maven { 5 | name = 'MinecraftForge' 6 | url = 'https://maven.minecraftforge.net/' 7 | } 8 | maven {url='https://repo.spongepowered.org/repository/maven-public'} 9 | maven { url = 'https://maven.parchmentmc.org' } 10 | } 11 | } 12 | 13 | plugins { 14 | id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' 15 | } 16 | 17 | //I always have one directory/clone per MC version so my folder name is e.g. 1.16. Therefore the default module name is 1.16. This prepends it with a meaningful name 18 | prefixProjectName(rootProject, "Integrations-") 19 | 20 | def prefixProjectName(project, prefix) { 21 | project.name = prefix + project.name 22 | project.children.each { prefixProjectName(it, prefix) } 23 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/betteranimalsplus/BetterAnimalsPlusCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.betteranimalsplus; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 6 | 7 | public class BetterAnimalsPlusCompat implements IModCompat { 8 | 9 | @Override 10 | public void buildConfig(ForgeConfigSpec.Builder builder) { 11 | 12 | } 13 | 14 | @Override 15 | public void onInitStep(Step step, ParallelDispatchEvent event) { 16 | if (step == Step.ENQUEUE_IMC) { 17 | BetterAnimalsPlusConvertibles.registerConvertibles(); 18 | } 19 | } 20 | 21 | @Override 22 | public String getModID() { 23 | return "betteranimalsplus"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | 4 | language: java 5 | jdk: 6 | - oraclejdk8 7 | 8 | before_cache: 9 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock 10 | - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ 11 | - rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/providedDummy.jar 12 | - rm -f $HOME/.gradle/caches/minecraft/deobfedDeps/compileDummy.jar 13 | cache: 14 | directories: 15 | - $HOME/.gradle/caches/ 16 | - $HOME/.gradle/wrapper/ 17 | 18 | before_install: chmod +x gradlew 19 | install: 20 | - ./gradlew setupCIWorkspace -S 21 | script: 22 | - ./gradlew build 23 | 24 | notifications: 25 | email: 26 | recipients: 27 | - vampirism@maxanier.de 28 | on_success: never 29 | on_failure: change 30 | irc: 31 | channels: 32 | - "irc.esper.net#vampirism" 33 | on_success: always 34 | on_failure: always 35 | skip_join: true -------------------------------------------------------------------------------- /src/main/resources/data/vampirism_integrations/scripts/vampirism/weapon_table.zs: -------------------------------------------------------------------------------- 1 | .addShapeless("gold_nugget_from_ingot_1", * 10, [, ], 14,1,[, ]); 2 | .addShaped("gold_nugget_from_ingot_2", , 3 | [ 4 | [ , , ], 5 | [ , , ], 6 | [ , , ] 7 | ], 14, 1, []); -------------------------------------------------------------------------------- /src/main/resources/META-INF/mods.toml: -------------------------------------------------------------------------------- 1 | modLoader = "javafml" 2 | loaderVersion = "${loader_version_range}" 3 | issueTrackerURL = "${mod_issue_tracker}" 4 | license = "${mod_license}" 5 | [[mods]] 6 | modId="${mod_id}" 7 | namespace="vampirism_integrations" 8 | version="${mod_version}" 9 | displayName="${mod_name}" 10 | authors="${mod_authors}" 11 | description='''${mod_description}''' 12 | displayURL="${mod_url}" 13 | updateJSONURL="https://api.modrinth.com/updates/vampirism-integrations/forge_updates.json" 14 | [[dependencies.${mod_id}]] 15 | modId="forge" 16 | mandatory=true 17 | versionRange="${forge_version_range}" 18 | ordering="NONE" 19 | side="BOTH" 20 | [[dependencies.${mod_id}]] 21 | modId="vampirism" 22 | mandatory=true 23 | versionRange="[${vampirism_version},)" 24 | ordering="AFTER" 25 | side="BOTH" 26 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/tan/TemperatureModifier.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.tan; 2 | 3 | import de.teamlapen.vampirism.util.Helper; 4 | import net.minecraft.world.entity.player.Player; 5 | import toughasnails.api.temperature.IPlayerTemperatureModifier; 6 | import toughasnails.api.temperature.TemperatureHelper; 7 | import toughasnails.api.temperature.TemperatureLevel; 8 | 9 | public class TemperatureModifier implements IPlayerTemperatureModifier { 10 | 11 | static void register() { 12 | TemperatureHelper.registerPlayerTemperatureModifier(new TemperatureModifier()); 13 | } 14 | 15 | @Override 16 | public TemperatureLevel modify(Player player, TemperatureLevel temperatureLevel) { 17 | return (temperatureLevel == TemperatureLevel.ICY || temperatureLevel == TemperatureLevel.COLD) && Helper.isVampire(player) ? TemperatureLevel.NEUTRAL : temperatureLevel; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/player_companion/RespawnHandler.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.player_companion; 2 | 3 | import de.markusbordihn.playercompanions.entity.PlayerCompanionEntity; 4 | import de.teamlapen.vampirism.entity.ExtendedCreature; 5 | import net.minecraftforge.event.entity.living.LivingDeathEvent; 6 | import net.minecraftforge.eventbus.api.EventPriority; 7 | import net.minecraftforge.eventbus.api.SubscribeEvent; 8 | 9 | class RespawnHandler { 10 | 11 | @SubscribeEvent(priority = EventPriority.LOWEST) 12 | static void onDeath(LivingDeathEvent event) { 13 | if (PlayerCompanionCompat.replenish_blood_on_death.get() && event.getEntity() instanceof PlayerCompanionEntity) { 14 | ExtendedCreature.getSafe(event.getEntity()).ifPresent(extended -> { 15 | extended.setBlood(extended.getMaxBlood()); 16 | }); 17 | } 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/mca/MCAEntityClassRedirect.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.mca; 2 | 3 | import forge.net.mca.entity.ai.relationship.Gender; 4 | import net.minecraft.world.entity.EntityType; 5 | import net.minecraft.world.entity.MobCategory; 6 | 7 | public class MCAEntityClassRedirect { 8 | public static EntityType.Builder createConverted(boolean male) { 9 | return EntityType.Builder.of((type, level) -> new ConvertedVillagerEntityMCA(type, level, male ? Gender.MALE : Gender.FEMALE), MobCategory.CREATURE).sized(0.6f, 2f); 10 | } 11 | 12 | public static EntityType.Builder createAngry(boolean male) { 13 | return EntityType.Builder.of((type, level) -> new AggressiveVillagerEntityMCA(type, level, male ? Gender.MALE : Gender.FEMALE), MobCategory.CREATURE).sized(0.6f, 2f); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'bug, unconfirmed' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ## Versions 17 | - Minecraft: 18 | - Forge: 19 | - Vampirism: 20 | - Integrations: 21 | 22 | 23 | ## Issue Description 24 | 25 | 26 | 27 | ## Reproduce Steps 28 | 29 | 30 | 31 | ## Additional Information -------------------------------------------------------------------------------- /gradle/artifacts.gradle: -------------------------------------------------------------------------------- 1 | 2 | task deobfJar(type: Jar) { 3 | description = 'Creates a JAR containing the non-obfuscated compiled code.' 4 | from sourceSets.main.output 5 | archiveClassifier = "deobf" 6 | } 7 | 8 | task sourcesJar(type: Jar) { 9 | from sourceSets.main.allJava 10 | archiveClassifier = 'sources' 11 | } 12 | 13 | task javadocJar(type: Jar, dependsOn: javadoc) { 14 | description = 'Creates a JAR containing the JavaDocs.' 15 | from javadoc.destinationDir 16 | archiveClassifier = 'javadoc' 17 | } 18 | 19 | javadoc { 20 | options.addBooleanOption('Xdoclint:none', true) 21 | } 22 | 23 | 24 | artifacts { 25 | archives sourcesJar 26 | archives deobfJar 27 | } 28 | //jar.finalizedBy('reobfJar') 29 | //reobf { 30 | // apiJar { classpath.from(sourceSets.api.compileClasspath) } 31 | // jar { classpath.from(sourceSets.main.compileClasspath) } 32 | //} 33 | // 34 | //task reobf { 35 | // dependsOn reobfJar 36 | // dependsOn reobfApiJar 37 | //} -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/waila/WailaModCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.waila; 2 | 3 | import de.teamlapen.lib.lib.util.IInitListener; 4 | import de.teamlapen.vampirism_integrations.util.IModCompat; 5 | import net.minecraft.world.level.block.Block; 6 | import net.minecraftforge.common.ForgeConfigSpec; 7 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 8 | import net.minecraftforge.registries.ObjectHolder; 9 | 10 | public class WailaModCompat implements IModCompat { 11 | 12 | @ObjectHolder(registryName="blocks", value= "vampirism:garlic_beacon") 13 | static Block garlicBeacon; 14 | 15 | @Override 16 | public String getModID() { 17 | return "waila"; 18 | } 19 | 20 | @Override 21 | public void buildConfig(ForgeConfigSpec.Builder builder) { 22 | 23 | } 24 | 25 | 26 | @Override 27 | public void onInitStep(IInitListener.Step step, ParallelDispatchEvent event) { 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/VampirismCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import de.teamlapen.vampirism_integrations.util.REFERENCE; 5 | import net.minecraftforge.common.ForgeConfigSpec; 6 | 7 | import javax.annotation.Nullable; 8 | 9 | /** 10 | * Dummy integration for Vampirism itself 11 | */ 12 | public class VampirismCompat implements IModCompat { 13 | 14 | public static ForgeConfigSpec.BooleanValue disableVersionCheck; 15 | 16 | @Override 17 | public String getModID() { 18 | return REFERENCE.VAMPIRISM_ID; 19 | } 20 | 21 | @Override 22 | public void buildConfig(ForgeConfigSpec.Builder builder) { 23 | disableVersionCheck = builder.define("disable_integrations_version_check", false); 24 | } 25 | 26 | @Nullable 27 | @Override 28 | public String getAcceptedVersionRange() { 29 | return "[1.8.0,)"; 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/update_compat.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Update/Extend compatibility 3 | about: Request extending an existing integration 4 | title: 'Extend compat for:' 5 | labels: 'ExtendedCompat, unconfirmed' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | 13 | 14 | 15 | I suggest extending/improving the already implemented integrations for the mod mentioned in the title. 16 | 17 | ## What should be added/changed exactly 18 | 19 | 20 | 21 | ## I can help with 22 | 23 | 24 | 25 | 26 | ## Additional comments -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/mca/client/ClientProxy.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.mca.client; 2 | 3 | import de.teamlapen.vampirism_integrations.mca.MCARegistration; 4 | import forge.net.mca.client.render.VillagerEntityMCARenderer; 5 | import net.minecraftforge.client.event.EntityRenderersEvent; 6 | 7 | public class ClientProxy { 8 | 9 | public static void onRegisterRenderer(EntityRenderersEvent.RegisterRenderers event) { 10 | MCARegistration.FEMALE_AGGRESSIVE_VILLAGER.ifPresent(entry -> event.registerEntityRenderer(entry, VillagerEntityMCARenderer::new)); 11 | MCARegistration.MALE_AGGRESSIVE_VILLAGER.ifPresent(entry -> event.registerEntityRenderer(entry, VillagerEntityMCARenderer::new)); 12 | MCARegistration.FEMALE_CONVERTED_VILLAGER.ifPresent(entry -> event.registerEntityRenderer(entry, RenderVillagerMCAConverted::new)); 13 | MCARegistration.MALE_CONVERTED_VILLAGER.ifPresent(entry -> event.registerEntityRenderer(entry, RenderVillagerMCAConverted::new)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/guardvillagers/GuardVillagerEventHandler.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.guardvillagers; 2 | 3 | import de.teamlapen.vampirism.api.event.VampirismVillageEvent; 4 | import de.teamlapen.vampirism_integrations.guardvillagers.tasks.GuardTargetNonFactionGoal; 5 | import net.minecraft.world.entity.LivingEntity; 6 | import net.minecraftforge.event.entity.EntityJoinLevelEvent; 7 | import net.minecraftforge.eventbus.api.SubscribeEvent; 8 | import org.jetbrains.annotations.NotNull; 9 | import tallestegg.guardvillagers.entities.Guard; 10 | 11 | public class GuardVillagerEventHandler { 12 | 13 | @SubscribeEvent 14 | public void onMakeAggressive(VampirismVillageEvent.MakeAggressive event) { 15 | event.setCanceled(true); 16 | } 17 | 18 | @SubscribeEvent 19 | public void onEntityJoinWorld(@NotNull EntityJoinLevelEvent event) { 20 | if (event.getEntity() instanceof Guard guard) { 21 | guard.targetSelector.addGoal(3, new GuardTargetNonFactionGoal(guard)); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/tan/TANCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.tan; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.common.MinecraftForge; 6 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 7 | 8 | public class TANCompat implements IModCompat { 9 | 10 | static ForgeConfigSpec.BooleanValue disableThirst; 11 | 12 | @Override 13 | public void buildConfig(ForgeConfigSpec.Builder builder) { 14 | disableThirst = builder.comment("Limit thirst for vampires").define("disableThirst", true); 15 | } 16 | 17 | @Override 18 | public String getModID() { 19 | return "toughasnails"; 20 | } 21 | 22 | @Override 23 | public void onInitStep(Step step, ParallelDispatchEvent event) { 24 | if (step == Step.LOAD_COMPLETE) { 25 | MinecraftForge.EVENT_BUS.register(new ThirstHandler()); 26 | TemperatureModifier.register(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/diet/DietCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.diet; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.common.MinecraftForge; 6 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 7 | 8 | import de.teamlapen.lib.lib.util.IInitListener.Step; 9 | 10 | public class DietCompat implements IModCompat { 11 | 12 | static ForgeConfigSpec.BooleanValue disableDiet; 13 | 14 | @Override 15 | public void buildConfig(ForgeConfigSpec.Builder builder) { 16 | disableDiet = builder.comment("Disable diet functionality for vampires").define("disableVampireDiet", true); 17 | } 18 | 19 | @Override 20 | public String getModID() { 21 | return "diet"; 22 | } 23 | 24 | @Override 25 | public void onInitStep(Step step, ParallelDispatchEvent event) { 26 | if (step == Step.COMMON_SETUP) { 27 | MinecraftForge.EVENT_BUS.addListener(DietEventHandler::onLevelChanged); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/guardvillagers/GuardVillagerCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.guardvillagers; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.common.MinecraftForge; 6 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 7 | import org.jetbrains.annotations.Nullable; 8 | 9 | public class GuardVillagerCompat implements IModCompat { 10 | public static final String ID = "guardvillagers"; 11 | 12 | @Override 13 | public void buildConfig(ForgeConfigSpec.Builder builder) { 14 | 15 | } 16 | 17 | @Override 18 | public void onInitStep(Step step, ParallelDispatchEvent event) { 19 | if (step == Step.COMMON_SETUP) { 20 | MinecraftForge.EVENT_BUS.register(new GuardVillagerEventHandler()); 21 | } 22 | } 23 | 24 | @Nullable 25 | @Override 26 | public String getAcceptedVersionRange() { 27 | return "[1.20.1-1.6.3,)"; 28 | } 29 | 30 | @Override 31 | public String getModID() { 32 | return ID; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/AltarOfInfusionProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.blocks.HunterTableBlock; 4 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 5 | import net.minecraft.network.chat.Component; 6 | import net.minecraft.resources.ResourceLocation; 7 | import net.minecraft.world.level.block.state.BlockState; 8 | import snownee.jade.api.BlockAccessor; 9 | import snownee.jade.api.IBlockComponentProvider; 10 | import snownee.jade.api.ITooltip; 11 | import snownee.jade.api.config.IPluginConfig; 12 | import snownee.jade.api.ui.IElementHelper; 13 | 14 | public enum AltarOfInfusionProvider implements IBlockComponentProvider { 15 | INSTANCE; 16 | 17 | @Override 18 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 19 | iTooltip.add(IElementHelper.get().text(Component.translatable("text.vampirism.for_to_levels", 5, 14))); 20 | } 21 | 22 | @Override 23 | public ResourceLocation getUid() { 24 | return JadePlugin.ALTAR_OF_INFUSION; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/mca/client/RenderVillagerMCAConverted.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.mca.client; 2 | 3 | import forge.net.mca.client.model.VillagerEntityModelMCA; 4 | import forge.net.mca.client.render.VillagerEntityMCARenderer; 5 | import forge.net.mca.entity.VillagerEntityMCA; 6 | import net.minecraft.client.model.geom.builders.CubeDeformation; 7 | import net.minecraft.client.model.geom.builders.LayerDefinition; 8 | import net.minecraft.client.model.geom.builders.MeshDefinition; 9 | import net.minecraft.client.renderer.entity.EntityRendererProvider; 10 | 11 | public class RenderVillagerMCAConverted extends VillagerEntityMCARenderer { 12 | public RenderVillagerMCAConverted(EntityRendererProvider.Context ctx) { 13 | super(ctx); 14 | this.addLayer(new LayerVampireFace<>(this, createModel(VillagerEntityModelMCA.bodyData(new CubeDeformation(0.01F))).hideWears())); 15 | } 16 | 17 | private static VillagerEntityModelMCA createModel(MeshDefinition data) { 18 | return new VillagerEntityModelMCA(LayerDefinition.create(data, 64, 64).bakeRoot()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/diet/DietEventHandler.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.diet; 2 | 3 | import com.illusivesoulworks.diet.common.capability.DietCapability; 4 | import de.teamlapen.vampirism.api.VReference; 5 | import de.teamlapen.vampirism.api.event.PlayerFactionEvent; 6 | 7 | 8 | public class DietEventHandler { 9 | 10 | private final static String DATA_KEY = "vampirism_integrations_disabled_diet"; 11 | 12 | public static void onLevelChanged(PlayerFactionEvent.FactionLevelChanged event) { 13 | if (DietCompat.disableDiet.get() && event.getCurrentFaction() == VReference.VAMPIRE_FACTION && event.getNewLevel() > 0) { 14 | DietCapability.get(event.getPlayer().getPlayer()).ifPresent(c -> c.setActive(false)); 15 | event.getPlayer().getPlayer().getPersistentData().putBoolean(DATA_KEY, true); 16 | } else if (event.getPlayer().getPlayer().getPersistentData().getBoolean(DATA_KEY)) { 17 | DietCapability.get(event.getPlayer().getPlayer()).ifPresent(c -> c.setActive(true)); 18 | event.getPlayer().getPlayer().getPersistentData().remove(DATA_KEY); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/ResearchTableProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.blocks.HunterTableBlock; 4 | import de.teamlapen.vampirism.entity.player.hunter.HunterLevelingConf; 5 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 6 | import net.minecraft.network.chat.Component; 7 | import net.minecraft.resources.ResourceLocation; 8 | import net.minecraft.world.level.block.state.BlockState; 9 | import snownee.jade.api.BlockAccessor; 10 | import snownee.jade.api.IBlockComponentProvider; 11 | import snownee.jade.api.ITooltip; 12 | import snownee.jade.api.config.IPluginConfig; 13 | import snownee.jade.api.ui.IElementHelper; 14 | 15 | public enum ResearchTableProvider implements IBlockComponentProvider { 16 | INSTANCE; 17 | 18 | @Override 19 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 20 | iTooltip.add(IElementHelper.get().text(Component.translatable("text.vampirism.for_to_levels",5, 14))); 21 | } 22 | 23 | @Override 24 | public ResourceLocation getUid() { 25 | return JadePlugin.RESEARCH_TABLE; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/player_companion/PlayerCompanionCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.player_companion; 2 | 3 | import de.teamlapen.lib.lib.util.IInitListener; 4 | import de.teamlapen.vampirism_integrations.util.IModCompat; 5 | import net.minecraftforge.common.ForgeConfigSpec; 6 | import net.minecraftforge.common.MinecraftForge; 7 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 8 | 9 | public class PlayerCompanionCompat implements IModCompat { 10 | 11 | static ForgeConfigSpec.BooleanValue replenish_blood_on_death; 12 | 13 | @Override 14 | public void buildConfig(ForgeConfigSpec.Builder builder) { 15 | replenish_blood_on_death = builder.comment("Replenish companion blood on companion death").define("replenish_blood_on_death", true); 16 | } 17 | 18 | @Override 19 | public String getModID() { 20 | return "player_companions"; 21 | } 22 | 23 | @Override 24 | public void onInitStep(IInitListener.Step step, ParallelDispatchEvent event) { 25 | if (step == IInitListener.Step.COMMON_SETUP) { 26 | MinecraftForge.EVENT_BUS.addListener(RespawnHandler::onDeath); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/betteranimals/BetterAnimalsConvertibles.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.betteranimals; 2 | 3 | import de.teamlapen.vampirism.api.VampirismAPI; 4 | import de.teamlapen.vampirism.api.entity.IVampirismEntityRegistry; 5 | import de.teamlapen.vampirism_integrations.util.REFERENCE; 6 | import net.minecraft.world.entity.EntityType; 7 | import net.minecraft.resources.ResourceLocation; 8 | 9 | import java.util.function.Function; 10 | 11 | public class BetterAnimalsConvertibles { 12 | 13 | static void changeConvertibles() { 14 | Function overlay = (String name) -> new ResourceLocation(REFERENCE.MODID, String.format("textures/entity/betteranimals/%s_overlay.png", name)); 15 | IVampirismEntityRegistry registry = VampirismAPI.entityRegistry(); 16 | 17 | registry.addConvertible(EntityType.COW, overlay.apply("cow")); 18 | registry.addConvertible(EntityType.OCELOT, overlay.apply("ocelot")); 19 | registry.addConvertible(EntityType.PIG, overlay.apply("pig")); 20 | registry.addConvertible(EntityType.POLAR_BEAR, overlay.apply("polar_bear")); 21 | registry.addConvertible(EntityType.SHEEP, overlay.apply("sheep")); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new_compat.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New compatibility 3 | about: Request integration with a not yet added mod 4 | title: 'Request compat for:' 5 | labels: 'NewCompat, unconfirmed' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | I would like to see integrations added for the mod mentioned in the title. 17 | I confirm it is available for the latest Minecraft version at the time of writing. 18 | 19 | ## About the mod 20 | Link to the mod page (e.g. on CurseForge): 21 | 22 | 23 | Link to mod source/API: 24 | 25 | 26 | ## What should be integrated exactly 27 | 28 | 29 | 30 | ## I can help with 31 | 32 | 33 | ## Additional comments 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/AltarOfInspirationProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.blocks.HunterTableBlock; 4 | import de.teamlapen.vampirism.entity.player.hunter.HunterLevelingConf; 5 | import de.teamlapen.vampirism.entity.player.vampire.VampireLevelingConf; 6 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 7 | import net.minecraft.network.chat.Component; 8 | import net.minecraft.resources.ResourceLocation; 9 | import net.minecraft.world.level.block.state.BlockState; 10 | import snownee.jade.api.BlockAccessor; 11 | import snownee.jade.api.IBlockComponentProvider; 12 | import snownee.jade.api.ITooltip; 13 | import snownee.jade.api.config.IPluginConfig; 14 | import snownee.jade.api.ui.IElementHelper; 15 | 16 | public enum AltarOfInspirationProvider implements IBlockComponentProvider { 17 | INSTANCE; 18 | 19 | @Override 20 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 21 | iTooltip.add(IElementHelper.get().text(Component.translatable("text.vampirism.for_to_levels", 2, 4))); 22 | } 23 | 24 | @Override 25 | public ResourceLocation getUid() { 26 | return JadePlugin.ALTAR_OF_INSPIRATION; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/data/vampirism_integrations/vampirism/single_jigsaw_pieces.json: -------------------------------------------------------------------------------- 1 | { 2 | "single_pieces": [ 3 | "ctov:village/beach/jobsite/hunter_trainer", 4 | "ctov:village/christmas/jobsite/hunter_trainer", 5 | "ctov:village/desert/jobsite/hunter_trainer", 6 | "ctov:village/desert_oasis/jobsite/hunter_trainer", 7 | "ctov:village/halloween/jobsite/hunter_trainer", 8 | "ctov:village/jungle/jobsite/hunter_trainer", 9 | "ctov:village/jungle_tree/jobsite/hunter_trainer", 10 | "ctov:village/mesa/jobsite/hunter_trainer", 11 | "ctov:village/mesa_fortified/jobsite/hunter_trainer", 12 | "ctov:village/mountain/jobsite/hunter_trainer", 13 | "ctov:village/mountain_alpine/jobsite/hunter_trainer", 14 | "ctov:village/mushroom/jobsite/hunter_trainer", 15 | "ctov:village/plains/jobsite/hunter_trainer", 16 | "ctov:village/plains_fortified/jobsite/hunter_trainer", 17 | "ctov:village/savanna/jobsite/hunter_trainer", 18 | "ctov:village/savanna_na/jobsite/hunter_trainer", 19 | "ctov:village/snowy_igloo/jobsite/hunter_trainer", 20 | "ctov:village/swamp/jobsite/hunter_trainer", 21 | "ctov:village/swamp_fortified/jobsite/hunter_trainer", 22 | "ctov:village/taiga/jobsite/hunter_trainer", 23 | "ctov:village/swamp_fortified/jobsite/hunter_trainer", 24 | "ctov:village/taiga_fortified/jobsite/hunter_trainer" 25 | ] 26 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/bop/BOPCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.bop; 2 | 3 | import de.teamlapen.lib.lib.util.IInitListener; 4 | import de.teamlapen.vampirism_integrations.VampirismIntegrationsMod; 5 | import de.teamlapen.vampirism_integrations.util.IModCompat; 6 | import net.minecraftforge.common.ForgeConfigSpec; 7 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 8 | 9 | public class BOPCompat implements IModCompat { 10 | 11 | public static final String ID = "biomesoplenty"; 12 | ForgeConfigSpec.BooleanValue disabled_sundamage_ominous_woods; 13 | 14 | @Override 15 | public String getModID() { 16 | return ID; 17 | } 18 | 19 | @Override 20 | public void buildConfig(ForgeConfigSpec.Builder builder) { 21 | disabled_sundamage_ominous_woods = builder.comment("Whether sundamage should be applied to vampires in this biome or not").define("disable_sundamage_ominous_woods", true); 22 | } 23 | 24 | 25 | @Override 26 | public void onInitStep(IInitListener.Step step, ParallelDispatchEvent event) { 27 | if (step == Step.COMMON_SETUP) { 28 | try { 29 | Biomes.registerNoSundamageBiomes(this); 30 | } catch (Exception e) { 31 | VampirismIntegrationsMod.LOGGER.error("Failed to disable sundamage for biomes o plenty biomes", e); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/util/NearestVampireSmartTargetGoal.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.util; 2 | 3 | import de.teamlapen.vampirism.api.VReference; 4 | import de.teamlapen.vampirism.api.VampirismAPI; 5 | import de.teamlapen.vampirism.util.TotemHelper; 6 | import net.minecraft.server.level.ServerLevel; 7 | import net.minecraft.world.entity.PathfinderMob; 8 | import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; 9 | 10 | 11 | /** 12 | * Entity target AI that targets vampires unless in a vampire village 13 | */ 14 | public class NearestVampireSmartTargetGoal extends NearestAttackableTargetGoal { 15 | private boolean insideVampireVillage; 16 | 17 | public NearestVampireSmartTargetGoal(PathfinderMob creature, boolean checkSight, boolean onlyNearby) { 18 | super(creature, PathfinderMob.class, 10, checkSight, onlyNearby, VampirismAPI.factionRegistry().getPredicate(VReference.HUNTER_FACTION, false, true, false, false, VReference.VAMPIRE_FACTION)); 19 | } 20 | 21 | @Override 22 | public boolean canUse() { 23 | if (mob.tickCount % 32 == 0 && mob.level() instanceof ServerLevel serverLevel) { 24 | this.insideVampireVillage = TotemHelper.getTotemNearPos(serverLevel, mob.blockPosition(), true).map(totem -> totem.getControllingFaction() == VReference.VAMPIRE_FACTION).orElse(false); 25 | } 26 | return !insideVampireVillage && super.canUse(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/waila/GarlicBeaconProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.waila; 2 | 3 | import de.teamlapen.vampirism.blockentity.GarlicDiffuserBlockEntity; 4 | import mcp.mobius.waila.api.IBlockAccessor; 5 | import mcp.mobius.waila.api.IBlockComponentProvider; 6 | import mcp.mobius.waila.api.IPluginConfig; 7 | import mcp.mobius.waila.api.ITooltip; 8 | import net.minecraft.network.chat.Component; 9 | import net.minecraft.world.item.ItemStack; 10 | import net.minecraft.world.item.TooltipFlag; 11 | import net.minecraft.world.level.block.entity.BlockEntity; 12 | 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | 17 | public class GarlicBeaconProvider implements IBlockComponentProvider { 18 | 19 | 20 | @Override 21 | public void appendBody(ITooltip tooltip, IBlockAccessor accessor, IPluginConfig config) { 22 | ItemStack stack = accessor.getStack(); 23 | List l = new ArrayList<>(); 24 | stack.getItem().appendHoverText(stack, accessor.getWorld(), l, TooltipFlag.Default.NORMAL); 25 | l.forEach(tooltip::addLine); 26 | BlockEntity t = accessor.getBlockEntity(); 27 | if (t instanceof GarlicDiffuserBlockEntity) { 28 | int fueled = ((GarlicDiffuserBlockEntity) t).getFuelTime(); 29 | if (fueled > 0) { 30 | tooltip.addLine(Component.literal("Fueled for " + (fueled / 20 / 20) + "min")); 31 | } 32 | } 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/EntityBloodProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.entity.ExtendedCreature; 4 | import de.teamlapen.vampirism_integrations.jade.elements.BloodElement; 5 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 6 | import net.minecraft.ChatFormatting; 7 | import net.minecraft.network.chat.Component; 8 | import net.minecraft.resources.ResourceLocation; 9 | import snownee.jade.api.EntityAccessor; 10 | import snownee.jade.api.IEntityComponentProvider; 11 | import snownee.jade.api.ITooltip; 12 | import snownee.jade.api.config.IPluginConfig; 13 | import snownee.jade.api.ui.IElementHelper; 14 | 15 | public enum EntityBloodProvider implements IEntityComponentProvider { 16 | INSTANCE; 17 | 18 | @Override 19 | public void appendTooltip(ITooltip iTooltip, EntityAccessor entityAccessor, IPluginConfig iPluginConfig) { 20 | ExtendedCreature.getSafe(entityAccessor.getEntity()).ifPresent(x -> { 21 | if (x.hasPoisonousBlood()) { 22 | iTooltip.add(IElementHelper.get().text(Component.translatable("text.vampirism.blood.poisonous").withStyle(ChatFormatting.DARK_GREEN))); 23 | } else { 24 | iTooltip.add(new BloodElement(x.getMaxBlood(), x.getBlood())); 25 | } 26 | }); 27 | } 28 | 29 | @Override 30 | public ResourceLocation getUid() { 31 | return JadePlugin.ENTITY_BLOOD; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/resources/assets/vampirism_integrations/lang/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "config.jade.plugin_vampirism.garlic_beacon": "Garlic Beacon", 3 | "config.jade.plugin_vampirism.player_faction": "Player Faction", 4 | "config.jade.plugin_vampirism.entity_blood": "Entity Blood", 5 | "config.jade.plugin_vampirism.entity_blood.show_fraction": "Show Fractions", 6 | "config.jade.plugin_vampirism.entity_blood.icon_per_line": "Icons per Line", 7 | "config.jade.plugin_vampirism.entity_blood.max_for_render": "Max Blood for Render", 8 | "config.jade.plugin_vampirism.player_faction.lord_level_number": "Show Lord Level Number", 9 | "config.jade.plugin_vampirism.weapon_table": "Weapon Table", 10 | "config.jade.plugin_vampirism.pedestal_charging": "Pedestal Charging", 11 | "config.jade.plugin_vampirism.altar_of_infusion": "Altar of Infusion", 12 | "config.jade.plugin_vampirism.totem": "Totem", 13 | "config.jade.plugin_vampirism.potion_table": "Potion Table", 14 | "config.jade.plugin_vampirism.altar_of_inspiration": "Altar of Inspiration", 15 | "config.jade.plugin_vampirism.alchemy_table": "Alchemy Table", 16 | "config.jade.plugin_vampirism.research_table": "Research Table", 17 | "config.jade.plugin_vampirism.altar_pillar": "Altar Pillar", 18 | "narration.vampirism.health": "Blood: %s", 19 | "text.vampirism_integrations.defending": "Defending", 20 | "text.vampirism_integrations.attacking": "Attacking", 21 | "text.vampirism_integrations.controlling": "Controlling", 22 | "text.vampirism_integrations.value": "Value: %s" 23 | } -------------------------------------------------------------------------------- /gradle/versioning.gradle: -------------------------------------------------------------------------------- 1 | project.mod_version = "${project.main_version}.${project.major_version}.${project.minor_version}" 2 | if (hasProperty("beta")) { 3 | project.mod_version = project.mod_version + "-beta." + beta 4 | project.type = "beta" 5 | project.classification = "public" 6 | } else if (hasProperty("release")) { 7 | project.type = "release" 8 | project.classification = "public" 9 | } else if (hasProperty("alpha")) { 10 | project.mod_version = project.mod_version + "-alpha+" + getDate() 11 | project.type = "alpha" 12 | project.classification = "public" 13 | } 14 | else if (System.getenv().CI) { 15 | project.mod_version = project.mod_version + "-test+" + System.getenv().GIT_BRANCH + "." + System.getenv().GIT_COMMIT 16 | writeVersion() 17 | project.type = "test" 18 | project.classification = "private" 19 | } else if(hasProperty("testid")) { 20 | project.mod_version = project.mod_version + "-test+" + getDate()+"+"+testid 21 | project.type = "test" 22 | project.classification = "private" 23 | } else { 24 | project.mod_version = project.mod_version + "-build+" + getDate() 25 | project.type = "test" 26 | project.classification = "test" 27 | } 28 | 29 | version = project.minecraft_version + "-" + project.mod_version 30 | 31 | logger.lifecycle "Version " + project.mod_version 32 | 33 | 34 | def writeVersion() { 35 | def file = new File("version.txt") 36 | file.text = project.mod_version 37 | } 38 | 39 | def getDate() { 40 | def date = new Date() 41 | def formattedDate = date.format('YYYYMMdd-HHmm') 42 | return formattedDate 43 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/graveyard/GraveyardCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.graveyard; 2 | 3 | 4 | import de.teamlapen.lib.lib.util.IInitListener; 5 | import de.teamlapen.vampirism_integrations.VampirismIntegrationsMod; 6 | import de.teamlapen.vampirism_integrations.util.IModCompat; 7 | import net.minecraftforge.common.ForgeConfigSpec; 8 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 9 | 10 | public class GraveyardCompat implements IModCompat { 11 | 12 | ForgeConfigSpec.BooleanValue disabled_sundamage_haunted; 13 | 14 | ForgeConfigSpec.BooleanValue disabled_sundamage_other; 15 | 16 | @Override 17 | public void buildConfig(ForgeConfigSpec.Builder builder) { 18 | disabled_sundamage_haunted = builder.comment("Whether sundamage should be applied to vampires in the haunted biomes or not").define("disable_sundamage_haunted", true); 19 | disabled_sundamage_other = builder.comment("Whether sundamage should be applied to vampires in the other graveyard biomes or not").define("disable_sundamage_other", false); 20 | 21 | } 22 | 23 | @Override 24 | public String getModID() { 25 | return "nyctophobia"; 26 | } 27 | 28 | public void onInitStep(IInitListener.Step step, ParallelDispatchEvent event) { 29 | if (step == Step.COMMON_SETUP) { 30 | try { 31 | Biomes.registerNoSundamageBiomes(this); 32 | } catch (Exception e) { 33 | VampirismIntegrationsMod.LOGGER.error("Failed to disable sundamge for graveyard biomes", e); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/WeaponTableProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.blocks.WeaponTableBlock; 4 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 5 | import net.minecraft.network.chat.Component; 6 | import net.minecraft.resources.ResourceLocation; 7 | import net.minecraft.world.item.Items; 8 | import net.minecraft.world.level.block.state.BlockState; 9 | import snownee.jade.api.BlockAccessor; 10 | import snownee.jade.api.IBlockComponentProvider; 11 | import snownee.jade.api.ITooltip; 12 | import snownee.jade.api.config.IPluginConfig; 13 | import snownee.jade.api.ui.IElementHelper; 14 | 15 | public enum WeaponTableProvider implements IBlockComponentProvider { 16 | INSTANCE; 17 | 18 | @Override 19 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 20 | BlockState blockState = blockAccessor.getBlockState(); 21 | int value = blockState.getValue(WeaponTableBlock.LAVA); 22 | IElementHelper helper = IElementHelper.get(); 23 | if (value > 0) { 24 | iTooltip.add(helper.smallItem(Items.LAVA_BUCKET.getDefaultInstance())); 25 | } else { 26 | iTooltip.add(helper.smallItem(Items.BUCKET.getDefaultInstance())); 27 | } 28 | iTooltip.append(helper.spacer(5, 0)); 29 | iTooltip.append(helper.text(Component.literal("%s/%s".formatted(value, WeaponTableBlock.MAX_LAVA)))); 30 | } 31 | 32 | @Override 33 | public ResourceLocation getUid() { 34 | return JadePlugin.WEAPON_TABLE; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/tan/ThirstHandler.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.tan; 2 | 3 | import de.teamlapen.vampirism.util.Helper; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.resources.ResourceLocation; 6 | import net.minecraft.world.entity.Entity; 7 | import net.minecraft.world.entity.player.Player; 8 | import net.minecraftforge.client.event.RenderGuiOverlayEvent; 9 | import net.minecraftforge.event.entity.living.LivingEvent; 10 | import net.minecraftforge.eventbus.api.SubscribeEvent; 11 | import toughasnails.api.thirst.IThirst; 12 | import toughasnails.api.thirst.ThirstHelper; 13 | 14 | /** 15 | * Remove/Limit thirst for vampires 16 | */ 17 | public class ThirstHandler { 18 | 19 | private static final ResourceLocation THIRST_OVERLAY = new ResourceLocation("toughasnails", "thirst_level"); 20 | @SubscribeEvent 21 | public void onPlayerUpdate(LivingEvent.LivingTickEvent event) { 22 | Entity e = event.getEntity(); 23 | if (TANCompat.disableThirst.get() && e.tickCount % 32 == 0 && e instanceof Player && Helper.isVampire((Player) e)) { 24 | IThirst thirst = ThirstHelper.getThirst((Player) e); 25 | if (thirst.getThirst() < 10) { 26 | thirst.setThirst(10); 27 | } 28 | } 29 | } 30 | 31 | @SubscribeEvent 32 | public void renderThirstLevel(RenderGuiOverlayEvent event) { 33 | if (event.getOverlay().id().equals(THIRST_OVERLAY) && TANCompat.disableThirst.get() && Minecraft.getInstance().player != null && Helper.isVampire(Minecraft.getInstance().player)) { 34 | event.setCanceled(true); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/AltarPillarProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.blocks.AltarPillarBlock; 4 | import de.teamlapen.vampirism.blocks.WeaponTableBlock; 5 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 6 | import net.minecraft.network.chat.Component; 7 | import net.minecraft.resources.ResourceLocation; 8 | import net.minecraft.world.item.Items; 9 | import net.minecraft.world.level.block.state.BlockState; 10 | import snownee.jade.api.BlockAccessor; 11 | import snownee.jade.api.IBlockComponentProvider; 12 | import snownee.jade.api.ITooltip; 13 | import snownee.jade.api.config.IPluginConfig; 14 | import snownee.jade.api.ui.IElementHelper; 15 | 16 | public enum AltarPillarProvider implements IBlockComponentProvider { 17 | INSTANCE; 18 | 19 | @Override 20 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 21 | BlockState blockState = blockAccessor.getBlockState(); 22 | AltarPillarBlock.EnumPillarType value = blockState.getValue(AltarPillarBlock.TYPE_PROPERTY); 23 | IElementHelper helper = IElementHelper.get(); 24 | int meta = value.meta; 25 | if (meta > 0) { 26 | iTooltip.add(helper.smallItem(value.fillerBlock.asItem().getDefaultInstance())); 27 | iTooltip.append(helper.spacer(5, 0)); 28 | iTooltip.append(helper.text(Component.translatable("text.vampirism_integrations.value", meta))); 29 | } 30 | } 31 | 32 | @Override 33 | public ResourceLocation getUid() { 34 | return JadePlugin.ALTAR_PILLAR; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/waila/PlayerDataProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.waila; 2 | 3 | import de.teamlapen.lib.lib.util.UtilLib; 4 | import de.teamlapen.vampirism.api.VampirismAPI; 5 | import de.teamlapen.vampirism.api.entity.factions.IFaction; 6 | import mcp.mobius.waila.api.IEntityAccessor; 7 | import mcp.mobius.waila.api.IEntityComponentProvider; 8 | import mcp.mobius.waila.api.IPluginConfig; 9 | import mcp.mobius.waila.api.ITooltip; 10 | import net.minecraft.network.chat.Component; 11 | import net.minecraft.world.entity.player.Player; 12 | 13 | /** 14 | * Provides information about faction players 15 | */ 16 | class PlayerDataProvider implements IEntityComponentProvider { 17 | 18 | @Override 19 | public void appendBody(ITooltip tooltip, IEntityAccessor accessor, IPluginConfig config) { 20 | if (config.getBoolean(WailaPlugin.SHOW_PLAYER_INFO)) { 21 | if (accessor.getEntity() instanceof Player) { 22 | VampirismAPI.getFactionPlayerHandler(accessor.getEntity()).ifPresent(fph -> { 23 | if (fph.getCurrentLevel() > 0) { 24 | fph.getCurrentFactionPlayer().ifPresent(fp -> { 25 | IFaction f = fp.getDisguisedAs(); 26 | if (f != null) { 27 | tooltip.addLine(Component.literal(String.format("%s %s: %s", f.getName().getString(), UtilLib.translate("text.vampirism.level"), fph.getCurrentLevel())).withStyle(style -> style.withColor(f.getChatColor()))); 28 | } 29 | }); 30 | } 31 | }); 32 | 33 | } 34 | } 35 | } 36 | 37 | 38 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/ctov/ChoiceTheoremOverhauledVillage.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.ctov; 2 | 3 | import de.teamlapen.vampirism.util.MixinHooks; 4 | import de.teamlapen.vampirism_integrations.util.IModCompat; 5 | import net.minecraft.resources.ResourceLocation; 6 | import net.minecraftforge.common.ForgeConfigSpec; 7 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 8 | 9 | import java.util.Arrays; 10 | 11 | /** 12 | * It is currently required to register single jigsaw pieces by code to generate them only once per village. This is subject to change, thus the extra `vampirism/single_jigsaw_pieces.json` file. 13 | */ 14 | public class ChoiceTheoremOverhauledVillage implements IModCompat { 15 | @Override 16 | public void buildConfig(ForgeConfigSpec.Builder builder) { 17 | 18 | } 19 | 20 | @Override 21 | public String getModID() { 22 | return "ctov"; 23 | } 24 | 25 | @Override 26 | public void onInitStep(Step step, ParallelDispatchEvent event) { 27 | if (step == Step.ENQUEUE_IMC) { 28 | registerHunterHouses(); 29 | } 30 | } 31 | 32 | private void registerHunterHouses() { 33 | registerHunterHouses("beach", "christmas", "desert", "desert_oasis", "halloween", "jungle", "jungle_tree", "mesa", "mesa_fortified", "mountain", "mountain_alpine", "mushroom", "plains", "plains_fortified", "savanna", "savanna_na", "snowy_igloo", "swamp", "swamp_fortified", "taiga", "taiga_fortified"); 34 | } 35 | private void registerHunterHouses(String... paths) { 36 | String template = "village/%s/jobsite/hunter_trainer"; 37 | MixinHooks.addSingleInstanceStructure(Arrays.stream(paths).map(path -> new ResourceLocation("ctov", template.formatted(path))).toList()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/waila/BloodComponent.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.waila; 2 | 3 | import de.teamlapen.vampirism_integrations.util.REFERENCE; 4 | import mcp.mobius.waila.api.ITooltipComponent; 5 | import net.minecraft.client.gui.GuiGraphics; 6 | import net.minecraft.resources.ResourceLocation; 7 | import net.minecraft.util.Mth; 8 | 9 | public class BloodComponent implements ITooltipComponent { 10 | static final ResourceLocation ICONS = new ResourceLocation(REFERENCE.VAMPIRISM_ID, "textures/gui/icons.png"); 11 | 12 | private final int blood; 13 | private final int iconCount; 14 | private final int lineWidth; 15 | 16 | public BloodComponent(int blood, int maxBlood, int maxPerLine) { 17 | this.blood = blood; 18 | this.iconCount = Mth.positiveCeilDiv(Mth.ceil(Math.max(blood, maxBlood)), 2); 19 | this.lineWidth = Math.min(iconCount, maxPerLine); 20 | } 21 | 22 | @Override 23 | public int getWidth() { 24 | return (lineWidth * 9) + 1; 25 | } 26 | 27 | @Override 28 | public int getHeight() { 29 | return (Mth.positiveCeilDiv(iconCount, lineWidth) * 3) + 6; 30 | } 31 | 32 | @Override 33 | public void render(GuiGraphics ctx, int x, int y, float delta) { 34 | int filled = blood / 2 - 1; 35 | int half = filled + blood % 2; 36 | 37 | for (int i = iconCount - 1; i >= 0; i--) { 38 | int ix = x + ((i % lineWidth) * 8); 39 | int iy = y + ((i / lineWidth) * 3); 40 | 41 | ctx.blit(ICONS, ix, iy, 0, 0, 9, 9); 42 | if (i <= filled) { 43 | ctx.blit(ICONS, ix, iy, 9, 0, 9, 9); 44 | } else if (i == half) { 45 | ctx.blit(ICONS, ix, iy, 18, 0, 9, 9); 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/waila/TankDataProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.waila; 2 | 3 | import de.teamlapen.lib.lib.util.UtilLib; 4 | import de.teamlapen.vampirism.api.VReference; 5 | import mcp.mobius.waila.api.IBlockAccessor; 6 | import mcp.mobius.waila.api.IBlockComponentProvider; 7 | import mcp.mobius.waila.api.IPluginConfig; 8 | import mcp.mobius.waila.api.ITooltip; 9 | import net.minecraft.world.level.block.entity.BlockEntity; 10 | import net.minecraft.network.chat.Component; 11 | import net.minecraft.ChatFormatting; 12 | import net.minecraftforge.common.capabilities.ForgeCapabilities; 13 | import net.minecraftforge.fluids.FluidStack; 14 | 15 | import java.util.List; 16 | 17 | /** 18 | * Provides information about the fluid level in blood containers 19 | */ 20 | class TankDataProvider implements IBlockComponentProvider { 21 | 22 | @Override 23 | public void appendBody(ITooltip tooltip, IBlockAccessor accessor, IPluginConfig config) { 24 | if (accessor.getBlockState().hasBlockEntity()) { 25 | BlockEntity tileEntity = accessor.getBlockEntity(); 26 | if (tileEntity != null) { 27 | tileEntity.getCapability(ForgeCapabilities.FLUID_HANDLER, accessor.getSide()).ifPresent(fh -> { 28 | for (int i = 0; i < fh.getTanks(); i++) { 29 | FluidStack c = fh.getFluidInTank(i); 30 | if (!c.isEmpty()) { 31 | tooltip.addLine(Component.literal(String.format("%s: %d/%d", UtilLib.translate(c.getTranslationKey()), c.getAmount() / VReference.FOOD_TO_FLUID_BLOOD, fh.getTankCapacity(i) / VReference.FOOD_TO_FLUID_BLOOD)).withStyle(ChatFormatting.RED)); 32 | } 33 | } 34 | 35 | }); 36 | } 37 | } 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/survive/SurviveCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.survive; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.common.MinecraftForge; 6 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 7 | import org.apache.logging.log4j.LogManager; 8 | 9 | import javax.annotation.Nullable; 10 | 11 | public class SurviveCompat implements IModCompat { 12 | 13 | static ForgeConfigSpec.BooleanValue disableThirstForVampires; 14 | static ForgeConfigSpec.BooleanValue enableTemperatureVampires; 15 | static ForgeConfigSpec.BooleanValue enableStaminaBoostVampires; 16 | 17 | @Override 18 | public void buildConfig(ForgeConfigSpec.Builder builder) { 19 | disableThirstForVampires = builder.comment("Whether vampires should not need to drink").define("disableThirstVampires", true); 20 | enableTemperatureVampires = builder.comment("Grant vampires cold resistance, but decrease heat resistance").define("enableTemperatureVampires", true); 21 | enableStaminaBoostVampires = builder.comment("Increase natural regeneration for vampires").define("enableStaminaBoostVampires", true); 22 | } 23 | 24 | @Override 25 | public String getModID() { 26 | return "survive"; 27 | } 28 | 29 | @Nullable 30 | @Override 31 | public String getAcceptedVersionRange() { 32 | return "[1.16.5-3.4.4,)"; 33 | } 34 | 35 | @Override 36 | public void onInitStep(Step step, ParallelDispatchEvent event) { 37 | if (step == Step.COMMON_SETUP) { 38 | try { 39 | MinecraftForge.EVENT_BUS.register(new SurviveHandler()); 40 | } catch (Exception e) { 41 | LogManager.getLogger().error("Failed to register survive thirst handler", e); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/mca/MCAEventHandler.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.mca; 2 | 3 | import de.teamlapen.lib.lib.util.UtilLib; 4 | import de.teamlapen.vampirism.api.entity.convertible.IConvertedCreature; 5 | import de.teamlapen.vampirism.api.entity.factions.IFactionEntity; 6 | import de.teamlapen.vampirism.api.event.VampirismVillageEvent; 7 | import forge.net.mca.entity.VillagerEntityMCA; 8 | import net.minecraft.world.entity.EntityType; 9 | import net.minecraft.world.entity.npc.Villager; 10 | import net.minecraftforge.eventbus.api.SubscribeEvent; 11 | import net.minecraftforge.registries.ForgeRegistries; 12 | 13 | public class MCAEventHandler { 14 | 15 | 16 | @SubscribeEvent 17 | public void onCreateAggressiveVillager(VampirismVillageEvent.MakeAggressive event) { 18 | if (event.getOldVillager() instanceof VillagerEntityMCA villagerEntityMCA) { 19 | if (villagerEntityMCA instanceof IFactionEntity) return; 20 | if (villagerEntityMCA.getAge() < 0) return; 21 | Villager v = AggressiveVillagerEntityMCA.makeAngry(villagerEntityMCA); 22 | if (v != null) { 23 | UtilLib.replaceEntity(event.getOldVillager(), v); 24 | event.setCanceled(true); 25 | } 26 | } 27 | } 28 | 29 | @SubscribeEvent 30 | public void onSpawnNewVillager(VampirismVillageEvent.SpawnNewVillager event) { 31 | boolean gender = event.getNewVillager().getRandom().nextBoolean(); 32 | boolean vampire = event.getNewVillager() instanceof IConvertedCreature; 33 | 34 | EntityType t = vampire ? (gender ? MCARegistration.MALE_CONVERTED_VILLAGER.get() : MCARegistration.FEMALE_CONVERTED_VILLAGER.get()) : gender ? ForgeRegistries.ENTITY_TYPES.getValue(MCACompat.MALE_VILLAGER) : ForgeRegistries.ENTITY_TYPES.getValue(MCACompat.FEMALE_VILLAGER); 35 | event.setNewVillager((Villager) t.create(event.getWorld())); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/mca/MCACompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.mca; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraft.resources.ResourceLocation; 5 | import net.minecraftforge.common.ForgeConfigSpec; 6 | import net.minecraftforge.common.MinecraftForge; 7 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 8 | import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; 9 | import org.jetbrains.annotations.Nullable; 10 | 11 | public class MCACompat implements IModCompat { 12 | 13 | public static final String CONVERTED_MALE_VILLAGER_ID = "male_villager_mca_converted"; 14 | public static final String CONVERTED_FEMALE_VILLAGER_ID = "female_villager_mca_converted"; 15 | public static final String ANGRY_MALE_VILLAGER_ID = "male_villager_mca_angry"; 16 | public static final String ANGRY_FEMALE_VILLAGER_ID = "female_villager_mca_angry"; 17 | 18 | public static final String ID = "mca"; 19 | protected static final ResourceLocation MALE_VILLAGER = new ResourceLocation(ID, "male_villager"); 20 | protected static final ResourceLocation FEMALE_VILLAGER = new ResourceLocation(ID, "female_villager"); 21 | 22 | public MCACompat() { 23 | MCARegistration.registerEntities(FMLJavaModLoadingContext.get().getModEventBus()); 24 | } 25 | 26 | @Override 27 | public void buildConfig(ForgeConfigSpec.Builder builder) { 28 | 29 | } 30 | 31 | @Nullable 32 | @Override 33 | public String getAcceptedVersionRange() { 34 | return "[7.3.19,)"; 35 | } 36 | 37 | @Override 38 | public String getModID() { 39 | return ID; 40 | } 41 | 42 | @Override 43 | public void onInitStep(Step step, ParallelDispatchEvent event) { 44 | if (step == Step.COMMON_SETUP) { 45 | MinecraftForge.EVENT_BUS.register(new MCAEventHandler()); 46 | MCARegistration.registerConvertibles(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/coldsweat/ColdSweatCompat.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.coldsweat; 2 | 3 | import de.teamlapen.vampirism_integrations.util.IModCompat; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | import net.minecraftforge.common.MinecraftForge; 6 | import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent; 7 | import org.apache.logging.log4j.LogManager; 8 | import org.jetbrains.annotations.Nullable; 9 | 10 | public class ColdSweatCompat implements IModCompat { 11 | public static final String ID = "cold_sweat"; 12 | public static ForgeConfigSpec.BooleanValue enableTemperatureVampires; 13 | public static ForgeConfigSpec.DoubleValue vampireColdResistance; 14 | public static ForgeConfigSpec.DoubleValue vampireBurningPointModifier; 15 | 16 | @Override 17 | public void buildConfig(ForgeConfigSpec.Builder builder) { 18 | enableTemperatureVampires = builder.comment("Grant vampires cold resistance, but decrease heat resistance").define("enableTemperatureVampires", true); 19 | vampireColdResistance = builder.comment("Increase cold resistance for vampires by this degree celsius").defineInRange("vampireColdResistance", 30d, 0, 100); 20 | vampireBurningPointModifier = builder.comment("Decrease the burning point of vampires by this factor").defineInRange("vampireBurningPointModifier", 0.7, 0, 1); 21 | } 22 | 23 | @Override 24 | public String getModID() { 25 | return ID; 26 | } 27 | 28 | @Nullable 29 | @Override 30 | public String getAcceptedVersionRange() { 31 | return "[2.3.13,)"; 32 | } 33 | 34 | @Override 35 | public void onInitStep(Step step, ParallelDispatchEvent event) { 36 | if (step == Step.COMMON_SETUP) { 37 | try { 38 | MinecraftForge.EVENT_BUS.register(new ColdSweatEventHandler()); 39 | } catch (Exception e) { 40 | LogManager.getLogger().error("Failed to register cold sweat event handler", e); 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/betteranimalsplus/BetterAnimalsPlusConvertibles.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.betteranimalsplus; 2 | 3 | import de.teamlapen.vampirism.api.VampirismAPI; 4 | import de.teamlapen.vampirism.api.entity.IVampirismEntityRegistry; 5 | import de.teamlapen.vampirism_integrations.util.REFERENCE; 6 | import dev.itsmeow.betteranimalsplus.init.ModEntities; 7 | import net.minecraft.resources.ResourceLocation; 8 | 9 | import java.util.function.Function; 10 | 11 | public class BetterAnimalsPlusConvertibles { 12 | 13 | static void registerConvertibles() { 14 | Function overlay = (String name) -> new ResourceLocation(REFERENCE.MODID, String.format("textures/entity/betteranimalsplus/%s_overlay.png", name)); 15 | IVampirismEntityRegistry registry = VampirismAPI.entityRegistry(); 16 | 17 | registry.addConvertible(ModEntities.PHEASANT.getEntityType(), overlay.apply("pheasant")); 18 | registry.addConvertible(ModEntities.BADGER.getEntityType(), overlay.apply("badger")); 19 | registry.addConvertible(ModEntities.MOOSE.getEntityType(), overlay.apply("moose")); 20 | registry.addConvertible(ModEntities.COYOTE.getEntityType(), overlay.apply("coyote")); 21 | registry.addConvertible(ModEntities.GOOSE.getEntityType(), overlay.apply("goose")); 22 | registry.addConvertible(ModEntities.BOAR.getEntityType(), overlay.apply("boar")); 23 | registry.addConvertible(ModEntities.DEER.getEntityType(), overlay.apply("deer")); 24 | registry.addConvertible(ModEntities.REINDEER.getEntityType(), overlay.apply("reindeer")); 25 | registry.addConvertible(ModEntities.BROWN_BEAR.getEntityType(), overlay.apply("brownbear")); 26 | registry.addConvertible(ModEntities.TURKEY.getEntityType(), overlay.apply("turkey")); 27 | registry.addConvertible(ModEntities.WALRUS.getEntityType(), overlay.apply("walrus")); 28 | registry.addConvertible(ModEntities.BLACK_BEAR.getEntityType(), overlay.apply("blackbear")); 29 | registry.addConvertible(ModEntities.FERAL_WOLF.getEntityType(), overlay.apply("feralwolf")); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/mca/client/LayerVampireFace.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.mca.client; 2 | 3 | import de.teamlapen.vampirism_integrations.util.REFERENCE; 4 | import forge.net.mca.client.model.VillagerEntityModelMCA; 5 | import forge.net.mca.client.render.layer.VillagerLayer; 6 | import forge.net.mca.entity.VillagerLike; 7 | import forge.net.mca.entity.ai.Genetics; 8 | import net.minecraft.client.renderer.entity.RenderLayerParent; 9 | import net.minecraft.resources.ResourceLocation; 10 | import net.minecraft.world.entity.Mob; 11 | 12 | public class LayerVampireFace> extends VillagerLayer> { 13 | 14 | private final ResourceLocation[] eyeOverlays; 15 | private final ResourceLocation[] fangOverlays; 16 | 17 | public LayerVampireFace(RenderLayerParent> renderer, VillagerEntityModelMCA model) { 18 | super(renderer, model); 19 | this.eyeOverlays = new ResourceLocation[de.teamlapen.vampirism.REFERENCE.EYE_TYPE_COUNT]; 20 | for (int i = 0; i < this.eyeOverlays.length; i++) { 21 | this.eyeOverlays[i] = new ResourceLocation(REFERENCE.VAMPIRISM_ID + ":textures/entity/vanilla/eyes" + (i) + ".png"); 22 | } 23 | this.fangOverlays = new ResourceLocation[de.teamlapen.vampirism.REFERENCE.FANG_TYPE_COUNT]; 24 | for (int i = 0; i < this.fangOverlays.length; i++) { 25 | this.fangOverlays[i] = new ResourceLocation(REFERENCE.VAMPIRISM_ID + ":textures/entity/vanilla/fangs" + i + ".png"); 26 | } 27 | } 28 | 29 | @Override 30 | public ResourceLocation getSkin(T villager) { 31 | int totalFaces = this.eyeOverlays.length; 32 | int index = (int) Math.min((float) (totalFaces - 1), Math.max(0.0F, villager.getGenetics().getGene(Genetics.FACE) * (float) totalFaces)); 33 | return eyeOverlays[index]; 34 | } 35 | 36 | @Override 37 | protected ResourceLocation getOverlay(T villager) { 38 | int totalFangs = this.fangOverlays.length; 39 | int index = (int)Math.min((float)(totalFangs - 1), Math.max(0.0F, villager.getGenetics().getGene(Genetics.FACE) * (float)totalFangs)); 40 | return fangOverlays[index]; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/waila/WailaPlugin.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.waila; 2 | 3 | 4 | import de.teamlapen.vampirism.blockentity.AltarInspirationBlockEntity; 5 | import de.teamlapen.vampirism.blockentity.BloodContainerBlockEntity; 6 | import de.teamlapen.vampirism.blockentity.GarlicDiffuserBlockEntity; 7 | import de.teamlapen.vampirism_integrations.util.REFERENCE; 8 | import mcp.mobius.waila.api.IBlockComponentProvider; 9 | import mcp.mobius.waila.api.IRegistrar; 10 | import mcp.mobius.waila.api.IWailaPlugin; 11 | import mcp.mobius.waila.api.TooltipPosition; 12 | import net.minecraft.world.entity.PathfinderMob; 13 | import net.minecraft.world.entity.player.Player; 14 | import net.minecraft.resources.ResourceLocation; 15 | 16 | public class WailaPlugin implements IWailaPlugin { 17 | 18 | public static final ResourceLocation SHOW_CREATURE_INFO = new ResourceLocation(REFERENCE.VAMPIRISM_ID, "show_creature_info"); 19 | public static final ResourceLocation SHOW_PLAYER_INFO = new ResourceLocation(REFERENCE.VAMPIRISM_ID, "show_player_info"); 20 | public static final ResourceLocation MAX_BLOOD_ICONS_PER_LINE = new ResourceLocation(REFERENCE.VAMPIRISM_ID, "blood.icon_per_line"); 21 | public static final ResourceLocation MAX_LONG_BLOOD_MAX = new ResourceLocation(REFERENCE.VAMPIRISM_ID, "blood.long_max"); 22 | 23 | @Override 24 | public void register(IRegistrar registrar) { 25 | registrar.addConfig(SHOW_CREATURE_INFO, true); 26 | registrar.addConfig(SHOW_PLAYER_INFO, true); 27 | registrar.addConfig(MAX_LONG_BLOOD_MAX, 100); 28 | 29 | registrar.addComponent(new CreatureDataProvider(), TooltipPosition.BODY, PathfinderMob.class, 975); 30 | registrar.addComponent(new PlayerDataProvider(), TooltipPosition.BODY, Player.class); 31 | IBlockComponentProvider tankDataProvider = new TankDataProvider(); 32 | registrar.addComponent(tankDataProvider, TooltipPosition.BODY, AltarInspirationBlockEntity.class); 33 | registrar.addComponent(tankDataProvider, TooltipPosition.BODY, BloodContainerBlockEntity.class); 34 | GarlicBeaconProvider garlicBeaconProvider = new GarlicBeaconProvider(); 35 | registrar.addComponent(garlicBeaconProvider, TooltipPosition.BODY, GarlicDiffuserBlockEntity.class); 36 | 37 | } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/waila/CreatureDataProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.waila; 2 | 3 | import de.teamlapen.lib.lib.util.UtilLib; 4 | import de.teamlapen.vampirism.api.VReference; 5 | import de.teamlapen.vampirism.api.VampirismAPI; 6 | import de.teamlapen.vampirism.api.entity.player.IFactionPlayer; 7 | import de.teamlapen.vampirism_integrations.util.REFERENCE; 8 | import mcp.mobius.waila.api.*; 9 | import mcp.mobius.waila.api.component.TextureComponent; 10 | import net.minecraft.resources.ResourceLocation; 11 | import net.minecraft.world.entity.PathfinderMob; 12 | import net.minecraft.network.chat.Component; 13 | import net.minecraft.ChatFormatting; 14 | 15 | /** 16 | * Provide data for creatures 17 | */ 18 | class CreatureDataProvider implements IEntityComponentProvider { 19 | 20 | @Override 21 | public void appendBody(ITooltip tooltip, IEntityAccessor accessor, IPluginConfig config) { 22 | if (config.getBoolean(WailaPlugin.SHOW_CREATURE_INFO)) { 23 | if (accessor.getEntity() instanceof PathfinderMob && VReference.VAMPIRE_FACTION.getPlayerCapability(accessor.getPlayer()).map(IFactionPlayer::getLevel).orElse(0) > 0) { 24 | VampirismAPI.getExtendedCreatureVampirism(accessor.getEntity()).ifPresent(c -> { 25 | int blood = c.getBlood(); 26 | ITooltipLine line = tooltip.addLine(); 27 | 28 | if (c.hasPoisonousBlood()) { 29 | tooltip.addLine(Component.translatable("text.vampirism.blood.poisonous").withStyle(ChatFormatting.DARK_GREEN)); 30 | } else if (blood > 0) { 31 | if (blood > config.getInt(WailaPlugin.MAX_BLOOD_ICONS_PER_LINE)) { 32 | line.with(new TextureComponent(BloodComponent.ICONS, 8,8,9,0,9,9,256,256)) 33 | .with(Component.literal(String.format("%d/%d", blood, c.getMaxBlood())).withStyle(ChatFormatting.RED)); 34 | } else { 35 | int maxPerLine = config.getInt(WailaPlugin.MAX_LONG_BLOOD_MAX); 36 | line.with(new BloodComponent(blood, c.getMaxBlood(), maxPerLine)); 37 | } 38 | } 39 | }); 40 | 41 | } 42 | } 43 | } 44 | 45 | 46 | 47 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/PedestalProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.api.items.IBloodChargeable; 4 | import de.teamlapen.vampirism.api.items.IItemWithTier; 5 | import de.teamlapen.vampirism.blockentity.PedestalBlockEntity; 6 | import de.teamlapen.vampirism.config.VampirismConfig; 7 | import de.teamlapen.vampirism.items.VampirismVampireSwordItem; 8 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 9 | import net.minecraft.nbt.CompoundTag; 10 | import net.minecraft.resources.ResourceLocation; 11 | import net.minecraft.world.item.ItemStack; 12 | import snownee.jade.api.BlockAccessor; 13 | import snownee.jade.api.IBlockComponentProvider; 14 | import snownee.jade.api.IServerDataProvider; 15 | import snownee.jade.api.ITooltip; 16 | import snownee.jade.api.config.IPluginConfig; 17 | import snownee.jade.api.ui.BoxStyle; 18 | import snownee.jade.api.ui.IElementHelper; 19 | 20 | public enum PedestalProvider implements IBlockComponentProvider, IServerDataProvider { 21 | INSTANCE; 22 | 23 | @Override 24 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 25 | if (blockAccessor.getServerData().contains("charge", CompoundTag.TAG_FLOAT)) { 26 | float charge = blockAccessor.getServerData().getFloat("charge"); 27 | IElementHelper style = IElementHelper.get(); 28 | iTooltip.add(style.progress(charge, null, style.progressStyle().color(0xEEFF1111).textColor(0xFF00FF00), new BoxStyle(), false)); 29 | } 30 | } 31 | 32 | @Override 33 | public void appendServerData(CompoundTag compoundTag, BlockAccessor blockAccessor) { 34 | if (blockAccessor.getBlockEntity() instanceof PedestalBlockEntity pedestal) { 35 | ItemStack stackForRender = pedestal.getStackForRender(); 36 | if (stackForRender.getItem() instanceof IBloodChargeable) { 37 | CompoundTag swordTag = stackForRender.getTag(); 38 | float charge = 0; 39 | if (swordTag != null) { 40 | charge = swordTag.getFloat("charged"); 41 | } 42 | compoundTag.putFloat("charge", charge); 43 | } 44 | } 45 | } 46 | 47 | @Override 48 | public ResourceLocation getUid() { 49 | return JadePlugin.PEDESTAL_CHARGING; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/AlchemyTableProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.blockentity.AlchemyTableBlockEntity; 4 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 5 | import net.minecraft.nbt.CompoundTag; 6 | import net.minecraft.resources.ResourceLocation; 7 | import net.minecraft.world.item.ItemStack; 8 | import net.minecraft.world.item.Items; 9 | import snownee.jade.api.BlockAccessor; 10 | import snownee.jade.api.IBlockComponentProvider; 11 | import snownee.jade.api.IServerDataProvider; 12 | import snownee.jade.api.ITooltip; 13 | import snownee.jade.api.config.IPluginConfig; 14 | import snownee.jade.api.theme.IThemeHelper; 15 | import snownee.jade.api.ui.IElementHelper; 16 | 17 | public enum AlchemyTableProvider implements IBlockComponentProvider, IServerDataProvider { 18 | INSTANCE; 19 | 20 | @Override 21 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 22 | if (blockAccessor.getServerData().contains("alchemyTable", 10)) { 23 | CompoundTag tag = blockAccessor.getServerData().getCompound("alchemyTable"); 24 | int fuel = tag.getInt("fuel"); 25 | int time = tag.getInt("time"); 26 | IElementHelper helper = IElementHelper.get(); 27 | iTooltip.add(helper.smallItem(new ItemStack(Items.BLAZE_POWDER))); 28 | iTooltip.append(IThemeHelper.get().info(fuel)); 29 | if (time > 0) { 30 | iTooltip.append(helper.spacer(5, 0)); 31 | iTooltip.append(helper.smallItem(new ItemStack(Items.CLOCK))); 32 | iTooltip.append(IThemeHelper.get().seconds(time)); 33 | } 34 | 35 | } 36 | } 37 | 38 | @Override 39 | public void appendServerData(CompoundTag compoundTag, BlockAccessor blockAccessor) { 40 | if (blockAccessor.getBlockEntity() instanceof AlchemyTableBlockEntity alchemyTable && !alchemyTable.isEmpty()) { 41 | CompoundTag compoundTag1 = alchemyTable.saveWithoutMetadata(); 42 | CompoundTag compound = new CompoundTag(); 43 | compound.putInt("time", compoundTag1.getInt("BrewTime")); 44 | compound.putInt("fuel", compoundTag1.getInt("Fuel")); 45 | compoundTag.put("alchemyTable", compound); 46 | } 47 | } 48 | 49 | @Override 50 | public ResourceLocation getUid() { 51 | return JadePlugin.ALCHEMY_TABLE; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/PotionTableProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.blockentity.PotionTableBlockEntity; 4 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 5 | import net.minecraft.nbt.CompoundTag; 6 | import net.minecraft.resources.ResourceLocation; 7 | import net.minecraft.world.item.ItemStack; 8 | import net.minecraft.world.item.Items; 9 | import net.minecraft.world.level.block.entity.BrewingStandBlockEntity; 10 | import snownee.jade.api.BlockAccessor; 11 | import snownee.jade.api.IBlockComponentProvider; 12 | import snownee.jade.api.IServerDataProvider; 13 | import snownee.jade.api.ITooltip; 14 | import snownee.jade.api.config.IPluginConfig; 15 | import snownee.jade.api.theme.IThemeHelper; 16 | import snownee.jade.api.ui.IElementHelper; 17 | 18 | public enum PotionTableProvider implements IBlockComponentProvider, IServerDataProvider { 19 | INSTANCE; 20 | 21 | @Override 22 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 23 | if (blockAccessor.getServerData().contains("potionTable", 10)) { 24 | CompoundTag tag = blockAccessor.getServerData().getCompound("potionTable"); 25 | int fuel = tag.getInt("fuel"); 26 | int time = tag.getInt("time"); 27 | IElementHelper helper = IElementHelper.get(); 28 | iTooltip.add(helper.smallItem(new ItemStack(Items.BLAZE_POWDER))); 29 | iTooltip.append(IThemeHelper.get().info(fuel)); 30 | if (time > 0) { 31 | iTooltip.append(helper.spacer(5, 0)); 32 | iTooltip.append(helper.smallItem(new ItemStack(Items.CLOCK))); 33 | iTooltip.append(IThemeHelper.get().seconds(time)); 34 | } 35 | 36 | } 37 | } 38 | 39 | @Override 40 | public void appendServerData(CompoundTag compoundTag, BlockAccessor blockAccessor) { 41 | if (blockAccessor.getBlockEntity() instanceof PotionTableBlockEntity potionTable && !potionTable.isEmpty()) { 42 | CompoundTag compoundTag1 = potionTable.saveWithoutMetadata(); 43 | CompoundTag compound = new CompoundTag(); 44 | compound.putInt("time", compoundTag1.getInt("BrewTime")); 45 | compound.putInt("fuel", compoundTag1.getInt("Fuel")); 46 | compoundTag.put("potionTable", compound); 47 | } 48 | } 49 | 50 | @Override 51 | public ResourceLocation getUid() { 52 | return JadePlugin.POTION_TABLE; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/GarlicDiffuserProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.blockentity.GarlicDiffuserBlockEntity; 4 | import de.teamlapen.vampirism.core.ModItems; 5 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 6 | import net.minecraft.nbt.CompoundTag; 7 | import net.minecraft.network.chat.Component; 8 | import net.minecraft.resources.ResourceLocation; 9 | import net.minecraft.world.item.ItemStack; 10 | import snownee.jade.api.BlockAccessor; 11 | import snownee.jade.api.IBlockComponentProvider; 12 | import snownee.jade.api.IServerDataProvider; 13 | import snownee.jade.api.ITooltip; 14 | import snownee.jade.api.config.IPluginConfig; 15 | import snownee.jade.api.theme.IThemeHelper; 16 | import snownee.jade.api.ui.BoxStyle; 17 | import snownee.jade.api.ui.IElementHelper; 18 | 19 | public enum GarlicDiffuserProvider implements IBlockComponentProvider, IServerDataProvider { 20 | INSTANCE; 21 | 22 | @Override 23 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 24 | if (blockAccessor.getServerData().contains("garlicDiffuser", CompoundTag.TAG_COMPOUND)) { 25 | CompoundTag tag = blockAccessor.getServerData().getCompound("garlicDiffuser"); 26 | int fuelTime = tag.getInt("fuelTime"); 27 | float bootProgress = tag.getFloat("bootProgress"); 28 | IElementHelper helper = IElementHelper.get(); 29 | if (bootProgress == 1f) { 30 | iTooltip.add(helper.smallItem(new ItemStack(ModItems.PURIFIED_GARLIC.get()))); 31 | iTooltip.append(IThemeHelper.get().seconds(fuelTime)); 32 | } else { 33 | iTooltip.add(helper.progress(bootProgress, Component.translatable("gui.vampirism.garlic_diffuser.startup"), helper.progressStyle().color(0xD0D0FF).textColor(0xFFFFFF), new BoxStyle(), false)); 34 | } 35 | } 36 | } 37 | 38 | @Override 39 | public void appendServerData(CompoundTag tag, BlockAccessor blockAccessor) { 40 | if (blockAccessor.getBlockEntity() instanceof GarlicDiffuserBlockEntity diffuser) { 41 | CompoundTag compoundTag = new CompoundTag(); 42 | compoundTag.putInt("fuelTime", diffuser.getFuelTime()); 43 | compoundTag.putFloat("bootProgress", diffuser.getBootProgress()); 44 | tag.put("garlicDiffuser", compoundTag); 45 | } 46 | } 47 | 48 | @Override 49 | public ResourceLocation getUid() { 50 | return JadePlugin.GARLIC_BEACON; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Minecraft Forge Template 2 | 3 | # Minecraft 4 | crash-reports/ 5 | /.metadata/ 6 | /libs/ 7 | /saves/ 8 | /resourcepacks/ 9 | /logs/ 10 | /mods/ 11 | /screenshots/ 12 | /classes/ 13 | options.txt 14 | usernamecache.json 15 | banned-ips.json 16 | banned-players.json 17 | eula.txt 18 | ops.json 19 | server.properties 20 | usercache.json 21 | whitelist.json 22 | 23 | # Other 24 | /run/ 25 | Thumbs.db 26 | .directory 27 | ### Eclipse template 28 | 29 | .metadata 30 | bin/ 31 | tmp/ 32 | *.tmp 33 | *.bak 34 | *.swp 35 | *~.nib 36 | local.properties 37 | .settings/ 38 | .loadpath 39 | .recommenders 40 | 41 | # Eclipse Core 42 | .project 43 | 44 | # External tool builders 45 | .externalToolBuilders/ 46 | 47 | # Locally stored "Eclipse launch configurations" 48 | *.launch 49 | 50 | # PyDev specific (Python IDE for Eclipse) 51 | *.pydevproject 52 | 53 | # CDT-specific (C/C++ Development Tooling) 54 | .cproject 55 | 56 | # JDT-specific (Eclipse Java Development Tools) 57 | .classpath 58 | 59 | # Java annotation processor (APT) 60 | .factorypath 61 | 62 | # PDT-specific (PHP Development Tools) 63 | .buildpath 64 | 65 | # sbteclipse plugin 66 | .target 67 | 68 | # Tern plugin 69 | .tern-project 70 | 71 | # TeXlipse plugin 72 | .texlipse 73 | 74 | # STS (Spring Tool Suite) 75 | .springBeans 76 | 77 | # Code Recommenders 78 | .recommenders/ 79 | 80 | # Scala IDE specific (Scala & Java development for Eclipse) 81 | .cache-main 82 | .scala_dependencies 83 | .worksheet 84 | ### JetBrains template 85 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 86 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 87 | 88 | .idea 89 | 90 | ## File-based project format: 91 | *.iws 92 | 93 | ## Plugin-specific files: 94 | 95 | # IntelliJ 96 | /out/ 97 | *.iml 98 | *.ipr 99 | 100 | # mpeltonen/sbt-idea plugin 101 | .idea_modules/ 102 | 103 | # JIRA plugin 104 | atlassian-ide-plugin.xml 105 | 106 | # Crashlytics plugin (for Android Studio and IntelliJ) 107 | com_crashlytics_export_strings.xml 108 | crashlytics.properties 109 | crashlytics-build.properties 110 | fabric.properties 111 | ### Java template 112 | # Compiled class file 113 | *.class 114 | 115 | # Log file 116 | *.log 117 | 118 | # BlueJ files 119 | *.ctxt 120 | 121 | # Mobile Tools for Java (J2ME) 122 | .mtj.tmp/ 123 | 124 | # Package Files # 125 | *.jar 126 | *.war 127 | *.ear 128 | *.zip 129 | *.tar.gz 130 | *.rar 131 | 132 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 133 | hs_err_pid* 134 | ### Gradle template 135 | .gradle 136 | /build/ 137 | 138 | # Ignore Gradle GUI config 139 | gradle-app.setting 140 | 141 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 142 | !gradle-wrapper.jar 143 | 144 | # Cache of project 145 | .gradletasknamecache 146 | 147 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 148 | # gradle/wrapper/gradle-wrapper.properties 149 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/guardvillagers/tasks/GuardTargetNonFactionGoal.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.guardvillagers.tasks; 2 | 3 | import de.teamlapen.vampirism.api.VReference; 4 | import de.teamlapen.vampirism.api.VampirismAPI; 5 | import de.teamlapen.vampirism.api.entity.factions.IFaction; 6 | import de.teamlapen.vampirism.blockentity.TotemBlockEntity; 7 | import de.teamlapen.vampirism.config.VampirismConfig; 8 | import de.teamlapen.vampirism.util.TotemHelper; 9 | import net.minecraft.server.level.ServerLevel; 10 | import net.minecraft.world.entity.LivingEntity; 11 | import net.minecraft.world.entity.Mob; 12 | import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; 13 | import tallestegg.guardvillagers.entities.Guard; 14 | 15 | import java.util.HashMap; 16 | import java.util.Map; 17 | import java.util.Optional; 18 | import java.util.function.Predicate; 19 | 20 | public class GuardTargetNonFactionGoal extends NearestAttackableTargetGoal { 21 | 22 | private static final Map, Predicate> predicates = new HashMap<>(); 23 | private final Guard guard; 24 | private IFaction faction; 25 | 26 | public GuardTargetNonFactionGoal(Guard guard) { 27 | super(guard, LivingEntity.class, true); 28 | this.guard = guard; 29 | } 30 | 31 | @Override 32 | public boolean canContinueToUse() { 33 | if (guard.tickCount % 16 == 0) { 34 | if (determineGolemFaction()) { 35 | return false; 36 | } 37 | } 38 | return super.canContinueToUse(); 39 | } 40 | 41 | 42 | @Override 43 | public boolean canUse() { 44 | if (guard.tickCount < 20) return false; // Some delay to allow nearby totems to load 45 | return super.canUse(); 46 | } 47 | 48 | @Override 49 | protected void findTarget() { 50 | determineGolemFaction(); 51 | super.findTarget(); 52 | } 53 | 54 | /** 55 | * Determine the faction of the golem by checking for nearby totems. Update the targetConditions accordingly 56 | * 57 | * @return Whether the faction has changed 58 | */ 59 | @SuppressWarnings({"unchecked", "rawtypes"}) 60 | private boolean determineGolemFaction() { 61 | IFaction faction = VReference.HUNTER_FACTION; 62 | if (VampirismConfig.BALANCE.golemAttackNonVillageFaction.get()) { 63 | Optional tile = TotemHelper.getTotemNearPos(((ServerLevel) this.guard.level()), this.guard.blockPosition(), true); 64 | faction = tile.map(TotemBlockEntity::getControllingFaction).orElse(((IFaction) VReference.HUNTER_FACTION)); // Raw type because otherwise it does not work 65 | } 66 | 67 | if (faction != this.faction) { 68 | this.targetConditions.selector(predicates.computeIfAbsent(this.faction = faction, faction1 -> VampirismAPI.factionRegistry().getPredicate(faction1, true, true, false, false, null))); 69 | return true; 70 | } 71 | return false; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/crafttweaker/SkillBracket.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.crafttweaker; 2 | 3 | import com.blamejared.crafttweaker.api.CraftTweakerAPI; 4 | import com.blamejared.crafttweaker.api.annotation.BracketDumper; 5 | import com.blamejared.crafttweaker.api.annotation.BracketResolver; 6 | import com.blamejared.crafttweaker.api.annotation.BracketValidator; 7 | import com.blamejared.crafttweaker.api.annotation.ZenRegister; 8 | import com.blamejared.crafttweaker.api.bracket.BracketValidators; 9 | import com.blamejared.crafttweaker.api.logging.CommonLoggers; 10 | import com.blamejared.crafttweaker_annotations.annotations.Document; 11 | import de.teamlapen.vampirism.api.entity.player.skills.ISkill; 12 | import de.teamlapen.vampirism.core.ModRegistries; 13 | import net.minecraft.resources.ResourceLocation; 14 | import org.openzen.zencode.java.ZenCodeType; 15 | 16 | import java.util.Collection; 17 | import java.util.Objects; 18 | import java.util.stream.Collectors; 19 | 20 | @SuppressWarnings("unused") 21 | @ZenRegister 22 | @Document("mods/vampirism/BracketHandlers") 23 | @ZenCodeType.Name("mods.vampirism.BracketHandlers") 24 | public class SkillBracket { 25 | 26 | @SuppressWarnings("unused") 27 | @ZenCodeType.Method 28 | @BracketValidator("skill") 29 | public static boolean validateSkill(String tokens) { 30 | if (ResourceLocation.tryParse(tokens) == null) { 31 | CommonLoggers.zenCode().error("Invalid Bracket Syntax: ! Syntax is "); 32 | return false; 33 | } 34 | 35 | return BracketValidators.validateBracket("skill", tokens, SkillBracket::getSkill); 36 | } 37 | 38 | /** 39 | * Gets the give {@link ISkill}. Throws an Exception if not found 40 | * 41 | * @param tokens What you would write in the BEP call. 42 | * 43 | * @return The found {@link ISkill} 44 | * 45 | * @docParam tokens "vampirism:master_brewer" 46 | */ 47 | @ZenCodeType.Method 48 | @BracketResolver("skill") 49 | public static ISkill getSkill(String tokens) { 50 | 51 | final int length = tokens.split(":").length; 52 | if (length != 2) { 53 | throw new IllegalArgumentException("Could not get skill "); 54 | } 55 | final ResourceLocation resourceLocation = new ResourceLocation(tokens); 56 | 57 | ISkill skill = ModRegistries.SKILLS.get().getValue(resourceLocation); 58 | if (skill == null) { 59 | throw new IllegalArgumentException("Could not get skill "); 60 | } 61 | return skill; 62 | } 63 | 64 | public static String getCommandString(ISkill skill) { 65 | return ""; 66 | } 67 | 68 | @ZenCodeType.Method 69 | @BracketDumper("skill") 70 | public static Collection getSkillDump(){ 71 | return ModRegistries.SKILLS.get().getValues().stream().map(SkillBracket::getCommandString).collect(Collectors.toList()); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/TotemProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import de.teamlapen.vampirism.api.VampirismAPI; 4 | import de.teamlapen.vampirism.api.entity.factions.IFaction; 5 | import de.teamlapen.vampirism.blockentity.TotemBlockEntity; 6 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 7 | import net.minecraft.nbt.CompoundTag; 8 | import net.minecraft.network.chat.Component; 9 | import net.minecraft.resources.ResourceLocation; 10 | import snownee.jade.api.BlockAccessor; 11 | import snownee.jade.api.IBlockComponentProvider; 12 | import snownee.jade.api.IServerDataProvider; 13 | import snownee.jade.api.ITooltip; 14 | import snownee.jade.api.config.IPluginConfig; 15 | 16 | import java.util.Optional; 17 | 18 | public enum TotemProvider implements IBlockComponentProvider, IServerDataProvider { 19 | INSTANCE; 20 | 21 | @Override 22 | public void appendTooltip(ITooltip iTooltip, BlockAccessor blockAccessor, IPluginConfig iPluginConfig) { 23 | if (blockAccessor.getServerData().contains("totem", CompoundTag.TAG_COMPOUND)) { 24 | CompoundTag tag = blockAccessor.getServerData().getCompound("totem"); 25 | if (tag.contains("controllingFaction")) { 26 | IFaction controlling = tag.contains("controllingFaction") ? VampirismAPI.factionRegistry().getFactionByID(new ResourceLocation(tag.getString("controllingFaction"))) : null; 27 | IFaction capturing = tag.contains("capturingFaction") ? VampirismAPI.factionRegistry().getFactionByID(new ResourceLocation(tag.getString("capturingFaction"))) : null; 28 | if (capturing != null) { 29 | if (controlling != null) { 30 | iTooltip.add(Component.translatable("text.vampirism_integrations.defending").append(": ").append(controlling.getNamePlural().plainCopy().withStyle(s -> s.withColor(controlling.getChatColor())))); 31 | } 32 | iTooltip.add(Component.translatable("text.vampirism_integrations.attacking").append(": ").append(capturing.getNamePlural().plainCopy().withStyle(s -> s.withColor(capturing.getChatColor())))); 33 | } else if (controlling != null) { 34 | iTooltip.add(Component.translatable("text.vampirism_integrations.controlling").append(": ").append(controlling.getNamePlural().plainCopy().withStyle(s -> s.withColor(controlling.getChatColor())))); 35 | } 36 | } 37 | } 38 | } 39 | 40 | @Override 41 | public void appendServerData(CompoundTag tag, BlockAccessor blockAccessor) { 42 | if (blockAccessor.getBlockEntity() instanceof TotemBlockEntity totem) { 43 | CompoundTag compoundTag = new CompoundTag(); 44 | Optional.ofNullable(totem.getControllingFaction()).map(IFaction::getID).ifPresent(id -> compoundTag.putString("controllingFaction", id.toString())); 45 | Optional.ofNullable(totem.getCapturingFaction()).map(IFaction::getID).ifPresent(id -> compoundTag.putString("capturingFaction", id.toString())); 46 | tag.put("totem", compoundTag); 47 | } 48 | } 49 | 50 | @Override 51 | public ResourceLocation getUid() { 52 | return JadePlugin.TOTEM; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # gradle 2 | org.gradle.daemon=false 3 | org.gradle.jvmargs=-Xmx3G 4 | 5 | # forge 6 | minecraft_version=1.20.1 7 | minecraft_version_range=[1.20.1,1.21) 8 | forge_version=47.4.0 9 | forge_version_range=[47,) 10 | loader_version_range=[47,) 11 | mcp_mappings=1.20.1 12 | mcp_channel=official 13 | 14 | # mod 15 | main_version=1 16 | major_version=8 17 | minor_version=1 18 | mod_id=vampirism_integrations 19 | mod_name=Vampirism Integrations 20 | mod_license=LGPL-3.0 21 | mod_group_id=de.teamlapen.vampirism_integrations 22 | mod_authors=Maxanier 23 | mod_description=Adds integration for Vampirism with several other mods 24 | mod_url=https://vampirism.dev 25 | mod_issue_tracker=https://github.com/TeamLapen/Vampirism/issues 26 | 27 | # properties will be overridden in gradle file 28 | mod_version="" 29 | type="" 30 | classification="" 31 | 32 | 33 | # If you want to enable / disable a dependency, you need to do the following: 34 | # 1. Set the include_* variable to true or false 35 | # 2. Set the version variable to the version you want to use 36 | # 3. Add / remove the mod package to / from the .idea/compiler.xml 37 | # 4. Add / remove the compat mod class to the CompatLoader in the main mod class 38 | # dependencies 39 | vampirism_mcversion=1.20.1 40 | vampirism_version=1.9.1 41 | 42 | include_biomes_o_plenty=true 43 | bop_version=18.0.0.592 44 | 45 | include_waila=true 46 | wthit_version=8.3.1 47 | bad_packets_version=0.4.1 48 | 49 | include_jade=true 50 | jade_version=4801177 51 | 52 | include_immersive_engineering=false 53 | immersiveengineering_fileid=4535969 54 | 55 | include_evilcraft=true 56 | evilcraft_fileid=4676026 57 | cyclopscore_fileid=4681655 58 | 59 | include_tough_as_nails=true 60 | tan_version=1.20.1-9.0.0.93 61 | 62 | include_nyctophobia=true 63 | nyctophobia_fileid=4593078 64 | 65 | include_survive=true 66 | survive_version=1.20.1-9.0.1 67 | unionlib_version=1.20.1-10.0.0-Forge 68 | 69 | include_diet=true 70 | diet_fileid=4634780 71 | 72 | include_tinkers_construction=false 73 | tconstruct_version=1.18.2-3.5.1.31 74 | mantle_version=1.18.1-1.8.37 75 | 76 | include_crafttweaker=true 77 | crafttweaker_version=1.20.1:14.0.12 78 | 79 | include_betteranimalsplus=false 80 | betteranimalsplus_fileid=4318518 81 | 82 | include_consecration=true 83 | consecration_fileid=4638141 84 | 85 | include_minecraft_comes_alive=true 86 | mca_fileid=4675848 87 | 88 | include_minecolonies=true 89 | minecolonies_version=1.0.1487-BETA 90 | structurize_version=1.0.489-ALPHA 91 | 92 | include_player_companion=true 93 | playercompanion_fileid=4693315 94 | 95 | include_betteranimals=false 96 | betteranimals_fileid=3830935 97 | 98 | include_bloodmagic=false 99 | bloodmagic_fileid=3477631 100 | bloodmagic_api_fileid=3477632 101 | 102 | include_mekanism=false 103 | mekanism_version=1.16.5-10.0.21.448 104 | 105 | #Optional runtime 106 | include_guide_api=true 107 | guideapi_version=1.20.1-2.2.6-alpha+20230617-1850 108 | 109 | include_jei=true 110 | jei_version=15.2.0.25 111 | 112 | include_terrablender=true 113 | terrablender_version=3.0.0.169 114 | 115 | include_architectury=true 116 | architectury_version=9.1.12 117 | 118 | include_cold_sweat=true 119 | coldsweat_fileid=6503192 120 | 121 | include_guard_villagers=true 122 | guardvillagers_fileid=4800776 -------------------------------------------------------------------------------- /src/main/resources/data/vampirism_integrations/vampirism/bloodvalues/entities/betteranimalsplus.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "author": "Unknown", 4 | "values": [ 5 | { 6 | "id": "betteranimalsplus:pheasant", 7 | "value": 7 8 | }, 9 | { 10 | "id": "betteranimalsplus:badger", 11 | "value": 3 12 | }, 13 | { 14 | "id": "betteranimalsplus:moose", 15 | "value": 20 16 | }, 17 | { 18 | "id": "betteranimalsplus:coyote", 19 | "value": 4 20 | }, 21 | { 22 | "id": "betteranimalsplus:goose", 23 | "value": 3 24 | }, 25 | { 26 | "id": "betteranimalsplus:boar", 27 | "value": 5 28 | }, 29 | { 30 | "id": "betteranimalsplus:deer", 31 | "value": 8 32 | }, 33 | { 34 | "id": "betteranimalsplus:reindeer", 35 | "value": 8 36 | }, 37 | { 38 | "id": "betteranimalsplus:goat", 39 | "value": 6 40 | }, 41 | { 42 | "id": "betteranimalsplus:brownbear", 43 | "value": 10 44 | }, 45 | { 46 | "id": "betteranimalsplus:turkey", 47 | "value": 4 48 | }, 49 | { 50 | "id": "betteranimalsplus:walrus", 51 | "value": 8 52 | }, 53 | { 54 | "id": "betteranimalsplus:blackbear", 55 | "value": 10 56 | }, 57 | { 58 | "id": "betteranimalsplus:feralwolf", 59 | "value": 6 60 | }, 61 | { 62 | "id": "betteranimalsplus:horseshoecrab", 63 | "value": 0 64 | }, 65 | { 66 | "id": "betteranimalsplus:songbird", 67 | "value": 0 68 | }, 69 | { 70 | "id": "betteranimalsplus:crab", 71 | "value": 0 72 | }, 73 | { 74 | "id": "betteranimalsplus:shark", 75 | "value": 0 76 | }, 77 | { 78 | "id": "betteranimalsplus:tarantula", 79 | "value": 0 80 | }, 81 | { 82 | "id": "betteranimalsplus:piranha", 83 | "value": 0 84 | }, 85 | { 86 | "id": "betteranimalsplus:bobbit_worm", 87 | "value": 0 88 | }, 89 | { 90 | "id": "betteranimalsplus:barracuda", 91 | "value": 0 92 | }, 93 | { 94 | "id": "betteranimalsplus:nautilus", 95 | "value": 0 96 | }, 97 | { 98 | "id": "betteranimalsplus:eel_saltwater", 99 | "value": 0 100 | }, 101 | { 102 | "id": "betteranimalsplus:flying_fish", 103 | "value": 0 104 | }, 105 | { 106 | "id": "betteranimalsplus:dragonfly", 107 | "value": 0 108 | }, 109 | { 110 | "id": "betteranimalsplus:squirrel", 111 | "value": 0 112 | }, 113 | { 114 | "id": "betteranimalsplus:squid_colossal", 115 | "value": 0 116 | }, 117 | { 118 | "id": "betteranimalsplus:lammergeier", 119 | "value": 0 120 | }, 121 | { 122 | "id": "betteranimalsplus:jellyfish", 123 | "value": 0 124 | }, 125 | { 126 | "id": "betteranimalsplus:octopus", 127 | "value": 0 128 | }, 129 | { 130 | "id": "betteranimalsplus:squid_giant", 131 | "value": 0 132 | }, 133 | { 134 | "id": "betteranimalsplus:eel_freshwater", 135 | "value": 0 136 | }, 137 | { 138 | "id": "betteranimalsplus:whale", 139 | "value": 0 140 | }, 141 | { 142 | "id": "betteranimalsplus:lamprey", 143 | "value": 0 144 | }, 145 | { 146 | "id": "betteranimalsplus:butterfly", 147 | "value": 0 148 | } 149 | ] 150 | } -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/coldsweat/ColdSweatEventHandler.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.coldsweat; 2 | 3 | import com.momosoftworks.coldsweat.api.util.Temperature; 4 | import de.teamlapen.vampirism.api.VReference; 5 | import de.teamlapen.vampirism.api.event.PlayerFactionEvent; 6 | import net.minecraft.core.registries.Registries; 7 | import net.minecraft.resources.ResourceLocation; 8 | import net.minecraft.world.entity.ai.attributes.Attribute; 9 | import net.minecraft.world.entity.ai.attributes.AttributeInstance; 10 | import net.minecraft.world.entity.ai.attributes.AttributeModifier; 11 | import net.minecraftforge.eventbus.api.SubscribeEvent; 12 | import net.minecraftforge.registries.RegistryObject; 13 | import org.apache.logging.log4j.LogManager; 14 | import org.apache.logging.log4j.Logger; 15 | 16 | import java.util.UUID; 17 | 18 | 19 | public class ColdSweatEventHandler { 20 | 21 | private static final Logger LOGGER = LogManager.getLogger(); 22 | private static final UUID VAMPIRE_MOD_UUID = UUID.fromString("648f1040-d104-4269-bcdd-161ff12dcb5e"); 23 | private static final String ID = "cold_sweat"; 24 | private static final RegistryObject BURNING_POINT = RegistryObject.create(new ResourceLocation(ID, "burning_point"), Registries.ATTRIBUTE, ID); 25 | private static final RegistryObject FREEZING_POINT = RegistryObject.create(new ResourceLocation(ID, "freezing_point"), Registries.ATTRIBUTE, ID); 26 | private boolean warnTemperature = true; 27 | 28 | 29 | @SubscribeEvent 30 | public void onFactionLevelChanged(PlayerFactionEvent.FactionLevelChanged event) { 31 | if (ColdSweatCompat.enableTemperatureVampires.get()) { 32 | try { 33 | boolean vamp = event.getCurrentFaction() == VReference.VAMPIRE_FACTION; 34 | AttributeInstance coldRes = event.getPlayer().getPlayer().getAttribute(FREEZING_POINT.get()); 35 | if (coldRes != null) { 36 | if (vamp) { 37 | if (coldRes.getModifier(VAMPIRE_MOD_UUID) == null) { 38 | //Reduce the freezing point for vampires by the configured value in Celsius 39 | coldRes.addTransientModifier(new AttributeModifier(VAMPIRE_MOD_UUID, "vampire", Temperature.convert(-ColdSweatCompat.vampireColdResistance.get(), Temperature.Units.C, Temperature.Units.MC, true), AttributeModifier.Operation.ADDITION)); 40 | } 41 | } else { 42 | coldRes.removeModifier(VAMPIRE_MOD_UUID); 43 | } 44 | } 45 | AttributeInstance heatRes = event.getPlayer().getPlayer().getAttribute(BURNING_POINT.get()); 46 | if (heatRes != null) { 47 | if (vamp) { 48 | if (heatRes.getModifier(VAMPIRE_MOD_UUID) == null) { 49 | //Scale the burning point by a configured factor. Must subtract one due to attribute modifier logic 50 | heatRes.addTransientModifier(new AttributeModifier(VAMPIRE_MOD_UUID, "vampire", - 1 + ColdSweatCompat.vampireBurningPointModifier.get(), AttributeModifier.Operation.MULTIPLY_TOTAL)); 51 | } 52 | } else { 53 | heatRes.removeModifier(VAMPIRE_MOD_UUID); 54 | } 55 | } 56 | 57 | 58 | } catch (Throwable e) { 59 | if (warnTemperature) { 60 | LOGGER.error("Failed to modify temperature resistance for vampires", e); 61 | warnTemperature = false; 62 | } 63 | } 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/EventHandler.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations; 2 | 3 | import de.teamlapen.lib.lib.util.UtilLib; 4 | import de.teamlapen.lib.lib.util.VersionChecker; 5 | import de.teamlapen.vampirism_integrations.util.IModCompat; 6 | import net.minecraft.ChatFormatting; 7 | import net.minecraft.network.chat.ClickEvent; 8 | import net.minecraft.network.chat.Component; 9 | import net.minecraft.network.chat.MutableComponent; 10 | import net.minecraftforge.event.entity.player.PlayerEvent; 11 | import net.minecraftforge.eventbus.api.SubscribeEvent; 12 | import net.minecraftforge.fml.ModContainer; 13 | import net.minecraftforge.fml.ModList; 14 | import net.minecraftforge.server.ServerLifecycleHooks; 15 | import org.apache.logging.log4j.LogManager; 16 | import org.apache.logging.log4j.Logger; 17 | 18 | import java.util.List; 19 | import java.util.Optional; 20 | 21 | public class EventHandler { 22 | 23 | private final static Logger LOGGER = LogManager.getLogger(); 24 | 25 | @SubscribeEvent 26 | public void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) { 27 | VersionChecker.VersionInfo versionInfo = VampirismIntegrationsMod.instance.getVersionInfo(); 28 | if (!versionInfo.isChecked()) 29 | LOGGER.warn("Version check is not finished yet"); 30 | 31 | boolean isAdminLikePlayer = !ServerLifecycleHooks.getCurrentServer().isDedicatedServer() || UtilLib.isPlayerOp(event.getEntity()); 32 | 33 | if (!VampirismCompat.disableVersionCheck.get() && versionInfo.isNewVersionAvailable()) { 34 | 35 | if (isAdminLikePlayer || event.getEntity().getRandom().nextInt(5) == 0) { 36 | if (event.getEntity().getRandom().nextInt(4) == 0) { 37 | VersionChecker.Version newVersion = versionInfo.getNewVersion(); 38 | event.getEntity().displayClientMessage(Component.translatable("text.vampirism.outdated", versionInfo.getCurrentVersion().name, newVersion.name), false); 39 | MutableComponent download = Component.translatable("text.vampirism.update_message.download").withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, newVersion.getUrl() == null ? versionInfo.getHomePage() : newVersion.getUrl())).applyFormat(ChatFormatting.UNDERLINE).withColor(ChatFormatting.BLUE)); 40 | Component changelog = Component.translatable("text.vampirism.update_message.changelog").withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/vampirism changelog")).applyFormat(ChatFormatting.UNDERLINE)); 41 | Component modpage = Component.translatable("text.vampirism.update_message.modpage").withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, versionInfo.getHomePage())).applyFormat(ChatFormatting.UNDERLINE).withColor(ChatFormatting.BLUE)); 42 | event.getEntity().displayClientMessage(download.append(" ").append(changelog).append(" ").append(modpage), false); 43 | } 44 | } 45 | 46 | 47 | } 48 | if (isAdminLikePlayer && event.getEntity().getRandom().nextInt(4) == 0) { 49 | List list = VampirismIntegrationsMod.instance.compatLoader.getIncompatibleCompats(); 50 | for (IModCompat m : list) { 51 | Optional mod = ModList.get().getModContainerById(m.getModID()); 52 | mod.ifPresent(modcontainer -> event.getEntity().displayClientMessage(Component.literal(String.format("Could not load Vampirism mod compat for %s because version %s is incompatible (Accepted %s)", m.getModID(), modcontainer.getModInfo().getVersion(), m.getAcceptedVersionRange())), false)); 53 | } 54 | } 55 | 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/elements/BloodElement.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.elements; 2 | 3 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 4 | import de.teamlapen.vampirism_integrations.util.REFERENCE; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.gui.Font; 7 | import net.minecraft.client.gui.GuiGraphics; 8 | import net.minecraft.client.resources.language.I18n; 9 | import net.minecraft.resources.ResourceLocation; 10 | import net.minecraft.util.Mth; 11 | import net.minecraft.world.phys.Vec2; 12 | import org.jetbrains.annotations.Nullable; 13 | import snownee.jade.api.config.IPluginConfig; 14 | import snownee.jade.api.config.IWailaConfig; 15 | import snownee.jade.api.theme.IThemeHelper; 16 | import snownee.jade.api.ui.Element; 17 | import snownee.jade.api.ui.IDisplayHelper; 18 | 19 | import java.text.DecimalFormat; 20 | 21 | public class BloodElement extends Element { 22 | private static final ResourceLocation ICONS = new ResourceLocation(REFERENCE.VAMPIRISM_ID, "textures/gui/icons.png"); 23 | public static final DecimalFormat DF_FORMATTER = new DecimalFormat("0.##"); 24 | 25 | private final int maxBlood; 26 | private final int blood; 27 | private final String text; 28 | private final IPluginConfig config; 29 | 30 | public BloodElement(int maxBlood, int blood) { 31 | this.config = IWailaConfig.get().getPlugin(); 32 | if (!this.config.get(JadePlugin.ENTITY_BLOOD_SHOW_FRACTION)) { 33 | maxBlood = Mth.ceil(maxBlood); 34 | blood = Mth.ceil(blood); 35 | } 36 | this.maxBlood = maxBlood; 37 | this.blood = blood; 38 | this.text = String.format(" %s/%s", DF_FORMATTER.format((double)blood), DF_FORMATTER.format((double)maxBlood)); 39 | } 40 | 41 | public Vec2 getSize() { 42 | if (this.maxBlood > this.config.getInt(JadePlugin.ENTITY_BLOOD_MAX_FOR_RENDER)) { 43 | Font font = Minecraft.getInstance().font; 44 | return new Vec2((float)(8 + font.width(this.text)), 10.0F); 45 | } else { 46 | int maxDrops = this.config.getInt(JadePlugin.ENTITY_BLOOD_ICONS_PER_LINE); 47 | int maxBlood = (int) (this.maxBlood * 0.5F); 48 | int heartsPerLine = Math.min(maxDrops, maxBlood); 49 | int lineCount = (int)Math.ceil((double) maxBlood / maxDrops); 50 | return new Vec2((float)(8 * heartsPerLine), (float)(10 * lineCount)); 51 | } 52 | } 53 | 54 | public void render(GuiGraphics guiGraphics, float x, float y, float maxX, float maxY) { 55 | int maxDrops = this.config.getInt(JadePlugin.ENTITY_BLOOD_ICONS_PER_LINE); 56 | int maxDropsForRender = this.config.getInt(JadePlugin.ENTITY_BLOOD_MAX_FOR_RENDER); 57 | boolean showNumbers = this.maxBlood > maxDropsForRender; 58 | int dropCount = showNumbers ? 1 : Mth.ceil(this.maxBlood * 0.5F); 59 | float blood = showNumbers ? 1.0F : this.blood * 0.5F; 60 | int dropsPerLine = (int)Math.min((double)maxDrops, Math.ceil((double)this.maxBlood)); 61 | int xOffset = 0; 62 | 63 | for(int i = 1; i <= dropCount; ++i) { 64 | guiGraphics.blit(ICONS, (int)x + xOffset, (int)y, 0,0, 9, 9); 65 | if (i <= Mth.floor(blood)) { 66 | guiGraphics.blit(ICONS, (int)x + xOffset, (int)y, 9,0, 9, 9); 67 | xOffset += 8; 68 | } 69 | 70 | if ((float)i > blood && (float)i < blood + 1.0F) { 71 | guiGraphics.blit(ICONS, (int)x + xOffset, (int)y, 18,0, 9, 9); 72 | xOffset += 8; 73 | } 74 | 75 | if ((float)i >= blood + 1.0F) { 76 | xOffset += 8; 77 | } 78 | 79 | if (!showNumbers && i % dropsPerLine == 0) { 80 | y += 10.0F; 81 | xOffset = 0; 82 | } 83 | } 84 | 85 | if (showNumbers) { 86 | IDisplayHelper.get().drawText(guiGraphics, this.text, x + 8.0F, y, IThemeHelper.get().getNormalColor()); 87 | } 88 | 89 | } 90 | 91 | public @Nullable String getMessage() { 92 | return I18n.get("narration.vampirism.health", DF_FORMATTER.format((double)this.blood)); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/de/teamlapen/vampirism_integrations/jade/provider/PlayerFactionProvider.java: -------------------------------------------------------------------------------- 1 | package de.teamlapen.vampirism_integrations.jade.provider; 2 | 3 | import com.mojang.datafixers.util.Pair; 4 | import com.mojang.serialization.DataResult; 5 | import de.teamlapen.vampirism.api.VampirismAPI; 6 | import de.teamlapen.vampirism.api.entity.factions.IFaction; 7 | import de.teamlapen.vampirism.api.entity.factions.IPlayableFaction; 8 | import de.teamlapen.vampirism.entity.factions.FactionPlayerHandler; 9 | import de.teamlapen.vampirism_integrations.jade.JadePlugin; 10 | import net.minecraft.nbt.CompoundTag; 11 | import net.minecraft.nbt.NbtOps; 12 | import net.minecraft.nbt.Tag; 13 | import net.minecraft.network.chat.Component; 14 | import net.minecraft.network.chat.MutableComponent; 15 | import net.minecraft.resources.ResourceLocation; 16 | import net.minecraft.util.ExtraCodecs; 17 | import net.minecraft.world.entity.player.Player; 18 | import snownee.jade.api.EntityAccessor; 19 | import snownee.jade.api.IEntityComponentProvider; 20 | import snownee.jade.api.IServerDataProvider; 21 | import snownee.jade.api.ITooltip; 22 | import snownee.jade.api.config.IPluginConfig; 23 | import snownee.jade.api.config.IWailaConfig; 24 | 25 | public enum PlayerFactionProvider implements IEntityComponentProvider, IServerDataProvider { 26 | INSTANCE; 27 | 28 | @Override 29 | public void appendTooltip(ITooltip iTooltip, EntityAccessor entityAccessor, IPluginConfig iPluginConfig) { 30 | if (entityAccessor.getServerData().contains("playerFaction", Tag.TAG_COMPOUND)) { 31 | CompoundTag tag = entityAccessor.getServerData().getCompound("playerFaction"); 32 | if (tag.contains("faction")) { 33 | String factionId = tag.getString("faction"); 34 | int level = tag.getInt("level"); 35 | IPlayableFaction faction = ((IPlayableFaction) VampirismAPI.factionRegistry().getFactionByID(new ResourceLocation(factionId))); 36 | MutableComponent component = Component.translatable(faction.getName().getString()).append(": "); 37 | if (tag.contains("lordTitle")) { 38 | int lordLevel = tag.getInt("lordLevel"); 39 | if (IWailaConfig.get().getPlugin().get(JadePlugin.PLAYER_FACTION_LORD_LEVEL_NUMBER)) { 40 | component.append(Component.translatable("text.vampirism.lord").append(" ").append(Component.translatable("text.vampirism.level"))).append(" ").append(String.valueOf(lordLevel)); 41 | } else { 42 | ExtraCodecs.COMPONENT.decode(NbtOps.INSTANCE, tag.get("lordTitle")).result().map(Pair::getFirst).ifPresent(component::append); 43 | } 44 | } else { 45 | component.append(Component.translatable("text.vampirism.level")).append(" ").append(String.valueOf(level)); 46 | } 47 | iTooltip.add(component.withStyle(style -> style.withColor(faction.getChatColor()))); 48 | } 49 | } 50 | } 51 | 52 | @Override 53 | public ResourceLocation getUid() { 54 | return JadePlugin.PLAYER_FACTION; 55 | } 56 | 57 | @Override 58 | public void appendServerData(CompoundTag compoundTag, EntityAccessor entityAccessor) { 59 | if (entityAccessor.getEntity() instanceof Player player) { 60 | FactionPlayerHandler.getOpt(player).ifPresent(handler -> { 61 | handler.getCurrentFactionPlayer().ifPresent(fp -> { 62 | CompoundTag tag = new CompoundTag(); 63 | IFaction currentFaction = fp.getDisguisedAs(); 64 | if (currentFaction != null) { 65 | tag.putString("faction", currentFaction.getID().toString()); 66 | tag.putInt("level", handler.getCurrentLevel()); 67 | if (handler.getLordLevel() > 0) { 68 | tag.putInt("lordLevel", handler.getLordLevel()); 69 | DataResult tagDataResult = ExtraCodecs.COMPONENT.encodeStart(NbtOps.INSTANCE, handler.getLordTitle()); 70 | tagDataResult.result().ifPresent(t -> { 71 | tag.putInt("lordLevel", handler.getLordLevel()); 72 | tag.put("lordTitle", t); 73 | }); 74 | } 75 | } 76 | compoundTag.put("playerFaction", tag); 77 | }); 78 | }); 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Vampirism Integrations for MC 1.20 - Latest branch 2 | ============================================ 3 | [![](https://cf.way2muchnoise.eu/versions/282433.svg)](https://www.curseforge.com/minecraft/mc-mods/vampirism-integrations) 4 | [![forthebadge](https://forthebadge.com/images/badges/built-by-developers.svg)](https://maxanier.de) 5 | 6 | This mod handles integrations or respectively compatibility with other mods. 7 | 8 | Curseforge Page: [https://www.curseforge.com/minecraft/mc-mods/vampirism-integrations](https://www.curseforge.com/minecraft/mc-mods/vampirism-integrations) 9 | Modrinth: [https://modrinth.com/mod/vampirism-integrations](https://modrinth.com/mod/vampirism-integrations) 10 | 11 | While the JEI and GuideAPI integration will stay inside the main mod, any additional compatibility will be implemented here. 12 | 13 | Therefore, this mod is only useful if you are using one or more of the supported mods: 14 | 15 | ## Reasons 16 | a) Mod integrations are a lot of work regarding Minecraft updates. If MC updates, but the other mods are not finished yet, I have to uncomment all the relevant parts in Vampirism codes, remove the dependencies and redo all these things once the mod eventually updates. 17 | b) If a other mods changes and requires changes, I don't want to release an update for Vampirism each time 18 | c) It keeps Vampirism's code slightly more organized 19 | d) It verifies that Vampirism's API is working, shows me areas for improvement and can act as an example. 20 | e) It makes it more straight-forward for others contribute and add more integrations (hope this is gonna happen, but I did not have any luck so far) 21 | 22 | The most important integrations will stay in Vampirism (JEI, GuideAPI,?), but any additional (hopefully many) will be added into the separate mod. 23 | If you are already installing many mods or a modpack it should not make that much a difference anyway. 24 | 25 | ## Configuration 26 | Integrations can be disabled per mod. 27 | Some integrations also allow more detailed customization. 28 | 29 | ## Setting up the development environment 30 | If you would like to compile your own versions or even contribute to Vampirism Integrations's development you need to set up a dev environment. 31 | The following example instructions will setup IntelliJ (Free community edition or Non-Free Ultimate edition). If you already have a setup or want to use another IDE, jump [here](#setting-up-vampirism-integrations-in-another-environment). 32 | 33 | #### IntelliJ 34 | 1. Make sure you have the Java **JDK** (Java 8) as well as the IntelliJ IDE installed. 35 | 2. If you want to contribute to the development (via pull requests), fork Vampirism Integrations on Github. 36 | 3. (Optionally) Install Git, so you can clone the repository and push changes. 37 | 4. Clone (`git clone https://github.com/TeamLapen/VampirismIntegrations`) or [download](https://github.com/TeamLapen/VampirismIntegrations/archive/master.zip) VampirismIntegrations to a new "VampirismIntegrations" folder. 38 | 5. In IntelliJ use `New...` -> `New from Version Control` -> Fill out repo, directory and name 39 | 6. After cloning is done IntelliJ offers you to import a unlinked Gradle Project. Click this. 40 | 7. Select `Create directories for empty content roots` and __deselect__ `Create seperate module per source set` [Image](https://picload.org/image/ripradpa/importprojectfromgradle_001.png). If you do not get that dialog, you might have to edit your .idea/gradle.xml to include `