Build 1.6-23

Panel components have to be shift-clicked to place them in the world
This commit is contained in:
malte0811 2017-12-08 20:15:02 +01:00
parent 8ff35f0ea4
commit b0156b70a0
4 changed files with 27 additions and 20 deletions

View file

@ -1,5 +1,5 @@
def mainVersion = "1.6"
def buildNumber = "22"
def buildNumber = "23"
// For those who want the bleeding edge
buildscript {

View file

@ -1,3 +1,9 @@
#####Version 1.6-23
- Added a command to allow taking screenshots of Marx generator discharges (/ciw triggermarxscreenshot)
- Panel components have to be shift-clicked to place them in the world
- Fixed wire coil crafting
- Added a recipe for the Seven-Segment displays
#####Version 1.6-22
- Added a Seven-Segment display for control panels
- Panel components update their values as soon as they are changed in the GUI

View file

@ -169,7 +169,7 @@ public class ItemPanelComponent extends Item implements INetGUIItem {
@Override
@Nonnull
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, @Nonnull EnumHand hand) {
if (!worldIn.isRemote) {
if (!worldIn.isRemote&&!playerIn.isSneaking()) {
playerIn.openGui(IndustrialWires.MODID, 1, worldIn, 0, 0, hand == EnumHand.MAIN_HAND ? 1 : 0);
}
return new ActionResult<>(EnumActionResult.SUCCESS, playerIn.getHeldItem(hand));
@ -180,25 +180,26 @@ public class ItemPanelComponent extends Item implements INetGUIItem {
*/
@Nonnull
public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
IBlockState iblockstate = worldIn.getBlockState(pos);
Block block = iblockstate.getBlock();
if (player.isSneaking()) {
IBlockState iblockstate = worldIn.getBlockState(pos);
Block block = iblockstate.getBlock();
if (!block.isReplaceable(worldIn, pos)) {
pos = pos.offset(facing);
}
ItemStack itemstack = player.getHeldItem(hand);
if (!itemstack.isEmpty() && player.canPlayerEdit(pos, facing, itemstack) && worldIn.mayPlace(IndustrialWires.panel, pos, false, facing, (Entity) null)) {
placeBlockAt(itemstack, player, worldIn, pos, facing, hitX, hitY, hitZ);
SoundType soundtype = worldIn.getBlockState(pos).getBlock().getSoundType(worldIn.getBlockState(pos), worldIn, pos, player);
worldIn.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);
itemstack.shrink(1);
return EnumActionResult.SUCCESS;
} else {
return EnumActionResult.FAIL;
if (!block.isReplaceable(worldIn, pos)) {
pos = pos.offset(facing);
}
ItemStack itemstack = player.getHeldItem(hand);
if (!itemstack.isEmpty() && player.canPlayerEdit(pos, facing, itemstack) && worldIn.mayPlace(IndustrialWires.panel, pos, false, facing, (Entity) null)) {
placeBlockAt(itemstack, player, worldIn, pos, facing, hitX, hitY, hitZ);
SoundType soundtype = worldIn.getBlockState(pos).getBlock().getSoundType(worldIn.getBlockState(pos), worldIn, pos, player);
worldIn.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);
itemstack.shrink(1);
return EnumActionResult.SUCCESS;
}
}
return EnumActionResult.FAIL;
}
private void placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) {

View file

@ -156,7 +156,7 @@ ie.manual.entry.industrialwires.redstone1=connectors from Immersive Engineering.
ie.manual.entry.industrialwires.components.name=Panel Components
ie.manual.entry.industrialwires.components.subtext=More than just two
ie.manual.entry.industrialwires.components.general=The settings of any component can be copied to a component of the same type by placing the components directly above each other in a crafting bench. The settings of the upper component will be copied to the lower.<br>Components can be placed in the world to create small control panels containing just that component. These interact with redstone signals in the world directly, just like a lever does, rather than through redstone wire controllers, like normal control panels.
ie.manual.entry.industrialwires.components.general=The settings of any component can be copied to a component of the same type by placing the components directly above each other in a crafting bench. The settings of the upper component will be copied to the lower.<br>Components can be placed in the world by shift-right-clicking to create small control panels containing just that component. These interact with redstone signals in the world directly, just like a lever does, rather than through redstone wire controllers like normal control panels would.
ie.manual.entry.industrialwires.button=A simple button that activates a redstone signal when pressed. Its color can be changed. The button either stays on until clicked again (latching) or tuns off after half a second (non-latching).
ie.manual.entry.industrialwires.label=A text that can be placed on the control panel, for example to indicate the purpose of some other component. The color and obviously the text can be edited.
ie.manual.entry.industrialwires.indicator_light=A small indicator that brightens as the input redstone signal is increased. The color can be changed.