Jump to content

robustus

Members
  • Posts

    151
  • Joined

  • Last visited

Posts posted by robustus

  1. oh lord man, been a while since I worked on Minecraft.  Gave up modding because the source code kept changing too much and yadayada decided to work on my own game.


    If it's still somewhat the same as when I was working on it,  I had to pretty much rewrite the ChunkProvider, and in the provideChunk function you can insert checks on height there.  I had a funky biome that would leave large areas of water so I wanted to rename these areas like "Lake" or something, so I inserted a check, if this biome, i'd do checks to see if there was water and if the water checked passed I changed that area to the biome Lake.  I started to get fed up with playing within the confines of the Minecraft generation rules after that and looking into my own engine but yeah it almost needs a whole new generation system to do sophisticated stuff without bogging down the code.     If you simply just want to do checks on which biome is next to which biome you need to start breaking down the GenLayer files.   I'd recc. playing around with it all anyway, I learned so much coool stuff messing around with it, like making nice beautiful huge rivers.

  2. I hear ya, I been working on learning what everything does in world generation for literally years now and am still learning, but I can possibly lend a hand if you ever need any questions.  The real break though for me came when I learned what all the GenLayer classes do and how to use them to customize the entire world gen process.   For example if you want biomes to be different sizes and how they connect to each other etc etc.  It is pretty fun messing around with it.

    • Like 1
  3. so ive kinda become obsessed with learning about noise generation to do some cool things with the terrain but I can't seem to figure out a way to stitch the terrain easily from one biome to the next because im using custom noise functions inside each biome.  I kinda see how they do it via the heightmap creator in the chunkprovider where they blend the base heights of the biome but im trying to connect a little more smoothly.  Easiest way I can think of just a simple worldgen to check the biome edge and smooth out the terrain a little bit, but was hoping maybe better alternatives.  Problem seems to be reliable checking where the biome edge is what have you.  I don't know really where to start Ive googled the issue and seems there is no real solution to stitching terrain any tips or ideas would be appreciated

  4. Do you plan for all variants of this block to have the same texture on all sides?

    You should also note that Blocks can only store 16 states in metadata(4 bits). That's 4 boolean properties max.

     

    is there any way around this? I'm totally rewriting my mod from scratch to update to the current version.  In pre 1.8 I was able to change a few textures based on conditions that didn't need metadata set, like biome, altitude etc...

  5. ok, I think I get it.  Im looking specifically at this bit of code

     

     

     private static int getColorAtPos(IBlockAccess blockAccess, BlockPos pos, BiomeColorHelper.ColorResolver colorResolver)
        {
            int i = 0;
            int j = 0;
            int k = 0;
    
            for (BlockPos.MutableBlockPos blockpos$mutableblockpos : BlockPos.getAllInBoxMutable(pos.add(-1, 0, -1), pos.add(1, 0, 1)))
            {
                int l = colorResolver.getColorAtPos(blockAccess.getBiomeGenForCoords(blockpos$mutableblockpos), blockpos$mutableblockpos);
                i += (l & 16711680) >> 16;
                j += (l & 65280) >> 8;
                k += l & 255;
            }
    
            return (i / 9 & 255) << 16 | (j / 9 & 255) << 8 | k / 9 & 255;
        }

     

     

    if I have to guess this is taking all mutable blocks around a certain block to get the color of the current block, is that correct?

  6. Can someone explain to me what this does?  Ive looked around but have not seen an explanation.  Ive seen it a few times but have not needed to use it or have used other methods but am running into it would like to know it is used for.

     

    Thanks

  7. Just wanted to say thank you, I used trollworkout's code to get slabs up and running.  I tried for few days to get it working on my own so I could at least understand it but I think the ItemSlab was where I couldn't put it all together, so I finally gave in and tried his, and got it working, the itemslab saves the day.  Just a few notes though incase someone else comes across this thread, I did have to tinker a little with the code, as the slab was showing up 3 times in the creative tabs as the item, the half and the double slab, and for all intensive purposes you only want the itemslab to show up because it's the key to the blocks logic, so I added this bit of code onto the SlabBlock code

     

     

        /**
         * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
         */
        @SideOnly(Side.CLIENT)
        @Override
        public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
        {
        	if(itemIn == ModItems.slab_cherry){
            list.add(new ItemStack(itemIn));
        	}
        }

     

     

    and also need to add in that breaking the block will return the Item and not the block, not sure how you made it work completely on your end troll as I didn't want to go reading all your code :) but just wanted to throw my 2 cents in in case anyone is having trouble because, these slabs are, I feel unnecessarily difficult.  Thanks

  8. So basically I have this fairly large mod that I was working on.  Spent countless hours on it, countless hours learning the ins and outs how to make mobs how to do render custom blocks etc the whole works.  This is a large mod.  Every time an update happens its hours to go through and fix everything. I kept the mod up to date until 1.7 but the upgrade to 1.8 seemed really to knock the wind out of my sails. I have tons of custom rendered blocks on top of everything else like mobs and world gen etc. 

     

    I wonder if it is worth it to even begin to try and update the mod all the  way to 1.9.  If I did I imagine by the time I get there the next version will be out and the mojang programmers will probably rewrite and make stuff even more difficult.  Ive noticed the amount of mods are shrinking as Im sure plenty of people are tired of constantly having to completely recode their mods in some cases.  (Also please do not take this the wrong way, my complaints have nothing to do with Forge and the people who spend even more time then I can ever imagine updating Forge to deal with these completely rewritten parts of Minecraft.  You guys are champions. )

     

    I just don't want to let the mod go unfinished and unreleased tho, I spent many many many hours and I believe people would really love it. 

     

    How long does it take to get familiar with the new json system of rendering blocks?  Once familiar with it, is it easier than the previous rendering system? 

     

    Does anyone else feel kind of exhausted and defeated?  Guess Im kinda just hoping for a pep talk lol.  Sorry for the ramble.

     

  9. Maybe someone can help me I was looking for more control over the spawning of my custom mobs, for example wanted to make a very very rare mob but it seem the normal way to do it even if you put very low weight on how many mobs spawn its still much more than I want, I was wondering if anyone knows of a code to spawn a single mob like you would a regular block during terrain gen, like how setblock would do it for blocks, is there a way to do with this mobs?

     

    Thanks

     

  10. In my mod I have a biome cluster that is all custom blocks which I keep crashing in and its giving me this error

     

     

    ---- Minecraft Crash Report ----

    // Uh... Did I do that?

     

    Time: 2/7/15 4:41 PM

    Description: Ticking entity

     

    java.lang.ArrayIndexOutOfBoundsException: 410

    at net.minecraft.entity.monster.EntityEnderman.onLivingUpdate(EntityEnderman.java:182)

    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1856)

    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:270)

    at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47)

    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2286)

    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:705)

    at net.minecraft.world.World.updateEntity(World.java:2246)

    at net.minecraft.world.World.updateEntities(World.java:2096)

    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:536)

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:739)

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:650)

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120)

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:528)

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:787)

     

     

    A detailed walkthrough of the error, its code path and all known details is as follows:

    ---------------------------------------------------------------------------------------

     

    -- Head --

    Stacktrace:

    at net.minecraft.entity.monster.EntityEnderman.onLivingUpdate(EntityEnderman.java:182)

    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1856)

    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:270)

    at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47)

    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2286)

    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:705)

    at net.minecraft.world.World.updateEntity(World.java:2246)

     

    -- Entity being ticked --

    Details:

    Entity Type: Enderman (net.minecraft.entity.monster.EntityEnderman)

    Entity ID: 17481

    Entity Name: Enderman

    Entity's Exact location: -892.76, 49.00, 441.45

    Entity's Block location: World: (-893,49,441), Chunk: (at 3,3,9 in -56,27; contains blocks -896,0,432 to -881,255,447), Region: (-2,0; contains chunks -64,0 to -33,31, blocks -1024,0,0 to -513,255,511)

    Entity's Momentum: 0.00, -0.08, 0.00

    Stacktrace:

    at net.minecraft.world.World.updateEntities(World.java:2096)

    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:536)

     

    -- Affected level --

    Details:

    Level name: Copy of Death Valley

    All players: 1 total; [EntityPlayerMP['Player941'/15, l='Copy of Death Valley', x=-921.02, y=114.40, z=534.55]]

    Chunk stats: ServerChunkCache: 834 Drop: 0

    Level seed: -4988574388548485212

    Level generator: ID 05 - Death Valley, ver 0. Features enabled: true

    Level generator options:

    Level spawn location: World: (56,64,140), Chunk: (at 8,4,12 in 3,8; contains blocks 48,0,128 to 63,255,143), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)

    Level time: 2354 game time, 2354 day time

    Level dimension: 0

    Level storage version: 0x04ABD - Anvil

    Level weather: Rain time: 80425 (now: false), thunder time: 76273 (now: false)

    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true

    Stacktrace:

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:739)

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:650)

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120)

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:528)

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:787)

     

    -- System Details --

    Details:

    Minecraft Version: 1.7.2

    Operating System: Windows 7 (amd64) version 6.1

    Java Version: 1.7.0_09, Oracle Corporation

    Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

    Memory: 400179400 bytes (381 MB) / 1227096064 bytes (1170 MB) up to 2861498368 bytes (2728 MB)

    JVM Flags: 0 total;

    AABB Pool Size: 2909 (162904 bytes; 0 MB) allocated, 133 (7448 bytes; 0 MB) used

    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94

    FML: MCP v9.01-pre FML v7.2.116.1024 Minecraft Forge 10.12.0.1024 5 mods loaded, 5 mods active

    mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    FML{7.2.116.1024} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    Forge{10.12.0.1024} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1024.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    biomesfiesta{v1.0} [biomes Fiesta] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    Profiler Position: N/A (disabled)

    Vec3 Pool Size: 32446 (1816976 bytes; 1 MB) allocated, 26 (1456 bytes; 0 MB) used

    Player Count: 1 / 8; [EntityPlayerMP['Player941'/15, l='Copy of Death Valley', x=-921.02, y=114.40, z=534.55]]

    Type: Integrated Server (map_client.txt)

    Is Modded: Definitely; Client brand changed to 'fml,forge'

     

     

    Which points to this block of code in EntityEnderman

     

     

        if (carriableBlocks[block.getIdFromBlock(block)])

                        {

                            this.func_146081_a(block);

                            this.setCarryingData(this.worldObj.getBlockMetadata(k, i, j));

                            this.worldObj.setBlock(k, i, j, Blocks.air);

                        }

     

     

    And since the biome is all non vanilla blocks I am assuming this from what I can tell is possibly the issue here?  I tried removing the Enderman from the spawnlist in the biomes but still having this problem.  Anyone have any advice?

     

    Thanks

     

     

     

     

  11. You can set biomes up to have a border biome, like how ExtremeHills has ExtremeHillsEdge or used to, so you can have your Biome, and have a border biome that either you generate the extra blocks on or just have the altitude of the biome a little higher to give the appearance of a wall.

  12. Ive been learning mob animations myself recently and have been using the same code.  BTW thanks Jabelar for that and your tutorials, very useful. 

     

    I think and I could be wrong, that the code sets the proper rotation angles of the child, but the actual rotation point locations need to be adjusted as well to offset now from the parent instead of the normal offset.    Its a bit complicated, maybe I'm explaining it wrong.

×
×
  • Create New...

Important Information

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