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


Forge Modder
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Rohzek

  1. I have two semi-related problems, both involving rendering. For the first situation I want to hide the air bubbles/breath bar when a particular piece of armor is worn. Previously I used RenderGameOverlayEvent.Pre event and canceled the event if the element type was ElementType.AIR which no longer exists in 1.17 it seems, and now I'm not sure how to recreate this functionality with the new system. For the second, I want to disable the under-lava-view fog when a particular piece of armor is worn. Previously I used EntityViewRenderEvent.FogDensity event and RenderSystem.fogStart(0.0F); RenderSystem.fogEnd(1024F); event.setDensity(0.05F); event.setCanceled(true); to achieve the desired result. To be honest with you I don't remember how I came up with that solution anymore, only that fogStart and fogEnd became deprecated at some point before 1.16.5 (as I found out when finally updating my mod yesterday), and are completely removed now. For 1.17 I tried replacing those with RenderSystem.setShaderFogStart(0.0F); RenderSystem.setShaderFogEnd(1024F); which has no effect, unless I'm missing something else for that to work. Not sure how to get the same effect here.
  2. I'm looking for a way to set an "easy" mode in the configs which disables some recipes and enables others. Googling/searching this forum brings up a lot of 1.12 references to IConditionFactory which no longer exists. How would you go about that now?
  3. How would I go about using a single blockstate/model/item model file for a set of blocks? I don't mean to try to use a single blockstate to stand in for metadata or whatever, I mean each block uses the same blockstate/model/texture etc.
  4. I'm making armor that allows players to walk in lava while they wear it, without being hurt. Easy enough, but I wonder if there's a way to remove the burning overlay so they can see normally (or stop players from burning all together when wearing the armor)?
  5. The easiest way to explain what I mean is probably an illustration so I'll just do that: Here I use one item to "fill" two other items, and the crafting recipe works as intended; the two empty cups get removed and the empty mug stays But here, I want to "mix" two items and keep the same amount of "containers" but currently it duplicates them by leaving the container items behind and creating two more in the form of the output. Technically the ContainerItem code is working as "intended" but, is there a way to temporarily override the container item in this instance, or just remove the item from the crafting matrix after pulling the result out? And what if I want to do this with vanilla items, too (e.g. mixing a custom "bucket" item with a vanilla milk bucket, to where two new bucket items would pop out, and both of the leftover vanilla buckets containers should be removed I've tried doing both clear and decrStackSize on the PlayerEvent.ItemCraftedEvent.craftMatrix but neither seemed to work.
  6. You can tag this class as @Mod.EventBusSubscriber and not worry about calling the event bus registry in your proxy But this has to be static for that to happen But, what's going on here? You do know 'Cooking for Dummies' is close, but using 'Cooking For Blockheads' is literally just using the name of another mod?
  7. Help > Eclipse Marketplace Search 'decompiler' Install Enhanced Class Decompiler (Or Bytecode Outline) Restart Open Package Explorer, right click on project Build Path > Configure Build Path > Libraries > Add External Jar > Add the mods jar file. Find files in Project > Referenced Libraries > modname.jar and open them like any other
  8. There's either a problem with CraftStudio, a mod that uses it, or a mod you have requires it and you don't have it installed. What's your list of mods? EDIT: Specifically PTRLib has a com.mia.craftstudio. Are you running Decocraft or Camera Obscura?
  9. Yes, I know that. And, as I said in the OP I'm using https://github.com/Azanor/thaumcraft-api/blob/master/ThaumcraftApi.java#L291 to add aspects to the other ores. Kind of implies I know of the API already. Infact I even said: What I'm not finding in it, is a method to remove/change/overwrite an item that's getting stuck with aspects through other sour- Just re-read the OP, I've already said all of this.
  10. Forge probably want's the server file to have the same name as it would have, if had been downloaded with the Forge installer, which is the same name displayed on the website, on the download link. Try renaming it to that: 'minecraft_server.1.12.2.jar'
  11. I know this isn't Forge related, but I figured I'd ask anyway, in case someone knows: I'm attempting to add limited Thaumcraft support to my mod, in the form of adding aspects to items, and am stuck on a small snag; Is there a way to overwrite/remove aspects from items that already have them, using the Thaumcraft API? Specifically my items/ores, which are tagged with (Thaumcraft supported) ore dictionary entries, are grabbed by Thaumcraft's automatic adding of ore dictionary items and have aspects applied to them, that I wish to tweak (small things such as adding 'Ignis' to nether ores) or change completely (in some cases, to better fit the item's purpose). Adding aspects to items a la the ThaumcraftApi#registerObjectTag (and #registerComplexObjectTag) method(s) works great for the unaffected items, but does not seem to override or even concat the aspects on the items that are already tagged, regardless of when it's called (Pre-Init, Init, or Post-Init). A quick search through the API (both on Github, and in Eclipse) hasn't really turned up anything obvious. Am I missing something/is there an easy way around this?
  12. Updating my mod to 1.12 seemed to be easy enough, except it seems that the lang file isn't being loaded? I have no errors in the console, either.
  13. It's actually pretty easy. Just look up the ModMetadata class, and then get an instance of it from FMLPreInitializationEvent#getModMetadata
  14. I'm hoping to be able to support any modded flower (or at least ones which are subclasses of BlockFlower and BlockBush), which is why getting a block from an itemstack and rendering it seemed way more simple than blockstates, assuming it's possible.
  15. Because I have no idea how to do what I want (render a block you place into a tile entity as a block in the world), but Googling "Forge modding render (anything) gets 50% results for rending a custom model, and 50% results for using a TESR. I started working with the one that seemed relevant.
  16. Trying to make a custom flowerpot; I have a TESR and it's Tile Entity stores an instance of a BlockFlower or BlockBush as an itemstack. So far, I've only seen information on how to render something as an EntityItem, but how do I render the flower block as a normal block, instead?
  17. If it's vanilla ore, it's easy. You'll need to subscribe to OreGenEvent#GenerateMinable and block the events. I have an example of that you can look at here. When it comes to the other mods, hope that they have a config you can use to turn off their generation. Or, you'll have to load the mod as an external library and see if there's a getter/setter/public variable somewhere you can edit to turn off generation when your mod is installed. How they have their generation setup determines what you have to do. ...And that really only works if the mod author provides a source/dev version of the mod. Outside of editing the other mods' configs, you won't be able to just read a boolean out of your config and support blocking of any mod, you'll have to code support in for each mod manually.
  18. That is the hardest possible way to do it, it seems. If you run into a block that's a subtype (e.g. forestry's apatite, copper, and tin are all just "forestry:resources" with a different metadata), you'll have to find some way for them to specify the metadata in your config too. To answer your specific question though, you'll need to get the mod id and use it to check to see if the mod is present, and if it is you can get the block with Block#getBlockFromName which will take an id and a block name (like "forestry:resources" or "minecraft:iron_ore") and then you can get the state from that to pass into your generation code.
  19. I would imagine there would be a way to get the list of ores from the mods and pass those to my own generate methods, but how would I be able to stop their ores from spawning first? I'm assuming when checking for an ore to block, EventType.CUSTOM will block any WorldGenerator extended block that isn't a vanilla one?
  20. I have a mod that changes the way ores generate in the overworld by blocking the vanilla ore generation (using the OreGenEvent#GenerateMinable event), and adds nether and end ores. I know how to make my mod aware of other mods by checking the mod Id with Loader#isModLoaded, and using the @Optional tag, but I'm not sure where to go from here. The most requested feature is to add support for ores from other mods, but I'm not sure how to go about that exactly. Another thing that got requested recently is for my ore generation to be used in (dynamic?) dimensions added by another mod, and I'm not sure how to go about that either - or can I even do that?
  21. But that's just it. That's why this is getting even more confusing, since all of the creative tabs, are created exactly the same as the others. Literally the only thing that I've changed is the tab chosen in this line, in every class: setCreativeTab(Main.CUSTOM_TAB); At first it was set to all the individual tabs, where food items were going to my "Main.FOOD_TAB," and blocks into "Main.BLOCKS_TAB" etc, etc, and only the first two tabs I added worked. Then I commented out all but one while testing after submitting this, and changed all of the item classes' 'setCreativeTabs()' calls to list into the one that was left, and it worked fine; every item appeared like it should. And now, to make it worse, I've un-commented them all, and set them all back to the way it originally was, and even less of them are working, now. It has to be the order they're being loaded (in the main class) vs the item classes (through a registered as @Mod.EventBusSubscriber), or something. This literally makes no sense. Project on Github: Main (Creative Tab's Init) Custom Creative Tabs Example Food Example Item Example Tool Example Tool Registration
  22. Right now, I have them all declared at the top of my main class, just like in the op, which probably isn't the correct way to do it. public static final CustomCreativeTab CUSTOM_TAB = new CustomCreativeTab("myCustomTab", Items.APPLE); public static final CustomCreativeTab CUSTOM_TAB_ONE = new CustomCreativeTab("myCustomTab1", Items.STICK); ... etc As for how I "apply" them my items, I have the different types separated by classes (Food, ingots, tools, etc) But in each, I just call setCreativeTab in their constructors, and tell it which tab it belongs in. public CustomItems(String names) { setNames(names); setCreativeTab(Main.CUSTOM_TAB); } private void setNames(String name) { setUnlocalizedName(name); setRegistryName(name); } Which works for the first two tabs, but not any more, which is weird. I'm assuming either the items, or the tabs are being initialized in an order that stops one of them from seeing the other. Not sure which way. Yeah. This is what I have: public class CustomCreativeTab extends CreativeTabs { private ItemStack iconItem; private ItemSorter itemSorter = new ItemSorter(); public CustomCreativeTab(String label, Item item) { super(label); iconItem = new ItemStack(item); } @Override public ItemStack getTabIconItem() { return iconItem; } @Override public void displayAllRelevantItems(NonNullList<ItemStack> items) { super.displayAllRelevantItems(items); Collections.sort(items, itemSorter); } // Sorts items in alphabetical order using their display names, blocks on top private static class ItemSorter implements Comparator<ItemStack> { @Override public int compare(ItemStack o1, ItemStack o2) { Item item1 = o1.getItem(); Item item2 = o2.getItem(); // If item1 is a block and item2 isn't, sort item1 before item2 if (((item1 instanceof ItemBlock)) && (!(item2 instanceof ItemBlock))) { return -1; } // If item2 is a block and item1 isn't, sort item1 after item2 if (((item2 instanceof ItemBlock)) && (!(item1 instanceof ItemBlock))) { return 1; } String displayName1 = o1.getDisplayName(); String displayName2 = o2.getDisplayName(); int result = displayName1.compareToIgnoreCase(displayName2); return result; } } }
  23. What is the proper way of registering Creative Tabs? Right now, I have them at the top of my main class between declaring the instance, and the preinit event just, like this: public static final CustomCreativeTabs SP_TAB = new CustomCreativeTabs("myTab", Items.APPLE); Which works fine if I only have one of them. For some reason, though, If I try to make more than 2, not all of my items and blocks will show up in the last one. If I make 4 or more. no items or blocks show up in the 4th+
  24. Okay, yeah thanks. I made my own WorldGenPumpkin to spawn my mod block, and dropped it in with that, and it worked. (You sort of need it for the pumpkins. The event pos replaces this.chunkpos in that generation command)
  • Create New...

Important Information

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