parent
92fa6af3a0
commit
58fc0d8147
|
@ -0,0 +1,5 @@
|
|||
package modchest.block.custom;
|
||||
|
||||
public class grid {
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package modchest.block.custom;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.block.BlockRenderType;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
||||
public class gridBlock extends Block{
|
||||
|
||||
public gridBlock(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderType getRenderType(BlockState state) {
|
||||
return BlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isSideInvisible(BlockState state, BlockState stateFrom, Direction direction) {
|
||||
return super.isSideInvisible(state, stateFrom, direction) || (state == stateFrom);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package modchest.block;
|
||||
|
||||
import modchest.block.custom.gridBlock;
|
||||
import modchest.block.custom.steeringWheelBlock;
|
||||
import modchest.item.modItemGroup;
|
||||
import modchest.REServerMod;
|
||||
|
@ -15,12 +16,17 @@ import net.minecraft.util.registry.Registry;
|
|||
//setzt die blöcke auf
|
||||
public class modBlocks {
|
||||
public static Block steering_wheel; // Block wird erstellt
|
||||
public static Block grid_block;
|
||||
|
||||
public static void setBlocks() {// Block wird definiert
|
||||
steering_wheel = registerBlock("steering_wheel",
|
||||
new steeringWheelBlock(FabricBlockSettings.of(Material.WOOD).strength(1.0f).requiresTool()),
|
||||
modItemGroup.modchest);
|
||||
|
||||
grid_block = registerBlock("grid_block",
|
||||
new gridBlock(FabricBlockSettings.of(Material.WOOD).strength(1.0f).requiresTool()),
|
||||
modItemGroup.modchest);
|
||||
|
||||
}
|
||||
|
||||
private static Block registerBlock(String name, Block block, ItemGroup group) { // Nicht verändern! Fügt die oben
|
||||
|
|
Loading…
Reference in New Issue