-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f07803
commit a311957
Showing
17 changed files
with
160 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/com/sammy/malum/common/block/MalumBlockEntityInventory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.sammy.malum.common.block; | ||
|
||
import com.sammy.malum.common.item.spirit.*; | ||
import com.sammy.malum.registry.common.*; | ||
import net.minecraft.sounds.*; | ||
import net.minecraft.world.entity.player.*; | ||
import net.minecraft.world.item.*; | ||
import net.minecraft.world.level.*; | ||
import team.lodestar.lodestone.helpers.*; | ||
import team.lodestar.lodestone.systems.blockentity.*; | ||
|
||
import java.util.function.*; | ||
|
||
public class MalumBlockEntityInventory extends LodestoneBlockEntityInventory { | ||
public MalumBlockEntityInventory(int slotCount, int allowedItemSize, Predicate<ItemStack> inputPredicate, Predicate<ItemStack> outputPredicate) { | ||
super(slotCount, allowedItemSize, inputPredicate, outputPredicate); | ||
} | ||
|
||
public MalumBlockEntityInventory(int slotCount, int allowedItemSize, Predicate<ItemStack> inputPredicate) { | ||
super(slotCount, allowedItemSize, inputPredicate); | ||
} | ||
|
||
public MalumBlockEntityInventory(int slotCount, int allowedItemSize) { | ||
super(slotCount, allowedItemSize); | ||
} | ||
|
||
@Override | ||
public void extractItem(Player playerEntity, ItemStack stack, int slot) { | ||
super.extractItem(playerEntity, stack, slot); | ||
SoundEvent soundEvent = stack.getItem() instanceof SpiritShardItem ? SoundRegistry.PEDESTAL_SPIRIT_PICKUP.get() : SoundRegistry.PEDESTAL_ITEM_PICKUP.get(); | ||
playerEntity.level.playSound(null, playerEntity.blockPosition(), soundEvent, SoundSource.BLOCKS, 0.7f, RandomHelper.randomBetween(playerEntity.level.random, 0.8f, 1.2f)); | ||
} | ||
|
||
@Override | ||
public ItemStack insertItem(Player playerEntity, ItemStack stack) { | ||
final ItemStack result = super.insertItem(playerEntity, stack); | ||
if (!result.isEmpty()) { | ||
SoundEvent soundEvent = result.getItem() instanceof SpiritShardItem ? SoundRegistry.PEDESTAL_SPIRIT_INSERT.get() : SoundRegistry.PEDESTAL_ITEM_INSERT.get(); | ||
playerEntity.level.playSound(null, playerEntity.blockPosition(), soundEvent, SoundSource.BLOCKS, 0.7f, RandomHelper.randomBetween(playerEntity.level.random, 0.8f, 1.2f)); | ||
} | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/sammy/malum/common/effect/GrowingFleshEffect.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.sammy.malum.common.effect; | ||
|
||
import net.minecraft.world.effect.*; | ||
import net.minecraft.world.entity.*; | ||
import net.minecraft.world.entity.ai.attributes.*; | ||
import team.lodestar.lodestone.helpers.*; | ||
|
||
import java.awt.*; | ||
|
||
public class GrowingFleshEffect extends MobEffect { | ||
public GrowingFleshEffect() { | ||
super(MobEffectCategory.BENEFICIAL, ColorHelper.getColor(new Color(126, 25, 95))); | ||
addAttributeModifier(Attributes.MAX_HEALTH, "04448cbf-ee2c-4f36-b71f-e641a312834a", 0.05f, AttributeModifier.Operation.MULTIPLY_TOTAL); | ||
} | ||
|
||
@Override | ||
public void applyEffectTick(LivingEntity entityLivingBaseIn, int amplifier) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.