-
-
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
7b3e563
commit 7c1b9d0
Showing
32 changed files
with
409 additions
and
3 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/malum/blockstates/ritual_plinth.json
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,7 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "malum:block/ritual_plinth" | ||
} | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/malum/models/item/ritual_plinth.json
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,3 @@ | ||
{ | ||
"parent": "malum:block/ritual_plinth" | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/malum/loot_tables/blocks/ritual_plinth.json
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,21 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
], | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "malum:ritual_plinth" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
], | ||
"random_sequence": "malum:blocks/ritual_plinth" | ||
} |
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
84 changes: 84 additions & 0 deletions
84
src/main/java/com/sammy/malum/common/block/curiosities/ritual_plinth/RitualPlinthBlock.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,84 @@ | ||
package com.sammy.malum.common.block.curiosities.ritual_plinth; | ||
|
||
import com.sammy.malum.common.block.curiosities.spirit_altar.*; | ||
import net.minecraft.core.*; | ||
import net.minecraft.world.level.*; | ||
import net.minecraft.world.level.block.entity.*; | ||
import net.minecraft.world.level.block.state.*; | ||
import net.minecraft.world.phys.shapes.*; | ||
import net.minecraftforge.common.capabilities.*; | ||
import net.minecraftforge.items.*; | ||
import net.minecraftforge.items.wrapper.*; | ||
import team.lodestar.lodestone.systems.block.*; | ||
|
||
public class RitualPlinthBlock<T extends RitualPlinthBlockEntity> extends WaterLoggedEntityBlock<T> { | ||
// public static final VoxelShape SHAPE = makeShape(); | ||
// public static final VoxelShape RENDER_SHAPE = makeRenderShape(); | ||
|
||
public RitualPlinthBlock(Properties properties) { | ||
super(properties); | ||
} | ||
|
||
// @Override | ||
// public VoxelShape getInteractionShape(BlockState p_60547_, BlockGetter p_60548_, BlockPos p_60549_) { | ||
// return SHAPE; | ||
// } | ||
// | ||
// @Override | ||
// public VoxelShape getCollisionShape(BlockState p_60572_, BlockGetter p_60573_, BlockPos p_60574_, CollisionContext p_60575_) { | ||
// return SHAPE; | ||
// } | ||
// | ||
// @Override | ||
// public VoxelShape getShape(BlockState p_60555_, BlockGetter p_60556_, BlockPos p_60557_, CollisionContext p_60558_) { | ||
// return RENDER_SHAPE; | ||
// } | ||
|
||
@Override | ||
public int getAnalogOutputSignal(BlockState pState, Level pLevel, BlockPos pPos) { | ||
BlockEntity be = pLevel.getBlockEntity(pPos); | ||
if (be instanceof RitualPlinthBlockEntity altar) { | ||
return ItemHandlerHelper.calcRedstoneFromInventory(altar.getCapability(ForgeCapabilities.ITEM_HANDLER).orElse(new EmptyHandler())); | ||
} | ||
return 0; | ||
} | ||
|
||
@Override | ||
public boolean hasAnalogOutputSignal(BlockState pState) { | ||
return true; | ||
} | ||
|
||
// public static VoxelShape makeShape() { | ||
// VoxelShape shape = Shapes.empty(); | ||
// shape = Shapes.join(shape, Shapes.box(0.0625, 0, 0.0625, 0.9375, 0.25, 0.9375), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.1875, 0.25, 0.1875, 0.8125, 0.625, 0.8125), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0, 0.625, 0, 1, 1, 1), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0, 1, 0, 0.1875, 1.0625, 0.1875), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0, 1, 0.8125, 0.1875, 1.0625, 1), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.8125, 1, 0, 1, 1.0625, 0.1875), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.8125, 1, 0.8125, 1, 1.0625, 1), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.8125, 0, 0.3125, 1, 0.375, 0.6875), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.3125, 0, 0, 0.6875, 0.375, 0.1875), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.3125, 0, 0.8125, 0.6875, 0.375, 1), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0, 0, 0.3125, 0.1875, 0.375, 0.6875), BooleanOp.OR); | ||
// | ||
// return shape; | ||
// } | ||
// | ||
// public static VoxelShape makeRenderShape() { | ||
// VoxelShape shape = Shapes.empty(); | ||
// shape = Shapes.join(shape, Shapes.box(0.0625, 0, 0.0625, 0.9375, 0.25, 0.9375), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.1875, 0.25, 0.1875, 0.8125, 0.625, 0.8125), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0, 0.625, 0, 1, 1, 1), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(-0.125, 0.5625, -0.125, 0.1875, 1.0625, 0.1875), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(-0.125, 0.5625, 0.8125, 0.1875, 1.0625, 1.125), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.8125, 0.5625, -0.125, 1.125, 1.0625, 0.1875), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.8125, 0.5625, 0.8125, 1.125, 1.0625, 1.125), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.8125, 0, 0.3125, 1, 0.375, 0.6875), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.3125, 0, 0, 0.6875, 0.375, 0.1875), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0.3125, 0, 0.8125, 0.6875, 0.375, 1), BooleanOp.OR); | ||
// shape = Shapes.join(shape, Shapes.box(0, 0, 0.3125, 0.1875, 0.375, 0.6875), BooleanOp.OR); | ||
// | ||
// return shape; | ||
// } | ||
} |
83 changes: 83 additions & 0 deletions
83
.../java/com/sammy/malum/common/block/curiosities/ritual_plinth/RitualPlinthBlockEntity.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,83 @@ | ||
package com.sammy.malum.common.block.curiosities.ritual_plinth; | ||
|
||
import com.sammy.malum.common.block.*; | ||
import com.sammy.malum.common.block.curiosities.spirit_altar.*; | ||
import com.sammy.malum.common.block.storage.*; | ||
import com.sammy.malum.common.item.spirit.*; | ||
import com.sammy.malum.common.recipe.*; | ||
import com.sammy.malum.core.systems.recipe.*; | ||
import com.sammy.malum.registry.common.*; | ||
import com.sammy.malum.registry.common.block.*; | ||
import com.sammy.malum.visual_effects.*; | ||
import com.sammy.malum.visual_effects.networked.altar.*; | ||
import com.sammy.malum.visual_effects.networked.data.*; | ||
import net.minecraft.core.*; | ||
import net.minecraft.nbt.*; | ||
import net.minecraft.sounds.*; | ||
import net.minecraft.util.*; | ||
import net.minecraft.world.*; | ||
import net.minecraft.world.entity.item.*; | ||
import net.minecraft.world.entity.player.*; | ||
import net.minecraft.world.item.*; | ||
import net.minecraft.world.level.block.entity.*; | ||
import net.minecraft.world.level.block.state.*; | ||
import net.minecraft.world.phys.*; | ||
import net.minecraftforge.common.capabilities.*; | ||
import net.minecraftforge.common.util.*; | ||
import net.minecraftforge.items.*; | ||
import net.minecraftforge.items.wrapper.*; | ||
import org.jetbrains.annotations.*; | ||
import team.lodestar.lodestone.helpers.*; | ||
import team.lodestar.lodestone.systems.blockentity.*; | ||
import team.lodestar.lodestone.systems.easing.*; | ||
import team.lodestar.lodestone.systems.recipe.*; | ||
|
||
import javax.annotation.Nullable; | ||
import javax.annotation.*; | ||
import java.util.*; | ||
|
||
public class RitualPlinthBlockEntity extends LodestoneBlockEntity { | ||
public RitualPlinthBlockEntity(BlockEntityType<? extends RitualPlinthBlockEntity> type, BlockPos pos, BlockState state) { | ||
super(type, pos, state); | ||
} | ||
|
||
public RitualPlinthBlockEntity(BlockPos pos, BlockState state) { | ||
super(BlockEntityRegistry.RITUAL_PLINTH.get(), pos, state); | ||
} | ||
|
||
@Override | ||
protected void saveAdditional(CompoundTag compound) { | ||
} | ||
|
||
@Override | ||
public void load(CompoundTag compound) { | ||
super.load(compound); | ||
} | ||
|
||
@Override | ||
public void onBreak(@Nullable Player player) { | ||
} | ||
|
||
@Override | ||
public InteractionResult onUse(Player player, InteractionHand hand) { | ||
if (level.isClientSide) { | ||
return InteractionResult.CONSUME; | ||
} | ||
return super.onUse(player, hand); | ||
} | ||
|
||
@Override | ||
public void tick() { | ||
super.tick(); | ||
} | ||
|
||
// public Vec3 getItemPos() { | ||
// final BlockPos blockPos = getBlockPos(); | ||
// final Vec3 offset = getCentralItemOffset(); | ||
// return new Vec3(blockPos.getX() + offset.x, blockPos.getY() + offset.y, blockPos.getZ() + offset.z); | ||
// } | ||
// | ||
// public Vec3 getCentralItemOffset() { | ||
// return ALTAR_ITEM_OFFSET; | ||
// } | ||
} |
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
Oops, something went wrong.