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.

Frepo

Members
  • Joined

  • Last visited

Everything posted by Frepo

  1. Hey hydroflame. Thanks for answering! Unfortunately this did not help. The method isOpaqueCube() relates to rendering blocks in the world. Our problem relates to blocks (the CustomChest in my case) that are rendered as an item in an inventory. It must be something in the RenderItem (or perhaps RenderBlock) class that needs to be changed or added. But I do not know how to override stuff in those classes. Its very confusing since my CustomChest is just copy-and-paste from the vanilla BlockChest, and I can't find where the rendering (as inventory items) of my chests differ from the vanilla chest. I have the same renderType (22). Could it have something to do with the ChestItemRenderHelper class?
  2. Find the "drawItemStackTooltip" method in you GuiContainer. There you can write something like: Item item = Item.itemsList[itemstack.itemID]; if(item.itemID == 1001){ // of course you can also type in vanilla id's to add tooltips to vanilla items and blocks as well list.add("my tooltip text"); }
  3. And for items in inventory? Man, I've been trying several ways of adding tooltips to vanilla items. I can get it done, but not in a handy way. Is'nt there really a hook for this?
  4. Yepp, as Mew explained, 1 is very rare, 100 is quite common. I believe a golden apple has a rarity of 1. And bread has 100.
  5. some examples // Add new loot (Params: Itemstack(theItem), min, max, rarity) ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(yourItem),1,3,20)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(yourItem),1,6,50)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(yourItem),1,3,5)); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(yourItem),1,5,); ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(yourItem),1,1,1));
  6. Hey boys and girls! I've been searching high and low for an example of someone making a custom BiomeDecorator for version 1.6.2 but can't find it. Found it for earlier versions but the biome decoration code was changed for 1.6 (I think). Correct me if I'm wrong, but as I understood each biome had it's own decorator before 1.6, and now there is only one, "this.theBiomeDecorator". So I have my custom biome (BiomeGenRedrock) which generates properly. And I have a custom block (BlockRedrockStone) that forms the top and the filler layers. Now I want to decorate my biome, starting with dead bushes. The problem is that plants can only be placed on sand, dirt, grass etc. So I made a replica of the vanilla BlockDeadBush (FCDeadBush) that looks and is supposed to behave kinda the same, except that it can also be placed on redrock. I made a WorldGenFCDeadBush and a BiomeDecoratorRedrock in an attempt to get my bush to generate in my biome. I even commented out the check "canBlockStay", so it should spawn everywhere within the biome. But... my biome is still as barren as the moon.... Is there something I missed out in the code? Is this even possible, or am I completely banging my head on a stone wall... in a dead end! ***BiomeGenRedrock*** ***BiomeDecoratorRedrock*** ***FCDeadBush*** ***WorldGenFCDeadBush*** Thanks in advance for your help. /Frepo
  7. Actually I mentioned it above. It was the "Block.blocksList[ x ]=null; Block.blocksList[ x ]=Block.myBlock;" part. I have simply replaced the furnace block in the blocksList with my own furnace. I had to go find a village with a blacksmith to ensure that the furnaces were replaced. Seems bulletproof so far. It's even gone from the creative block/item index (well of course it is when the object is completely removed). So we'll see from here how this turns out. Off topic, I made my own biome (using the standard Forge GameRegistry-method). As usual when it comes to me, it's not enough. Do you know of a way to generate the custom blocks (forming the ground) futher down than just the top 3 layers?
  8. Found a solution! Still, if anyone knows a solution please post. Perhaps it's a better way. Or at least we can learn something from it.
  9. Well if you're gonna get technical on me... sure I'm "removing stuff"... since we want to avoid changing the vanilla code directly, to "modify stuff" in it we can remove and replace. A fine example is "Block.blocksList[ x ]=null; Block.blocksList[ x ]=Block.myBlock;" Remove and replace my friend, now we have made a MODIFICATION so to speak. So instead of criticizing and saying stupid this, stupid that. Try to be a little more constructive and see the big picture in what I'm saying/asking instead of marking single lines or words. I understand that you mean well, and want to warn me of messing with stuff I don't fully grasp. Hey, I like coding, I'm not an ace in any way. But I like to experiment, see what happens, see if it's possible, see what I can do. And if the program crashes, so be it, then I revert and try something else. So if I see an opportunity to improve something, I'll do it! And that includes Forge (to answer your question), if I see a way to improve it I would. Pheew... this was a waste of time.... please, no more talk of this. I am aware that a program can crash or bug out with bad code. I learned that a looong time ago ... actually I would say that is the first thing you learn about coding. Then you learn to fix the bugs. And when it works, you get your rush. That's why we love programming, problem solving! So anyway, no handy way of overriding e.g. the furnace GUI anyone?
  10. Hmm yeah that's what I hear people say most of the time. But it's always "I think..." or "I'm not sure but...", and so on. So I still have hopes that there is an easier way through Forge. And it should, since the two fundamental things you do if you wanna mod minecraft are 1. Adding stuff 2. Modifying vanilla stuff. The most important to me is modifying vanilla stuff (coremodding), since just adding new stuff don't make that much of a difference to gameplay. Food is easily retained though wheat/potatoes and cattle (which is all too simple, in my opinion, so no new food is worth adding). Armor is capped with diamond material, so you can't make anything stronger (except for more durability). Dig straight down below Y:18 and search around for diamonds for a while and you have the best tools and armor the game can offer. So in order to make new tools worth the harvestLevel of diamonds must be increased. Well, I guess you get my point. Sorry for yabbing, got carried away there Thanks for the tip! I think the time has come to finally grab the bull by the horns and get into this bytecoding stuff. Feels like it's gonna be a huge time consumer (for me at least). Btw, found something interesting here: https://github.com/MC-Adventure/Torch-Burnout/tree/master/tb_common/com/jjtcomkid/tb He is using a "OverrideHandler", but left out the code for it made me VERY disappointed! I would give my left leg to get a glimpse of that code!
  11. Check out ChestGenHooks. //Example code: ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(yourItem),1,4,20)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(yourItem),1,3,5)); // Last three params: numMin, numMax, and chance to appear in chest (golden apple 1, bread 100)
  12. What I would like to know is how to override vanilla GUI's? Or at least remove the block/item completely and then make my own. My problem is that I want to att heat to furnaces. Sure I can remove the recipe for it, but it will still spawn in villages. So I need to replace it's GUI. Any tips anyone?
  13. what's the code for that? Edit: nvm, i got it A nifty method for removing vanilla recipes. Oh you solved it. Ok. Well then this might be an alternate way of doing it
  14. I have the same problem. Made me a CustomChest class (defining, creating, handling and rendering 5 types of chests). The ItemRenderer renders my chests properly. But all items (block-type) that are rendered "after" any of these custom chests are darkened about 50% (as it is for you). Whenever none of these chests are rendered (i.e. not in my inventory or hotbar) then other blocks are rendered as normal again. I've looked around for hours for a solution.... but nothing. Some openGL parameter seems to not change/restore after rendering of the chests is done. So I guess I just wanted to "raise a hand" and show that there are others who have same/similar problems. So please if anyone knows a fix to this, share it with us!

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.