Jump to content

tychobrailleur

Members
  • Posts

    2
  • Joined

  • Last visited

tychobrailleur's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks. I was on the right path, but it seems I probably had messed up my `BlockPos` calculation. For posterity, here is what I finally came up with, which seems to work ok: World overworld = server.getWorld(0); BlockPos blockPosition = overworld.getSpawnPoint(); logger.info("World: " + overworld.getClass()); BlockPos tmp = blockPosition; while (!overworld.isAirBlock(tmp)) { tmp = tmp.up(); } Block blockStandingSign = Blocks.STANDING_SIGN; overworld.setBlockState(tmp, blockStandingSign.getDefaultState() .withProperty(BlockStandingSign.ROTATION, 0)); TileEntity tileEntity = overworld.getTileEntity(tmp); if (tileEntity instanceof TileEntitySign) { TileEntitySign tileEntitySign = (TileEntitySign) tileEntity; tileEntitySign.signText[0] = new TextComponentString("tychobrailleur"); } Happy to hear suggestions/improvement if any.
  2. Apologies for the super-n00b question — but despite looking at the docs and checking out a few sample mod, I haven't been able to figure out how to get a mod to automatically place a block (in particular a `BlockStandingSign`) at a given `BlockPos`. Would anyone have an example somewhere, or could point me to the relevant part of the Forge docs? Thanks in advance!
×
×
  • Create New...

Important Information

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