Update to forge and fuck up the cables? Not sure :P
This commit is contained in:
parent
bc5c30dd3a
commit
6498bd1974
16 changed files with 91 additions and 108 deletions
|
@ -33,7 +33,7 @@ public class ClientPartModelBakery
|
|||
{
|
||||
for (EnumCableType type : EnumCableType.values())
|
||||
{
|
||||
event.map.registerSprite(new ResourceLocation(type.textureName));
|
||||
event.getMap().registerSprite(new ResourceLocation(type.textureName));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,29 +1,20 @@
|
|||
package techreborn.client.render.parts;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.*;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import org.lwjgl.util.vector.Vector3f;
|
||||
import reborncore.common.misc.vecmath.Vecs3dCube;
|
||||
import techreborn.parts.CableMultipart;
|
||||
import techreborn.parts.EnumCableType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.BlockFaceUV;
|
||||
import net.minecraft.client.renderer.block.model.BlockPartFace;
|
||||
import net.minecraft.client.renderer.block.model.FaceBakery;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
|
||||
import org.lwjgl.util.vector.Vector3f;
|
||||
|
||||
import reborncore.common.misc.vecmath.Vecs3dCube;
|
||||
import techreborn.parts.CableMultipart;
|
||||
import techreborn.parts.EnumCableType;
|
||||
|
||||
public class RenderCablePart implements IBakedModel
|
||||
{
|
||||
|
||||
|
@ -40,6 +31,14 @@ public class RenderCablePart implements IBakedModel
|
|||
public void addCubeToList(Vecs3dCube cube, ArrayList<BakedQuad> list, BlockPartFace face,
|
||||
ModelRotation modelRotation, TextureAtlasSprite cubeTexture)
|
||||
{
|
||||
System.out.print(" Max X:" + cube.getMaxX());
|
||||
System.out.print(" Min X:" + cube.getMinX());
|
||||
|
||||
System.out.print(" Max Y:" + cube.getMaxY());
|
||||
System.out.print(" Min Y:" + cube.getMinY());
|
||||
|
||||
System.out.print(" Max Z:" + cube.getMaxZ());
|
||||
System.out.print(" Min Z:" + cube.getMinZ());
|
||||
BlockFaceUV uv = new BlockFaceUV(new float[] { (float) cube.getMinX(), (float) cube.getMinY(),
|
||||
(float) cube.getMaxX(), (float) cube.getMaxY() }, 0);
|
||||
face = new BlockPartFace(null, 0, "", uv);
|
||||
|
@ -53,7 +52,7 @@ public class RenderCablePart implements IBakedModel
|
|||
EnumFacing.UP, modelRotation, null, true, true));// up
|
||||
list.add(faceBakery.makeBakedQuad(
|
||||
new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMinZ()),
|
||||
new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMaxZ()), face, cubeTexture,
|
||||
new Vector3f((float) cube.getMaxX(), (float) cube.getMaxY(), (float) cube.getMinZ()), face, cubeTexture,
|
||||
EnumFacing.NORTH, modelRotation, null, true, true));// north
|
||||
list.add(faceBakery.makeBakedQuad(
|
||||
new Vector3f((float) cube.getMinX(), (float) cube.getMinY(), (float) cube.getMaxZ()),
|
||||
|
@ -98,13 +97,13 @@ public class RenderCablePart implements IBakedModel
|
|||
}
|
||||
if (state.getValue(CableMultipart.NORTH))
|
||||
{
|
||||
addCubeToList(new Vecs3dCube(thickness, thickness, 0.0, lastThickness, lastThickness, thickness), list,
|
||||
face, ModelRotation.X0_Y0, texture);
|
||||
addCubeToList(new Vecs3dCube(thickness, thickness, lastThickness, lastThickness, lastThickness, 16.0),
|
||||
list, face, ModelRotation.X0_Y0, texture);
|
||||
}
|
||||
if (state.getValue(CableMultipart.SOUTH))
|
||||
{
|
||||
addCubeToList(new Vecs3dCube(thickness, thickness, lastThickness, lastThickness, lastThickness, 16.0),
|
||||
list, face, ModelRotation.X0_Y0, texture);
|
||||
addCubeToList(new Vecs3dCube(thickness, thickness, 0.0, lastThickness , lastThickness, thickness), list,
|
||||
face, ModelRotation.X0_Y0, texture);
|
||||
}
|
||||
if (state.getValue(CableMultipart.EAST))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue