
Gwafu
Members-
Posts
36 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
heh
Gwafu's Achievements

Tree Puncher (2/8)
0
Reputation
-
diesieben suggested to add a conditional breakpoint in RenderManager.renderEntityWithPosYaw to check with my entity. If I understand that correctly, I need to go MC's RenderManager class file and find the renderEntityWithPosYaw method and add if statements and debug messages there. i dunno lol
-
How do I edit Minecraft source files with the current Forge setup? A quick trip to Google shows ASM usage but I think that's taking things too far.
-
The entity is a direct copy from the EntityLeashKnot class (with minor edits). I don't know if it is frowned upon or not but it's how I work with creating objects for Minecraft: copy vanilla, see if the new copy works, and work from it. I have removed writeToNBTOptional method and it the entity is still there (albeit still with no render/model) after reloading the world.
-
Yes it does. I have them at the onUpdate method and also before the spawnEntityInWorld inside createKnot method. Both of the debug messages are being called. There's also a strange thing now that I test it one more time, is that after I reconnect to a test world (save and quit, play in the world), the debug message inside the onUpdate method doesn't get called. I've also tried adding a debug message inside the onValidSurface method, but that method doesn't get called when the entity spawns from the item.
-
Almost two weeks. The current latest version for 1.8 is 1.8-11.14.2.1430. It still doesn't work.
-
Probably the last 48-hour bump. I'll be reverting back for 1.7.10 in the meantime if this still goes unsolved.
-
Bump.
-
I think there are no other instance of RenderManager than the one Minecraft.getMinecraft().getRenderManager() provides. And also, the constructor from my RenderRopeKnot is the same as the one from RenderLeashKnot, I just passed the RenderManager inside the constructor instead of during initialization. Anyway, I still tried doing it and it didn't work. As a last resort, I'll try looking around mods with public sources and see how they register their entities and renders. :V EDIT I can't seem to find a mod utilizing EntityHanging that is update for 1.8. 4 days and still counting.
-
The ClientProxy is called (since my block models work). The constructor for RenderRopeKnot is called. getEntityTexture doesn't get called. And as always, doRender doesn't get called. And in case someone is wondering, the entity spawns (because the entity's onUpdate method works) just without a model/render. I'll try testing it with a 1.7.10 build and see if it's a 1.8 forge problem. EDIT For some reason, the same code works with 1.7.10-10.13.3-1407 (latest). I'll try reinstalling Forge 1.8. EDIT 2 Reinstalling Forge 1.8 still didn't work. Will try using the latest version (1.8-11.14.1.1405). EDIT 3 It still didn't work with 1.8-11.14.1.1405.
-
I can't remove it since there's no other constructor without the RenderManager thingy inside the Render class. RenderLeashKnot has this as its constructor: public RenderLeashKnot(RenderManager p_i46158_1_) { super(p_i46158_1_); } which calls Render's constructor: protected Render(RenderManager renderManager) { this.renderManager = renderManager; } And the entry for RenderLeashKnot inside RenderManager: this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this)); I'm with you, I don't really know what's causing it to not render properly :V.
-
The render method is called by the doRender method, so by calling the doRender method inside the render method will just loop around. Anyway, I still tried it and it didn't work. I've also simplified/cleaned the code, removing unneeded methods: @SideOnly(Side.CLIENT) public class RenderRopeKnot extends Render { private static final ResourceLocation TEXTURE = new ResourceLocation(Mod.MODID, "textures/entity/rope_knot.png"); private ModelRopeKnot MODEL = new ModelRopeKnot(); public RenderRopeKnot() { super(Minecraft.getMinecraft().getRenderManager()); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return this.TEXTURE; } @Override public void doRender(Entity entity, double x, double y, double z, float f, float partialTicks) { System.out.println("render"); EntityRopeKnot entityropeknot = (EntityRopeKnot)entity; GlStateManager.pushMatrix(); GlStateManager.disableCull(); GlStateManager.translate((float)x, (float)y, (float)z); GlStateManager.enableRescaleNormal(); GlStateManager.scale(-1.0F, -1.0F, 1.0F); GlStateManager.enableAlpha(); this.bindEntityTexture(entityropeknot); this.MODEL.render(entityropeknot, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GlStateManager.popMatrix(); super.doRender(entityropeknot, x, y, z, f, partialTicks); } }
-
48 hours? And also, placing EntityRegistry.registerModEntity and RenderingRegistry.registerEntityRenderingHandler inside my pre-init method didn't work. I am using Forge 1.8-11.14.1.1402. The latest one is .1404 but I don't see the need to update.
-
I have also tried placing registerModEntity inside the modfile's init: @EventHandler public void init(FMLInitializationEvent event) { EntityRegistry.registerModEntity(EntityRopeKnot.class, "rope", 0, this, 160, Integer.MAX_VALUE, false); proxy.init(); } But it is still invisible.
-
I've searched the forums and this is the most related one but is left unsolved. I am trying to create an item based on leash. When the item is activated/right-clicked on a block (fence), it is supposed to create an entity in the block's place. The entity spawns fine but is invisible. Placing debug messages here and there showed that the doRender() method from the entity's render class is not being called. Here's the relevant codes + some brief (very) explanations: http://pastebin.com/SiWKMPSp Any help is appreciated!
-
Checked it, you're right. It returns 12 and -1. Will fix right away. Thank you very much!