Jump to content

Lerp

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Lerp

  1. That uses an Entity and uses the block info of the block that's being made to fall. Like I said the block doesn't exist in the world so I can't rely on renderXXX
  2. Okay to my understanding what I'm intending to do it not currently possible in the current implementation of Forge. It all dissolves down to ISimpleBlockRenderingHandler.renderWorldBlock for custom blocks or RenderBlocks.renderXXX for vanilla blocks. These expect the block to exist at the passed position in the given IBlockAccess as they do things like world.getBlockMetadata(x, y, z). The problem with that is when the block doesn't actually exist you're not going to fetch relevant metadata. I toyed with the idea of creating a fake world and setting the block at the position to the block that's wanting to be imitated so that it can get any relevant information it wants but I don't like the idea of duplicating the world. I thought about making the fake world a wrapper for the real world that checks if the block being accessed is a "fake block" and so we don't duplicate the world just trick the accessor into believing the block actually exists. Ultimately I'm going to stop here because a lot of the rendering code I've looked at sets textures and colours inside it's rendering method which will prevent me from doing what I wanted to do. I was hoping for a way to just get a block to populate the tessellator with vertices.
  3. I am looking at the source for WorldRenderer.updateRenderer in the hopes to shine some light on the subject. It just creates a new renderer blocks with the current chunk being rendered. Some I'm pretty sure I should be okay just doing: RenderBlocks renderer = new RenderBlocks(/* get player's worldobj*/); Looking through it does some setting up, then calls RenderBlocks.renderBlockByRenderType. I'm going to see if I can at least imitate drawing a stone block then expand from there.
  4. I'm trying RenderBlock.renderBlockByRenderType inside of a RenderWorldLastEvent but nothing renders. I can't seem to see a RenderBlocks instance in RenderWorldLastEvent, I only see RenderGlobal instance?
  5. I am wanting to render a block (currently held item) as if it had been placed in the world at a certain location *without* actually placing it in the world. I have no problem with the currently held item and setting the location I'm just unsure the proper way to get the block's renderer? I've looked at MinecraftForgeClient.getItemRenderer but there doesn't seem to be a suitable render type and I'm not too sure how to get the require data params. I've also looked at RenderBlocks but I'm not clear on how to get the correct instance of it.
  6. At the moment game types are practically hard coded in via EnumGameType and GuiCreateWorld. The button cycling the game types doesn't even use EnumGameType. This make extremely hard to add your own game type. (see GuICreateWorld.java, line 281) If maybe EnumGameType were to be refactored into an interface and the GuiCreateWorld were changed to be more maintainable it would allow for custom game types. I think this would elegantly open the door way to some mods. For example, a game type such as "Zombie Survival" or "RPG", the player may not want their normal worlds to be constantly invaded by zombies, now they wouldn't have to worry because so long as the game type is not set to "Zombie Survival" they won't be bothered by the mod. Alternatively without the game type refactoring you would have to use a command to be able to start zombie survival or force the user to take the mod out of the mods folder each time. It's just more elegant if you could make it a custom game type. You could take it one step further and give the game types an easy hook for custom huds, allow them to set a custom PlayerController, a custom EntityPlayer, maybe even a custom render routine for drawing things in the world that wouldn't be so easy otherwise. Perhaps a mod could even declare the GameType it uses in the @Mod annotation, then it wouldn't even need to be loaded until the user selects the game type and starts it up. (Although I think forge already does something like this)
×
×
  • Create New...

Important Information

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