Jump to content

winnetrie

Members
  • Posts

    408
  • Joined

  • Last visited

Everything posted by winnetrie

  1. Well, i was using no renderer. I didn't knew i had to. How should i know? Thank you for pointing me in that direction. I have created my signrendering class now, but i do not know how i register it? Can you help me with that? EDIT: Ok i found how to register the render and it works,but....yeah there is a "but" again. My sign still has not the custom texture and now my sign is acting strange. If i place the sign i'll get the gui where i can type my text on the sign, but it appears the sign on the gui screen turns around his axis equal as the player's angle. Customs signs are harder as i thought....
  2. So i have this in my CommonProxy.class : public void init(FMLInitializationEvent event) { TemRecipes.init(); if(Loader.isModLoaded("BiomesOPlenty")){ BOPAddonRecipes.init(); } MinecraftForge.EVENT_BUS.register(new TemChunkOverider()); GameRegistry.registerWorldGenerator(new ChalkStoneGenerator(), 1); } What i want to happen is replacing stone with my stone. This works! Then i want to spawn in ores (with the chalkstonegenerator) Both generators work, but the game spawns my ore first and after that it replaces all the stone with my stone. It has to be the other way. Can i somehow let TemChunkOverider go before ChalkstoneGenerator ? TemChunkOverider:
  3. I still need help with this, if anyone would be so kind!
  4. Thanks to both of you. It is working now. I also did the same with the workbench and that's working too. Now i have a working enchanttable that supports my custom bookshelfs!! Maybe 1 last thing. Is there a way to show the enchant by it's name instead of those gibberisch letters?
  5. I'm totally calm, i only had the impression you were just saying something random, srry for that. thank you, but i guess Choonster was faster hehe.
  6. Thank you! Something isn't still clear. in this: public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { if (world.isRemote) { return true; } else { TileEntityEnchantmentTable tileentityenchantmenttable = (TileEntityEnchantmentTable)world.getTileEntity(x, y, z); player.displayGUIEnchantment(x, y, z, tileentityenchantmenttable.func_145921_b() ? tileentityenchantmenttable.func_145919_a() : null); return true; } } what/how do i place in there to get mine gui? i have made a gui class called TemGuiEnchanttable.class Also do i have to register the gui and container somewhere? I really have no clue!
  7. I wonder if you even read what i said? That wasn't helpfull at all! The problem is when clicking on the table i get no GUI like you normally should get! As for the update to 1.9, well again i use 1.7.10 because i have no use for 1.9 There is a reason someone uses 1.7.10. I do not use 1.7.10 just for fun you know.
  8. While the standard enchanttable doesn't recognize custom made bookshelfs due to the fact it only checks for the standard bookshelf and not the instanceof bookshelf block, i then thought let's make a custom enchanttable, copy over all the stuff and change the checking for the bookshelf into instanceof. So i tested it and yeah it worked, the particles where showing up. So nice done i thought, but then when i clicked on the enchanttable no window( Gui) popped up where you can enchant stuff. I couldn't figure it out why that is. Anyone can tell me why?
  9. The sound is only playing when i move horizontally on the ladder (because i then walk on it) setStepSound() is only when you step on the block (in my opinion) Anyways this is what my ladder class looks like: public class CustomLadder extends BlockLadder{ public CustomLadder(){ this.setHardness(0.4F); this.setStepSound(soundTypeLadder); this.useNeighborBrightness=true; this.setCreativeTab(TemBlocks.extradecor); } }
  10. I made my own ladders and it was pretty simple to achiev that. Yet i found out there is an issue with the sound. While climbing the ladder the climbing sound isn't playing. This is probably because minecraft checks if the player is climbing the standard ladder instead of "instance of BlockLadder" I was wondering where that check happens, i went trough multiple classes but couldn't find it. Can this be solved anyway? I think it can. So what i want to try is finding the class where the "player is climbing the ladder" check happens, then copy that check into a new class and change the check into checking instanceof BlockLadder. But where do i find it anyways?
  11. i updated the code, but i do not know what func_146100_a is, but i think it doesn't matter. I don't think does gives you a better view, why the pole isn't rendering and why my own texture isn't rendering, but you asked for readable variables, so here they are!
  12. I'm trying to create custom signs but i have 2 problems: 1)-The sign that is on the ground has no stick attached 2)-The sign doesn't show the texture i say I know i have to register the sign like this: GameRegistry.registerBlock(wood_sign_wall= new CustomSign(TileEntitySign.class, false, Blocks.cobblestone,0).setBlockName("wood_sign_wall"), "wood_sign_wall" ); GameRegistry.registerBlock(wood_sign_standing= new CustomSign(TileEntitySign.class, true, Blocks.cobblestone,0).setBlockName("wood_sign_standing"), "wood_sign_standing" ); And also an itemsign like this: GameRegistry.registerItem(wood_item_sign = new CustomItemSign().setUnlocalizedName("wood_item_sign").setTextureName(tem.modid+":"+"flux"), "wood_item_sign"); The texture i give here for the item is just for testing purpose and i think it doesn't even matter. now for the classes i have this CustomSign (block): and the itemclass: The function of the sign is working good. It just doesn't render well and /or is misplaced on the ground here a picture
  13. nvm i made all the texture now Thank you anyway!
  14. This works fine ofc, but i wanted to draw the bookshelves over the the other texture. So i won't need to make extra textures for my custom bookshelf, but instead i use existing textures
  15. I have succesfully added alot of simple blocks and item to my mod. Things like: bricked blocks, stairs, slabs, walls, fences, buttons, tools, items, recipes and also made an addon for BOP. I had alot of help here on this forum, but once again i need help again. I now want to make bookshelfs in all 6 wood types and also in the woodtypes of BOP (later) i found the bookshelf class and changed it to this: public class CustomBookShelves extends BlockBookshelf { private final Block planks; private final int meta; @SideOnly(value=Side.CLIENT) private IIcon overlay; @SideOnly(value=Side.CLIENT) public CustomBookShelves(Block block, int meta) { this.planks=block; this.meta=meta; this.setHardness(1.5F); this.setBlockName("bookshelf_"+planks.getUnlocalizedName()); this.setCreativeTab(TemBlocks.extrafences); } /** * Gets the block's texture. Args: side, meta */ public float getEnchantPowerBonus(World world, int x, int y, int z) { return 1.0f; } @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta) { IIcon plankIcon = this.planks.getIcon(side, this.meta); return side != 1 && side != 0 ? (renderOverlay ? this.overlay : plankIcon) : plankIcon; //return side != 1 && side != 0 ? super.getIcon(side, meta) : Blocks.planks.getBlockTextureFromSide(side); } @Override @SideOnly(value=Side.CLIENT) public void registerBlockIcons(IIconRegister reg) { this.overlay = reg.registerIcon("tem:bookshelf"); } @Override public int quantityDropped(Random rand) { return 3; } @Override public Item getItemDropped(int par1, Random par2, int par3) { return Items.book; } } So ingame my custom bookshelf has the right woodtype texture but there aren't bookshelfs drawn on it. While the bookshelf does do his task as a bookshelf (enchantmentlevel get increased), i don't see the effect (those weird signs flying from the bookshelf into the enchantment table) So how do i do it right?
  16. I know it's not the right way, but it does work! It is wrong, i know, that's why i am here to ask help..... But people keep telling me to update to at least 1.8. For sake why? I WANT to use 1.7.10 because i can use it with cauldron. Cauldron supports forge mods and bukkit plugins, wich i need to set up a server. I know those plugins could be replaced by mods who does the same thing, but that's the problem. There aren't such mods as good as those plugins(if so plz tell me), and since i am far away able to create them myself, i will use 1.7.10. Besides that i have troubles with 1.9 and i can't find good documentations. If i would know how it all works and eventually i will at some point, i would make documentations myself, because i like forge and i want to help others. For you everything looks and sounds logically, because you are high skilled in this. Those who aren't that skilled (yet), they don't see "IT". No we don't ask you to give us chewed code, that's rediculous, but proper examples WITH good explanations like : what does it do?, why use that?, how does it work? that can help us, and we learn from it. Right now i have no clue and no ideas left to try it out. Before i post here, i searched google for hours! Now for that object rock , wich has 6 metadata (0-5), how do i make stairs (for example) of it in the right way? I think i do need a new block for every metadata because the metadata for stairs is used for the stairs position So for every metadata rock has i need a new stairs
  17. So what's the best way to get the blocks? I just found out that this works too: GameRegistry.registerBlock(rocks = new Customstairs(getBlock("BiomesOPlenty:rocks"), 0).setBlockName("rocks"),"rocks" ).setCreativeTab(TemBlocks.extrastairs); GameRegistry.registerBlock(rocks = new Customstairs(getBlock("BiomesOPlenty:rocks"), 1).setBlockName("rocks1"),"rocks1" ).setCreativeTab(TemBlocks.extrastairs); GameRegistry.registerBlock(rocks = new Customstairs(getBlock("BiomesOPlenty:rocks"), 2).setBlockName("rocks2"),"rocks2" ).setCreativeTab(TemBlocks.extrastairs); GameRegistry.registerBlock(rocks = new Customstairs(getBlock("BiomesOPlenty:rocks"), 3).setBlockName("rocks3"),"rocks3" ).setCreativeTab(TemBlocks.extrastairs); but still no hardness and resistance etc etc.
  18. Is there another way to get a block with metadata from the registry? I created this method: public static Block getBlock(String name) { Block block = (Block) Block.blockRegistry.getObject(name); if (block == null || block == Blocks.air) throw new NullPointerException("Could not find any blocks named " + name); return block; } public static Block loadBlock(String name, int meta) { ItemStack stack = new ItemStack((Block) Block.blockRegistry.getObject(name), 1, meta); return Block.getBlockFromItem(stack.getItem()); } the getblock method works fine but doesn't return a metablock, so i created the method 'loadblock' This 1 returns a block with metadata but it has forgotten all the properties of that block. hardness, resistance, material, stepsound etc etc has to be set again. Here is what i mean: GameRegistry.registerBlock(ashstonewall = new CustomWalls(getBlock("BiomesOPlenty:ashStone"), 0).setBlockName("ashstonewall"), "ashstonewall"); GameRegistry.registerBlock(limestonewall = new CustomBOPWalls(loadBlock("BiomesOPlenty:rocks",0), 0, Material.rock,5.0F/5.0F, 3.0F).setStepSound(Block.soundTypePiston).setBlockName("limestonewall"), "limestonewall"); Is there any other function that returns an object with his metadata?
  19. Srry, i didn't saw your post untill now. Even when it's fixed now, i can still post what i have. You'll never know if someone could find his answers here. So here it is:
  20. Ow,this is nice. I didn't know you can do "before" and "after" alone. I always thought it has to be "required-after" or "required-before". thank you very much!! Seems to work all fine now!
  21. wouldn't that make my mod depending on BOP? If so, i don't want that. My mod is a mod on his own, but whenever BOP is installed too you have the extra stuff
  22. So i tried something new, based on some info i found. public static final void init(){ GameRegistry.registerBlock(ashstonestairs = new Customstairs(getBlock("BiomesOPlenty:ashStone"), 0).setBlockName("ashstonestairs"),"ashstonestairs" ).setCreativeTab(TemBlocks.extrastairs); } public static Block getBlock(String name) { Block block = (Block) Block.blockRegistry.getObject(name); if (block == null || block == Blocks.air) throw new NullPointerException("Could not find any blocks named " + name); return block; } But now it gives me that error, wich is weird because the block IS there. If i try to supply a block from minecraft or 1 of mine it works! What am i doing wrong? Why can't it find the block, i'm very sure the name is correct. I can also find the block ingame in the bop tab. EDIT: I tried initializing it in the postinit of my proxy, because you never know and it worked... package winnetrie.tem; import winnetrie.tem.block.BOPBlocksAddon; import winnetrie.tem.block.TemBlocks; import winnetrie.tem.block.ColoredSlab; import winnetrie.tem.crafting.TemRecipes; import winnetrie.tem.item.TemItems; import winnetrie.tem.item.TemTools; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; public class CommonProxy { public void preInit(FMLPreInitializationEvent event) { TemItems.init(); TemBlocks.init(); TemTools.init(); } public void init(FMLInitializationEvent event) { TemRecipes.init(); GameRegistry.registerWorldGenerator(new ChalkStoneGenerator(), 1); } public void postInit(FMLPostInitializationEvent event) { if(Loader.isModLoaded("BiomesOPlenty")){ BOPBlocksAddon.init(); } } } I have all my own block in the preinit Why do i have to put the addon block in the postinit to let it work? Is this because the mod has to be loaded first before you can qeue something? It now works but if something is still not good or wrong i'll be happy to hear it.
  23. this is what i see in the console when i start up and load a world: in my opinion nothing special. As for the texture i do not apply 1, because i make stairs out of that block and that block has a texture. At least this works for my own blocks. If i change the biome o plenty block into 1 of my own blocks or 1 of minecraft, it then works. But just in case i tested it with supplying a texture of my own and also tested it with supplying the texture it from BOP. It also see no error saying it has no texture. So somehow it knows the texture but does not apply it.
  24. I fixed it with installing code chicken core. it does the deobf while running it. Now it works fine. How do i use now an existing block from that mod ? For example i want to make stairs from ashStone. I tried this: GameRegistry.registerBlock(ashstonestairs = new Customstairs(GameData.getBlockRegistry().getObject("BiomesOPlenty:ashStone"), 0).setBlockName("ashstonestairs"),"ashstonestairs" ).setCreativeTab(TemBlocks.extrastairs); The game starts but the block has no textures. Even when setting manually a texture with .setBlockTextureName("something") it has no texture. I made a class for the addon, here i add all the stuff i want to add when having the mod installed. I did a check in the class where i register all my own blocks if the mod is present and if yes then load all the "additions" for it. if(Loader.isModLoaded("BiomesOPlenty")){ BOPBlocksAddon.init(); } This works all fine, i just have no textures. So what am i doing wrong?
  25. I still need help with this. Is there information or instruction for forge modding and all the other stuff involved modding?
×
×
  • Create New...

Important Information

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