Skip to content

Commit

Permalink
add compatiblity with CarpentersBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilzinsel64 committed Jan 19, 2024
1 parent 5022aae commit ed5825b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
*/
dependencies {
implementation(rfg.deobf(fileTree(dir: 'libs/implementation', include: ['*.jar'])))
implementation("com.github.GTNewHorizons:CarpentersBlocks:3.5.1-GTNH:dev");
}
31 changes: 28 additions & 3 deletions src/main/java/bl4ckscor3/mod/sit/SitHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,41 @@ public void onPlayerInteract(PlayerInteractEvent event) {
if (!EntitySit.OCCUPIED.containsKey(p) && e.getHeldItem() == null) {
if (b instanceof BlockSlab) {
if ((w.getBlockMetadata(p.x, p.y, p.z) & 8) != 0) return;
} else if (b instanceof BlockStairs) {
}
else if (b instanceof BlockStairs) {
if ((w.getBlockMetadata(p.x, p.y, p.z) & 4) != 0) return;
} else if (Loader.isModLoaded("ImmersiveEngineering")
}
else if (Loader.isModLoaded("ImmersiveEngineering")
&& b instanceof blusunrize.immersiveengineering.common.blocks.BlockIESlabs) {
TileEntity te = w.getTileEntity(event.x, event.y, event.z);

if ((te instanceof blusunrize.immersiveengineering.common.blocks.TileEntityIESlab)
&& ((blusunrize.immersiveengineering.common.blocks.TileEntityIESlab) te).slabType != 0)
return;
} else return;
}
else if (Loader.isModLoaded("CarpentersBlocks"))
{
if (b instanceof com.carpentersblocks.block.BlockCarpentersStairs)
{
}
else if (b instanceof com.carpentersblocks.block.BlockCarpentersSlope)
{
}
else if (b instanceof com.carpentersblocks.block.BlockCarpentersBlock)
{
TileEntity te = w.getTileEntity(event.x, event.y, event.z);

if (te instanceof com.carpentersblocks.tileentity.TEBase)
{
com.carpentersblocks.tileentity.TEBase TE = (com.carpentersblocks.tileentity.TEBase)te;
if (TE.getData() != com.carpentersblocks.data.Slab.SLAB_Y_NEG)
return;
}
}
else
return;
}
else return;

EntitySit sit = new EntitySit(w, p);

Expand Down

0 comments on commit ed5825b

Please sign in to comment.