This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
EnergonRelics/src/main/java/com/thebrokenrail/energonrelics/block/TestBlock.java

29 lines
1.1 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), Collections.emptyList())).place(world, pos);
}
}
}