More blocks in Multiplayer?

Discussion in 'Archived: Plugin Requests' started by Aeron, Jan 23, 2011.

  1. Offline

    Aeron

    This topic is outdated, you can read about my project more here:
    http://www.minecraftforum.net/topic...ungeon-craft/page__view__findpost__p__4795468



    Old Thread History (open)
    Been browsing the forums for a while now, but there is no tutorial or anything regarding of making new blocks, that can be spawnable ingame and may be used for multiplayer...

    Would be nice, if there would be a possibility to create new blocks and add them to the server and the client (through hacking minecraft.jar and adding for example terrain_extended.png, where you could basically make as much new block types as your imagination and texture making skills allow.

    Anyone up for the task of making such a bridge ingame, I know that there are mods for Single Player mode, that add new blocks with the help of extra ID making mods etc, but for multiplayer it would be more than awesome! The current terrain.png texture image file contains a grid of 16x16 and that could mean, that if there would be a possibility to add new items to the game through a client patch (by replacing the necessary class files or making new ones), you could be able to define 256 new blocks to build with, it would be very, very useful, especially for those server owners, that own a server, that they want to fit a certain scenario. Personally I am currently working on a HD texture packed modified client patch, that will be required to play on our server, therefore this would be a really fantastic opportunity to create a unique server experience (regardless weather the recipes for those items in-game exist or don't. the important thing would be the ability to use those blocks while building something!

    And I am thinking, that there could be a config file server side, where it would containt the following information - new block IDs, the location of the texture based from the top left corner of terrain_extended.png, the width and height of the tile in one number, material type, something like this:

    Code:
    1001:1,1:128:metal
    1002:129,1:128:wood
    1003:257,1:128:stone
    ....
    1256:1921,1921:128:metal
    The client of the game would have the terrain_extended.png, en_US.lang moddified with extended entries, something similar to this:

    Code:
    tile.dispenser.name=Dispenser
    tile.dispenser.desc=
    tile.musicBlock.name=Note Block
    tile.musicBlock.desc=
    tile.cake.name=Cake
    tile.cake.desc=
    
    tile.1001.name=Metal Crate
    tile.1001.desc=
    tile.1002.name=Wooden Crate
    tile.1002.desc=
    tile.1003.name=Stone Brick
    tile.1003.desc=
    tile.1004.name=Electrical Circuitry
    tile.1004.desc=
    ...
    tile.1256.name=Magical Stone
    tile.1256.desc=
    
    Possible material types? Well... from the ones, that exist ingame - stone, soil, wood, iron (metal), its important to have various materials, so that pickaxes, axes and shovels would work normally, as well as the sound, that is generated by walking on those blocks should be appropriate
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    WIP
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Total Progress Bar:
    [()()()()()()()()()()()()()()()()()()()()] ~ 20%
    Client side:
    [()()()()()()()()()()()()()()()()()()()()] ~ 40%
    Server Side:
    [()()()()()()()()()()()()()()()()()()()()] ~ 0%

    After I made this thread about more blocks in multiplayer I discovered, that it is achievable and currently I am working on making some client and server side changes, with extra blocks in the game as well as required items, to make some of the special new blocks, such as Gold and Iron chests and some other interesting things.

    However I still need some help for making it possible to use more block IDs than currently free ones, which are 93-127, that can be extended up to 255, but requires a server side mod for that. The original author of that plugin for SP said, that he will check it out and well, all I can do now is wait for that.

    And I need some help and assistance of how to make a block to use a different image for its texture, than the default one: terrain.png ( I know, that Mod Loader has some kind of override for that, but I want it simple and clean with no mod loaders)

    Extended Blocks and Items
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    BLOCKS
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The following blocks are already implemented in the Client Test Version:

    6 Extra Stairs:
    <3 Wood> Woodplate Stairs, Log Stairs, Old Wooden Stairs,
    <3 Stone> Cobblestone Brick Stairs (Stone Stairs), Sandstone Brick Stairs (Sandstone Stairs), Stone Stairs (Smoothstone Stairs)
    15 Extra Rock based blocks: Asphalt, Asphalt with Sewer Cover (Asphalt Sewer), Ancient Ornament, Dark Stone Tiles, Reinforced Greenstone, Stone Ornament, Splintered Stone Tile, Hexagonal Stone Tile, Rough Stone Tiles, Diagonal Stone Tiles, Smooth Stone Tiles, Mixed Stone Tiles, Ceramic Roof, Old Ceramic Roof, Ornamental Stone Tile
    15 Extra Wood based blocks: Horizontal Log, Wooden Slats, Old Wooden Slats, Wooden Roof, Gray Wooden Roof, Classic Wall, Worn Vertical Planks, Ornamental Wood Panel, Wood Panel, Urban Camouflage, Jungle Camouflage, Bamboo, White Vertical Planks, Flat Wooden Panel, Wooden Eagle
    15 Extra Iron based blocks: Steel Bars, Crossed Steel Bars, Microchip, Rusted Metal Panel, Red Metal Panel, Side Panel, Inlayed Panel, Metal Floor, Metal Panel, White Profiled Panel, Basic Floor Panel, Base Side Panel, Power Panel, Basic Sewer Panel, Basic Panel
    5 Extra Glass based blocks: Aluminum Window (Aluminium Window), Wooden Window, Tiled Window, Ornamental Window, Toned Window
    4 Extra Brick based blocks: Sandstone Bricks, Stone Bricks (Cobblestone Bricks), Blue Tiberium, Artefact
    2 Extra Containers: Drawer, Compact Chest
    4 Extra Doors: Wooden Door, Shack Door, Metalic Door, T Door (Panel Door)
    14 Extra Sloped Top blocks: Sand, Stone, Planks, Cobblestone, Mossy Cobblestone, Obsidian, Sandstone, Glass, Aluminium Window, Wooden Window, Old Wooden Slats, Wooden Roof, Ceramic Roof, Old Ceramic Roof
    14 Extra Sloped Bottom blocks: Sand, Stone, Planks, Cobblestone, Mossy Cobblestone, Obsidian, Sandstone, Glass, Aluminium Window, Wooden Window, Old Wooden Slats, Wooden Roof, Ceramic Roof, Old Ceramic Roof
    14 Extra Sloped Top Corner blocks: Sand, Stone, Planks, Cobblestone, Mossy Cobblestone, Obsidian, Sandstone, Glass, Aluminium Window, Wooden Window, Old Wooden Slats, Wooden Roof, Ceramic Roof, Old Ceramic Roof
    14 Extra Sloped Side blocks: Sand, Stone, Planks, Cobblestone, Mossy Cobblestone, Obsidian, Sandstone, Glass, Aluminium Window, Wooden Window, Old Wooden Slats, Wooden Roof, Ceramic Roof, Old Ceramic Roof
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ITEMS
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Fried Eggs
    Nails
    Key Mechanism (For Making Gold and Iron Chest)
    Obsidian Ignot/Bar (For Future Weapons)
    Silver Ignot/Bar
    Aluminium Ignot/Bar
    Bronze Ignot/Bar
    Copper Ignot/Bar
    Steel (Made from Iron Ignots/Bars)
    Aluminium Profile (For Aluminium Window)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CURRENTLY CHANGED AND ADDED FILES TO THE CLIENT
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Changed Files:
    Block.java
    Item.java
    CraftingManager.java
    ItemDoor.java
    BlockDoor.java
    RenderBlocks.java
    FurnaceRecipes.java
    ItemSpade.java


    Extra Files:
    _Extended_block_brick.java
    _Extended_block_cobblestone.java
    _Extended_block_glass.java
    _Extended_block_ore.java
    _Extended_block_planks.java
    _Extended_block_slope_cobblestone.java
    _Extended_block_slope_cobblestonemossy.java
    _Extended_block_slope_glass.java
    _Extended_block_slope_glassmetal.java
    _Extended_block_slope_glasswood.java
    _Extended_block_slope_obsidian.java
    _Extended_block_slope_planks.java
    _Extended_block_slope_roof_1.java
    _Extended_block_slope_roof_2.java
    _Extended_block_slope_roof_3.java
    _Extended_block_slope_roof_4.java
    _Extended_block_slope_sand.java
    _Extended_block_slope_sandstone.java
    _Extended_block_slope_stone.java
    _Extended_block_stairs_cobblestone.java
    _Extended_block_stairs_wood.java
    _Extended_block_steelblock.java
    _Extended_container_chest.java
    _Extended_container_drawer.java
    _Extended_item_brick.java
    _Extended_item_cobblestone.java
    _Extended_item_glass.java
    _Extended_item_ore.java
    _Extended_item_planks.java
    _Extended_item_slope_cobblestone.java
    _Extended_item_slope_cobblestonemossy.java
    _Extended_item_slope_glass.java
    _Extended_item_slope_glassmetal.java
    _Extended_item_slope_glasswood.java
    _Extended_item_slope_obsidian.java
    _Extended_item_slope_planks.java
    _Extended_item_slope_roof_1.java
    _Extended_item_slope_roof_2.java
    _Extended_item_slope_roof_3.java
    _Extended_item_slope_roof_4.java
    _Extended_item_slope_sand.java
    _Extended_item_slope_sandstone.java
    _Extended_item_slope_stone.java
    _Extended_item_stairs_cobblestone.java
    _Extended_item_stairs_wood.java
    _Extended_item_steelblock.java
    _Extended_item_cells.java

    Changed Images:
    terrain.png
    gui/items.png
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PLANS FOR FUTURE
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Support for Zan's Minimap (Will be included in the mod)
    Support for Better Light and Grass (Will be included in the mod)
    Support for HD (Will be a HD version of the mod)

    Learning how to make the client read a custom terrain.png file for more block support
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    SCREENSHOTS
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Some images below are with a lowered quality value for space saving, for example, terrain.png is cropped from the original by 80% in quality and stored in jpg without alpha transparency values.


    previewterrain.jpg previewitems.png previewlanterns.png 2glassblocks.png drawer_preview.png lantern.png 2011-02-21_02.37.30.png 2011-02-21_02.37.39.png 2011-02-21_02.37.43.png 2011-02-21_02.37.47.png

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CREDITS
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Main Mod Author:
    Aeron
    Mod Components:
    Kaevator for SuperSlopes source code

    Seriously? No one is up for this task, meh just as I thought..., considering the fact that this one is probably the hardest to make

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
  2. Offline

    nichiatu

    not possible without making a client mod as well.
     
  3. Offline

    matejdro

    I doubt you will see anything like that. At least until official Mod is released.
     
  4. Offline

    Aeron

    You probably missed this sentence, that I wrote at the first post:
    ...a possibility to add new items to the game through a client patch (by replacing the necessary class files or making new ones)...

    I don't mind of sharing the terrain_extended.png file, with all the configs etc, but since I'm not so experienced at Java, I am hoping, that some one on these forums might be of making such a thing possible, then I could work on making new materials for the game (yay)!

    Also while thinking about this mod, i thought about a possibility, that you could define 2 grid squares for 1 block - a top and a bottom block, and it could either define a half step liked block or maybe a door, that uses up 2 square blocks stacked vertically in the terrain.png (talking about wooden and iron door).

    Yeah, this is a big deal, but if it would be possible, so many new options would open up - extra step liked blocks, extra doors, extra blocks for interior and exterior buildings! As I said before, I don't know how java works and how Notch made it to generate the blocks, but it would be awersome, if the engine could generate a triangular liked block (for roofs), that would work similar like cobblestone and wood steps, but instead of steps it would have a flat surface:


    halftriangularblock.png

    Which is basically a block, that has been sliced in half by diagonal and has 2 full faces, 2 half faces and one stretched face. This block would be perfect for roof building etc.

    The texture for this schematic would require 2 squares defined in terrain_extended.png - one for the face that is up by diagonal, and the other face for sides back and bottom, here is a nice texture for the top of the block, that I found browsing through the internet:

    [​IMG]
     
  5. Offline

    nichiatu

    I like the idea. Someone should find out a way to automatically download and install plugins/mods to the client when you join a server. Like in CSS.
     
  6. Offline

    Aeron

    Found some tutorials here: http://www.minecraftforum.net/viewtopic.php?f=25&t=103030&sid=6f84871dd17c3d239c8f80849c826393 , though I lack time myself to read through them all to begin with something, maybe for some developers it would be useful, concerning this idea :)
    --- merged: Jan 26, 2011 10:15 PM ---
    Downloaded myself the Minecraft Coder Pack and Java Development Kit, and after checking the sources, the server jar structure is quite similar to the clients structure, however I wasn't very lucky of compiling the client itself (maybe because of my HD mod, will try with the vanilla client and will see what happens (I'm just messing around weather it is possible or not, for now as it seems (without any knowledge of java coding), I've found a number 256 for blocks, which would probably mean, that this needs to be changed to a larger number, if any time soon a terrain_extended.png is gonna be used for making extra blocks possible client and server side :p
    --- merged: Jan 27, 2011 12:01 AM ---
    After some research of modding minecraft_server and minecraft client sources I did manage to get into the server a new item block with an ID of 101, which I named as a WoodenBox (Used one face of the chest), which means that it is definitely possible to accomplish (considering the fact, that java is new for me (well not anymore I guess).

    Next step would probably would be a way of extending the limit of item IDs allowed in the game and afterward defining a new path to terrain_extended.png
     
  7. A few questions , how do you want to define the area new blocks are being created from, or do you want it to be relatively random, also how do you want to control the rate items show up?

    I am willing to try but i might give up if its beyond me, so no promises.
     
  8. Offline

    Aeron

    Posted in minecraft forums as well, here is the link: http://www.minecraftforum.net/viewtopic.php?f=25&t=156068

    Well, speaking of the control, I have learned for now of how to make extra blocks (ID93-127), but the client needs some files edited, so that it can allow up to 255 blocks defined, however I am thinking about expanding this limit (remember, nothing is impossible, but some things are very hard ;( ).

    How to define, hmm, the client patch should contain probably the following files (mods is the folder inside .minecraft folder:
    mods/extended/blockdata.properties
    mods/extended/itemdata.properties
    mods/extended/textures/terrain.png
    mods/extended/textures/items.png
    And of course modified minecraft.jar with language files etc.. could be also, so that items_extended.png located under gui folder and terrain_extended.png under main folder inside the jar

    The file blockdata.properties would probably look like the above stated one, but probably need more thinking and brainstorming about it, because well a custom Door or a chest would be defined differently, so there is more to it.

    It should contain the following (at least):
    Block ID
    Block Name
    Block Type
    Block Structure (Door, Chest, Block, Step, Stairs, Ladder, Lantern (Glowing Pumpkin))
    Block Hardness
    Block Resistance
    The path to the textures location by the top left point of the texture, could be a number, like in Block.java

    Speaking of how the new items would show up in the world, well it would be probably a pain in the a** to accomplish this, because of so many extra blocks defined. I am guessing that they would require recipes from the existing blocks in the game to make the new ones.

    The question now is rather more into the Minecraft coding than Bukkit itself of how to make the custom terrain.png and how to call it in the client/server files, else would be relative: ability to use bukkit to spawn the custom IDs in the game through admin commands.

    EDIT: The rates of the block drops could probably be defined using this plugin:
    http://forums.bukkit.org/threads/me...-blocks-drop-now-with-creeper-drops-122.2177/
     
  9. in the bukkit i think i can use the blockplaceevent class to place already built blocks. i can import the random class to get a random location, i would need to figure out the section of the map to place and i need to figure out player events because we dont want the map to end up filling up with block unless you want to make a game out of it but if you do that to the entire map it would lag. so we want a general location like 50 blocks in each direction (staying in map bounds and we could change this with a command.

    i am going to take a look at the block drop from that plugin and see what they did.

    I am sure this can be a plugin because of that event
     
  10. Offline

    Aeron

    Currently I am trying to make a working multiplayer version of Shockah's More Block IDs mod, so that there could be a possibility to define extra blocks with IDs from 93 to 255
     
  11. Offline

    Tomy

    Hey, do you have it on git hub or somewhere?
     
  12. Offline

    Aeron

    Here is the Shockah's More Block IDs (Link: http://www.minecraftforum.net/viewtopic.php?f=25&t=83028 ), I tried to merge it into the minecraft server jar, but there are so many errors, because of the statement missmatches between the client and the server variables, hope any of you will be more lucky of making it server side as well ;)
    --- merged: Jan 27, 2011 7:37 PM ---
    Ok, so I somehow managed to get the server up with moddified Chunk.java and World.java files, based from Shockah's mod, however all the time I am falling into the void, something definetly isn't right with Chunk.java, which I am not very suprised about, because of my "large" knowledge in java coding :p
     

    Attached Files:

  13. i have finished everything up to the block adding file and i think i will be done with the first version today just to add blocks randomly over x amount of time.eventually i will work with files and setting it up so you can change the time and the block types but right now i am just making everything random except for a set time which i will decide a temporary test time.
     
  14. Offline

    Aeron

    That's great news, and I sent a message to Shockach weather he would look into the multiplayer side of his mod:
    I am thinking, that Copper and Bronze would be an interesting addition to the game, as well as Steel and Reinforced Steel
     
  15. Something else i just though of... if you have something setup specificly for a water system or a lava system you might end up accidently blocking it. until you cacn choose ccertain blocks to connect to or to place.

    if you have skype let me know you are on the bukkit forum so i dont block you and we can chat about the plugin username- spacerules
    --- merged: Jan 27, 2011 10:11 PM ---
    I need to request some help, I need to get the world somehow so i can use it in the script. I am so close i can taste it. (its a chocolate chip cookie dough ice cream with oreo cookie crumbs on top) :)
     
  16. Offline

    Aeron

    Now I am kinda making a chart of what items would be in this client/server mod, added that list in the first post
     
  17. I have news... I cant get it to do a timer event because i cant figure out why my thread wont start correctly but i have gotten it to place a block a a single position. when I try to start a thread "ba.start()" (ba is blockadder) it does nothing. I am not making the code public yet because I need to make the locations random and have a variable for the number of blocks being added.

    EDIT: I have been able to add blocks randomly in a set location and i am making a config file to set howmany blocks and the distance in front of your current position. it will be in front and down from your current position.
     
  18. Offline

    Aeron

    Sounds fantastic!!! I made a unique block for the game, which won't be craftable and will be marked as a special block in the game, and I called it Aether (The Fifth Element), and those who will obtain it, will be able to make the most powerful item (Maybe various items in future), and it would be nice to spread it around (near bedrock level) in a really few spots in 1 chunk.
     
  19. right now the generator only makes glass blocks randomly, the blocks can be floating and i havent figure out what direction to place the blocks but it get the current location and generates them, it also makes a config files so only certain users can use it. I wouldn't want a guest to come and use a everywhere, it would be a pain, I will have version 1.0 done hopefully by tommorrow.
     
  20. Offline

    Aeron

    Fantastic! Today I am going to make the first version of what blocks I have planned inside the game, gonna take some time (in paralel of thinking what blocks would be nice to see as extra blocks ingame, I am making charts for the recopies of how to get them by crafting :)

    I have tried to make extra doors ingame, but with no succsess, because there are more java files involved with it, which means less compatability with other stuff, so I still don't know weather I will edit them, because that may bring up some really nasty and unwanted problems. Currently I know how to make extra chests (can make a chest, that looks like a drawer too, would be nice If i would figure out a possibility of how to make a double chest, if you put one small chest above the lower one, like a closet or something, but that is gonna take some time), extra stairs, regular blocks. What I havent checked now is that I want to implement an alternative glass block, that is semi transparent in the way as ice works (but would have to make it unmeetable if in close range of torch, lava.
     
  21. i need 1 thing before i relese it and that is direction, i need to find the way to calculate what way is north, east, south, or west to decide where we are placing the blocks.
     
  22. Offline

    lokiman72

    this would be fantastic, but how about giving some things special purposes, such as elevators? sorry i dont know XP
     
  23. Offline

    Aeron

    The single player portion for several materials is almost complete, which includes the following blocks:

    Gold Chest
    Iron Chest
    Silver Ore
    Aluminium Ore
    Bronze Ore
    Copper Ore
    Cobblestone Brick
    Stone Stairs (Uses Cobblestone Brick)
    Sandstone Brick
    Sandstone Stairs
    Silver Block
    Aluminium Block
    Bronze Block
    Copper Block

    Currently working on recipes for:
    Wooden Box
    Iron Box
    Steel Box
    Silver Box
    Camo Forest (Camouflage block for Forest setting) (For Army Purposes)
    Camo Urban (Camouflage block for Urban setting) (For Army Purposes)

    The Ore blocks and the Artifact Block Aether will require the seeding function that you are working on, I wonder, does craftbukkit support for other IDs than the default ones ingame? Well admins be able to get the blocks/items with the function /i , anyone know that?

    World Edit plugin had the function of setting up NWSE, Up, Down directions for the selection of blocks

    Current progress:
    terrain.png

    Also I have some plans for the Items as well:
    items.png

    I will add my 128x128 HD Texture Eddition, once I am finished with the 16x16 implementation.

    P.S. Any Moderator thinking of moving this thread to another forum location? It's kind of a semi request and wip server and minecraft mod ;)
     
  24. Offline

    Aeron

    Well the basics will be done, and updating them will be easier than writing it from zero :)
     
  25. Offline

    iMalware

    Patience is a virtue. But creativity isn't as patient.

    I like this idea, what can I say. I love'em new blocks.
     
  26. Offline

    Aeron

    From my experiments of shaping blocks (Based on Stair Block), I have managed to make a Chair Block, will hope that it won't get buggy in multiplayer mode
     
  27. Offline

    Snowl

    Sweet! I would like to test this out.
     
  28. Offline

    Aeron

    About the Chairs, I figured a way to add a unique extra block called Chair, however there is some strange math going on here, that I can't understand correctly in RenderBlocks.java, where if I do the following
    Code (open)


    In line 89 of RenderBlocks.java:
    Code:
            if(l == 12)
            {
                return renderBlockLever(block, i, j, k);
            } else
            {
                return false;
            }
    
    Added extra line for the Chair and after the changes it looks like this:
    In line 89:
    Code:
            if(l == 12)
            {
                return renderBlockLever(block, i, j, k);
            }
            if(l == 14)
             {
                 return renderBlockLever(block, i, j, k);
             } else
            {
                return false;
            }
    
    And then found the line starting with public boolean renderBlockStairs(Block block, int i, int j, int k) I Moddified it so that after that code part goes the Chair code:
    Code:
        public boolean renderBlockStairs(Block block, int i, int j, int k)
        {
            boolean flag = false;
            int l = blockAccess.getBlockMetadata(i, j, k);
            if(l == 0)
            {
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
                renderStandardBlock(block, i, j, k);
                block.setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                renderStandardBlock(block, i, j, k);
            } else
            if(l == 1)
            {
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
                renderStandardBlock(block, i, j, k);
                block.setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
                renderStandardBlock(block, i, j, k);
            } else
            if(l == 2)
            {
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
                renderStandardBlock(block, i, j, k);
                block.setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
                renderStandardBlock(block, i, j, k);
            } else
            if(l == 3)
            {
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
                renderStandardBlock(block, i, j, k);
                block.setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
                renderStandardBlock(block, i, j, k);
            }
            block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
            return flag;
        }
        public boolean renderBlockChair(Block block, int i, int j, int k)
        {
            boolean flag = false;
            int l = blockAccess.getBlockMetadata(i, j, k);
            if(l == 0)
            {
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
                renderStandardBlock(block, i, j, k);
                block.setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                renderStandardBlock(block, i, j, k);
            } else
            if(l == 1)
            {
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
                renderStandardBlock(block, i, j, k);
                block.setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
                renderStandardBlock(block, i, j, k);
            } else
            if(l == 2)
            {
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
                renderStandardBlock(block, i, j, k);
                block.setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
                renderStandardBlock(block, i, j, k);
            } else
            if(l == 3)
            {
                block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
                renderStandardBlock(block, i, j, k);
                block.setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
                renderStandardBlock(block, i, j, k);
            }
            block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
            return flag;
        }
    
    After that I copy-pasted the BlockStairs.java and renamed the copy to BlockChair.java and changed the following values:
    Line 9-13:
    Code:
    public class BlockStairs extends Block
    {
    
        protected BlockStairs(int i, Block block)
        {
    
    Changed to:
    Code:
    public class BlockChair extends Block
    {
    
        protected BlockChair(int i, Block block)
        {
    
    And in line 41-44:
    Code:
        public int getRenderType()
        {
            return 10;
        }
    
    Changed to:
    Code:
        public int getRenderType()
        {
            return 14;
        }
    
    Where number 14 is the getRenderType() reference, but I didn't get into the code much why is it so, but everything is fine except that instead of a stair icon in the quickbar, it shows a square texture plate (not a block, a plate, like if you spawn Water), if i use the get render type 10, it shows fine using the chair rendering method...

    Untill I find a way of how to fix this, won't be messing with chairs :p, besides that it requires an extra .class file to be changed, so even less compatability. Currently used class files for the client:
    ay.class, dj.class, eo.class, fg.class, pj.class
    And more speaking of compatability, I will try to make it compatable with HD textures and Better Light+Grass mod, which I preffer, since it makes the game a lot more charming than the vanilla :)

    P.S. I don't have any knowledge about how java works, those are just my instincts, that are basically based on Turbo Pascal, that I learned at my University 3 years ago, since I am studying to be a Construction Engineer, didn't need java :D
    --- merged: Jan 30, 2011 2:04 AM ---
    Woohaa! I did manage to get into the game a transparent glass block (With no frame and it works with frame as well, it checks the terrain.png image for alphatransparency, if there is not transparency, then it shows as solid structure (frame for the window), and if there is a transparency in the png, it shows it :))

    Because of the current event I will change the recipie of the glass, that can currently be obtainable by burning sand in furnace, it will make glass with no frame, and if you will want a frame for glass blocks, you will need Aluminium! :)

    UPDATE: Lanterns!

    Lanterns can be placed even under a block, which is an advantage to torches and furthemore they have a light value of 1, where torch has: 0.9375

    Another Screenshot of lantern (one is hanging in the air, attatched to the ceiling, and the other is put on the ground!
     
  29. Offline

    Afforess

    Impressive!
     

Share This Page