Clean packet registration, misc compile things
This commit is contained in:
@@ -29,6 +29,7 @@ import java.util.Optional;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import appeng.core.Api;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -42,6 +43,7 @@ import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
@@ -1189,12 +1191,12 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
Vec3d from = new Vec3d( hostTile.getPos().getX() + 0.5, hostTile.getPos().getY() + 0.5, hostTile.getPos().getZ() + 0.5 );
|
||||
from = from.add( direction.getXOffset() * 0.501, direction.getYOffset() * 0.501, direction.getZOffset() * 0.501 );
|
||||
final Vec3d to = from.add( direction.getXOffset(), direction.getYOffset(), direction.getZOffset() );
|
||||
final RayTraceResult mop = hostWorld.rayTraceBlocks( from, to );
|
||||
if( mop != null && !BAD_BLOCKS.contains( directedBlock ) )
|
||||
final BlockRayTraceResult hit = null;//hostWorld.rayTraceBlocks( from, to ); //FIXME: https://github.com/MinecraftForge/MinecraftForge/pull/6708
|
||||
if( hit != null && !BAD_BLOCKS.contains( directedBlock ) )
|
||||
{
|
||||
if( mop.getBlockPos().equals( directedTile.getPos() ) )
|
||||
if( hit.getPos().equals( directedTile.getPos() ) )
|
||||
{
|
||||
final ItemStack g = directedBlock.getPickBlock( directedBlockState, mop, hostWorld, directedTile.getPos(), null );
|
||||
final ItemStack g = directedBlock.getPickBlock( directedBlockState, hit, hostWorld, directedTile.getPos(), null );
|
||||
if( !g.isEmpty() )
|
||||
{
|
||||
what = g;
|
||||
|
||||
@@ -22,6 +22,7 @@ package appeng.helpers;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import appeng.core.Api;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import appeng.core.Api;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -36,7 +37,6 @@ import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
@@ -74,7 +74,7 @@ public class Splotch
|
||||
this.pos = data.readByte();
|
||||
final int val = data.readByte();
|
||||
|
||||
this.side = Direction.VALUES[val & 0x07];
|
||||
this.side = Direction.values()[val & 0x07];
|
||||
this.color = AEColor.values()[( val >> 3 ) & 0x0F];
|
||||
this.lumen = ( ( val >> 7 ) & 0x01 ) > 0;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
package appeng.helpers;
|
||||
|
||||
|
||||
import appeng.core.Api;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
Reference in New Issue
Block a user