Jump to content

hoodwink_dude

Members
  • Posts

    95
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by hoodwink_dude

  1. Now it doesn't even render... :'( By render, I mean the textures. It is just the pink/black checkerboard texture
  2. I let eclipse generate the parameter names of the method
  3. So what should I put into item, metadata and model? And is this a substitute for the Minecraft.getMinecraft... .register?
  4. There was no crash when I put the block renderer thingy back into init() but the block doesn't rotate. The block renderer code is here
  5. Main mod file spoiler Common proxy modfile spoiler Client proxy modfile spoiler
  6. I am extending Block to make a multi-state block that can be placed facing different directions. It has two different textures that are used to make the block. When transitioning from preinitialisation to initialisation, minecraft crashes. Here is a spoiler with the crash log And here is a spoiler with the class of the block Not sure what is wrong but I would appreciate any and all help with this. I am pretty amateur at forge modding so extending blocks is something new to me and the minecraft code is packed so it is hard to look at all the functions. If I am missing anything, please just tell me what I am missing but if you do that, please explain why it is needed so that I can actually understand the code and what is going on. I love learning new things in programming and the most enjoyable way to program is to actually understand what is happening otherwise all sorts of things can derail the project and... ragequit. I don't want that to happen so... yeah. GitHub page of the project here https://github.com/JamesYeoman/EpicMod
  7. IDK why I didn't think about extending the FUNDAMENTAL CLASS FOR BLOCKS! Stupid brain! I am intelligent it just doesn't always show. Thanks for the help. I think I can manage from here...
  8. I have no idea where to even start with that. I only know how to make blocks via the GameRegistry. If you want, I can supply you with the source code so that you can take a look and figure out what needs to be modified because I haven't got the furry crack of a rat's behind in terms of what to do for that.
  9. Because the furnace never faces its front side towards a wall. isFullBlock() returns true if the block...is a full...block, as in, fills 100% of its volume. I get it now. I understand the code (just about) but how am I supposed to apply it to the block? The block is created through the GameRegistry. It isn't in it's own class.
  10. I am still confused by things like "&& block.isFullBlock() && !block1.isFullBlock()". I don't understand why the next block needs to be checked to see if it isnt a full block.
  11. private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state) { if (!worldIn.isRemote) { Block block = worldIn.getBlockState(pos.north()).getBlock(); Block block1 = worldIn.getBlockState(pos.south()).getBlock(); Block block2 = worldIn.getBlockState(pos.west()).getBlock(); Block block3 = worldIn.getBlockState(pos.east()).getBlock(); EnumFacing enumfacing = (EnumFacing)state.getValue(FACING); if (enumfacing == EnumFacing.NORTH && block.isFullBlock() && !block1.isFullBlock()) { enumfacing = EnumFacing.SOUTH; } else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock() && !block.isFullBlock()) { enumfacing = EnumFacing.NORTH; } else if (enumfacing == EnumFacing.WEST && block2.isFullBlock() && !block3.isFullBlock()) { enumfacing = EnumFacing.EAST; } else if (enumfacing == EnumFacing.EAST && block3.isFullBlock() && !block2.isFullBlock()) { enumfacing = EnumFacing.WEST; } worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2); } } Kinda confusing. How am I supposed to use this to make my block do that? How am I supposed to use that function to interact with the JSON files if I don't understand what the hell is going on in there? Am I making it seem harder than it actually is?
  12. private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state) { if (!worldIn.isRemote) { Block block = worldIn.getBlockState(pos.north()).getBlock(); Block block1 = worldIn.getBlockState(pos.south()).getBlock(); Block block2 = worldIn.getBlockState(pos.west()).getBlock(); Block block3 = worldIn.getBlockState(pos.east()).getBlock(); EnumFacing enumfacing = (EnumFacing)state.getValue(FACING); if (enumfacing == EnumFacing.NORTH && block.isFullBlock() && !block1.isFullBlock()) { enumfacing = EnumFacing.SOUTH; } else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock() && !block.isFullBlock()) { enumfacing = EnumFacing.NORTH; } else if (enumfacing == EnumFacing.WEST && block2.isFullBlock() && !block3.isFullBlock()) { enumfacing = EnumFacing.EAST; } else if (enumfacing == EnumFacing.EAST && block3.isFullBlock() && !block2.isFullBlock()) { enumfacing = EnumFacing.WEST; } worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2); } } Kinda confusing. How am I supposed to use this to make my block do that?
  13. You know how the furnace and things like that can be placed rotated depending on where you stand when you place it? How do this in forge 1.8.9 using the models? Currently, my model only ever places facing the same way but I want to make it so that it faces the player when they place the block.
  14. I did make the quote from diesieben07 it just happened to include your post that he quoted. diesieben07, I understand that modern versions are more stable but I am not leaving behind discontinued mods or mods that haven't been updated to the most recent version
  15. Compatibility with older mods that either are dead or the mod creators have not bothered to update to newer versions
  16. I would have to do it manually. I am trying to automate as much as possible without any screwups
  17. Static can be the biggest source of memory leaks as they are not cleaned up as they don't need an instantiation and is essensially a global variable.
  18. Basically, the unlocalised name. I was originally thinking the actual name used to distinguish one variable from the other but upon further review, it should be the unlocalised name
×
×
  • Create New...

Important Information

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