Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.20' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/ISSUE_TEMPLATE/bug_report.yml
#	.github/ISSUE_TEMPLATE/mod_incompatibility.yml
#	.github/workflows/gradle.yml
#	.idea/compiler.xml
#	README.md
#	build.gradle
#	gradle.properties
#	gradle/deploy.gradle
#	gradle/forge.gradle
#	src/generated/resources/data/minecraft/tags/damage_type/bypasses_armor.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_block_dark_brick_from_castle_block_dark_brick.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_slaps_dark_brick_from_castle_block_dark_brick.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_slaps_dark_brick_from_castle_block_dark_stone.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_slaps_dark_stone_from_castle_block_dark_brick.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_slaps_dark_stone_from_castle_block_dark_stone.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_stairs_dark_brick_from_castle_block_dark_brick.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_stairs_dark_brick_from_castle_block_dark_stone.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_stairs_dark_stone_from_castle_block_dark_brick.json
#	src/generated/resources/data/vampirism/advancements/recipes/building_blocks/stonecutting/castle_stairs_dark_stone_from_castle_block_dark_stone.json
#	src/generated/resources/data/vampirism/loot_tables/blocks/bat_cage.json
#	src/generated/resources/data/vampirism/loot_tables/blocks/castle_slab_dark_brick.json
#	src/generated/resources/data/vampirism/loot_tables/blocks/castle_slab_dark_stone.json
#	src/generated/resources/data/vampirism/loot_tables/blocks/castle_stairs_dark_brick.json
#	src/generated/resources/data/vampirism/loot_tables/blocks/castle_stairs_dark_stone.json
#	src/generated/resources/data/vampirism/loot_tables/blocks/cursed_earth_path.json
#	src/generated/resources/data/vampirism/loot_tables/blocks/fog_diffuser.json
#	src/generated/resources/data/vampirism/loot_tables/blocks/mother_trophy.json
#	src/generated/resources/data/vampirism/recipes/dark_stone_slab.json
#	src/generated/resources/data/vampirism/recipes/dark_stone_stairs.json
#	src/generated/resources/data/vampirism/recipes/dark_stone_tiles_slab.json
#	src/generated/resources/data/vampirism/recipes/dark_stone_tiles_stairs.json
#	src/lib/java/de/teamlapen/lib/lib/util/UtilLib.java
#	src/main/java/de/teamlapen/vampirism/VampirismMod.java
#	src/main/java/de/teamlapen/vampirism/blockentity/AltarInspirationBlockEntity.java
#	src/main/java/de/teamlapen/vampirism/blocks/CastleBricksBlock.java
#	src/main/java/de/teamlapen/vampirism/blocks/CursedBarkBlock.java
#	src/main/java/de/teamlapen/vampirism/blocks/CursedGrass.java
#	src/main/java/de/teamlapen/vampirism/blocks/CursedSpruceBlock.java
#	src/main/java/de/teamlapen/vampirism/blocks/DarkStoneSlabBlock.java
#	src/main/java/de/teamlapen/vampirism/blocks/DarkStoneStairsBlock.java
#	src/main/java/de/teamlapen/vampirism/blocks/GarlicDiffuserBlock.java
#	src/main/java/de/teamlapen/vampirism/blocks/HunterTableBlock.java
#	src/main/java/de/teamlapen/vampirism/client/core/ClientEventHandler.java
#	src/main/java/de/teamlapen/vampirism/client/core/ModKeys.java
#	src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionDurationOverlay.java
#	src/main/java/de/teamlapen/vampirism/client/gui/overlay/CustomBossEventOverlay.java
#	src/main/java/de/teamlapen/vampirism/client/gui/screens/AltarInfusionScreen.java
#	src/main/java/de/teamlapen/vampirism/client/gui/screens/HunterTableScreen.java
#	src/main/java/de/teamlapen/vampirism/client/gui/screens/HunterTrainerScreen.java
#	src/main/java/de/teamlapen/vampirism/client/gui/screens/VampirePlayerAppearanceScreen.java
#	src/main/java/de/teamlapen/vampirism/client/gui/screens/VampirismContainerScreen.java
#	src/main/java/de/teamlapen/vampirism/client/gui/screens/skills/SkillNodeScreen.java
#	src/main/java/de/teamlapen/vampirism/client/gui/screens/taskboard/TaskList.java
#	src/main/java/de/teamlapen/vampirism/client/model/HunterMinionModel.java
#	src/main/java/de/teamlapen/vampirism/client/renderer/entity/AdvancedHunterRenderer.java
#	src/main/java/de/teamlapen/vampirism/client/renderer/entity/BasicHunterRenderer.java
#	src/main/java/de/teamlapen/vampirism/client/renderer/entity/HunterMinionRenderer.java
#	src/main/java/de/teamlapen/vampirism/client/renderer/entity/HunterTaskMasterRenderer.java
#	src/main/java/de/teamlapen/vampirism/client/renderer/entity/HunterTrainerRenderer.java
#	src/main/java/de/teamlapen/vampirism/client/renderer/entity/layers/HunterEquipmentLayer.java
#	src/main/java/de/teamlapen/vampirism/command/VersionCheckCommand.java
#	src/main/java/de/teamlapen/vampirism/command/test/GarlicCheckCommand.java
#	src/main/java/de/teamlapen/vampirism/core/ModBlocks.java
#	src/main/java/de/teamlapen/vampirism/core/ModContainer.java
#	src/main/java/de/teamlapen/vampirism/core/ModDamageTypes.java
#	src/main/java/de/teamlapen/vampirism/core/ModEntities.java
#	src/main/java/de/teamlapen/vampirism/core/ModItems.java
#	src/main/java/de/teamlapen/vampirism/core/ModRegistries.java
#	src/main/java/de/teamlapen/vampirism/core/ModTags.java
#	src/main/java/de/teamlapen/vampirism/core/RegistryManager.java
#	src/main/java/de/teamlapen/vampirism/data/LootTablesGenerator.java
#	src/main/java/de/teamlapen/vampirism/data/TagGenerator.java
#	src/main/java/de/teamlapen/vampirism/data/reloadlistener/BloodValuesReloadListener.java
#	src/main/java/de/teamlapen/vampirism/effects/VampirismPoisonEffect.java
#	src/main/java/de/teamlapen/vampirism/entity/ConvertedCreature.java
#	src/main/java/de/teamlapen/vampirism/entity/DarkBloodProjectileEntity.java
#	src/main/java/de/teamlapen/vampirism/entity/ModEntityEventHandler.java
#	src/main/java/de/teamlapen/vampirism/entity/ai/goals/GolemTargetNonVillageFactionGoal.java
#	src/main/java/de/teamlapen/vampirism/entity/ai/goals/NearestTargetGoalModifier.java
#	src/main/java/de/teamlapen/vampirism/entity/converted/ConvertedCowEntity.java
#	src/main/java/de/teamlapen/vampirism/entity/converted/ConvertedCreatureEntity.java
#	src/main/java/de/teamlapen/vampirism/entity/converted/ConvertedDonkeyEntity.java
#	src/main/java/de/teamlapen/vampirism/entity/converted/ConvertedVillagerEntity.java
#	src/main/java/de/teamlapen/vampirism/entity/hunter/BasicHunterEntity.java
#	src/main/java/de/teamlapen/vampirism/entity/hunter/HunterTrainerEntity.java
#	src/main/java/de/teamlapen/vampirism/entity/player/TaskManager.java
#	src/main/java/de/teamlapen/vampirism/entity/player/hunter/HunterPlayer.java
#	src/main/java/de/teamlapen/vampirism/entity/player/tasks/req/ItemRequirement.java
#	src/main/java/de/teamlapen/vampirism/entity/player/tasks/reward/RefinementItemReward.java
#	src/main/java/de/teamlapen/vampirism/entity/player/vampire/BloodStats.java
#	src/main/java/de/teamlapen/vampirism/entity/player/vampire/VampirePlayer.java
#	src/main/java/de/teamlapen/vampirism/entity/player/vampire/actions/InfectAction.java
#	src/main/java/de/teamlapen/vampirism/inventory/HunterTableMenu.java
#	src/main/java/de/teamlapen/vampirism/inventory/HunterTrainerMenu.java
#	src/main/java/de/teamlapen/vampirism/inventory/TaskBoardMenu.java
#	src/main/java/de/teamlapen/vampirism/inventory/VampirismMenu.java
#	src/main/java/de/teamlapen/vampirism/items/ColoredVampireClothingItem.java
#	src/main/java/de/teamlapen/vampirism/items/HolyWaterSplashBottleItem.java
#	src/main/java/de/teamlapen/vampirism/items/HunterAxeItem.java
#	src/main/java/de/teamlapen/vampirism/items/HunterHatItem.java
#	src/main/java/de/teamlapen/vampirism/items/StakeItem.java
#	src/main/java/de/teamlapen/vampirism/items/VampirismVampireSwordItem.java
#	src/main/java/de/teamlapen/vampirism/mixin/NearestAttackableTargetGoalMixin.java
#	src/main/java/de/teamlapen/vampirism/modcompat/jei/TaskRecipeCategory.java
#	src/main/java/de/teamlapen/vampirism/util/Helper.java
#	src/main/java/de/teamlapen/vampirism/world/ModDamageSources.java
#	src/main/java/de/teamlapen/vampirism/world/VampirismWorld.java
#	src/main/java/de/teamlapen/vampirism/world/gen/VampirismFeatures.java
#	src/main/java/de/teamlapen/vampirism/world/gen/structure/huntercamp/HunterCampPieces.java
#	src/main/resources/META-INF/accesstransformer.cfg
#	src/main/resources/META-INF/mods.toml
#	src/main/resources/assets/vampirism/lang/en_us.json
#	src/main/resources/assets/vampirism/textures/gui/icons.png
#	src/main/resources/assets/vampirism/textures/gui/vampirism_menu_refinements.png
#	src/main/resources/pack.mcmeta
#	src/main/resources/supporters.json
#	src/main/resources/vampireBooks.json
#	src/main/resources/vampirism.mixins.json
  • Loading branch information
Cheaterpaul committed Nov 13, 2023
2 parents fdb1f98 + 04268a7 commit b28e612
Show file tree
Hide file tree
Showing 32 changed files with 55 additions and 30 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ body:
- 1.18.x
- 1.19.2
- 1.19.3+
- 1.20.x
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Feature request
description: Suggest an idea for this mod
title: "[Feature]: "
labels: [ "discussion", "enhancement", "feature", "unconfirmed" ]
labels: [ "discussion", "enhancement", "feature" ]
body:
- type: markdown
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/mod_incompatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ body:
- 1.18.x
- 1.19.2
- 1.19.3+
- 1.20.x
validations:
required: true
- type: input
Expand Down
9 changes: 0 additions & 9 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Vampirism for Minecraft 1.20 - Development branch
Vampirism for Minecraft 1.20 - Latest branch
============================================
[![](http://cf.way2muchnoise.eu/short_233029_downloads.svg)](https://minecraft.curseforge.com/projects/vampirism-become-a-vampire) [![](https://img.shields.io/modrinth/dt/jVZ0F1wn?label=Modrinth)](https://modrinth.com/mod/vampirism) [![Build Status](https://github.com/TeamLapen/Vampirism/workflows/Java%20CI/badge.svg?branch=1.16)](https://github.com/TeamLapen/Vampirism/actions) [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) [![Discord Server](https://img.shields.io/discord/430326060635258881)](https://discord.gg/wuamm4P) [![Crowdin](https://badges.crowdin.net/vampirism/localized.svg)](https://crowdin.com/project/vampirism)

[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://maxanier.de)
[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://vampirism.dev)

## Mod Description

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3G
# forge
minecraft_version=1.20.1
minecraft_version_range=[1.20.1,1.21)
forge_version=47.2.0
forge_version=47.1.0
forge_version_range=[47,)
loader_version_range=[47,)
mappings_channel=parchment
Expand Down
3 changes: 3 additions & 0 deletions project/resources/badge/requires_vampirism.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import de.teamlapen.lib.lib.util.UtilLib;
import de.teamlapen.vampirism.api.blocks.HolyWaterEffectConsumer;
import de.teamlapen.vampirism.api.items.IItemWithTier;
import de.teamlapen.lib.lib.util.UtilLib;
import de.teamlapen.vampirism.entity.ExtendedCreature;
import de.teamlapen.vampirism.entity.player.vampire.VampirePlayer;
import net.minecraft.core.BlockPos;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/de/teamlapen/vampirism/blocks/CursedGrass.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ public boolean isBonemealSuccess(@NotNull Level level, @NotNull RandomSource ran
/**
* copied from {@link net.minecraft.world.level.block.GrassBlock#performBonemeal(net.minecraft.server.level.ServerLevel, net.minecraft.util.RandomSource, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState)}
* and add a random flower
* * and use vampire forest as flower source
* and use vampire forest as flower source
*/
@Override
public void performBonemeal(@NotNull ServerLevel level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) {
BlockPos blockpos = pos.above();
// changed from grass to cursed grass
BlockState blockstate = Blocks.GRASS.defaultBlockState();
Optional<Holder.Reference<PlacedFeature>> optional = level.registryAccess().registryOrThrow(Registries.PLACED_FEATURE).getHolder(VegetationPlacements.GRASS_BONEMEAL);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.Property;
import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.common.ToolAction;
import net.minecraftforge.common.ToolActions;
import org.jetbrains.annotations.NotNull;

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.CyclingSlotBackground;
import net.minecraft.client.gui.screens.inventory.ItemCombinerScreen;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.teamlapen.vampirism.client.gui.screens.taskboard;

import com.google.common.collect.Lists;
import com.mojang.blaze3d.systems.RenderSystem;
import de.teamlapen.lib.lib.client.gui.components.ContainerObjectSelectionListWithDummy;
import de.teamlapen.lib.lib.util.MultilineTooltip;
import de.teamlapen.vampirism.REFERENCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import org.apache.commons.lang3.tuple.Pair;
import org.jetbrains.annotations.NotNull;

import java.util.Optional;


/**
* There are differently looking level 0 hunters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import org.apache.commons.lang3.tuple.Pair;
import org.jetbrains.annotations.NotNull;

import java.util.Optional;

/**
* There are differently looking level 0 hunters.
* Hunter as of level 1 look all the same, but have different weapons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import de.teamlapen.vampirism.client.core.ModEntitiesRender;
import de.teamlapen.vampirism.client.renderer.entity.layers.TaskMasterTypeLayer;
import de.teamlapen.vampirism.entity.hunter.HunterTaskMasterEntity;
import de.teamlapen.vampirism.mixin.client.VillagerModelAccessor;
import net.minecraft.client.model.VillagerModel;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ public static void finalizeAndRegisterConfig() {
public static void onLoad(final ModConfigEvent.@NotNull Loading configEvent) {
if (configEvent.getConfig().getType() == ModConfig.Type.SERVER) {
((SundamageRegistry) VampirismAPI.sundamageRegistry()).reloadConfiguration();

} else if (configEvent.getConfig().getType() == ModConfig.Type.CLIENT) {
if (CLIENT.guiLevelOffsetY.get() == 0) {
CLIENT.guiLevelOffsetY.set(47); //Temporary workaround to reset incorrect values
}
}
}

Expand Down Expand Up @@ -264,7 +267,7 @@ public static class Client {

builder.comment("Configure GUI").push("gui");
guiLevelOffsetX = builder.comment("X-Offset of the level indicator from the center in pixels").defineInRange("levelOffsetX", 0, -250, 250);
guiLevelOffsetY = builder.comment("Y-Offset of the level indicator from the bottom in pixels").defineInRange("levelOffsetY", 47, 0, 270);
guiLevelOffsetY = builder.comment("Y-Offset of the level indicator from the bottom in pixels. Must be > 0").defineInRange("levelOffsetY", 47, 0, 270);
guiSkillButton = builder.comment("Render skill menu button in inventory").define("skillButtonEnable", true);
overrideGuiSkillButtonX = builder.comment("Force the guiSkillButton to the following x position from the center of the inventory, default value is 125").defineInRange("overrideGuiSkillButtonX", 125, Integer.MIN_VALUE, Integer.MAX_VALUE);
overrideGuiSkillButtonY = builder.comment("Force the guiSkillButton to the following y position from the center of the inventory, default value is -22").defineInRange("overrideGuiSkillButtonY", -22, Integer.MIN_VALUE, Integer.MAX_VALUE);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/de/teamlapen/vampirism/core/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.level.material.PushReaction;
import net.minecraft.world.level.block.state.properties.BlockSetType;
import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.level.material.PushReaction;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.teamlapen.vampirism.core.ModEffects;
import de.teamlapen.vampirism.util.DamageHandler;
import de.teamlapen.vampirism.util.DamageHandler;
import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.EffectRenderingInventoryScreen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
import com.mojang.serialization.Codec;
import com.mojang.serialization.DataResult;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import com.mojang.serialization.Codec;
import com.mojang.serialization.DataResult;
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Encoder;
import com.mojang.serialization.codecs.PrimitiveCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import de.teamlapen.vampirism.VampirismMod;
import de.teamlapen.vampirism.api.VampirismRegistries;
import de.teamlapen.vampirism.api.entity.factions.IPlayableFaction;
Expand All @@ -28,13 +34,16 @@
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.NbtOps;
import net.minecraft.nbt.Tag;
import net.minecraft.nbt.NbtOps;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.stats.Stats;
import net.minecraft.tags.TagKey;
import net.minecraft.util.ExtraCodecs;
import net.minecraft.world.SimpleMenuProvider;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.player.Inventory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import de.teamlapen.lib.lib.util.ItemStackUtil;
import de.teamlapen.lib.lib.util.ItemStackUtil;
import de.teamlapen.vampirism.api.entity.player.IFactionPlayer;
import de.teamlapen.vampirism.api.entity.player.task.TaskRequirement;
import de.teamlapen.vampirism.core.ModTasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import de.teamlapen.vampirism.core.ModAttributes;
import de.teamlapen.vampirism.core.ModEffects;
import de.teamlapen.vampirism.core.ModTags;
import de.teamlapen.vampirism.util.DamageHandler;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.Difficulty;
import net.minecraft.world.effect.MobEffectInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ public void onLevelChanged(int newLevel, int oldLevel) {
bloodStats.setMaxBlood(20);
} else {
this.vision.deactivate();
this.sync(true);
}
} else {
if (oldLevel == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public int getTickDelay(@NotNull LevelReader worldReader) {

@Override
public boolean isSource(@NotNull FluidState state) {
return false;
return true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public int getTickDelay(@NotNull LevelReader worldReader) {

@Override
public boolean isSource(@NotNull FluidState state) {
return false;
return true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public boolean performShootingMod(Level level, LivingEntity shooter, Interaction

for(int i = 0; i < list.size() && i < 2; ++i) { // only shoot a maximum of 2 arrows
ItemStack itemstack = list.get(i);
boolean flag = shooter instanceof Player && ((Player) shooter).getAbilities().instabuild;
boolean flag = !(shooter instanceof Player player) || player.getAbilities().instabuild;
if (!itemstack.isEmpty()) {
shootProjectileMod(level, shooter, hand, stack, itemstack, afloat[i], flag, speed, angle, 0.0F); // only one arrow per projectile
shootProjectileMod(level, shooter, hand, stack, itemstack, afloat[i], flag, speed, angle); // only one arrow per projectile
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public boolean performShootingMod(Level p_220014_0_, LivingEntity p_220014_1_, I
float[] afloat = CrossbowItemMixin.getShotPitches(p_220014_1_.getRandom());

ItemStack itemstack = getProjectile(p_220014_1_, p_220014_3_, list); //delegate for easy usage and frugality
boolean flag = p_220014_1_ instanceof Player && ((Player) p_220014_1_).getAbilities().instabuild;
boolean flag = !(p_220014_1_ instanceof Player player) || player.getAbilities().instabuild;
if (!itemstack.isEmpty()) {
shootProjectileMod(p_220014_0_, p_220014_1_, p_220014_2_, p_220014_3_, itemstack, afloat[0], flag, p_220014_4_, p_220014_5_, 0.0F); // do not shoot more than one projectile
shootProjectileMod(p_220014_0_, p_220014_1_, p_220014_2_, p_220014_3_, itemstack, afloat[0], flag, p_220014_4_, p_220014_5_); // do not shoot more than one projectile
}

CrossbowItemMixin.onCrossbowShot(p_220014_0_, p_220014_1_, p_220014_3_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ public boolean performShootingMod(Level level, LivingEntity shooter, Interaction

for(int i = 0; i < list.size(); ++i) {
ItemStack itemstack = list.get(i);
boolean flag = shooter instanceof Player && ((Player) shooter).getAbilities().instabuild;
boolean flag = !(shooter instanceof Player player) || player.getAbilities().instabuild;
if (!itemstack.isEmpty()) {
shootProjectileMod(level, shooter, hand, stack, itemstack, afloat[i], flag, speed, angle, 0.0F);
shootProjectileMod(level, shooter, hand, stack, itemstack, afloat[i], flag, speed, angle);
break; // only shoot one projectile
}
}
Expand All @@ -157,19 +157,19 @@ public boolean performShootingMod(Level level, LivingEntity shooter, Interaction
* <br>
* see comments for changes
*/
protected void shootProjectileMod(Level p_220016_0_, LivingEntity p_220016_1_, InteractionHand p_220016_2_, ItemStack p_220016_3_, ItemStack p_220016_4_, float p_220016_5_, boolean p_220016_6_, float p_220016_7_, float p_220016_8_, float p_220016_9_) {
protected void shootProjectileMod(Level p_220016_0_, LivingEntity p_220016_1_, InteractionHand p_220016_2_, ItemStack p_220016_3_, ItemStack p_220016_4_, float p_220016_5_, boolean p_220016_6_, float p_220016_7_, float p_220016_8_) {
if (!p_220016_0_.isClientSide) {
AbstractArrow projectileentity;
projectileentity = modifyArrow(p_220016_3_, CrossbowItemMixin.getArrow(p_220016_0_, p_220016_1_, p_220016_3_, p_220016_4_)); // modify arrow
if (p_220016_6_ || p_220016_9_ != 0.0F) {
if (p_220016_6_) {
projectileentity.pickup = AbstractArrow.Pickup.CREATIVE_ONLY;
}

if (p_220016_1_ instanceof CrossbowAttackMob crossbowUser) {
crossbowUser.shootCrossbowProjectile(crossbowUser.getTarget(), p_220016_3_, projectileentity, p_220016_9_);
crossbowUser.shootCrossbowProjectile(crossbowUser.getTarget(), p_220016_3_, projectileentity, (float) 0.0);
} else {
Vec3 vec31 = p_220016_1_.getUpVector(1.0F);
Quaternionf quaternionf = (new Quaternionf()).setAngleAxis(p_220016_9_ * ((float)Math.PI / 180F), vec31.x, vec31.y, vec31.z);
Quaternionf quaternionf = (new Quaternionf()).setAngleAxis((float) 0.0 * ((float)Math.PI / 180F), vec31.x, vec31.y, vec31.z);
Vec3 vec3 = p_220016_1_.getViewVector(1.0F);
Vector3f vector3f = vec3.toVector3f().rotate(quaternionf);
projectileentity.shoot(vector3f.x(), vector3f.y(), vector3f.z(), p_220016_7_, p_220016_8_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static de.teamlapen.vampirism.core.ModBlocks.*;
import static de.teamlapen.vampirism.core.ModItems.*;
import static net.minecraft.world.item.CreativeModeTabs.BUILDING_BLOCKS;

@Mod.EventBusSubscriber(modid = REFERENCE.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class VampirismCreativeTab {
Expand Down

0 comments on commit b28e612

Please sign in to comment.