This repository has been archived by the owner on Apr 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
127 additions
and
5 deletions.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
src/main/java/quaternary/incorporeal/api/ICorporeaInhibitor.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,9 @@ | ||
package quaternary.incorporeal.api; | ||
|
||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.world.World; | ||
|
||
public interface ICorporeaInhibitor { | ||
/** If true, corporea sparks cannot connect through this block. */ | ||
boolean shouldBlockCorporea(World world, IBlockState state); | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/quaternary/incorporeal/block/BlockCorporeaInhibitor.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,23 @@ | ||
package quaternary.incorporeal.block; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraft.world.World; | ||
import quaternary.incorporeal.Incorporeal; | ||
import quaternary.incorporeal.api.ICorporeaInhibitor; | ||
|
||
public class BlockCorporeaInhibitor extends Block implements ICorporeaInhibitor { | ||
public BlockCorporeaInhibitor() { | ||
super(Material.ROCK); | ||
|
||
setRegistryName(new ResourceLocation(Incorporeal.MODID, "corporea_inhibitor")); | ||
setUnlocalizedName(Incorporeal.MODID + ".corporea_inhibitor"); | ||
} | ||
|
||
@Override | ||
public boolean shouldBlockCorporea(World world, IBlockState state) { | ||
return true; | ||
} | ||
} |
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