Merge branch 'master' of git@gitlab.com:jottyfan/quickiefabric.git
This commit is contained in:
commit
97fbe3d933
@ -1,5 +1,6 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.blockentity;
|
||||
|
||||
import de.jottyfan.minecraft.quickiefabric.blocks.QuickieBlocks;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
@ -29,7 +30,7 @@ public class DrillBlockEntity extends BlockEntity implements Tickable {
|
||||
if (drillstep < 1) {
|
||||
drillstep = MAXDRILLSTEP;
|
||||
BlockPos down = pos.down();
|
||||
if (!world.getBlockState(down).isOf(Blocks.BEDROCK)) {
|
||||
if (!world.getBlockState(down).isOf(Blocks.BEDROCK) && !world.getBlockState(down).isOf(QuickieBlocks.DRILLSTOP)) {
|
||||
world.breakBlock(down, true);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package de.jottyfan.minecraft.quickiefabric.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.loot.context.LootContext.Builder;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class BlockDrillstop extends Block {
|
||||
|
||||
public BlockDrillstop() {
|
||||
super(FabricBlockSettings.of(Material.STONE).hardness(2.5f));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||
List<ItemStack> list = new ArrayList<>();
|
||||
list.add(new ItemStack(QuickieBlocks.DRILLSTOP));
|
||||
return list;
|
||||
}
|
||||
}
|
@ -20,4 +20,5 @@ public class QuickieBlocks {
|
||||
public static final BlockCottonplant COTTONPLANT = new BlockCottonplant();
|
||||
public static final BlockSulphor BLOCKSULPHOR = new BlockSulphor();
|
||||
public static final BlockDrill DRILL = new BlockDrill();
|
||||
public static final BlockDrillstop DRILLSTOP = new BlockDrillstop();
|
||||
}
|
||||
|
@ -141,6 +141,7 @@ public class RegistryManager {
|
||||
stacks.add(new ItemStack(QuickieBlocks.KELPSTACK));
|
||||
stacks.add(new ItemStack(QuickieBlocks.BLOCKSULPHOR));
|
||||
stacks.add(new ItemStack(QuickieBlocks.DRILL));
|
||||
stacks.add(new ItemStack(QuickieBlocks.DRILLSTOP));
|
||||
}).build();
|
||||
|
||||
private static final void registerBlock(Block block, String name) {
|
||||
@ -191,6 +192,7 @@ public class RegistryManager {
|
||||
registerBlock(QuickieBlocks.COTTONPLANT, "cottonplant");
|
||||
registerBlock(QuickieBlocks.BLOCKSULPHOR, "blocksulphor");
|
||||
registerBlock(QuickieBlocks.DRILL, "drill");
|
||||
registerBlock(QuickieBlocks.DRILLSTOP, "drillstop");
|
||||
}
|
||||
|
||||
public static final void registerItems() {
|
||||
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "quickiefabric:block/drillstop"
|
||||
}
|
||||
}
|
||||
}
|
@ -53,6 +53,7 @@
|
||||
"block.quickiefabric.cottonplant": "Baumwollpflanze",
|
||||
"block.quickiefabric.blocksulphor": "Schwefelblock",
|
||||
"block.quickiefabric.drill": "Bohrer",
|
||||
"block.quickiefabric.drillstop": "Bohrerstopper",
|
||||
"container.quickiefabric.backpack": "Rucksack",
|
||||
"msg.buildingplan.start": "beginne Konstruktionsaufnahme bei %s,%s,%s",
|
||||
"msg.buildingplan.end": "beende Konstruktionsaufnahme bei %s,%s,%s",
|
||||
|
@ -53,6 +53,7 @@
|
||||
"block.quickiefabric.cottonplant": "cotton plant",
|
||||
"block.quickiefabric.blocksulphor": "block of sulfur",
|
||||
"block.quickiefabric.drill": "drill",
|
||||
"block.quickiefabric.drillstop": "drill stopper",
|
||||
"container.quickiefabric.backpack": "backpack",
|
||||
"msg.buildingplan.start": "started recording of construction at %s,%s,%s",
|
||||
"msg.buildingplan.end": "finished recording of construction at %s,%s,%s",
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "quickiefabric:block/drillstop"
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"parent": "quickiefabric:block/drillstop",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
20
src/main/resources/data/quickiefabric/recipes/drillstop.json
Normal file
20
src/main/resources/data/quickiefabric/recipes/drillstop.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"sss",
|
||||
"srs",
|
||||
"sss"
|
||||
],
|
||||
"key": {
|
||||
"s": {
|
||||
"item": "quickiefabric:speedpowder"
|
||||
},
|
||||
"r": {
|
||||
"item": "minecraft:obsidian"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "quickiefabric:drillstop",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user