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
  • urbanxx001

urbanxx001

Members
 View Profile  See their activity
  • Content Count

    139
  • Joined

    March 10, 2020
  • Last visited

    December 30, 2020

Community Reputation

8 Neutral

About urbanxx001

  • Rank
    Creeper Killer

Recent Profile Visitors

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

  1. urbanxx001

    [1.16.x] No Class TypeResolver Initialization Error

    urbanxx001 replied to urbanxx001's topic in Support & Bug Reports

    That did the trick! Thanks
    • December 30, 2020
    • 4 replies
  2. urbanxx001

    [1.16.x] No Class TypeResolver Initialization Error

    urbanxx001 replied to urbanxx001's topic in Support & Bug Reports

    Tried that, it still gives the error. Pretty bizarre. I might just try transferring all the code to a new gradle project.
    • December 30, 2020
    • 4 replies
  3. urbanxx001

    [1.16.x] No Class TypeResolver Initialization Error

    urbanxx001 posted a topic in Support & Bug Reports

    This was completely out of left field; upon loading Forge, it crashes with a "No class 'TypeResolver' found" error. I'm not sure what it points to since no code changes took place between now and when it last loaded fine. Error log: https://pastebin.com/QFJsXj1q
    • December 30, 2020
    • 4 replies
  4. urbanxx001

    [1.16.x] ImageButton Not Displaying Text

    urbanxx001 replied to urbanxx001's topic in Modder Support

    That makes a ton of sense now... it's strange that it's set like that though, if ImageButton has a constructor that accepts text, you would think it would render on the button by default. Normally it just passes StringTextComponent.field_240750_d_ (an empty string), so having another hurdle seems redundant.
    • November 20, 2020
    • 3 replies
      • 1
      • Like
  5. urbanxx001

    [1.16.x][Solved] how to call the TintIndex of water into a custom model

    urbanxx001 replied to raziel23x's topic in Modder Support

    I recommend taking a look at the Forge documentation for events. In your Main class, the mod event bus is added as: @Mod(Main.MOD_ID) @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public class Main { public static final String MOD_ID = "mod_id"; public Main() { final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); eventBus.addListener(this::onCommonSetup); eventBus.addListener(this::onClientSetup); } private void onClientSetup(FMLClientSetupEvent event) { registerColors(); } } Alternatively, if you do the subscribe event, Poopoodice is saying you can get the colors from the event like: BlockColors blockcolors = event.getBlockColors();
    • November 20, 2020
    • 10 replies
  6. urbanxx001

    [1.16.x][Solved] how to call the TintIndex of water into a custom model

    urbanxx001 replied to raziel23x's topic in Modder Support

    Yeah it can be handled like that if you get it from the event, the way it was done with the instance is adding it to FMLClientSetupEvent.
    • November 20, 2020
    • 10 replies
  7. urbanxx001

    [1.16.x][Solved] how to call the TintIndex of water into a custom model

    urbanxx001 replied to raziel23x's topic in Modder Support

    One way to add Biome colors to blocks is by registering directly in the client proxy. A few different examples below. In your case, the example with the oak hedge will let your block change with biome, and change getFoliageColor() to getWaterColor(). private void registerColors() { BlockColors blockcolors = Minecraft.getInstance().getBlockColors(); ItemColors itemcolors = Minecraft.getInstance().getItemColors(); blockcolors.register((state, world, pos, tintIndex) -> 12665871, ModBlocks.HEDGE_RED_MAPLE); blockcolors.register((state, reader, pos, i) -> FoliageColors.getSpruce(), ModBlocks.SPRUCE_LEAF_CARPET, ModBlocks.HEDGE_SPRUCE); blockcolors.register((state, reader, pos, i) -> reader != null && pos != null ? BiomeColors.getFoliageColor(reader, pos) : FoliageColors.getDefault(), ModBlocks.OAK_LEAF_CARPET, ModBlocks.HEDGE_OAK, itemcolors.register((stack, i) -> { BlockState state = ((BlockItem)stack.getItem()).getBlock().getDefaultState(); return blockcolors.getColor(state, null, null, i); }, ModBlocks.OAK_LEAF_CARPET, ModBlocks.HEDGE_OAK, ModBlocks.SPRUCE_LEAF_CARPET, ModBlocks.HEDGE_SPRUCE, ModBlocks.HEDGE_RED_MAPLE); }
    • November 20, 2020
    • 10 replies
  8. urbanxx001

    [1.16.x] ImageButton Not Displaying Text

    urbanxx001 posted a topic in Modder Support

    So this seems like a bug, but it could be a drawing issue I'm not aware of. I have an ImageButton and regular Button: this.func_230480_a_(new ImageButton(xstart + 99, ystart + 18, 70, 16, 156, 0, 21, WIDGET_TEXTURES, 256, 256, (p_213070_1_) -> { }, new TranslationTextComponent("Image Button"))); this.func_230480_a_(new Button(xstart + 99, ystart + 18, 70, 20, new TranslationTextComponent("Button"), (p_213070_1_) -> { })); Both textures render fine, however the ImageButton doesn't display text. This is odd considering they both output the same arguments below. I also tried to give the ImageButton text color to see if it would make a difference, but it doesn't. TranslatableComponent{key='Image Button', args=[], siblings=[], style=Style{ color=null, bold=null, italic=null, underlined=null, strikethrough=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null, font=minecraft:default}} TranslatableComponent{key='Button', args=[], siblings=[], style=Style{ color=null, bold=null, italic=null, underlined=null, strikethrough=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null, font=minecraft:default}}
    • November 20, 2020
    • 3 replies
  9. urbanxx001

    [1.16.x] Updating Widgets in GUI

    urbanxx001 replied to urbanxx001's topic in Modder Support

    Yeah toggling the visibility is an option. However this is usually only possible by clicking on the button, which can't be done in this case. Now that I think about it, the game rule menu for creating a world has scrolling buttons, I’ll take a look there. Edit: ok I didn't realize you could access the widgets with this.field_230710_m_ ..smh these auto-generated names.
    • November 17, 2020
    • 4 replies
  10. urbanxx001

    [1.16.x] Updating Widgets in GUI

    urbanxx001 replied to urbanxx001's topic in Modder Support

    The condition is from a scrollbar. I can do changes there, however I don't what actual methods exist to either remove or update the buttons.
    • November 17, 2020
    • 4 replies
  11. urbanxx001

    Modding in IntelliJ

    urbanxx001 replied to American2050's topic in Modder Support

    You could try "Invalidate Caches/Restart" under File.
    • November 17, 2020
    • 1 reply
  12. urbanxx001

    [1.16.x] Updating Widgets in GUI

    urbanxx001 posted a topic in Modder Support

    According to several sources, it's difficult to update widgets when you're not directly clicking/interacting with them. In my case I'd like to change the text displayed by buttons. I've considered a few solutions. One is to call drawing events in GuiScreenEvent to get the widgets and replace them. However these events are only called when the screen is instantiated. Another is to use the updateScreen() method in the custom screen class, however I can't seem to find it so I believe I'm not calling it correctly or it's deprecated. Finally I could manually close and reopen the screen with updated fields for the buttons, but this seems expensive.
    • November 17, 2020
    • 4 replies
  13. urbanxx001

    [1.16.x] Get Entity from Wildcard EntityType

    urbanxx001 replied to urbanxx001's topic in Modder Support

    Thank you so much, I'll use GlobalEntityTypeAttributes then. The EntityType (a set of them actually) isn't being grabbed from an Entity in the world, but instead from the ForgeRegistry. It's being used for a database. I may still need the actual class, as I need to check if IAngerable is extended by it (to determine if mobs are Neutral or not; isPeacefulCreature only checks if the mob is peaceful or hostile).
    • November 12, 2020
    • 2 replies
  14. urbanxx001

    Crashing when launching

    urbanxx001 replied to miguelangelo22x@gmail.com's topic in Modder Support

    I see that lol. Unfortunately it seems like the crash report makes no reference to a specific mod, unless I overlooked it. You may have to remove the mods one by one to see where the trouble lies.
    • November 12, 2020
    • 6 replies
  15. urbanxx001

    [1.16.x] Get Entity from Wildcard EntityType

    urbanxx001 posted a topic in Modder Support

    For an EntityType<?> I can use getClass(), but the methods available are generic, since it's a wildcard. I would like the specific entity class in order to retrieve attributes and check a few other data. Since methods like getAttribute() aren't directly available, this can (probably?) be accomplished with: if (MobEntity.class.isAssignableFrom(entityType.getClass())) { EntityType<? extends MobEntity> entityType1 = (EntityType<? extends MobEntity>) entityType; AttributeModifierMap.MutableAttribute attributeMap = null; Method[] methods = entityType1.getClass().getMethods(); for (Method method : methods) { if (method.getReturnType() == AttributeModifierMap.MutableAttribute.class) { attributeMap = (AttributeModifierMap.MutableAttribute) method.getDefaultValue(); } } } However this seems over-complicated. Alternatively I can cast ? to type T with a helper method, and then would somehow need to instantiate it: T entity = new T(entityType1, world) {}; But obviously T can't be used in that manner. Am I overthinking this?
    • November 12, 2020
    • 2 replies
  • All Activity
  • Home
  • urbanxx001
  • Theme

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