Added CTM back in (???)
May need to be tweaked
This commit is contained in:
@@ -19,6 +19,7 @@ forge_version=31.2.20
|
||||
jei_version=6.0.0.4
|
||||
top_version=2.0.4-5
|
||||
hwyla_version=1.10.8-B72_1.15.2
|
||||
ctm_version=MC1.15.2-1.1.0.9
|
||||
|
||||
#########################################################
|
||||
# Deployment #
|
||||
|
||||
@@ -80,6 +80,7 @@ dependencies {
|
||||
// Runtime, Mods
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}")
|
||||
runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-${minecraft_release}:${minecraft_release}-${top_version}")
|
||||
runtimeOnly fg.deobf("team.chisel.ctm:CTM:${ctm_version}")
|
||||
|
||||
// unit test dependencies
|
||||
testCompile "junit:junit:4.13"
|
||||
|
||||
@@ -18,12 +18,25 @@
|
||||
|
||||
package appeng.block.networking;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import appeng.api.parts.IFacadeContainer;
|
||||
import appeng.api.parts.IFacadePart;
|
||||
import appeng.api.parts.PartItemStack;
|
||||
import appeng.api.parts.SelectedPart;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.client.render.cablebus.CableBusBakedModel;
|
||||
import appeng.client.render.cablebus.CableBusBreakingParticle;
|
||||
import appeng.client.render.cablebus.CableBusRenderState;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketClick;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.integration.abstraction.IAEFacade;
|
||||
import appeng.parts.ICableBusContainer;
|
||||
import appeng.parts.NullCableBusContainer;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
import appeng.util.Platform;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -44,12 +57,8 @@ import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.*;
|
||||
import net.minecraft.util.math.RayTraceResult.Type;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
@@ -60,24 +69,12 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.parts.IFacadeContainer;
|
||||
import appeng.api.parts.PartItemStack;
|
||||
import appeng.api.parts.SelectedPart;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.client.render.cablebus.CableBusBakedModel;
|
||||
import appeng.client.render.cablebus.CableBusBreakingParticle;
|
||||
import appeng.client.render.cablebus.CableBusRenderState;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketClick;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.parts.ICableBusContainer;
|
||||
import appeng.parts.NullCableBusContainer;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
import appeng.util.Platform;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockCableBus extends AEBaseTileBlock<TileCableBus> /* FIXME implements IAEFacade */ {
|
||||
public class BlockCableBus extends AEBaseTileBlock<TileCableBus> implements IAEFacade {
|
||||
|
||||
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
|
||||
|
||||
@@ -355,23 +352,23 @@ public class BlockCableBus extends AEBaseTileBlock<TileCableBus> /* FIXME implem
|
||||
// do nothing
|
||||
}
|
||||
|
||||
// FIXME FACADES @Override
|
||||
// FIXME FACADES public BlockState getFacadeState( IBlockReader world, BlockPos pos, Direction side )
|
||||
// FIXME FACADES {
|
||||
// FIXME FACADES if( side != null )
|
||||
// FIXME FACADES {
|
||||
// FIXME FACADES IFacadeContainer container = this.fc( world, pos );
|
||||
// FIXME FACADES if( container != null )
|
||||
// FIXME FACADES {
|
||||
// FIXME FACADES IFacadePart facade = container.getFacade( AEPartLocation.fromFacing( side ) );
|
||||
// FIXME FACADES if( facade != null )
|
||||
// FIXME FACADES {
|
||||
// FIXME FACADES return facade.getBlockState();
|
||||
// FIXME FACADES }
|
||||
// FIXME FACADES }
|
||||
// FIXME FACADES }
|
||||
// FIXME FACADES return world.getBlockState( pos );
|
||||
// FIXME FACADES }
|
||||
@Override
|
||||
public BlockState getFacadeState( IBlockReader world, BlockPos pos, Direction side )
|
||||
{
|
||||
if( side != null )
|
||||
{
|
||||
IFacadeContainer container = this.fc( world, pos );
|
||||
if( container != null )
|
||||
{
|
||||
IFacadePart facade = container.getFacade( AEPartLocation.fromFacing( side ) );
|
||||
if( facade != null )
|
||||
{
|
||||
return facade.getBlockState();
|
||||
}
|
||||
}
|
||||
}
|
||||
return world.getBlockState( pos );
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2018, 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.integration.abstraction;
|
||||
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import team.chisel.ctm.api.IFacade;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
/**
|
||||
* Neat abstraction class for All the IFacade interfaces.
|
||||
*
|
||||
* @author covers1624
|
||||
*/
|
||||
public interface IAEFacade extends IFacade
|
||||
{
|
||||
|
||||
BlockState getFacadeState( IBlockReader world, BlockPos pos, @Nullable Direction side );
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
default BlockState getFacade(@Nonnull IBlockReader world, @Nonnull BlockPos pos, @Nullable Direction side) {
|
||||
return getFacadeState(world, pos, side);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
default BlockState getFacade(@Nonnull IBlockReader world, @Nonnull BlockPos pos, @Nullable Direction side, @Nonnull BlockPos connection) {
|
||||
return getFacadeState(world, pos, side);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package team.chisel.ctm.api;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* To be implemented on blocks that "hide" another block inside, so connected textures can still be accomplished.
|
||||
*/
|
||||
public interface IFacade {
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getFacade(IBlockReader, BlockPos, Direction, BlockPos)}
|
||||
*/
|
||||
@Nonnull
|
||||
@Deprecated
|
||||
BlockState getFacade(@Nonnull IBlockReader world, @Nonnull BlockPos pos, @Nullable Direction side);
|
||||
|
||||
/**
|
||||
* Gets the blockstate this facade appears as.
|
||||
*
|
||||
* @param world
|
||||
* {@link World}
|
||||
* @param pos
|
||||
* The Blocks position
|
||||
* @param side
|
||||
* The side being rendered, NOT the side being connected from.
|
||||
* <p>
|
||||
* This value can be null if no side is specified. Please handle this appropriately.
|
||||
* @param connection
|
||||
* The position of the block being connected to.
|
||||
* @return The blockstate which your block appears as.
|
||||
*/
|
||||
@Nonnull
|
||||
default BlockState getFacade(@Nonnull IBlockReader world, @Nonnull BlockPos pos, @Nullable Direction side, @Nonnull BlockPos connection) {
|
||||
return getFacade(world, pos, side);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user