Utils ported
This commit is contained in:
@@ -1,30 +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 net.minecraft.block.Material;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.block.piston.PistonBehavior;
|
||||
|
||||
public class AEGlassMaterial {
|
||||
|
||||
public static final Material INSTANCE = new Material(MaterialColor.CLEAR, false, false, true, false, false,
|
||||
false, PistonBehavior.NORMAL);
|
||||
|
||||
}
|
||||
@@ -978,7 +978,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
hostTile.getPos().getZ() + 0.5);
|
||||
from = from.add(direction.getOffsetX() * 0.501, direction.getOffsetY() * 0.501,
|
||||
direction.getOffsetZ() * 0.501);
|
||||
final Vec3d to = from.add(direction.getOffsetX(), direction.getOffsetY(), direction.getZOffset());
|
||||
final Vec3d to = from.add(direction.getOffsetX(), direction.getOffsetY(), direction.getOffsetZ());
|
||||
final BlockHitResult hit = null;// hostWorld.rayTraceBlocks( from, to ); //FIXME:
|
||||
// https://github.com/MinecraftForge/MinecraftForge/pull/6708
|
||||
if (hit != null && !BAD_BLOCKS.contains(directedBlock)) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.helpers;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.state.Property;
|
||||
import net.minecraft.state.property.DirectionProperty;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Direction.Axis;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -31,11 +31,11 @@ import appeng.decorative.solid.QuartzPillarBlock;
|
||||
|
||||
public class MetaRotation implements IOrientable {
|
||||
|
||||
private final Property<Direction> facingProp;
|
||||
private final DirectionProperty facingProp;
|
||||
private final BlockView w;
|
||||
private final BlockPos pos;
|
||||
|
||||
public MetaRotation(final BlockView world, final BlockPos pos, final Property<Direction> facingProp) {
|
||||
public MetaRotation(final BlockView world, final BlockPos pos, final DirectionProperty facingProp) {
|
||||
this.w = world;
|
||||
this.pos = pos;
|
||||
this.facingProp = facingProp;
|
||||
@@ -58,12 +58,12 @@ public class MetaRotation implements IOrientable {
|
||||
public Direction getUp() {
|
||||
final BlockState state = this.w.getBlockState(this.pos);
|
||||
|
||||
if (this.facingProp != null && state.has(this.facingProp)) {
|
||||
if (this.facingProp != null && state.contains(this.facingProp)) {
|
||||
return state.get(this.facingProp);
|
||||
}
|
||||
|
||||
// TODO 1.10.2-R - Temp
|
||||
if (state.has(QuartzPillarBlock.AXIS)) {
|
||||
if (state.contains(QuartzPillarBlock.AXIS)) {
|
||||
Axis a = state.get(QuartzPillarBlock.AXIS);
|
||||
switch (a) {
|
||||
case X:
|
||||
|
||||
Reference in New Issue
Block a user