Jump to content

TheGreyGhost

Members
  • Posts

    3280
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by TheGreyGhost

  1. Hi This link might help a bit http://www.minecraftforge.net/forum/index.php/topic,23561.msg119530.html#msg119530 -TGG
  2. Hi I didn't find anything obvious; I think the most likely explanation is that you've either accidentally provided a second (empty?) constructor that doesn't initialise activeElements properly, another section of code is overwriting it after construction, or your packet handler is stuffing something up. I'd suggest adding a pile more System.out.println() to the constructor, getter/setter, and packet handler, to help track it down. -TGG
  3. sorry mate, nothing is coming to mind and I don't see anything obvious in that code (but then - I've never programmed riding entity stuff before either). What I would try next is to put a breakpoint on the client side posY (i.e. to break when it turns to say > 56.5) and see which method is writing the changed value in there. It will slow your code down a lot but with any luck it should show you exactly what is causing the problem. -TGG
  4. Hi I'd suggest you put a breakpoint or System.out.println("here"); into your renderTileEntityAt() This will show you if it's a rendering problem or a registration problem, and give you a good clue on where to look next. -TGG PS I don't think you need to use t.setTextureUV(1/4, 1/4); before each t.addVertexWithUV(0, 1, 1, 1/4, 1/4); Also, 1/4 gets converted to 0 due to integer arithmetic. Use 0.25 or 1.0/4.0 instead.
  5. Hi Show some code? I've found position logging to be extremely useful for this type of problem eg System.out.println("position on side " + (this.worldObj.isRemote() ? "client" : "server") + " is [" + this.posX + ", " + this.posY + ", " + this.posZ + "]" ); (in one of the entity's tick update methods) That will show you if it really is a client/server mismatch, and might help you figure out where to look next. -TGG
  6. Hi I don't have experience doing this, but at the risk of stating the obvious I assume that in net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:62), either renderManager or renderEngine is null? this.renderManager.renderEngine.bindTexture(p_110776_1_); If you can figure out why that is, you'd be a lot closer..? -TGG
  7. Hi Sure there is a way, even if you have to use reflection to mod the vanilla. Try looking in vanilla ChunkProviderServer.loadChunk. The ChunkEvent.Load seems to appear a few times, that might be promising. It gives you the chunk so you can getBlock, setBlock, removeTileEntity etc on it as much as you want. -TGG
  8. Hi I'd suggest you search vanilla for usage of Blocks.snow_layer, put a breakpoint on each of those lines, and find out which one is placing the undesired snow. Then hunt back through the vanilla to find a way to stop it. For example WorldServer.func_147456_g():: this.theProfiler.endStartSection("iceandsnow"); if (provider.canDoRainSnowIce(chunk) && this.rand.nextInt(16) == 0) { this.updateLCG = this.updateLCG * 3 + 1013904223; i1 = this.updateLCG >> 2; j1 = i1 & 15; k1 = i1 >> 8 & 15; l1 = this.getPrecipitationHeight(j1 + k, k1 + l); if (this.isBlockFreezableNaturally(j1 + k, l1 - 1, k1 + l)) { this.setBlock(j1 + k, l1 - 1, k1 + l, Blocks.ice); } if (this.isRaining() && this.func_147478_e(j1 + k, l1, k1 + l, true)) { this.setBlock(j1 + k, l1, k1 + l, Blocks.snow_layer); // here } -TGG
  9. Hi This link might help, although it sounds like you've got the basics already http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-transparent-blocks.html Are you sure you need an IBSRH? If your block is just a cube, you can probably get the effect you want just by changing the block bounds based on the metadata, similar to how the vanilla water works. Anyway you should override both Block.getRenderBlockPass() and Block.canRenderInPass(pass) to make it render as alpha (i.e. canRenderInPass is true for pass == 1 only) . getRenderBlockPass is actually poorly named, it should better be getHighestRenderPass(). -TGG
  10. Hi In that case, I reckon there's a good chance that putting that code into PostInit will work, as Jabelar suggested. Recipes are supposed to be all registered in Init. From the forge docs... PreInitialization - "Run before anything else. Read your config, create blocks, items, etc, and register them with the GameRegistry." Initialization - "Do your mod setup. Build whatever data structures you care about. Register recipes." PostInitialization - "Handle interaction with other mods, complete your setup based on this. -TGG
  11. Hi After rummaging through MusicTicker, I think you might be able to achieve it using ISound.AttenuationType = NONE, see MovingSoundMinecartRiding constructor for a vanilla example, also PositionedSoundRecord public static PositionedSoundRecord func_147673_a(ResourceLocation p_147673_0_) { return new PositionedSoundRecord(p_147673_0_, 1.0F, 1.0F, false, 0, ISound.AttenuationType.NONE, 0.0F, 0.0F, 0.0F); } -TGG
  12. Hi As you might have guessed from the two posts above, we're not quite sure what you mean by "loaded". What are you trying to do, exactly? -TGG
  13. Hi Perhaps your build environment has been corrupted or has a (de)obfuscation problem. That error shows up when a class is present during compile time but not during run time, and since it's a vanilla class, I'm struggling to think of any way your mod might cause that. Unless GotoLink is right and you are doing something wrong with the world Object. Where does worldObj come from? Interestingly, my World.java:690 is not in that function at all, even though I have 1.7.10 - 10.13.0.1180 installed same as you. Maybe that means something, maybe not. /** * The block type change and need to notify other systems Args: x, y, z, blockID */ public void notifyBlockChange(int p_147444_1_, int p_147444_2_, int p_147444_3_, Block p_147444_4_) { this.notifyBlocksOfNeighborChange(p_147444_1_, p_147444_2_, p_147444_3_, p_147444_4_); } /** * marks a vertical line of blocks as dirty */ public void markBlocksDirtyVertical(int p_72975_1_, int p_72975_2_, int p_72975_3_, int p_72975_4_) { int i1; if (p_72975_3_ > p_72975_4_) { // line 690 here i1 = p_72975_4_; -TGG
  14. Hi I think the best answer about performance questions is almost always "try it and see". -TGG
  15. Hi Perhaps you could describe what you expect to see? -TGG
  16. Hi perhaps PlayerControllerMP.interactWithEntitySendPacket() See here (for 1.6.4 but still mostly the same) http://greyminecraftcoder.blogspot.com.au/2013/10/user-input.html Minecraft.getMinecraft().playerController; -TGG
  17. Hi Post the full crash log? That single line isn't enough to tell much. It should continue with something like "The following problems were captured during this phase"...etc... -TGG
  18. Hi Have you verified that your tick handler is called? eg using a breakpoint or putting System.out.println("onRenderTick"); in your tick handler? -TGG
  19. Hi You might find this useful for getting the player on the server side http://greyminecraftcoder.blogspot.com.au/2013/10/server-side-class-linkage-map.html Using EntityPlayer player = Minecraft.getMinecraft().thePlayer on the server side will either fail outright or lead to intermittent bugs/crashes if the server thread accesses a client object at the same time as the client thread. -TGG
  20. Hi Perhaps try PlayerInteractEvent looking for Action RIGHT_CLICK_BLOCK? -TGG
  21. Hi Setting setDamage to 0 might cause your item to be destroyed, is that what you want? If you change your item to a blocking type like the sword eg public EnumAction getItemUseAction(ItemStack p_77661_1_) { return EnumAction.block; } /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack p_77626_1_) { return 72000; } you can use the server tick event to apply your item's effect (whatever it is) once per second, instead of using onItemRightClick -TGG
  22. Hi I would suggest the method you said, i.e. create an EntityItem instance (stored in your class not spawned) then call RenderItem.doRender, should work fine. You may need to copy parts of the code out of doRender into your own class if things like bobbing up & down or getting your sticks to "lie flat" get in the way, in which case you might be able to use just an ItemStack instead of the whole EntityItem. I reckon a bit of time looking at RenderItem.doRender will get you there pretty easily. -TGG
  23. Hi Have you tried adding breakpoints or System.out.println() to your TileEntity methods? Might help you narrow it down. -TGG
  24. Hi After looking more closely at your code I think the problem is probably here GL11.glColor3f(c.getRed() / 255, c.getGreen() / 255, c.getBlue() / 255); This uses integer division so it becomes GL11.glColor3f(0, 0, 0); Try / 255.0F instead of / 255 -TGG
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.