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
|
jei_version=6.0.0.4
|
||||||
top_version=2.0.4-5
|
top_version=2.0.4-5
|
||||||
hwyla_version=1.10.8-B72_1.15.2
|
hwyla_version=1.10.8-B72_1.15.2
|
||||||
|
ctm_version=MC1.15.2-1.1.0.9
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# Deployment #
|
# Deployment #
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ dependencies {
|
|||||||
// Runtime, Mods
|
// Runtime, Mods
|
||||||
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}")
|
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("mcjty.theoneprobe:TheOneProbe-${minecraft_release}:${minecraft_release}-${top_version}")
|
||||||
|
runtimeOnly fg.deobf("team.chisel.ctm:CTM:${ctm_version}")
|
||||||
|
|
||||||
// unit test dependencies
|
// unit test dependencies
|
||||||
testCompile "junit:junit:4.13"
|
testCompile "junit:junit:4.13"
|
||||||
|
|||||||
@@ -18,12 +18,25 @@
|
|||||||
|
|
||||||
package appeng.block.networking;
|
package appeng.block.networking;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import appeng.api.parts.IFacadeContainer;
|
||||||
import java.util.List;
|
import appeng.api.parts.IFacadePart;
|
||||||
import java.util.Random;
|
import appeng.api.parts.PartItemStack;
|
||||||
|
import appeng.api.parts.SelectedPart;
|
||||||
import javax.annotation.Nullable;
|
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.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -44,12 +57,8 @@ import net.minecraft.util.ActionResultType;
|
|||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.*;
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.BlockRayTraceResult;
|
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
|
||||||
import net.minecraft.util.math.RayTraceResult.Type;
|
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.ISelectionContext;
|
||||||
import net.minecraft.util.math.shapes.VoxelShape;
|
import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
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.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
|
|
||||||
import appeng.api.parts.IFacadeContainer;
|
import javax.annotation.Nullable;
|
||||||
import appeng.api.parts.PartItemStack;
|
import java.util.EnumSet;
|
||||||
import appeng.api.parts.SelectedPart;
|
import java.util.List;
|
||||||
import appeng.api.util.AEColor;
|
import java.util.Random;
|
||||||
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;
|
|
||||||
|
|
||||||
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();
|
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
|
||||||
|
|
||||||
@@ -355,23 +352,23 @@ public class BlockCableBus extends AEBaseTileBlock<TileCableBus> /* FIXME implem
|
|||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME FACADES @Override
|
@Override
|
||||||
// FIXME FACADES public BlockState getFacadeState( IBlockReader world, BlockPos pos, Direction side )
|
public BlockState getFacadeState( IBlockReader world, BlockPos pos, Direction side )
|
||||||
// FIXME FACADES {
|
{
|
||||||
// FIXME FACADES if( side != null )
|
if( side != null )
|
||||||
// FIXME FACADES {
|
{
|
||||||
// FIXME FACADES IFacadeContainer container = this.fc( world, pos );
|
IFacadeContainer container = this.fc( world, pos );
|
||||||
// FIXME FACADES if( container != null )
|
if( container != null )
|
||||||
// FIXME FACADES {
|
{
|
||||||
// FIXME FACADES IFacadePart facade = container.getFacade( AEPartLocation.fromFacing( side ) );
|
IFacadePart facade = container.getFacade( AEPartLocation.fromFacing( side ) );
|
||||||
// FIXME FACADES if( facade != null )
|
if( facade != null )
|
||||||
// FIXME FACADES {
|
{
|
||||||
// FIXME FACADES return facade.getBlockState();
|
return facade.getBlockState();
|
||||||
// FIXME FACADES }
|
}
|
||||||
// FIXME FACADES }
|
}
|
||||||
// FIXME FACADES }
|
}
|
||||||
// FIXME FACADES return world.getBlockState( pos );
|
return world.getBlockState( pos );
|
||||||
// FIXME FACADES }
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VoxelShape getShape(BlockState state, IBlockReader w, BlockPos pos, ISelectionContext context) {
|
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