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

Awesome_Spider

Forge Modder
  • Posts

    892
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Awesome_Spider

  1. Right, I guess you do have to commit every time you edit something. Probably the closest you could get to collaboration in real time.
  2. Ok. I fixed it by looking at the furnace container. But... I can fix that of course, it's just a funny fail on my part.
  3. Oh right, IInventory is outdated. What am I supposed to implement instead (if anything)?
  4. I have a steam generator that acts like furnace in that when it has fuel in it, it shows a fire symbol to display how much burn time is left. However, it burns coal, but it doesn't show a fire icon on it. What could be I be doing wrong? Here is my code:
  5. I was about to say it was crashing, but then I realized it was because of my half-built particles. The face value is working as desired. Thank you for the help.
  6. And this is all I see when I'm on my IPad and view this forum. It's really hard to read. It's fine on my desktop though.
  7. So, your not developing a mod? If you are just making a modpack this is the wrong forum section.
  8. Ok, will do. On another topic, does the edit button for editing your posts show up for you anymore? I think they are changing stuff again.
  9. I'm getting a crash because of a nullpointer. I've seen so many crash reports today, lol. Main class where I register the particle:
  10. Ok, now they are in the right direction like before, but when I log out and back in they face north again. Here is my current code:
  11. A few days ago I asked on this forum how to make a custom particle. Now I am have trouble with it. Am I supposed to register the particle somehow? How do I spawn my custom particle in the world? Here is my code thus far:
  12. Thank you! It's working now. I didn't override getStateFromMeta because my IDE said it was deprecated.
  13. Ok, now I have a different exception. This time it's in my ModBlocks class.
  14. Off topic, but why is everyone a stone miner all of a sudden? lol
  15. Now it's crashing. It's a nullpointer, I must not be initializing something I should be.
  16. How do I create that? The vanilla furnace uses setDefaultState in the constructor but I don't think that's what you mean.
  17. It still faces north. Here is the updated code: public class BlockSteamEngine extends BlockTileEntity<TileEntitySteamEngine> { public static final PropertyDirection FACING = BlockHorizontal.FACING; public BlockSteamEngine() { super(Material.ROCK, "steam_engine"); } @Override public Class<TileEntitySteamEngine> getTileEntityClass() { return TileEntitySteamEngine.class; } @Nullable @Override public TileEntitySteamEngine createTileEntity(World world, IBlockState state) { return new TileEntitySteamEngine(); } @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) { EnumFacing entityFacing = entity.getHorizontalFacing(); if(!world.isRemote) { if(entityFacing == EnumFacing.NORTH) { entityFacing = EnumFacing.SOUTH; } else if(entityFacing == EnumFacing.EAST) { entityFacing = EnumFacing.WEST; } else if(entityFacing == EnumFacing.SOUTH) { entityFacing = EnumFacing.NORTH; } else if(entityFacing == EnumFacing.WEST) { entityFacing = EnumFacing.EAST; } world.setBlockState(pos, state.withProperty(FACING, entityFacing), 2); } } @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (!world.isRemote) { player.openGui(RobotiCraft.instance, ModGuiHandler.TILE_ENTITY_STEAM_ENGINE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); } return true; } @Override public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) { TileEntitySteamEngine te = (TileEntitySteamEngine) world.getTileEntity(pos); world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, 0.0D, 0.1D, 0.0D, new int[0]); world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, 0.0D, 0.1D, 0.0D, new int[0]); world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, 0.0D, 0.1D, 0.0D, new int[0]); } }
  18. Ya, you use one EventHandler for three events. You have to have one for each event. And you should rename your class from the tutorial mod name.
  19. I have a block that has a front texture that is different than the side textures. I want it to face towards me when I place it in the world like the vanilla furnace, but instead it always faces north. I tried using the vanilla furnace code to help me, but it is still not working. Have I missed something that I should have changed? My blockstate json: { "forge_marker": 1, "defaults": { "textures": { "front": "roboticraft:blocks/steam_engine_front", "top": "roboticraft:blocks/steam_engine_steam", "side": "roboticraft:blocks/steam_engine_side", "particle": "roboticraft:blocks/steam_engine_side" } }, "variants": { "normal": { "model": "orientable" }, "inventory": { "model": "orientable" }, "facing=north": { "model": "orientable" }, "facing=south": { "model": "orientable", "y": 180 }, "facing=west": { "model": "orientable", "y": 270 }, "facing=east": { "model": "orientable", "y": 90 } } } My block code: public class BlockSteamEngine extends BlockTileEntity<TileEntitySteamEngine> { public static final PropertyDirection FACING = BlockHorizontal.FACING; public BlockSteamEngine() { super(Material.ROCK, "steam_engine"); } @Override public Class<TileEntitySteamEngine> getTileEntityClass() { return TileEntitySteamEngine.class; } @Nullable @Override public TileEntitySteamEngine createTileEntity(World world, IBlockState state) { return new TileEntitySteamEngine(); } @Override public void onBlockAdded(World world, BlockPos pos, IBlockState state) { if (!world.isRemote) { IBlockState iblockstate = world.getBlockState(pos.north()); IBlockState iblockstate1 = world.getBlockState(pos.south()); IBlockState iblockstate2 = world.getBlockState(pos.west()); IBlockState iblockstate3 = world.getBlockState(pos.east()); EnumFacing enumfacing = (EnumFacing)state.getValue(FACING); if (enumfacing == EnumFacing.NORTH && iblockstate.isFullBlock() && !iblockstate1.isFullBlock()) { enumfacing = EnumFacing.SOUTH; } else if (enumfacing == EnumFacing.SOUTH && iblockstate1.isFullBlock() && !iblockstate.isFullBlock()) { enumfacing = EnumFacing.NORTH; } else if (enumfacing == EnumFacing.WEST && iblockstate2.isFullBlock() && !iblockstate3.isFullBlock()) { enumfacing = EnumFacing.EAST; } else if (enumfacing == EnumFacing.EAST && iblockstate3.isFullBlock() && !iblockstate2.isFullBlock()) { enumfacing = EnumFacing.WEST; } world.setBlockState(pos, state.withProperty(FACING, enumfacing), 2); } } @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { if (!world.isRemote) { player.openGui(RobotiCraft.instance, ModGuiHandler.TILE_ENTITY_STEAM_ENGINE_GUI, world, pos.getX(), pos.getY(), pos.getZ()); } return true; } @Override public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) { TileEntitySteamEngine te = (TileEntitySteamEngine) world.getTileEntity(pos); world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, 0.0D, 0.1D, 0.0D, new int[0]); world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, 0.0D, 0.1D, 0.0D, new int[0]); world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D, 0.0D, 0.1D, 0.0D, new int[0]); } } PS: I think the new forum software was worth the wait. It looks nice.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.