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


  • Posts

  • Joined

  • Last visited


  • Gender
  • URL
  • Location
    NJ, USA
  • Personal Text
    Coffee + Java = NaN

Recent Profile Visitors

1393 profile views

DimensionsInTime's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. You are re-inventing the wheel. Look at the Block::getDrops, Block::getItemDropped and Block::quantityDropped methods. You can override these to set what is dropped when a block is broken.
  2. Have you ever been able to place a bucket on the ground in Minecraft?
  3. I've never found such a resource, but if you keep the idea that game logic runs on the logical server and client interaction/graphics runs on the logical client you should be okay.
  4. Do you mean you want to place the lava bucket? On the ground?
  5. All outlined in the docs: https://mcforge.readthedocs.io/en/latest/concepts/sides/ But do some experimenting to see what runs where. if(world.isRemote){ // Log something }else{ // Log something else } and see what happens, when it happens, where it happens.
  6. TheGreyGhost makes a great tool called ItemTransformHelper that you can use to help figure out item transforms when creating your jsons. Place it in your run/mods folder, start your mod and put the camera from the mod's creativetab in your toolbar. Viola, a tool to manipulate the item and get the values you need.
  7. Think I have it now. I kept it falling, but scrapped the code from WorldGenMinable and just wrote a small iterator that creates the vein right where I want it, as you suggested. Seems to work ok, going to do some testing today to be sure. Added sets for the blocks the ore spawns into, and liquid blocks to look for nearby when deciding to spawn. The chance to spawn is lower because the ore has tiny chance to drop things other than a dust, like gold nugget, coal, clay balls or diamond/emerald shards or full items. New class:
  8. More progress (?) This morning I bypassed WorldGenMinable and put the meat of it into my own method called createVein(..), with the only difference being it no longer looks to make sure it's replacing the correct block type. Started a new world and found some water and quickly saw that ocean blocks with high light levels (near the surface) were being replaced with my ore. Which is a falling ore like sand. So it would spawn and fall, and the loop would continue so another would spawn and fall, and so on, and so on... Also, finding the ore spawned at the surface in villages replacing blocks making up wells and horribly ruining the villagers crop areas. Whoops! Now I know why the routine specifies a block you want to replace.
  9. New findGroundLevel(..) method: Seems to work MUCH better! I capture brightness too, just to test things like blocks under trees. So far a light level of 10+ seems to be a great gauge for finding ground level. However, when I find water near the block and run the following to generate a vein of ore it still doesn't work. I do pass WorldGenMinable#generate that third parameter as a predicate, so I'll have to look at it further tomorrow.
  10. Yes! I did see that happening, actually, though some of that may have been stopped by the check for and air block above the center block in the search. Thanks for the suggestion. I think what I might do for testing purposes is create an item that I can right click on a block so I can do some sort of visual representation of the search for water to make sure it's working properly. With regard to my problem with WorldGenMinable not actually replacing blocks, you think it could be because it's encountering air blocks (since it's start point is on the ground) causing it to crap out? I haven't wrapped my head around how the code in there works.
  11. I might be going about this the wrong way, not sure. I am trying to generate my custom ore only around water and only at the surface. My idea was to use a standard method that implements IWorldGenerator (like everyone does) but in the generate method it would choose a random x and z, then start at z=50 and move upward until I find a block that can see the sky, hopefully giving me a surface block. Then search the surrounding blocks in a radius of 3 blocks to see if water is nearby. If all those match, run a WorldGenMinable to generate my vein. The problem I'm having is the find surface and find water routines seem to work well, it's just not generating the vein or ore at the block position found. Prior to this, I had a normal random version that simply replaced stone on y=55-95 and it worked fine. But the mod ore is alluvium based (silty dirt/clay/sand composite found near waterways) and I want to keep with an accurate portrayal of where the ore is found. Some code: World Generation This is called in the init() section of the main mod class with simple "EPWorldGeneration.init();" Ore Generation The constructor makes sure we're in the overworld. EP_ALLIVIUM_ORE is my custom ore. findGroundLevel(..) starts at x, 50, z and moves up y++ until it hits ground level or returns zero. isBlockNearWater(..) searches in a block radius to see if water is nearby. In the generateInOverworld(..) method I added BlockDirt, BlockGrass and BlockClay to see if it would help in finding somewhere to generate the vein. It finds blocks, but the gen.generate(..) call does nothing. I surrounded it with an if/then to log the result, and the log shows "Ore Gen:" lines so I know the code is successfully reached. But when you /tp to the coords you see that the block has not changed to the custom ore block. NOTE: If you run this code to test and use the logging lines it will slow down worldgen a lot, so be prepared. Also, logging class is below to make things easier. EDIT: Found a bug already myself in this code I believe. In isBlockNearWater(..) the for loops for x and z should start at xIn - radius and yIn - radius so the loops cover the entire radius around the block... Logging Class
  12. Aha, sorry I did read right past that in his first post. I just did that exact same thing (leave item in crafting table) too!
  13. To answer your other question, you can use the ore dictionary to use varied items into your recipe. I would write the recipe like this: GameRegistry.addShapedRecipe(new ItemStack(moditems.castPA, 1), "SSS", "SDS", "SSS", 'S', Blocks.SAND, 'D', new ItemStack(Items.DIAMOND_PICKAXE, 1, OreDictionary.WILDCARD_VALUE)); Changing T to D is my OCD kicking in. I'm actually torn between using D or P. I need help...
  14. Your play code was in there, it's how I knew you had that complicated pitch formula there. You just had a few nested spoiler tags that made it hidden. You have stream set in your json, so it should start playing right away instead of loading then playing.
  15. 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F Why is your pitch that complicated formula and not 1.0F for normal speed?
  • Create New...

Important Information

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