Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


Forge Modder
  • Posts

  • Joined

  • Last visited

Everything posted by 10paktimbits

  1. I think you missed the point. getSelectedBoundingBox() seems to be defining the collision bounding box - not the hitbox around the block getCollisionBoundingBox() is defining the hitbox - trace the code into Forge and you can clearly see that this is the case. Try returning null or NULL_AABB from getCollisionBoundingBox() (which you should be able to do to make a non-solid block, i.e. a plant) and Forge will crash because it is using this value to render, not to check the collision. I'm quite sure these two methods are swapped/misnamed. This also leads into the question why there are 3 methods needing a AxisAlignedBB?!? 1) getBoundingBox() 2) getSelectedBoundingBox() 3) getCollisionBoundingBox()
  2. Is it possible that these two methods might be misnamed? The following sample code works: @Override public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World worldIn, BlockPos pos) { return Block.FULL_BLOCK_AABB; } @Override public AxisAlignedBB getSelectedBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) { if (myBlockShouldBeSolid) { return Block.FULL_BLOCK_AABB; // solid } return Block.NULL_AABB; // not solid } But shouldn't this code actually be? @Override public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World worldIn, BlockPos pos) { if (myBlockShouldBeSolid) { return Block.FULL_BLOCK_AABB; // solid } return Block.NULL_AABB; // not solid } @Override public AxisAlignedBB getSelectedBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) { return NULL_AABB; }
  3. I am making a block (#1) that allows the user to select another block (#2) who's texture will be used to render inside of block #1. Item rendering won't work - I need to render many faces in different locations within block #1 - just like I was able to in 1.7.10. My code above does not work - I only get a solid white color on the face I'm rendering rather than the block texture I'm trying to use. And yes, I need to be able to have access to all textures in a block like wool or glass.
  4. I think this is the way to get what I am looking for... Minecraft mc = Minecraft.getMinecraft(); IBlockState blockState = Block.getStateById(Block.getIdFromBlock(block)); BlockRendererDispatcher blockRendererDispatcher = mc.getBlockRendererDispatcher(); BlockModelShapes blockModelShapes = blockRendererDispatcher.getBlockModelShapes(); IFlexibleBakedModel bakedModel = (IFlexibleBakedModel)blockModelShapes.getModelForState(blockState); TextureAtlasSprite sprite = bakedModel.getTexture(); int textureX = sprite.getOriginX(); int textureY = sprite.getOriginY(); ...anyone know a better way?
  5. I'm trying to do this in 1.8 not 1.7.x. What is the 1.8 equivalent of what you just posted? Thanks.
  6. Right. In the tesr renderer, I have access to the ItemStack containint the block the user dropped into the gui. How can I get the texture of that block in the ItemStack?
  7. I have a storage block/container/tesr that allows the user to add any block to a single slot in the gui. I need to obtain the texture of the block dropped into the slot for rendering in the TESR. How can the texture be obtained in 1.8? Also, is this the correct texture to assign? this.renderManager.renderEngine.bindTexture(TextureMap.locationBlocksTexture); Thanks.
  8. What I have: 1) a block and tile entity used for storage, like a chest 2) a block that will act as a 'top' for block #1 What I am trying to do: The container/gui for the storage block has a special slot that is used to store block #2. When the player drops block #2 into this slot I want block #1 to render both blocks at the same coordinates, essentially combining the two models together. Both blocks have their own .json model file and I would like to use these if this is possible. It seems that the solution should be implemented in the renderTileEntityAt() method of the TESR for block #1, but I have yet to see an example anywhere of how to do this. An alternative (and preferred) solution would be to dynamically change one of the textures in the storage block based on the contents of the special gui slot. Is this possible? Any help would be greatly appreciated.
  9. Thank you! Build 1.8- LexManos: Fixed InitMapGenEvent's fire order so values are used. And added OCEAN_MONUMENT type. Closes #1681 LexManos: Fixed BlockBush and BlockCrops not respecting custom soils. Closes #1683
  10. Purpose: to provide more flexibility in determining the offset type of a block. Would it be possible to add the following parameters? (1) World (2) BlockPos These parameters would, for example, allow a block to check adjacent blocks when determining its offset type. Thank you for any consideration offered to this.
  11. Purpose: allow vanilla plants to recognize a modded block as a soil/ground block Current code: return ground == Blocks.grass || ground == Blocks.dirt || ground == Blocks.farmland; allows vanilla plants to detect these specific blocks, but not any other blocks. Possible change to this code: (1) check material type of ground block or perhaps even better (2) call canSustainPlant() in the ground block Thank you for any consideration offered to this.
  12. He's a busy genius with mountains of much more important things to focus on. A sacrifice for my mod yes, but not a show stopper.
  13. I have tried Material.water and subclassing off of both BlockLiquid and BlockStaticLiquid and these just don't work because rendering of water blocks is internal to MC/Forge and I cannot 'add' my own rendering to the existing render. Some properties of water, like the vacuum effect, cause issues with my blocks that are not acceptable for what I am trying to achieve. Water blocks also require all metadata bits in a state called 'level' - my blocks are based on a single class that has its own block state - creating a new class just for these is prohibitive and it is absolutely critical that all of my blocks be based on a single class. I believe that this is something that needs to be solved in Forge, and not modders having to work around this a number of different ways. The Material.coral type is a great idea that just isn't fully implemented.
  14. Thank you for your replies. I have tried all of the solutions suggested (and others) and this still will not work. My blocks render fine - the problem is with the rendering of the adjacent water blocks since they are not detecting a Material.coral block and adjusting which faces should be rendered. Unfortunately, this is critical for a bunch of plant blocks in my mod that I now have to remove completely due to the 1.8 changes. Perhaps sometime down the road this will be fixed. Thanks again.
  15. Is it possible to render a coral block properly so that you don't see the waterfall effect of adjacent water blocks on the sides of the coral block? How does one do this? I was able to make this work in 1.7.10 by using Material.water for the block and some additional code but this no longer works in 1.8 with all of the changes. The Material.coral type seems like it should be used for this purpose, but that type has never worked to help with the rendering. Thank you.
  16. I need my mod to have the ability to generate blocks in a world after vanilla generation is complete. I am not using custom dimensions or biomes, and I don't want to change vanilla generation at all. The mod simply adds new plants to Minecraft, some of which are two-blocks tall. (Plant Mega Pack) PROBLEM: my generation code is not being called at the right time - I need it to be called last when each chunk is generated. Because of this: - Near rivers/lakes, when I place plants on dirt, Minecraft sometimes replaces the dirt with sand - When I generate two-blocks tall plants in desert and jungle biomes, the bottom block is often replaced with an air block - I cannot detect light level in a forest to plant mushrooms, because trees are generated after my plants are There is a hook in BiomeDecorator, right at the end that I think would work, but I cannot get this event to invoke my generation code, or if this is even the correct solution: BiomeDecorator.decorate() { ...code... MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); } If you know how to solve this please post and thank you in advance!
  • Create New...

Important Information

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