Closed duggum closed 8 years ago
Might be off topic, but why are you running this in the UI thread? I believe it is not required.
@sliceofcode The code and images above are just a means of demonstrating that the EntityRenderType for 'cow' is 6, not '7' as it is assigned in EntityRenderType.cow.
The code I was running that brought this to my attention is:
// make all pigs look like cows
function entityAddedHook(entity) {
if (Entity.getEntityTypeId(entity) === EntityType.PIG) {
Entity.setRenderType(entity, EntityRenderType.cow);
}
}
I was just running some test code to help me learn the API, and I was surprised to see all new pigs rendering as Mooshrooms, not Cows.
re UI thread: yeah, please don't run that on the UI thread (technically all Minecraft methods should be accessed on game thread, not UI thread; however, I don't think Minecraft cares) Thank you so much - fixed in latest beta.
BlockLauncher Pro v1.10.3 MCPE v0.12.2
The render type id for cow (7) is incorrect. It should be 6; 7 is for Mooshrooms. Run the following code and look at a cow to confirm: