Added missing file headers
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render;
|
||||
|
||||
|
||||
@@ -21,7 +39,8 @@ import appeng.items.parts.ItemFacade;
|
||||
|
||||
|
||||
/**
|
||||
* This baked model class is used as a dispatcher to redirect the renderer to the *real* model that should be used based on the item stack.
|
||||
* This baked model class is used as a dispatcher to redirect the renderer to the *real* model that should be used based
|
||||
* on the item stack.
|
||||
* A custom Item Override List is used to accomplish this.
|
||||
*/
|
||||
public class FacadeDispatcherBakedModel implements IBakedModel
|
||||
@@ -74,8 +93,7 @@ public class FacadeDispatcherBakedModel implements IBakedModel
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return new ItemOverrideList( Collections.emptyList() )
|
||||
{
|
||||
return new ItemOverrideList( Collections.emptyList() ){
|
||||
@Override
|
||||
public IBakedModel handleItemState( IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity )
|
||||
{
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render;
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
|
||||
/*
|
||||
* 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.client.render;
|
||||
|
||||
|
||||
@@ -9,7 +25,9 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
|
||||
|
||||
/**
|
||||
* TODO: Removed useless stuff.
|
||||
*/
|
||||
public enum FacingToRotation
|
||||
{
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render;
|
||||
|
||||
|
||||
@@ -25,7 +43,8 @@ public class TesrRenderHelper
|
||||
private static final IWideReadableNumberConverter NUMBER_CONVERTER = ReadableNumberConverter.INSTANCE;
|
||||
|
||||
/**
|
||||
* Move the current coordinate system to the center of the given block face, assuming that the origin is currently at the center of a block.
|
||||
* Move the current coordinate system to the center of the given block face, assuming that the origin is currently
|
||||
* at the center of a block.
|
||||
*/
|
||||
public static void moveToFace( EnumFacing face )
|
||||
{
|
||||
@@ -33,7 +52,8 @@ public class TesrRenderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate the current coordinate system so it is on the face of the given block side. This can be used to render on the given face as if it was
|
||||
* Rotate the current coordinate system so it is on the face of the given block side. This can be used to render on
|
||||
* the given face as if it was
|
||||
* a 2D canvas.
|
||||
*/
|
||||
public static void rotateToFace( EnumFacing face, byte spin )
|
||||
@@ -103,9 +123,11 @@ public class TesrRenderHelper
|
||||
|
||||
/**
|
||||
* Render an item in 2D and the given text below it.
|
||||
*
|
||||
* @param spacing Specifies how far apart the item and the item stack amount are rendered.
|
||||
*/
|
||||
public static void renderItem2dWithAmount( IAEItemStack itemStack, float itemScale, float spacing ) {
|
||||
public static void renderItem2dWithAmount( IAEItemStack itemStack, float itemScale, float spacing )
|
||||
{
|
||||
|
||||
TesrRenderHelper.renderItem2d( itemStack.getItemStack(), itemScale );
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.cablebus;
|
||||
|
||||
|
||||
@@ -73,7 +91,8 @@ class CableBuilder
|
||||
static ResourceLocation getConnectionTexture( AECableType cableType, AEColor color )
|
||||
{
|
||||
String textureFolder;
|
||||
switch (cableType) {
|
||||
switch( cableType )
|
||||
{
|
||||
case GLASS:
|
||||
textureFolder = "parts/cable/glass/";
|
||||
break;
|
||||
@@ -275,8 +294,6 @@ class CableBuilder
|
||||
|
||||
addStraightCoveredCableSizedCube( facing, cubeBuilder );
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static void setStraightCableUVs( CubeBuilder cubeBuilder, EnumFacing facing, int x, int y )
|
||||
@@ -374,8 +391,11 @@ class CableBuilder
|
||||
cubeBuilder.setColorRGB( cableColor.whiteVariant );
|
||||
addCoveredCableSizedCube( facing, cubeBuilder );
|
||||
|
||||
/* TODO: this.setSmartConnectionRotations( of, renderer );
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;*/
|
||||
/*
|
||||
* TODO: this.setSmartConnectionRotations( of, renderer );
|
||||
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
|
||||
* renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
*/
|
||||
}
|
||||
|
||||
public void addStraightSmartConnection( EnumFacing facing, AEColor cableColor, int channels, List<BakedQuad> quadsOut )
|
||||
@@ -460,7 +480,7 @@ class CableBuilder
|
||||
addDenseCableSizedCube( facing, cubeBuilder );
|
||||
|
||||
// Dense cables show used channels in groups of 4, rounded up
|
||||
channels = (channels + 3) / 4;
|
||||
channels = ( channels + 3 ) / 4;
|
||||
|
||||
TextureAtlasSprite oddChannel = smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = smartCableTextures.getEvenTextureForChannels( channels );
|
||||
@@ -494,7 +514,7 @@ class CableBuilder
|
||||
addStraightDenseCableSizedCube( facing, cubeBuilder );
|
||||
|
||||
// Dense cables show used channels in groups of 4, rounded up
|
||||
channels = (channels + 3) / 4;
|
||||
channels = ( channels + 3 ) / 4;
|
||||
|
||||
TextureAtlasSprite oddChannel = smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = smartCableTextures.getEvenTextureForChannels( channels );
|
||||
@@ -511,7 +531,6 @@ class CableBuilder
|
||||
addStraightDenseCableSizedCube( facing, cubeBuilder );
|
||||
}
|
||||
|
||||
|
||||
private static void addDenseCableSizedCube( EnumFacing facing, CubeBuilder cubeBuilder )
|
||||
{
|
||||
switch( facing )
|
||||
@@ -537,7 +556,8 @@ class CableBuilder
|
||||
}
|
||||
}
|
||||
|
||||
// Adds a cube to the given cube builder that has the size of a dense cable connection and spans the entire block for the given direction
|
||||
// Adds a cube to the given cube builder that has the size of a dense cable connection and spans the entire block
|
||||
// for the given direction
|
||||
private static void addStraightDenseCableSizedCube( EnumFacing facing, CubeBuilder cubeBuilder )
|
||||
{
|
||||
switch( facing )
|
||||
@@ -548,8 +568,10 @@ class CableBuilder
|
||||
break;
|
||||
case EAST:
|
||||
case WEST:
|
||||
/*renderer.uvRotateEast = renderer.uvRotateWest = 1;
|
||||
renderer.uvRotateBottom = renderer.uvRotateTop = 1;*/
|
||||
/*
|
||||
* renderer.uvRotateEast = renderer.uvRotateWest = 1;
|
||||
* renderer.uvRotateBottom = renderer.uvRotateTop = 1;
|
||||
*/
|
||||
cubeBuilder.addCube( 0, 3, 3, 16, 13, 13 );
|
||||
break;
|
||||
case NORTH:
|
||||
@@ -560,7 +582,8 @@ class CableBuilder
|
||||
}
|
||||
}
|
||||
|
||||
// Adds a cube to the given cube builder that has the size of a covered cable connection from the core of the cable to the given face
|
||||
// Adds a cube to the given cube builder that has the size of a covered cable connection from the core of the cable
|
||||
// to the given face
|
||||
private static void addCoveredCableSizedCube( EnumFacing facing, CubeBuilder cubeBuilder )
|
||||
{
|
||||
switch( facing )
|
||||
@@ -586,7 +609,8 @@ class CableBuilder
|
||||
}
|
||||
}
|
||||
|
||||
// Adds a cube to the given cube builder that has the size of a covered cable connection and spans the entire block for the given direction
|
||||
// Adds a cube to the given cube builder that has the size of a covered cable connection and spans the entire block
|
||||
// for the given direction
|
||||
private static void addStraightCoveredCableSizedCube( EnumFacing facing, CubeBuilder cubeBuilder )
|
||||
{
|
||||
switch( facing )
|
||||
@@ -597,8 +621,10 @@ class CableBuilder
|
||||
break;
|
||||
case EAST:
|
||||
case WEST:
|
||||
/*renderer.uvRotateEast = renderer.uvRotateWest = 1;
|
||||
renderer.uvRotateBottom = renderer.uvRotateTop = 1;*/
|
||||
/*
|
||||
* renderer.uvRotateEast = renderer.uvRotateWest = 1;
|
||||
* renderer.uvRotateBottom = renderer.uvRotateTop = 1;
|
||||
*/
|
||||
cubeBuilder.addCube( 0, 5, 5, 16, 11, 11 );
|
||||
break;
|
||||
case NORTH:
|
||||
@@ -635,8 +661,10 @@ class CableBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* This renders a slightly bigger covered cable connection to the specified side. This is used to connect cable cores with adjacent machines
|
||||
* that do not want to be connected to using a glass cable connection. This applies to most machines (interfaces, etc.)
|
||||
* This renders a slightly bigger covered cable connection to the specified side. This is used to connect cable
|
||||
* cores with adjacent machines
|
||||
* that do not want to be connected to using a glass cable connection. This applies to most machines (interfaces,
|
||||
* etc.)
|
||||
*/
|
||||
private void addBigCoveredCableSizedCube( EnumFacing facing, CubeBuilder cubeBuilder )
|
||||
{
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.cablebus;
|
||||
|
||||
|
||||
@@ -82,7 +100,6 @@ public class CableBusBakedModel implements IBakedModel
|
||||
return quads;
|
||||
}
|
||||
|
||||
|
||||
// Determines whether a cable is connected to exactly two sides that are opposite each other
|
||||
private static boolean isStraightLine( Set<EnumFacing> sides )
|
||||
{
|
||||
@@ -121,7 +138,8 @@ public class CableBusBakedModel implements IBakedModel
|
||||
{
|
||||
EnumFacing facing = connectionTypes.keySet().iterator().next();
|
||||
|
||||
switch (cableType) {
|
||||
switch( cableType )
|
||||
{
|
||||
case GLASS:
|
||||
cableBuilder.addStraightGlassConnection( facing, cableColor, quadsOut );
|
||||
break;
|
||||
@@ -129,10 +147,10 @@ public class CableBusBakedModel implements IBakedModel
|
||||
cableBuilder.addStraightCoveredConnection( facing, cableColor, quadsOut );
|
||||
break;
|
||||
case SMART:
|
||||
cableBuilder.addStraightSmartConnection( facing, cableColor, renderState.getChannelsOnSide().get(facing), quadsOut );
|
||||
cableBuilder.addStraightSmartConnection( facing, cableColor, renderState.getChannelsOnSide().get( facing ), quadsOut );
|
||||
break;
|
||||
case DENSE:
|
||||
cableBuilder.addStraightDenseConnection( facing, cableColor, renderState.getChannelsOnSide().get(facing), quadsOut );
|
||||
cableBuilder.addStraightDenseConnection( facing, cableColor, renderState.getChannelsOnSide().get( facing ), quadsOut );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.cablebus;
|
||||
|
||||
|
||||
@@ -56,10 +74,7 @@ public class CableBusModel implements IModel
|
||||
return new CableBusBakedModel( cableBuilder, partModels );
|
||||
}
|
||||
|
||||
private Map<ResourceLocation, IBakedModel> loadPartModels(
|
||||
IModelState state,
|
||||
VertexFormat format,
|
||||
Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
private Map<ResourceLocation, IBakedModel> loadPartModels( IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
{
|
||||
ImmutableMap.Builder<ResourceLocation, IBakedModel> result = ImmutableMap.builder();
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.cablebus;
|
||||
|
||||
|
||||
@@ -30,8 +48,10 @@ public class CableBusRenderState
|
||||
// Describes the outgoing connections of this cable bus to other blocks, and how they should be rendered
|
||||
private EnumMap<EnumFacing, AECableType> connectionTypes = new EnumMap<>( EnumFacing.class );
|
||||
|
||||
// Indicate on which sides signified by connectionTypes above, there is another cable bus. If a side is connected, but it is absent from this
|
||||
// set, then it means that there is a Grid host, but not a cable bus on that side (i.e. an interface, a controller, etc.)
|
||||
// Indicate on which sides signified by connectionTypes above, there is another cable bus. If a side is connected,
|
||||
// but it is absent from this
|
||||
// set, then it means that there is a Grid host, but not a cable bus on that side (i.e. an interface, a controller,
|
||||
// etc.)
|
||||
private EnumSet<EnumFacing> cableBusAdjacent = EnumSet.noneOf( EnumFacing.class );
|
||||
|
||||
// Specifies the number of channels used for the connection to a given side. Only contains entries if
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.cablebus;
|
||||
|
||||
|
||||
@@ -22,9 +40,7 @@ import appeng.core.AppEng;
|
||||
*/
|
||||
public enum CableCoreType
|
||||
{
|
||||
GLASS( "parts/cable/core/glass" ),
|
||||
COVERED( "parts/cable/core/covered" ),
|
||||
DENSE( "parts/cable/core/dense" );
|
||||
GLASS( "parts/cable/core/glass" ), COVERED( "parts/cable/core/covered" ), DENSE( "parts/cable/core/dense" );
|
||||
|
||||
private static final Map<AECableType, CableCoreType> cableMapping = generateCableMapping();
|
||||
|
||||
@@ -52,7 +68,8 @@ public enum CableCoreType
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The type of core that should be rendered when the given cable isn't straight and needs to have a core to attach connections to.
|
||||
* @return The type of core that should be rendered when the given cable isn't straight and needs to have a core to
|
||||
* attach connections to.
|
||||
* Is null for the NULL cable.
|
||||
*/
|
||||
public static CableCoreType fromCableType( AECableType cableType )
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.cablebus;
|
||||
|
||||
|
||||
@@ -60,7 +78,8 @@ public class CubeBuilder
|
||||
y2 /= 16.0f;
|
||||
z2 /= 16.0f;
|
||||
|
||||
// If brightness is forced to specific values, extend the vertex format to contain the multi-texturing lightmap offset
|
||||
// If brightness is forced to specific values, extend the vertex format to contain the multi-texturing lightmap
|
||||
// offset
|
||||
VertexFormat savedFormat = null;
|
||||
if( renderFullBright )
|
||||
{
|
||||
@@ -92,10 +111,7 @@ public class CubeBuilder
|
||||
float v2;
|
||||
}
|
||||
|
||||
private void putFace( EnumFacing face,
|
||||
float x1, float y1, float z1,
|
||||
float x2, float y2, float z2
|
||||
)
|
||||
private void putFace( EnumFacing face, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
|
||||
TextureAtlasSprite texture = textures.get( face );
|
||||
@@ -164,9 +180,7 @@ public class CubeBuilder
|
||||
output.add( new BakedQuad( vertexData, -1, face, texture, true, format ) );
|
||||
}
|
||||
|
||||
private UvVector getDefaultUv( EnumFacing face, TextureAtlasSprite texture,
|
||||
float x1, float y1, float z1,
|
||||
float x2, float y2, float z2 )
|
||||
private UvVector getDefaultUv( EnumFacing face, TextureAtlasSprite texture, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
|
||||
UvVector uv = new UvVector();
|
||||
@@ -219,7 +233,8 @@ public class CubeBuilder
|
||||
{
|
||||
float u, v;
|
||||
|
||||
switch (uvRotations[face.ordinal()]) {
|
||||
switch( uvRotations[face.ordinal()] )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
u = uv.u1;
|
||||
@@ -239,7 +254,7 @@ public class CubeBuilder
|
||||
break;
|
||||
}
|
||||
|
||||
putVertex(builder, face, x, y, z, u, v );
|
||||
putVertex( builder, face, x, y, z, u, v );
|
||||
}
|
||||
|
||||
// uv.u2, uv.v1
|
||||
@@ -248,7 +263,8 @@ public class CubeBuilder
|
||||
float u;
|
||||
float v;
|
||||
|
||||
switch (uvRotations[face.ordinal()]) {
|
||||
switch( uvRotations[face.ordinal()] )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
u = uv.u2;
|
||||
@@ -267,7 +283,7 @@ public class CubeBuilder
|
||||
v = uv.v2;
|
||||
break;
|
||||
}
|
||||
putVertex(builder, face, x, y, z, u, v );
|
||||
putVertex( builder, face, x, y, z, u, v );
|
||||
}
|
||||
|
||||
// uv.u2, uv.v2
|
||||
@@ -277,7 +293,8 @@ public class CubeBuilder
|
||||
float u;
|
||||
float v;
|
||||
|
||||
switch (uvRotations[face.ordinal()]) {
|
||||
switch( uvRotations[face.ordinal()] )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
u = uv.u2;
|
||||
@@ -297,7 +314,7 @@ public class CubeBuilder
|
||||
break;
|
||||
}
|
||||
|
||||
putVertex(builder, face, x, y, z, u, v );
|
||||
putVertex( builder, face, x, y, z, u, v );
|
||||
}
|
||||
|
||||
// uv.u1, uv.v2
|
||||
@@ -307,7 +324,8 @@ public class CubeBuilder
|
||||
float u;
|
||||
float v;
|
||||
|
||||
switch (uvRotations[face.ordinal()]) {
|
||||
switch( uvRotations[face.ordinal()] )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
u = uv.u1;
|
||||
@@ -327,7 +345,7 @@ public class CubeBuilder
|
||||
break;
|
||||
}
|
||||
|
||||
putVertex(builder, face, x, y, z, u, v );
|
||||
putVertex( builder, face, x, y, z, u, v );
|
||||
}
|
||||
|
||||
private void putVertex( UnpackedBakedQuad.Builder builder, EnumFacing face, float x, float y, float z, float u, float v )
|
||||
@@ -343,10 +361,7 @@ public class CubeBuilder
|
||||
builder.put( i, x, y, z );
|
||||
break;
|
||||
case NORMAL:
|
||||
builder.put( i,
|
||||
face.getFrontOffsetX(),
|
||||
face.getFrontOffsetY(),
|
||||
face.getFrontOffsetZ() );
|
||||
builder.put( i, face.getFrontOffsetX(), face.getFrontOffsetY(), face.getFrontOffsetZ() );
|
||||
break;
|
||||
case COLOR:
|
||||
// Color format is RGBA
|
||||
@@ -425,9 +440,12 @@ public class CubeBuilder
|
||||
|
||||
public void setUvRotation( EnumFacing facing, int rotation )
|
||||
{
|
||||
if ( rotation == 2 ) {
|
||||
if( rotation == 2 )
|
||||
{
|
||||
rotation = 3;
|
||||
} else if ( rotation == 3 ) {
|
||||
}
|
||||
else if( rotation == 3 )
|
||||
{
|
||||
rotation = 2;
|
||||
}
|
||||
Preconditions.checkArgument( rotation >= 0 && rotation <= 3, "rotation" );
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.cablebus;
|
||||
|
||||
|
||||
@@ -17,7 +35,8 @@ import appeng.core.AELog;
|
||||
|
||||
|
||||
/**
|
||||
* Assuming a default-orientation of forward=NORTH and up=UP, this class rotates a given list of quads to the desired facing
|
||||
* Assuming a default-orientation of forward=NORTH and up=UP, this class rotates a given list of quads to the desired
|
||||
* facing
|
||||
*/
|
||||
public class QuadRotator
|
||||
{
|
||||
@@ -42,10 +61,14 @@ public class QuadRotator
|
||||
private BakedQuad rotateQuad( BakedQuad quad, EnumFacing forward, EnumFacing up )
|
||||
{
|
||||
// Sanitize forward/up
|
||||
if (forward.getAxis() == up.getAxis()) {
|
||||
if (up.getAxis() == EnumFacing.Axis.Y) {
|
||||
if( forward.getAxis() == up.getAxis() )
|
||||
{
|
||||
if( up.getAxis() == EnumFacing.Axis.Y )
|
||||
{
|
||||
up = EnumFacing.NORTH;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
up = EnumFacing.UP;
|
||||
}
|
||||
}
|
||||
@@ -77,11 +100,7 @@ public class QuadRotator
|
||||
|
||||
for( int i = 0; i < 4; i++ )
|
||||
{
|
||||
Point3f pos = new Point3f(
|
||||
Float.intBitsToFloat( newData[i * stride + posIdx] ) - 0.5f,
|
||||
Float.intBitsToFloat( newData[i * stride + posIdx + 1] ) - 0.5f,
|
||||
Float.intBitsToFloat( newData[i * stride + posIdx + 2] ) - 0.5f
|
||||
);
|
||||
Point3f pos = new Point3f( Float.intBitsToFloat( newData[i * stride + posIdx] ) - 0.5f, Float.intBitsToFloat( newData[i * stride + posIdx + 1] ) - 0.5f, Float.intBitsToFloat( newData[i * stride + posIdx + 2] ) - 0.5f );
|
||||
|
||||
// Rotate stuff around
|
||||
mat.transform( pos );
|
||||
@@ -92,14 +111,11 @@ public class QuadRotator
|
||||
newData[i * stride + posIdx + 2] = Float.floatToIntBits( pos.getZ() + 0.5f );
|
||||
|
||||
// Transform the normal if one is present
|
||||
if ( normalIdx != -1 ) {
|
||||
if( normalIdx != -1 )
|
||||
{
|
||||
if( normalType == VertexFormatElement.EnumType.FLOAT )
|
||||
{
|
||||
Vector3f normal = new Vector3f(
|
||||
Float.intBitsToFloat( newData[i * stride + normalIdx] ),
|
||||
Float.intBitsToFloat( newData[i * stride + normalIdx + 1] ),
|
||||
Float.intBitsToFloat( newData[i * stride + normalIdx + 2] )
|
||||
);
|
||||
Vector3f normal = new Vector3f( Float.intBitsToFloat( newData[i * stride + normalIdx] ), Float.intBitsToFloat( newData[i * stride + normalIdx + 1] ), Float.intBitsToFloat( newData[i * stride + normalIdx + 2] ) );
|
||||
|
||||
// Rotate stuff around
|
||||
mat.transform( normal );
|
||||
@@ -145,7 +161,7 @@ public class QuadRotator
|
||||
int idx = offset / 4;
|
||||
int subOffset = offset % 4;
|
||||
int mask = 0xFF << ( subOffset * 8 );
|
||||
data[idx] = data[idx] & ( ~mask ) | ( (value & 0xFF) << (subOffset * 8) );
|
||||
data[idx] = data[idx] & ( ~mask ) | ( ( value & 0xFF ) << ( subOffset * 8 ) );
|
||||
}
|
||||
|
||||
private int findPositionOffset( VertexFormat format )
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.cablebus;
|
||||
|
||||
|
||||
@@ -17,17 +35,7 @@ import appeng.core.AppEng;
|
||||
public class SmartCableTextures
|
||||
{
|
||||
|
||||
public static final ResourceLocation[] SMART_CHANNELS_TEXTURES = {
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_00" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_01" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_02" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_03" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_04" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_10" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_11" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_12" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_13" ),
|
||||
new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_14" )
|
||||
public static final ResourceLocation[] SMART_CHANNELS_TEXTURES = { new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_00" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_01" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_02" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_03" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_04" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_10" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_11" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_12" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_13" ), new ResourceLocation( AppEng.MOD_ID, "parts/cable/smart/channels_14" )
|
||||
};
|
||||
|
||||
// Textures used to display channels on smart cables. There's two sets of 5 textures each, and
|
||||
@@ -36,9 +44,7 @@ public class SmartCableTextures
|
||||
|
||||
public SmartCableTextures( Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
{
|
||||
textures = Arrays.stream( SMART_CHANNELS_TEXTURES )
|
||||
.map( bakedTextureGetter::apply )
|
||||
.toArray( TextureAtlasSprite[]::new );
|
||||
textures = Arrays.stream( SMART_CHANNELS_TEXTURES ).map( bakedTextureGetter::apply ).toArray( TextureAtlasSprite[]::new );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.crafting;
|
||||
|
||||
|
||||
@@ -176,7 +194,7 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
// crafting cube blocks, we'd have to check for a, side, and the perpendicular direction. But in this
|
||||
// block, we've already checked for side (due to face culling) and a (see above).
|
||||
EnumFacing perpendicular = a.rotateAround( side.getAxis() );
|
||||
for ( EnumFacing cornerCandidate: EnumSet.of(perpendicular, perpendicular.getOpposite()))
|
||||
for( EnumFacing cornerCandidate : EnumSet.of( perpendicular, perpendicular.getOpposite() ) )
|
||||
{
|
||||
if( !connections.contains( cornerCandidate ) )
|
||||
{
|
||||
@@ -226,12 +244,12 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
return;
|
||||
}
|
||||
|
||||
float x1 = (west == EnumFacing.WEST ? 0 : 13);
|
||||
float y1 = (down == EnumFacing.DOWN ? 0 : 13);
|
||||
float z1 = (north == EnumFacing.NORTH ? 0 : 13);
|
||||
float x2 = (west == EnumFacing.WEST ? 3 : 16);
|
||||
float y2 = (down == EnumFacing.DOWN ? 3 : 16);
|
||||
float z2 = (north == EnumFacing.NORTH ? 3 : 16);
|
||||
float x1 = ( west == EnumFacing.WEST ? 0 : 13 );
|
||||
float y1 = ( down == EnumFacing.DOWN ? 0 : 13 );
|
||||
float z1 = ( north == EnumFacing.NORTH ? 0 : 13 );
|
||||
float x2 = ( west == EnumFacing.WEST ? 3 : 16 );
|
||||
float y2 = ( down == EnumFacing.DOWN ? 3 : 16 );
|
||||
float z2 = ( north == EnumFacing.NORTH ? 3 : 16 );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.crafting;
|
||||
|
||||
|
||||
@@ -56,22 +74,7 @@ class CraftingCubeModel implements IModel
|
||||
@Override
|
||||
public Collection<ResourceLocation> getTextures()
|
||||
{
|
||||
return ImmutableList.of(
|
||||
RING_CORNER,
|
||||
RING_SIDE_HOR,
|
||||
RING_SIDE_VER,
|
||||
UNIT_BASE,
|
||||
LIGHT_BASE,
|
||||
ACCELERATOR_LIGHT,
|
||||
STORAGE_1K_LIGHT,
|
||||
STORAGE_4K_LIGHT,
|
||||
STORAGE_16K_LIGHT,
|
||||
STORAGE_64K_LIGHT,
|
||||
MONITOR_BASE,
|
||||
MONITOR_LIGHT_DARK,
|
||||
MONITOR_LIGHT_MEDIUM,
|
||||
MONITOR_LIGHT_BRIGHT
|
||||
);
|
||||
return ImmutableList.of( RING_CORNER, RING_SIDE_HOR, RING_SIDE_VER, UNIT_BASE, LIGHT_BASE, ACCELERATOR_LIGHT, STORAGE_1K_LIGHT, STORAGE_4K_LIGHT, STORAGE_16K_LIGHT, STORAGE_64K_LIGHT, MONITOR_BASE, MONITOR_LIGHT_DARK, MONITOR_LIGHT_MEDIUM, MONITOR_LIGHT_BRIGHT );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -93,13 +96,7 @@ class CraftingCubeModel implements IModel
|
||||
case STORAGE_64K:
|
||||
return new LightBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter.apply( LIGHT_BASE ), getLightTexture( bakedTextureGetter, type ) );
|
||||
case MONITOR:
|
||||
return new MonitorBakedModel( format, ringCorner, ringSideHor, ringSideVer,
|
||||
bakedTextureGetter.apply( UNIT_BASE ),
|
||||
bakedTextureGetter.apply( MONITOR_BASE ),
|
||||
bakedTextureGetter.apply( MONITOR_LIGHT_DARK ),
|
||||
bakedTextureGetter.apply( MONITOR_LIGHT_MEDIUM ),
|
||||
bakedTextureGetter.apply( MONITOR_LIGHT_BRIGHT )
|
||||
);
|
||||
return new MonitorBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter.apply( UNIT_BASE ), bakedTextureGetter.apply( MONITOR_BASE ), bakedTextureGetter.apply( MONITOR_LIGHT_DARK ), bakedTextureGetter.apply( MONITOR_LIGHT_MEDIUM ), bakedTextureGetter.apply( MONITOR_LIGHT_BRIGHT ) );
|
||||
default:
|
||||
throw new IllegalArgumentException( "Unsupported crafting unit type: " + type );
|
||||
}
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.crafting;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.crafting;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.crafting;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.crafting;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.crafting;
|
||||
|
||||
|
||||
@@ -13,8 +31,10 @@ import appeng.client.render.cablebus.CubeBuilder;
|
||||
|
||||
|
||||
/**
|
||||
* The baked model for the crafting monitor. Please note that this model doesn't handle the item being displayed. That is handled by a TESR.
|
||||
* Instead, this model adds 3 layered light textures using the [dark|medium|bright] color variants of the attached bus color. The textures
|
||||
* The baked model for the crafting monitor. Please note that this model doesn't handle the item being displayed. That
|
||||
* is handled by a TESR.
|
||||
* Instead, this model adds 3 layered light textures using the [dark|medium|bright] color variants of the attached bus
|
||||
* color. The textures
|
||||
* are full-bright if the cube is powered.
|
||||
*/
|
||||
class MonitorBakedModel extends CraftingCubeBakedModel
|
||||
@@ -30,15 +50,7 @@ class MonitorBakedModel extends CraftingCubeBakedModel
|
||||
|
||||
private final TextureAtlasSprite lightBrightTexture;
|
||||
|
||||
MonitorBakedModel( VertexFormat format,
|
||||
TextureAtlasSprite ringCorner,
|
||||
TextureAtlasSprite ringHor,
|
||||
TextureAtlasSprite ringVer,
|
||||
TextureAtlasSprite chassisTexture,
|
||||
TextureAtlasSprite baseTexture,
|
||||
TextureAtlasSprite lightDarkTexture,
|
||||
TextureAtlasSprite lightMediumTexture,
|
||||
TextureAtlasSprite lightBrightTexture )
|
||||
MonitorBakedModel( VertexFormat format, TextureAtlasSprite ringCorner, TextureAtlasSprite ringHor, TextureAtlasSprite ringVer, TextureAtlasSprite chassisTexture, TextureAtlasSprite baseTexture, TextureAtlasSprite lightDarkTexture, TextureAtlasSprite lightMediumTexture, TextureAtlasSprite lightBrightTexture )
|
||||
{
|
||||
super( format, ringCorner, ringHor, ringVer );
|
||||
this.chassisTexture = chassisTexture;
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.crafting;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.model;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* 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.client.render.model;
|
||||
|
||||
@@ -41,8 +58,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
{
|
||||
this.parent = parent;
|
||||
// 6 (DUNSWE) * 6 (DUNSWE) * 7 (DUNSWE + null) = 252
|
||||
this.quadCache = CacheBuilder.newBuilder().maximumSize( 252 ).build( new CacheLoader<AutoRotatingCacheKey, List<BakedQuad>>()
|
||||
{
|
||||
this.quadCache = CacheBuilder.newBuilder().maximumSize( 252 ).build( new CacheLoader<AutoRotatingCacheKey, List<BakedQuad>>(){
|
||||
@Override
|
||||
public List<BakedQuad> load( AutoRotatingCacheKey key ) throws Exception
|
||||
{
|
||||
@@ -124,8 +140,10 @@ public class AutoRotatingModel implements IBakedModel
|
||||
return parent.getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
// The model has other properties than just forward/up, so it would cause our cache to inadvertendly also cache these
|
||||
// additional states, possibly leading to huge isseus if the other extended state properties do not implement equals/hashCode correctly
|
||||
// The model has other properties than just forward/up, so it would cause our cache to inadvertendly also cache
|
||||
// these
|
||||
// additional states, possibly leading to huge isseus if the other extended state properties do not implement
|
||||
// equals/hashCode correctly
|
||||
if( extState.getUnlistedProperties().size() != 2 )
|
||||
{
|
||||
return getRotatedModel( extState, side, forward, up );
|
||||
@@ -198,10 +216,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
vec.x += 0.5f;
|
||||
vec.y += 0.5f;
|
||||
vec.z += 0.5f;
|
||||
return new float[] {
|
||||
vec.x,
|
||||
vec.y,
|
||||
vec.z
|
||||
return new float[] { vec.x, vec.y, vec.z
|
||||
};
|
||||
case 4:
|
||||
Vector4f vecc = new Vector4f( fs[0], fs[1], fs[2], fs[3] );
|
||||
@@ -212,11 +227,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
vecc.x += 0.5f;
|
||||
vecc.y += 0.5f;
|
||||
vecc.z += 0.5f;
|
||||
return new float[] {
|
||||
vecc.x,
|
||||
vecc.y,
|
||||
vecc.z,
|
||||
vecc.w
|
||||
return new float[] { vecc.x, vecc.y, vecc.z, vecc.w
|
||||
};
|
||||
|
||||
default:
|
||||
@@ -230,19 +241,12 @@ public class AutoRotatingModel implements IBakedModel
|
||||
{
|
||||
case 3:
|
||||
Vec3i vec = f2r.rotate( face ).getDirectionVec();
|
||||
return new float[] {
|
||||
vec.getX(),
|
||||
vec.getY(),
|
||||
vec.getZ()
|
||||
return new float[] { vec.getX(), vec.getY(), vec.getZ()
|
||||
};
|
||||
case 4:
|
||||
Vector4f veccc = new Vector4f( fs[0], fs[1], fs[2], fs[3] );
|
||||
Vec3i vecc = f2r.rotate( face ).getDirectionVec();
|
||||
return new float[] {
|
||||
vecc.getX(),
|
||||
vecc.getY(),
|
||||
vecc.getZ(),
|
||||
veccc.w
|
||||
return new float[] { vecc.getX(), vecc.getY(), vecc.getZ(), veccc.w
|
||||
};
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.model;
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* 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.client.render.model;
|
||||
|
||||
|
||||
@@ -27,13 +28,15 @@ import com.google.common.collect.Lists;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
|
||||
// TODO: Investigate use of CubeBuilder instead
|
||||
final class RenderHelper
|
||||
{
|
||||
|
||||
private static EnumMap<EnumFacing, List<Vec3d>> cornersForFacing = generateCornersForFacings();
|
||||
|
||||
private RenderHelper() {
|
||||
private RenderHelper()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -56,32 +59,18 @@ final class RenderHelper
|
||||
{
|
||||
default:
|
||||
case X:
|
||||
corners = Lists.newArrayList(
|
||||
new Vec3d( offset, 1, 1 ),
|
||||
new Vec3d( offset, 0, 1 ),
|
||||
new Vec3d( offset, 0, 0 ),
|
||||
new Vec3d( offset, 1, 0 )
|
||||
);
|
||||
corners = Lists.newArrayList( new Vec3d( offset, 1, 1 ), new Vec3d( offset, 0, 1 ), new Vec3d( offset, 0, 0 ), new Vec3d( offset, 1, 0 ) );
|
||||
break;
|
||||
case Y:
|
||||
corners = Lists.newArrayList(
|
||||
new Vec3d( 1, offset, 1 ),
|
||||
new Vec3d( 1, offset, 0 ),
|
||||
new Vec3d( 0, offset, 0 ),
|
||||
new Vec3d( 0, offset, 1 )
|
||||
);
|
||||
corners = Lists.newArrayList( new Vec3d( 1, offset, 1 ), new Vec3d( 1, offset, 0 ), new Vec3d( 0, offset, 0 ), new Vec3d( 0, offset, 1 ) );
|
||||
break;
|
||||
case Z:
|
||||
corners = Lists.newArrayList(
|
||||
new Vec3d( 0, 1, offset ),
|
||||
new Vec3d( 0, 0, offset ),
|
||||
new Vec3d( 1, 0, offset ),
|
||||
new Vec3d( 1, 1, offset )
|
||||
);
|
||||
corners = Lists.newArrayList( new Vec3d( 0, 1, offset ), new Vec3d( 0, 0, offset ), new Vec3d( 1, 0, offset ), new Vec3d( 1, 1, offset ) );
|
||||
break;
|
||||
}
|
||||
|
||||
if (facing.getAxisDirection() == EnumFacing.AxisDirection.NEGATIVE) {
|
||||
if( facing.getAxisDirection() == EnumFacing.AxisDirection.NEGATIVE )
|
||||
{
|
||||
corners = Lists.reverse( corners );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* 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.client.render.model;
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* 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.client.render.renderable;
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* 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.client.render.renderable;
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.spatial;
|
||||
|
||||
|
||||
@@ -110,14 +128,7 @@ class SpatialPylonBakedModel implements IBakedModel
|
||||
}
|
||||
}
|
||||
|
||||
builder.setTextures(
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.UP ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.DOWN ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.NORTH ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.SOUTH ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.EAST ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.WEST ) )
|
||||
);
|
||||
builder.setTextures( textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.UP ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.DOWN ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.NORTH ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.SOUTH ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.EAST ) ), textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
|
||||
if( ( flags & TileSpatialPylon.DISPLAY_POWERED_ENABLED ) == TileSpatialPylon.DISPLAY_POWERED_ENABLED )
|
||||
@@ -125,14 +136,7 @@ class SpatialPylonBakedModel implements IBakedModel
|
||||
builder.setRenderFullBright( true );
|
||||
}
|
||||
|
||||
builder.setTextures(
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.UP ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.DOWN ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.NORTH ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.SOUTH ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.EAST ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.WEST ) )
|
||||
);
|
||||
builder.setTextures( textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.UP ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.DOWN ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.NORTH ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.SOUTH ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.EAST ) ), textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.spatial;
|
||||
|
||||
|
||||
@@ -33,9 +51,7 @@ class SpatialPylonModel implements IModel
|
||||
@Override
|
||||
public Collection<ResourceLocation> getTextures()
|
||||
{
|
||||
return Arrays.stream( SpatialPylonTextureType.values() )
|
||||
.map( SpatialPylonModel::getTexturePath )
|
||||
.collect( Collectors.toList() );
|
||||
return Arrays.stream( SpatialPylonTextureType.values() ).map( SpatialPylonModel::getTexturePath ).collect( Collectors.toList() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.spatial;
|
||||
|
||||
|
||||
@@ -33,9 +51,7 @@ public class SpatialPylonRendering extends BlockRenderingCustomizer
|
||||
|
||||
private Map<IBlockState, ModelResourceLocation> mapState( Block block )
|
||||
{
|
||||
return ImmutableMap.of(
|
||||
block.getDefaultState(), new ModelResourceLocation( MODEL_ID, "normal" )
|
||||
);
|
||||
return ImmutableMap.of( block.getDefaultState(), new ModelResourceLocation( MODEL_ID, "normal" ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.spatial;
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,25 @@
|
||||
/*
|
||||
* 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.client.render.spatial;
|
||||
|
||||
|
||||
enum SpatialPylonTextureType
|
||||
{
|
||||
BASE,
|
||||
BASE_END,
|
||||
BASE_SPANNED,
|
||||
DIM,
|
||||
DIM_END,
|
||||
DIM_SPANNED,
|
||||
RED,
|
||||
RED_END,
|
||||
RED_SPANNED
|
||||
BASE, BASE_END, BASE_SPANNED, DIM, DIM_END, DIM_SPANNED, RED, RED_END, RED_SPANNED
|
||||
}
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* 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.client.render.tesr;
|
||||
|
||||
@@ -12,6 +29,7 @@ import appeng.client.render.FacingToRotation;
|
||||
import appeng.client.render.renderable.Renderable;
|
||||
import appeng.tile.AEBaseTile;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class ModularTESR<T extends AEBaseTile> extends TileEntitySpecialRenderer<T>
|
||||
{
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* 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.client.render.tesr;
|
||||
|
||||
@@ -15,6 +32,7 @@ import appeng.client.render.FacingToRotation;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.tile.storage.TileSkyChest;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class SkyChestTESR extends TileEntitySpecialRenderer<TileSkyChest>
|
||||
{
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.client.render.textures;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user