mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-23 04:57:58 +01:00
Copy the texture width/height with children
This commit is contained in:
parent
da3f14c85b
commit
9dd0c0dfb8
2 changed files with 8 additions and 5 deletions
|
@ -22,8 +22,8 @@ public abstract class AbstractPonyRenderer<T extends AbstractPonyRenderer<T>> ex
|
|||
baseModel = model;
|
||||
}
|
||||
|
||||
public AbstractPonyRenderer(ModelBase model, int x, int y) {
|
||||
super(model, x, y);
|
||||
public AbstractPonyRenderer(ModelBase model, int texX, int texY) {
|
||||
super(model, texX, texY);
|
||||
baseModel = model;
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,10 @@ public abstract class AbstractPonyRenderer<T extends AbstractPonyRenderer<T>> ex
|
|||
*/
|
||||
public T child(int index) {
|
||||
if (childModels == null || index >= childModels.size()) {
|
||||
child(copySelf().offset(modelOffsetX, modelOffsetY, modelOffsetZ));
|
||||
T copy = copySelf();
|
||||
child(copy.offset(modelOffsetX, modelOffsetY, modelOffsetZ));
|
||||
copy.textureHeight = textureHeight;
|
||||
copy.textureWidth = textureWidth;
|
||||
}
|
||||
return (T)childModels.get(index);
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ public class PonyRenderer extends AbstractPonyRenderer<PonyRenderer> {
|
|||
super(model);
|
||||
}
|
||||
|
||||
public PonyRenderer(ModelBase model, int x, int y) {
|
||||
super(model, x, y);
|
||||
public PonyRenderer(ModelBase model, int texX, int texY) {
|
||||
super(model, texX, texY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue