29 lines
1.2 KiB
Java
29 lines
1.2 KiB
Java
package com.thebrokenrail.energonrelics.block;
|
|
|
|
import com.thebrokenrail.energonrelics.block.util.SimpleBlock;
|
|
import com.thebrokenrail.energonrelics.structure.StructurePlacer;
|
|
import com.thebrokenrail.energonrelics.structure.researchcomplex.ResearchComplexStartPart;
|
|
import com.thebrokenrail.energonrelics.structure.researchcomplex.ResearchComplexState;
|
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.block.Material;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.world.World;
|
|
|
|
import java.util.Collections;
|
|
|
|
public class TestBlock extends SimpleBlock {
|
|
public TestBlock() {
|
|
super(FabricBlockSettings.of(Material.STONE));
|
|
}
|
|
|
|
@SuppressWarnings("deprecation")
|
|
@Override
|
|
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) {
|
|
super.onBlockAdded(state, world, pos, oldState, notify);
|
|
if (!world.isClient()) {
|
|
new StructurePlacer(new ResearchComplexStartPart(new ResearchComplexState(world, world.random), Collections.emptyList())).place(world, pos);
|
|
}
|
|
}
|
|
}
|