Awareness block #53
@ -0,0 +1,37 @@
|
||||
package net.banutama.utamacraft.block.custom;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.banutama.utamacraft.block.entity.ModBlockEntities;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.BaseEntityBlock;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.RenderShape;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class AwarenessBlock extends BaseEntityBlock {
|
||||
public static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 16, 16);
|
||||
|
||||
public AwarenessBlock() {
|
||||
super(getProperties());
|
||||
}
|
||||
|
||||
public static Block.Properties getProperties() {
|
||||
return Block.Properties.of(Material.METAL).strength(6.0f).requiresCorrectToolForDrops().noOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull RenderShape getRenderShape(@NotNull BlockState state) {
|
||||
return RenderShape.MODEL;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(@NotNull BlockPos pos, @NotNull BlockState state) {
|
||||
return ModBlockEntities.AWARENESS_BLOCK.get().create(pos, state);
|
||||
}
|
||||
}
|
@ -17,34 +17,29 @@ import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
|
||||
public class ModBlocks {
|
||||
public static final DeferredRegister<Block> BLOCKS =
|
||||
DeferredRegister.create(ForgeRegistries.BLOCKS, Utamacraft.MOD_ID);
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS,
|
||||
Utamacraft.MOD_ID);
|
||||
|
||||
public static final RegistryObject<Block> ETHEREAL_GLASS =
|
||||
registerBlock("ethereal_glass", EtherealGlassBlock::new);
|
||||
public static final RegistryObject<Block> ETHEREAL_GLASS_TINTED =
|
||||
registerBlock("ethereal_glass_tinted", EtherealGlassTintedBlock::new);
|
||||
public static final RegistryObject<Block> TUNGSTEN_ORE =
|
||||
registerBlock("tungsten_ore",
|
||||
() -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE)
|
||||
.strength(6.0f)
|
||||
.requiresCorrectToolForDrops(),
|
||||
UniformInt.of(3, 7)));
|
||||
public static final RegistryObject<Block> DEEPSLATE_TUNGSTEN_ORE =
|
||||
registerBlock("deepslate_tungsten_ore",
|
||||
() -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE)
|
||||
.strength(6.0f)
|
||||
.requiresCorrectToolForDrops(),
|
||||
UniformInt.of(3, 7)));
|
||||
public static final RegistryObject<Block> TUNGSTEN_BLOCK =
|
||||
registerBlock("tungsten_block",
|
||||
() -> new Block(BlockBehaviour.Properties.of(Material.METAL)
|
||||
.strength(12.0f)
|
||||
.requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Block> INSOLATOR =
|
||||
registerBlock("insolator", InsolatorBlock::new);
|
||||
public static final RegistryObject<Block> ETHEREAL_GLASS = registerBlock("ethereal_glass", EtherealGlassBlock::new);
|
||||
public static final RegistryObject<Block> ETHEREAL_GLASS_TINTED = registerBlock("ethereal_glass_tinted",
|
||||
EtherealGlassTintedBlock::new);
|
||||
public static final RegistryObject<Block> TUNGSTEN_ORE = registerBlock("tungsten_ore",
|
||||
() -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE)
|
||||
.strength(6.0f)
|
||||
.requiresCorrectToolForDrops(),
|
||||
UniformInt.of(3, 7)));
|
||||
public static final RegistryObject<Block> DEEPSLATE_TUNGSTEN_ORE = registerBlock("deepslate_tungsten_ore",
|
||||
() -> new DropExperienceBlock(BlockBehaviour.Properties.of(Material.STONE)
|
||||
.strength(6.0f)
|
||||
.requiresCorrectToolForDrops(),
|
||||
UniformInt.of(3, 7)));
|
||||
public static final RegistryObject<Block> TUNGSTEN_BLOCK = registerBlock("tungsten_block",
|
||||
() -> new Block(BlockBehaviour.Properties.of(Material.METAL)
|
||||
.strength(12.0f)
|
||||
.requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Block> INSOLATOR = registerBlock("insolator", InsolatorBlock::new);
|
||||
public static final RegistryObject<Block> AWARENESS_BLOCK = registerBlock("awareness", AwarenessBlock::new);
|
||||
|
||||
private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block) {
|
||||
RegistryObject<T> registered_block = BLOCKS.register(name, block);
|
||||
@ -53,7 +48,8 @@ public class ModBlocks {
|
||||
}
|
||||
|
||||
private static <T extends Block> void registerBlockItem(String name, RegistryObject<T> block) {
|
||||
ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties().tab(ModCreativeModeTab.TAB)));
|
||||
ModItems.ITEMS.register(name,
|
||||
() -> new BlockItem(block.get(), new Item.Properties().tab(ModCreativeModeTab.TAB)));
|
||||
}
|
||||
|
||||
public static void register(IEventBus bus) {
|
||||
|
@ -0,0 +1,11 @@
|
||||
package net.banutama.utamacraft.block.entity;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class AwarenessBlockEntity extends BlockEntity {
|
||||
public AwarenessBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(ModBlockEntities.AWARENESS_BLOCK.get(), pos, state);
|
||||
}
|
||||
}
|
@ -16,6 +16,10 @@ public class ModBlockEntities {
|
||||
"insolator",
|
||||
() -> BlockEntityType.Builder.of(InsolatorBlockEntity::new, ModBlocks.INSOLATOR.get()).build(null));
|
||||
|
||||
public static final RegistryObject<BlockEntityType<AwarenessBlockEntity>> AWARENESS_BLOCK = BLOCK_ENTITIES.register(
|
||||
"awareness_block",
|
||||
() -> BlockEntityType.Builder.of(AwarenessBlockEntity::new, ModBlocks.AWARENESS_BLOCK.get()).build(null));
|
||||
|
||||
public static void register(IEventBus bus) {
|
||||
BLOCK_ENTITIES.register(bus);
|
||||
}
|
||||
|
@ -1,20 +1,26 @@
|
||||
{
|
||||
"block.utamacraft.awareness_block": "Awareness Block",
|
||||
"block.utamacraft.deepslate_tungsten_ore": "Deepslate Tungsten Ore",
|
||||
"block.utamacraft.ethereal_glass": "Ethereal Glass",
|
||||
"block.utamacraft.ethereal_glass_tinted": "Tinted Ethereal Glass",
|
||||
"block.utamacraft.insolator": "Insolator",
|
||||
"block.utamacraft.tungsten_block": "Tungsten Block",
|
||||
"block.utamacraft.tungsten_ore": "Tungsten Ore",
|
||||
"block_entity.utamacraft.awareness_block": "Awareness Block",
|
||||
"block_entity.utamacraft.insolator": "Insolator",
|
||||
"gui.utamacraft.insolator.dump": "Dump",
|
||||
"gui.utamacraft.insolator.dump.tooltip": "Dump the fluid contents of the Insolator",
|
||||
"gui.utamacraft.insolator.dump.tooltip.empty": "No fluid contents to dump from Insolator",
|
||||
"item.utamacraft.awareness_block": "Awareness Block",
|
||||
"item.utamacraft.bulb": "Bulb",
|
||||
"item.utamacraft.fiber_glass": "Fiberglass",
|
||||
"item.utamacraft.fire_ward": "Fire Ward Necklace",
|
||||
"item.utamacraft.insolator": "Insolator",
|
||||
"item.utamacraft.pcb": "Printed Circuit Board",
|
||||
"item.utamacraft.player_peripheral": "Player peripheral",
|
||||
"item.utamacraft.tungsten_raw": "Raw Tungsten",
|
||||
"item.utamacraft.tungsten_block": "Tungsten Block",
|
||||
"item.utamacraft.tungsten_ingot": "Tungsten Ingot",
|
||||
"item.utamacraft.tungsten_raw": "Raw Tungsten",
|
||||
"itemGroup.utamacraft_tab": "Utamacraft",
|
||||
"tooltip.utamacraft.energy": "Energy",
|
||||
"tooltip.utamacraft.energy.amount": "%s FE",
|
||||
@ -22,11 +28,8 @@
|
||||
"tooltip.utamacraft.ethereal_glass": "Glass that is not solid to players",
|
||||
"tooltip.utamacraft.ethereal_glass_tinted": "Glass that is not solid to players and blocks light",
|
||||
"tooltip.utamacraft.fire_ward": "Protects the player from fire damage",
|
||||
"tooltip.utamacraft.fluid.empty": "Empty",
|
||||
"tooltip.utamacraft.fluid.amount": "%s mB",
|
||||
"tooltip.utamacraft.fluid.amount.with_capacity": "%s / %s mB",
|
||||
"turtle.utamacraft.player_turtle": "Player",
|
||||
"gui.utamacraft.insolator.dump": "Dump",
|
||||
"gui.utamacraft.insolator.dump.tooltip": "Dump the fluid contents of the Insolator",
|
||||
"gui.utamacraft.insolator.dump.tooltip.empty": "No fluid contents to dump from Insolator"
|
||||
"tooltip.utamacraft.fluid.empty": "Empty",
|
||||
"turtle.utamacraft.player_turtle": "Player"
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"texture_size": [64, 64],
|
||||
"textures": {
|
||||
"0": "utamacraft:block/awareness_block",
|
||||
"particle": "utamacraft:block/awareness_block"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 5.33333, 16], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 5.33333, 16], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 5.33333, 16], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 5.33333, 16], "texture": "#0"},
|
||||
"up": {"uv": [10.66667, 16, 5.33333, 0], "texture": "#0"},
|
||||
"down": {"uv": [16, 0, 10.66667, 16], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "utamacraft:block/awareness_block"
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
Loading…
Reference in New Issue
Block a user