Removed leftover debug messages

This commit is contained in:
RainWarrior 2015-01-30 03:10:09 +03:00
parent a420927007
commit ab39b7e4e0
2 changed files with 0 additions and 18 deletions

View File

@ -1,7 +1,5 @@
package net.minecraftforge.client.model.b3d; package net.minecraftforge.client.model.b3d;
import static net.minecraftforge.client.model.b3d.B3DModel.logger;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
@ -244,7 +242,6 @@ public class B3DLoader implements ICustomModelLoader
if(key == null) if(key == null)
{ {
FMLLog.severe("invalid key index: " + frame); FMLLog.severe("invalid key index: " + frame);
logger.debug(String.format("getMatrix: %s %s\n%s %s %s\n%s", frame, node, node.getPos(), node.getScale(), node.getRot(), ret));
} }
else else
{ {
@ -252,7 +249,6 @@ public class B3DLoader implements ICustomModelLoader
Matrix4f rm = new TRSRTransformation(node.getPos(), node.getRot(), node.getScale(), null).getMatrix(); Matrix4f rm = new TRSRTransformation(node.getPos(), node.getRot(), node.getScale(), null).getMatrix();
rm.invert(); rm.invert();
ret = ret.compose(new TRSRTransformation(rm)); ret = ret.compose(new TRSRTransformation(rm));
logger.debug(String.format("getMatrix: %s %s\n%s %s %s\n%s %s %s\n%s", frame, node, node.getPos(), node.getScale(), node.getRot(), key.getPos(), key.getScale(), key.getRot(), ret));
} }
return ret; return ret;
} }
@ -328,7 +324,6 @@ public class B3DLoader implements ICustomModelLoader
String path = t.getPath(); String path = t.getPath();
if(path.endsWith(".png")) path = path.substring(0, path.length() - ".png".length()); if(path.endsWith(".png")) path = path.substring(0, path.length() - ".png".length());
builder.put(t.getPath(), new ResourceLocation(location.getResourceDomain(), path)); builder.put(t.getPath(), new ResourceLocation(location.getResourceDomain(), path));
System.out.println("Texture: " + path);
} }
return builder.build(); return builder.build();
} }
@ -566,7 +561,6 @@ public class B3DLoader implements ICustomModelLoader
@Override @Override
public BakedWrapper handleBlockState(IBlockState state) public BakedWrapper handleBlockState(IBlockState state)
{ {
System.out.println("handleBlockState " + state);
if(state instanceof IExtendedBlockState) if(state instanceof IExtendedBlockState)
{ {
IExtendedBlockState exState = (IExtendedBlockState)state; IExtendedBlockState exState = (IExtendedBlockState)state;

View File

@ -208,16 +208,13 @@ public class B3DModel
List<Texture> ret = new ArrayList<Texture>(); List<Texture> ret = new ArrayList<Texture>();
while(buf.hasRemaining()) while(buf.hasRemaining())
{ {
logger.debug("TEST");
String path = readString(); String path = readString();
logger.debug("path: '" + path + "'");
int flags = buf.getInt(); int flags = buf.getInt();
int blend = buf.getInt(); int blend = buf.getInt();
Vector2f pos = new Vector2f(buf.getFloat(), buf.getFloat()); Vector2f pos = new Vector2f(buf.getFloat(), buf.getFloat());
Vector2f scale = new Vector2f(buf.getFloat(), buf.getFloat()); Vector2f scale = new Vector2f(buf.getFloat(), buf.getFloat());
float rot = buf.getFloat(); float rot = buf.getFloat();
ret.add(new Texture(path, flags, blend, pos, scale, rot)); ret.add(new Texture(path, flags, blend, pos, scale, rot));
logger.debug("TEX: '" + path + "' " + flags + " " + blend + " " + pos + " " + scale + " " + rot);
} }
popLimit(); popLimit();
this.textures.addAll(ret); this.textures.addAll(ret);
@ -360,7 +357,6 @@ public class B3DModel
rot = readQuat(); rot = readQuat();
} }
Key key = new Key(pos, scale, rot); Key key = new Key(pos, scale, rot);
//logger.debug("Key: " + frame + " " + key);
Key oldKey = animations.peek().get(frame, null); Key oldKey = animations.peek().get(frame, null);
if(oldKey != null) if(oldKey != null)
{ {
@ -436,7 +432,6 @@ public class B3DModel
{ {
for(Table.Cell<Integer, Optional<Node<?>>, Key> key : keyData.cellSet()) for(Table.Cell<Integer, Optional<Node<?>>, Key> key : keyData.cellSet())
{ {
logger.debug("KEY1: " + key + " " + node);
animations.peek().put(key.getRowKey(), key.getColumnKey().or(Optional.of(node)), key.getValue()); animations.peek().put(key.getRowKey(), key.getColumnKey().or(Optional.of(node)), key.getValue());
} }
} }
@ -625,16 +620,12 @@ public class B3DModel
{ {
totalWeight += bone.getLeft(); totalWeight += bone.getLeft();
Matrix4f bm = animator.apply(bone.getRight()); Matrix4f bm = animator.apply(bone.getRight());
logger.debug("w:" + totalWeight + " bone: " + bone.getRight().getName() + " bm: \n" + bm);
bm.mul(bone.getLeft()); bm.mul(bone.getLeft());
t.add(bm); t.add(bm);
logger.debug("t: \n" + t);
} }
if(totalWeight != 0) t.mul(1f / totalWeight); if(totalWeight != 0) t.mul(1f / totalWeight);
} }
logger.debug("t: \n" + t);
// pos // pos
Vector4f pos = new Vector4f(this.pos), newPos = new Vector4f(); Vector4f pos = new Vector4f(this.pos), newPos = new Vector4f();
pos.w = 1; pos.w = 1;
@ -861,7 +852,6 @@ public class B3DModel
public void setAnimation(Animation animation) public void setAnimation(Animation animation)
{ {
logger.debug("setAnimation " + animation + " " + this);
this.animation = animation; this.animation = animation;
Deque<Node<?>> q = new ArrayDeque<Node<?>>(nodes.values()); Deque<Node<?>> q = new ArrayDeque<Node<?>>(nodes.values());
@ -879,7 +869,6 @@ public class B3DModel
ImmutableTable.Builder<Integer, Node<?>, Key> builder = ImmutableTable.builder(); ImmutableTable.Builder<Integer, Node<?>, Key> builder = ImmutableTable.builder();
for(Table.Cell<Integer, Optional<Node<?>>, Key> key : keyData.cellSet()) for(Table.Cell<Integer, Optional<Node<?>>, Key> key : keyData.cellSet())
{ {
//logger.debug("KEY2: " + key + " " + this);
builder.put(key.getRowKey(), key.getColumnKey().or(this), key.getValue()); builder.put(key.getRowKey(), key.getColumnKey().or(this), key.getValue());
} }
setAnimation(new Animation(animData.getLeft(), animData.getMiddle(), animData.getRight(), builder.build())); setAnimation(new Animation(animData.getLeft(), animData.getMiddle(), animData.getRight(), builder.build()));
@ -1037,7 +1026,6 @@ public class B3DModel
for(Pair<Vertex, Float> b : bone.getKind().getData()) for(Pair<Vertex, Float> b : bone.getKind().getData())
{ {
builder.put(b.getLeft(), Pair.of(b.getRight(), bone)); builder.put(b.getLeft(), Pair.of(b.getRight(), bone));
logger.debug("Weight: " + b.getRight() + " " + bone.getName() + " " + b.getLeft().getPos());
} }
} }
weightMap = builder.build(); weightMap = builder.build();