test for broken items
This commit is contained in:
parent
3716111b4a
commit
9001500056
@ -17,6 +17,7 @@ import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.MapColor;
|
||||
import net.minecraft.block.ExperienceDroppingBlock;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.registry.Registries;
|
||||
@ -75,5 +76,15 @@ public class BlockManager {
|
||||
Block exampleBlockOre = new ExperienceDroppingBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).sounds(BlockSoundGroup.ANCIENT_DEBRIS).requiresTool(), UniformIntProvider.create(4, 20));
|
||||
RegisterBlock("example_block_ore", exampleBlockOre);
|
||||
RegisterBlock("example_block", exampleBlock);
|
||||
RegisterBlock("money_block", MONEY_BLOCK);
|
||||
}
|
||||
|
||||
////CUSTOM BLOCKS BELOW
|
||||
public static final Block MONEY_BLOCK = new MoneyBlock(FabricBlockSettings.create()
|
||||
.mapColor(MapColor.GOLD)
|
||||
.requiresTool()
|
||||
.strength(5.0F, 6.0F)
|
||||
.sounds(BlockSoundGroup.METAL)
|
||||
.luminance(100));
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
package jesse.keeblarcraft.CustomBlocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
//Testing to make a money block the idea is to be able to put the money in your bank at somepoint
|
||||
public class MoneyBlock extends Block {
|
||||
|
||||
// CommonServerUtils commonServerUtils = new CommonServerUtils();
|
||||
|
||||
// public static final BlockItem MONEY_BLOCK_ITEM = new BlockItem(BlockManager.MONEY_BLOCK, new FabricItemSettings());
|
||||
|
||||
public MoneyBlock(Settings sett) {
|
||||
super(sett);
|
||||
|
||||
// ItemManager.RegisterItem("money_block", MONEY_BLOCK_ITEM);
|
||||
|
||||
// @Override
|
||||
// public ActionResult onUse(World world, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
// return this.getBlock().onUse(this.asBlockState(), world, hit.getBlockPos(), player, hand, hit);
|
||||
// }
|
||||
}
|
||||
}
|
@ -14,7 +14,10 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import jesse.keeblarcraft.Keeblarcraft;
|
||||
import jesse.keeblarcraft.CustomBlocks.MoneyBlock;
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
@ -48,6 +51,11 @@ public class ItemManager {
|
||||
itemList.add(newItem);
|
||||
}
|
||||
|
||||
public static void RegisterBlockItem(String name, BlockItem blockitem) {
|
||||
Item newItem = Registry.register(Registries.ITEM, new Identifier(Keeblarcraft.MOD_ID, name), blockitem);
|
||||
itemList.add(newItem);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/// @fn RegisterAllItems
|
||||
///
|
||||
@ -66,5 +74,4 @@ public class ItemManager {
|
||||
// Item exampleItem = new Item(new FabricItemSettings());
|
||||
// RegisterItem("metaljacket_helmet", exampleItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "keeblarcraft:block/money_block"
|
||||
}
|
||||
}
|
||||
}
|
@ -7,5 +7,6 @@
|
||||
"itemgroup.keeblarcraft": "Keeblarcraft Modded Items",
|
||||
|
||||
"block.keeblarcraft.example_block": "Keeblarcraft example block",
|
||||
"block.keeblarcraft.money_block": "Money! Money! Money!",
|
||||
"block.keeblarcraft.example_block_ore": "Keeblarcraft example block ore"
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"texture_size": [64, 64],
|
||||
"textures": {
|
||||
"1": "keeblarcraft:block/money_block"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 4, 4], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 4, 4], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 4, 4], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 4, 4], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 4, 4], "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 4, 4], "texture": "#1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "keeblarcraft:block/money_block"
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"conditions": "minecraft:survives_explosions"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "keeblarcraft:money_block"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": "false",
|
||||
"values": [
|
||||
|
||||
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": "false",
|
||||
"values": [
|
||||
|
||||
|
||||
]
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
"replace": false,
|
||||
"values": [
|
||||
"keeblarcraft:example_block",
|
||||
"keeblarcraft:example_block_ore"
|
||||
"keeblarcraft:example_block_ore",
|
||||
"keeblarcraft:money_block"
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": "false",
|
||||
"values": [
|
||||
|
||||
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": "false",
|
||||
"values": [
|
||||
"keeblarcraft:example_block"
|
||||
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": "false",
|
||||
"values": [
|
||||
"keeblarcraft:money_block"
|
||||
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user