Skip to content

Commit

Permalink
Make the occult symbol advancement work
Browse files Browse the repository at this point in the history
  • Loading branch information
hjake123 committed Jan 24, 2023
1 parent 5743576 commit 3a9bada
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/main/java/com/hyperlynx/reactive/blocks/OccultSymbolBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.RandomSource;
Expand All @@ -13,6 +14,7 @@
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
Expand All @@ -24,6 +26,7 @@
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Objects;
Expand All @@ -36,6 +39,13 @@ public OccultSymbolBlock(Properties props) {
registerDefaultState(stateDefinition.any().setValue(FACING, Direction.UP).setValue(ACTIVE, false));
}

@Override
public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity entity, ItemStack stack) {
if(entity instanceof ServerPlayer){
Registration.PLACE_OCCULT_TRIGGER.trigger((ServerPlayer) entity);
}
}

@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ displayName="Reactive" #mandatory
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI
displayURL="https://www.curseforge.com/minecraft/mc-mods/reactive" #optional
displayURL="https://modrinth.com/mod/reactive" #optional
# A file name (in the root of the mod JAR) containing a logo for display
logoFile="icon.png" #optional
# A text field displayed in the mod UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"type": "patchouli:crafting",
"recipe": "reactive:volt_cell_crafting",
"text": "Aside from damaging Creatures that pass on top of it, placing it below a Crucible charges it with $(thing)Electricity$(0). I wonder what additional kinds of reactions might be possible with such Stimulus?"
"text": "Aside from damaging Creatures that pass on top of it, placing it below a Crucible charges it with $(thing)Electricity$(0). $(4)I wonder what additional kinds of reactions might be possible with such Stimulus?$(0)"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"pages": [
{
"type": "patchouli:text",
"text": "$(1)It should be possible to summon forth spirits using a Crucible. While one might imagine that simply releasing Soul would acomplish this, the truth seems, as ever to be somewhat more involved. $(br2)It is my belief that certain spiritually important objects would aid such a process:"
"text": "$(1)It should be possible to summon forth spirits using a Crucible. While one might imagine that simply releasing Soul would acomplish this, the truth seems, as ever, to be somewhat more involved. $(br2)It is my belief that certain spiritually important objects would aid such a process:"
},
{
"type": "patchouli:text",
Expand Down

0 comments on commit 3a9bada

Please sign in to comment.