Working in part placement

This commit is contained in:
Sebastian Hartte
2020-07-01 21:27:37 +02:00
parent 8e031ca8d6
commit f2e3d81fd7
134 changed files with 1553 additions and 1494 deletions
@@ -1,27 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.helpers;
import appeng.api.implementations.tiles.IColorableTile;
import appeng.api.networking.IGridHost;
import appeng.api.parts.IPartHost;
public interface AEMultiTile extends IGridHost, IPartHost, IColorableTile {
}
@@ -29,6 +29,8 @@ import java.util.Optional;
import javax.annotation.Nullable;
import alexiil.mc.lib.attributes.item.FixedItemInv;
import appeng.block.networking.CableBusBlock;
import appeng.tile.networking.CableBusBlockEntity;
import com.google.common.collect.ImmutableSet;
import net.minecraft.block.Block;
@@ -982,12 +984,13 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
final BlockHitResult hit = null;// hostWorld.rayTraceBlocks( from, to ); //FIXME:
// https://github.com/MinecraftForge/MinecraftForge/pull/6708
if (hit != null && !BAD_BLOCKS.contains(directedBlock)) {
if (hit.getPos().equals(directedTile.getPos())) {
final ItemStack g = directedBlock.getPickBlock(directedBlockState, hit, hostWorld,
directedTile.getPos(), null);
if (!g.isEmpty()) {
what = g;
}
if (hit.getBlockPos().equals(directedTile.getPos())) {
// FIXME FABRIC: Either add "getName" to the interface adaptor, or special-case cable buses here
// FIXME FABRIC final ItemStack g = directedBlock.getPickBlock(directedBlockState, hit, hostWorld,
// FIXME FABRIC directedTile.getPos(), null);
// FIXME FABRIC if (!g.isEmpty()) {
// FIXME FABRIC what = g;
// FIXME FABRIC }
}
}
} catch (final Throwable t) {
@@ -998,7 +1001,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
return new TranslatableText(what.getTranslationKey());
}
final Item item = Item.getItemFromBlock(directedBlock);
final Item item = Item.fromBlock(directedBlock);
if (item == Items.AIR) {
return new TranslatableText(directedBlock.getTranslationKey());
}