mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 05:02:18 +00:00
MachineMuse, remember, there's TWO model formats supported!
This commit is contained in:
1 parent
e962c2a94d
commit
0443ef5a9e
2 files changed
+43
-4
No files matched your search
@@ -169,6 +169,7 @@ public class WavefrontObject implements IModelCustom
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderAll()
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
@@ -194,6 +195,7 @@ public class WavefrontObject implements IModelCustom
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOnly(String... groupNames)
|
||||
{
|
||||
for (GroupObject groupObject : groupObjects)
|
||||
@@ -221,6 +223,7 @@ public class WavefrontObject implements IModelCustom
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderPart(String partName)
|
||||
{
|
||||
for (GroupObject groupObject : groupObjects)
|
||||
@@ -244,18 +247,17 @@ public class WavefrontObject implements IModelCustom
|
||||
|
||||
public void renderAllExcept(String... excludedGroupNames)
|
||||
{
|
||||
boolean exclude;
|
||||
for (GroupObject groupObject : groupObjects)
|
||||
{
|
||||
exclude=false;
|
||||
boolean skipPart=false;
|
||||
for (String excludedGroupName : excludedGroupNames)
|
||||
{
|
||||
if (excludedGroupName.equalsIgnoreCase(groupObject.name))
|
||||
{
|
||||
exclude=true;
|
||||
skipPart=true;
|
||||
}
|
||||
}
|
||||
if(!exclude)
|
||||
if(!skipPart)
|
||||
{
|
||||
groupObject.render();
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
import net.minecraftforge.client.model.ModelFormatException;
|
||||
import net.minecraftforge.client.model.obj.GroupObject;
|
||||
|
||||
/**
|
||||
* Techne model importer, based on iChun's Hats importer
|
||||
@@ -298,4 +299,40 @@ public class TechneModel extends ModelBase implements IModelCustom {
|
||||
part.renderWithRotation(1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOnly(String... groupNames)
|
||||
{
|
||||
bindTexture();
|
||||
for (ModelRenderer part : parts.values())
|
||||
{
|
||||
for (String groupName : groupNames)
|
||||
{
|
||||
if (groupName.equalsIgnoreCase(part.boxName))
|
||||
{
|
||||
part.render(1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderAllExcept(String... excludedGroupNames)
|
||||
{
|
||||
for (ModelRenderer part : parts.values())
|
||||
{
|
||||
boolean skipPart=false;
|
||||
for (String excludedGroupName : excludedGroupNames)
|
||||
{
|
||||
if (excludedGroupName.equalsIgnoreCase(part.boxName))
|
||||
{
|
||||
skipPart=true;
|
||||
}
|
||||
}
|
||||
if(!skipPart)
|
||||
{
|
||||
part.render(1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user