-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from Mesabrook-Development-Team/Dot10BugFixes
Hotfixes for 1.0.0.10
- Loading branch information
Showing
8 changed files
with
103 additions
and
7 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
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,47 @@ | ||
package com.mesabrook.ib.init; | ||
|
||
import com.mesabrook.ib.blocks.te.TileEntityFluidMeter; | ||
import com.mesabrook.ib.blocks.te.TileEntityWirelessChargingPad; | ||
|
||
import mcjty.xnet.XNet; | ||
import mcjty.xnet.api.channels.IConnectable; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.EnumFacing; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.IBlockAccess; | ||
|
||
public class XNetAPI { | ||
public static void registerConnectables() | ||
{ | ||
XNet.xNetApi.registerConnectable(new WirelessChargingPadConnectable()); | ||
XNet.xNetApi.registerConnectable(new FluidMeterConnectable()); | ||
} | ||
|
||
public static class WirelessChargingPadConnectable implements IConnectable | ||
{ | ||
@Override | ||
public ConnectResult canConnect(IBlockAccess world, BlockPos connectorPos, BlockPos blockPos, TileEntity te, | ||
EnumFacing facing) { | ||
if (te instanceof TileEntityWirelessChargingPad) | ||
{ | ||
return facing.getOpposite() == EnumFacing.DOWN ? ConnectResult.YES : ConnectResult.NO; | ||
} | ||
|
||
return ConnectResult.DEFAULT; | ||
} | ||
} | ||
|
||
public static class FluidMeterConnectable implements IConnectable | ||
{ | ||
@Override | ||
public ConnectResult canConnect(IBlockAccess world, BlockPos connectorPos, BlockPos blockPos, TileEntity te, | ||
EnumFacing facing) { | ||
if (te instanceof TileEntityFluidMeter) | ||
{ | ||
return (facing == EnumFacing.UP || facing == EnumFacing.DOWN) ? ConnectResult.YES : ConnectResult.NO; | ||
} | ||
|
||
return ConnectResult.DEFAULT; | ||
} | ||
} | ||
} |
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
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,26 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": | ||
[ | ||
"BBB", | ||
"R R", | ||
"RRR" | ||
], | ||
"key": | ||
{ | ||
"R": | ||
{ | ||
"type": "forge:ore_dict", | ||
"ore": "stickIron" | ||
}, | ||
"B": | ||
{ | ||
"item": "wbtc:black_plastic" | ||
} | ||
}, | ||
"result": | ||
{ | ||
"item": "wbtc:security_box", | ||
"count": 6 | ||
} | ||
} |
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