Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Caffeinated Pinkie

Caffeinated Pinkie

Members
 View Profile  See their activity
  • Content Count

    36
  • Joined

    November 10, 2018
  • Last visited

    Friday at 04:37 PM

Community Reputation

1 Neutral

About Caffeinated Pinkie

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Caffeinated Pinkie started following Remove Chat Clearing, Detect Development Environment, Item DeferredRegister Issue and and 6 others September 18, 2020
  2. Caffeinated Pinkie

    Detect Development Environment

    Caffeinated Pinkie posted a topic in Modder Support

    Is there a proper or correct way to check if a mod is running in a Forge development environment versus if it's running in an actual Minecraft client?
    • September 18, 2020
    • 1 reply
  3. Caffeinated Pinkie

    Item DeferredRegister Issue

    Caffeinated Pinkie replied to Caffeinated Pinkie's topic in Modder Support

    Oh jeez, that was a stupid mistake. I should not have been writing late t night. Thank you.
    • September 1, 2020
    • 7 replies
  4. Caffeinated Pinkie

    Item DeferredRegister Issue

    Caffeinated Pinkie replied to Caffeinated Pinkie's topic in Modder Support

    Alright. But that still doesn't help because none of the methods I tried work.
    • September 1, 2020
    • 7 replies
  5. Caffeinated Pinkie

    Item DeferredRegister Issue

    Caffeinated Pinkie replied to Caffeinated Pinkie's topic in Modder Support

    Well, when I iterate through the BLOCKS entries, it shows two RegistryObjects in it. After running the command to create items as I did, there are two RegistryObjects in the items entries. They all have the correct names as well. It seems functionally identical to defining them as so: public Circuitry() { DeferredRegister<Item> items = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID); items.register("in_node", () -> new BlockItem(IN_NODE.get(), new Properties().group(ItemGroup.REDSTONE))); items.register("out_node", () -> new BlockItem(OUT_NODE.get(), new Properties().group(ItemGroup.REDSTONE))); IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); bus.register(BLOCKS); bus.register(items); } and even doing this statically like so: public class Circuitry { private static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID); private static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID); public static final RegistryObject<Block> IN_NODE = BLOCKS.register("in_node", InNodeBlock::new), OUT_NODE = BLOCKS.register("out_node", OutNodeBlock::new); static { ITEMS.register("in_node", () -> new BlockItem(IN_NODE.get(), new Properties().group(ItemGroup.REDSTONE))); ITEMS.register("out_node", () -> new BlockItem(OUT_NODE.get(), new Properties().group(ItemGroup.REDSTONE))); } public Circuitry() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); bus.register(BLOCKS); bus.register(ITEMS); } } Even writing it identical to how the documentation does it doesn't help: public class Circuitry { private static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID); private static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID); public static final RegistryObject<Block> IN_NODE_BLOCK = BLOCKS.register("in_node", InNodeBlock::new), OUT_NODE_BLOCK = BLOCKS.register("out_node", OutNodeBlock::new); public static final RegistryObject<Item> IN_NODE_ITEM = ITEMS.register("in_node", () -> new BlockItem(IN_NODE_BLOCK.get(), new Properties().group(ItemGroup.REDSTONE))), OUT_NODE_ITEM = ITEMS.register("out_node", () -> new BlockItem(OUT_NODE_BLOCK.get(), new Properties().group(ItemGroup.REDSTONE))); public Circuitry() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); bus.register(BLOCKS); bus.register(ITEMS); } }
    • September 1, 2020
    • 7 replies
  6. Caffeinated Pinkie

    Item DeferredRegister Issue

    Caffeinated Pinkie posted a topic in Modder Support

    Here is most of my mod class: public class Circuitry { public static final String MODID = "circuitry"; private static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID); public static final RegistryObject<Block> IN_NODE = BLOCKS.register("in_node", InNodeBlock::new), OUT_NODE = BLOCKS.register("out_node", OutNodeBlock::new); public Circuitry() { DeferredRegister<Item> items = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID); BLOCKS.getEntries().forEach(block -> items.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Properties().group(ItemGroup.REDSTONE)))); IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); bus.register(BLOCKS); bus.register(items); } } I have the Item DeferredRegister and RegistryObjects in the constructor rather than statically declaring it because I never need to retrieve the Item objects anywhere else in my code. However, upon loading a world, I am unable to find any of the added Blocks in the Redstone tab of the creative menu. The following commands don't work either: /give Dev circuitry:in_node /give Dev circuitry:out_node Declaring the Item DeferredRegister and RegistryObjects statically doesn't seem to fix the problem either. Printing the Item DeferredRegistry shows two entries with the correct names. No error messages are thrown and I can't determine why this is occurring.
    • September 1, 2020
    • 7 replies
  7. Caffeinated Pinkie

    ObfuscationReflectionHelper.findClass()?

    Caffeinated Pinkie posted a topic in Modder Support

    Is there a preferred way to access a private class from Minecraft classes? I can use the regular Java Reflection to access it, but I don't believe that will work after it is obfuscated. For example, how can I access net.minecraft.client.gui.screen.FlatPresetsScreen.LayerItem given that it is not a public class?
    • August 30, 2020
    • 1 reply
  8. Caffeinated Pinkie

    [1.15.2] Fat Jar or Shading Possible?

    Caffeinated Pinkie posted a topic in Modder Support

    I need the Apache HttpClient Mime Apache to create multipart forms. However, nothing I try seems to allow me to load the mod with this library. Even copying the source files into the mod source doesn't work; I keep getting NoClassDefFoundErrors. Is it even possible to, from a Maven dependency (org.apache.httpcomponents:httpmime:jar:4.3.2), create a fat jar, shade the library, or in any way embed it? The documentation for ForgeGradle is not in date anymore regarding this topic and the guides in the Grade Docs don't work for Forge.
    • August 25, 2020
    • 2 replies
  9. Caffeinated Pinkie

    Build with External Library

    Caffeinated Pinkie posted a topic in Modder Support

    In order to use multipart HTTP forms, I've had to import Apache HttpClient Mime. I've tried including it in my built jar like so: configurations { compile.extendsFrom(buildWith) } dependencies { minecraft 'net.minecraftforge:forge:1.15.2-31.2.0' buildWith 'org.apache.httpcomponents:httpmime:+' } jar.from { configurations.buildWith.collect { it.isDirectory() ? it : zipTree(it) } } This does add the files to the mod jar, but I still get errors when I try to use the library in game. It cannot find the class files that are being referenced. What am I missing here? How can I include external libraries in the mod or with the game?
    • August 24, 2020
  10. Caffeinated Pinkie

    Access Transformers versus ObfuscationReflectionHelper

    Caffeinated Pinkie posted a topic in Modder Support

    So, I'm trying out access transformers in one of my mods. I've previously used ObfuscationReflectionHelper instead, but I don't know what the advantages and disadvantages of each might be. Which is better to use for what situations and why?
    • August 24, 2020
    • 1 reply
  11. Caffeinated Pinkie

    Volume of a Block

    Caffeinated Pinkie replied to Caffeinated Pinkie's topic in Modder Support

    Well, is there a way to get the cross-sections of the VoxelShape? Or, at the very least, some documentation on how VoxelShapes work?
    • July 19, 2020
    • 3 replies
  12. Caffeinated Pinkie

    Volume of a Block

    Caffeinated Pinkie posted a topic in Modder Support

    I'm wondering what the most efficient way to calculate the volume of a block is. That is, if I have a BlockState in a World at a BlockPos, how can I most easily or efficiently calculate the volume? Do I have to just take the integral of the cross-sections of the VoxelShape? If that is the case, how do I get the cross-sections?
    • July 18, 2020
    • 3 replies
  13. Caffeinated Pinkie

    Disable Lightning Fire

    Caffeinated Pinkie replied to Caffeinated Pinkie's topic in Modder Support

    Actually, that's definitely cleaner than overriding FireBlock. I already catch the lightning when it is added, so that shouldn't be hard. Thanks.
    • July 18, 2020
    • 4 replies
  14. Caffeinated Pinkie

    Disable Lightning Fire

    Caffeinated Pinkie replied to Caffeinated Pinkie's topic in Modder Support

    Well, the problem is that I'm trying to prevent all lightning from spawning fire, including vanilla lightning.
    • July 18, 2020
    • 4 replies
  15. Caffeinated Pinkie

    Disable Lightning Fire

    Caffeinated Pinkie posted a topic in Modder Support

    So, for a mod that I am making, I've been trying to find the simplest and cleanest way to prevent fire from spawning where lightning bolts strike. I have a few solutions already that work, the simplest of which is that I register a custom FireBlock over the vanilla one. It has a boolean in it that is set to true when EntityConstructing is called with lightning and false when it enters the world. While this value is true, fire cannot be spawned. The reason why this is difficult is that the constructor for LightningBoltEntity actually spawns fire before it even enters the world. Basically, I can intercept the lightning object when it calls the Entity constructor at the start of its constructor and after it is finished constructing, by which it is already too late. Do any of you have suggestions for a better method of doing this? I'm concerned about compatibility issues that may arise from overriding FireBlock.
    • July 17, 2020
    • 4 replies
  16. Caffeinated Pinkie

    Remove Chat Clearing

    Caffeinated Pinkie posted a topic in Modder Support

    I'm currently looking for a way to remove the vanilla system of clearing lines of chat from memory when a certain amount are present. Basically, I'd like all chat messages to persist indefinitely for a given instance of the game. It's a little hard to decipher how vanilla does this as the source code for the chat GUI classes don't seem to currently be available. Edit: Actually, the NewChatGui class has its source code visible, so it shouldn't be too hard. My apologies for not searching harder first.
    • July 15, 2020
  • All Activity
  • Home
  • Caffeinated Pinkie
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community