This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated antimatter mostly finished mining pipe placement in oil drill…
…ing rig
- Loading branch information
Showing
5 changed files
with
97 additions
and
23 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
common/src/main/java/muramasa/gregtech/block/BlockMiningPipe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package muramasa.gregtech.block; | ||
|
||
import muramasa.antimatter.block.BlockBasic; | ||
import muramasa.antimatter.datagen.providers.AntimatterBlockStateProvider; | ||
import muramasa.antimatter.registration.IItemBlockProvider; | ||
import muramasa.gregtech.GTIRef; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.level.BlockGetter; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import net.minecraft.world.phys.shapes.CollisionContext; | ||
import net.minecraft.world.phys.shapes.Shapes; | ||
import net.minecraft.world.phys.shapes.VoxelShape; | ||
|
||
public class BlockMiningPipe extends BlockBasic implements IItemBlockProvider { | ||
VoxelShape shape = null; | ||
public BlockMiningPipe(String domain, String id, Properties properties) { | ||
super(domain, id, properties); | ||
if (id.equals("mining_pipe_thin")){ | ||
shape = Shapes.create(0.375, 0.0, 0.375, 0.625, 1.0, 0.625); | ||
} | ||
} | ||
|
||
@Override | ||
public VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { | ||
if (this.id.equals("mining_pipe_thin")){ | ||
return shape; | ||
} | ||
return super.getShape(state, level, pos, context); | ||
} | ||
|
||
@Override | ||
public void onBlockModelBuild(Block block, AntimatterBlockStateProvider prov) { | ||
if (getId().equals("mining_pipe_thin")){ | ||
prov.state(block, prov.getBuilder(block).parent(new ResourceLocation("block/fence_post")).texture("texture", new ResourceLocation(GTIRef.ID, "block/casing/brick"))); | ||
return; | ||
} | ||
super.onBlockModelBuild(block, prov); | ||
} | ||
|
||
@Override | ||
public boolean generateItemBlock() { | ||
return !getId().equals("mining_pipe"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters