Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

memcallen

Members
  • Joined

  • Last visited

Everything posted by memcallen

  1. Can you not create items the same as in 1.7? (I realize the texturing is different)
  2. I did originally, and it still doesn't work.
  3. I've been trying to texture my item (unsuccessfully) and for whatever reason the model thinks that it's a block. I don't have any code that says it's an item block, but I still have no idea how the json texturing system works. This is my json file: { "parent": "builtin/generated", "textures": { "layer0": "Ancients:items/Rubble" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } Also, how can I texture it? I can't seem to figure it out.
  4. I want to change my model, so I create a class that implements IProperty. I'm wondering about what I have to put in the functions to make everything work.
  5. I have no idea how that works...
  6. I want to change the model of my block, from a 'normal' variant to the 'rubble' variant. Would I do this with an IBlockState? Also, how?
  7. Where can I get a link for a document that says all of the json tags for the models? I've looked at TGG's minecraft by example, but I don't understand what any of the tags in the .json files mean.
  8. Wow I didn't even realize that I put chunkX twice...I don't have my computer here right now but I will change that later, thanks.
  9. I found something odd, the blocks are being spawned, just not in the right place. For whatever reason they spawn in the same few chunks. I have no idea why, here's my spawning code: int x = (chunkX*16)+RNG.nextInt(14); int z = (chunkX*16)+RNG.nextInt(14); System.out.println("Spawning at:"+ x+":"+z); BlockPos block = new BlockPos(x,0,z); block = world.getTopSolidOrLiquidBlock(block); System.out.println("Top Block is:"+block.getY()); IBlockState state = Ancients.invincible.getDefaultState(); System.out.println(state); world.setBlockState(block, state); EDIT:It appears that my blocks are spawning in a diagonal, from what I assume is chunk '0,0'. I have never seen this happen before with my genning code (I used it in 1.7.2 and it worked fine).
  10. Yes I spawned it in and can place it properly without crashes (I'm still figuring out how to texture it though...)
  11. Yes the line "Top Block is: (block y value)" is being printed.
  12. @AnZaNaMa that's almost exactly what I did, though it didn't set the block to what I wanted: BlockPos block = new BlockPos(x,0,z); block = world.getTopSolidOrLiquidBlock(block); System.out.println("Top Block is:"+block.getY()); IBlockState state = Ancients.invincible.getDefaultState(); world.setBlockState(block, state); 'Ancients.invincible' being my block. FYI:This code was meant to be used in an IWorldGenerator(Which is why I'm getting the top block)
  13. Currently, I'm making an IWorldGenerator that will spawn a structure. I need some way to set the blocks to my block. I thought maybe using World.setBlockState would help but it might not do what I think it does. Can I use setBlockState to set the blocks or do I use another method?
  14. How can I use an IBlockState and World.setBlockState to set a block to my custom block? Using Block.getDefaultBlockState doesn't work.
  15. It gets the proper block, but it doesn't set the block to my 'invincible' block. Did I miss a method that I need to use?
  16. Ok I'm trying to get used to being able to see the source code. For whatever reason my old mod only let me see only one or two files, even though I tried to re-do my workspace.
  17. Ok what would I put in this file?
  18. I fixed some location errors (s's missing, capitals) and I fixed the error saying [12:52:05] [Client thread/ERROR] [FML]: Model definition for location ancients:InvincibleBlock#normal not found but I still have the error saying [12:52:05] [Client thread/ERROR] [FML]: Model definition for location ancients:InvincibleBlock#inventory not found . How do I fix this? new Model definition.json (InvincibleBlock.json): { "variants": { "normal": { "model": "ancients:InvincibleBlock_Model"} "inventory": { "model": "ancients:InvincibleBlock_Model"} } }
  19. I'm not sure this is how IBlockState is supposed to work but I'm using this code to spawn my block (x/z are random coords from IWorldGenerator): BlockPos block = new BlockPos(x,0,z); block = world.getTopSolidOrLiquidBlock(block); System.out.println("Top Block is:"+block.getY()); IBlockState state = Ancients.invincible.getDefaultState(); world.setBlockState(block, state);
  20. I've put everything the same way that TGG did it but it's still not working. I've got the variants file in a blockstate folder And I've got the model file under assets.Ancients.models.block: My texture name is InvincibleBlock.png I tend to overlook a lot of errors, so I'm probably just missing it aswell. Thanks in advance
  21. Yes, thanks. Also how do I use IBlockState to set a block? It's an interface so I can't instantiate it. Is there a method somewhere kind of like getAxisAlignedBB that returns it?
  22. I've looked at TGG's minecraft by example but I still can't figure out how to texture something. I'm probably just missing something crucial. EDIT:nevermind I found it, but do you actually need to make a separate model for each block? or can you re-use them?
  23. So far I have found a set block method but no get block method. I need the get block method for detecting what the top block's y coord is at the specified x/z coordinates. I need the y-coord so that my structure doesn't spawn in the ground, or in the air.
  24. What are the getting and setting block methods for 1.8? If there are none (which I highly doubt) how can I make my structure generate in-world (I already have the IWorldGenerator set up).

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.