Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/06/19 in all areas

  1. Sorry. 1.7.10 is no longer supported on this forum due to its age. Update to a modern version of Minecraft to receive support.
    1 point
  2. Don’t extend BlockContainer, it’s legacy vanilla code. Simply override Block#hasTileEntity(IBlockState) and Block#createTileEntity(IBlockState) Tickable tile entities can do whatever they want in their onUpdate method (renamed tick in 1.13). You can use TileEntity#getPos, BlockPos#offset(EnumFacing, int), AxisAlignedBB(BlockPos) and World#getEntitiesInsideAABB to find all entities up to 7 blocks away from your TE in any direction. As a general rule, don’t copy the vanilla code exactly, it’s usually not very good (vanilla operates in an “if it ain’t broke don’t fix it” way) and Forge usually has better ways of doing what you want. That said, vanilla is an excellent reference, but it’s not great to just copy paste vanilla code. This likely means you followed a sub-par YouTube tutorial about how to setup your mod. Don’t use static initialisers (see http://www.minecraftforge.net/forum/topic/70095-1122-custom-tree-problems/?do=findComment&comment=339598 for an explanation), your registration can be massively simplified and clean up (see https://gist.github.com/Cadiboo/b825d62fb46538e7b7b262c5612d62aa and https://gist.github.com/Cadiboo/3f5cdb785affc069af2fa5fdf2d70358)
    1 point
×
×
  • Create New...

Important Information

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