Jump to content

lisilew

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by lisilew

  1. I do not know if this is outdated or not, but when I use sm command on a method that I have mapped SRG to MCP, it says Also, that page says to not rename anything that does not have the default SRG names. Then, is it possible to configure build.gradle in a way that ForgeGradle does not re-download and overwrite the mappings when it has different MD5?
  2. My problem with the bot is that I cannot rename already mapped names and there are missing SRG names. For example, net.minecraft.client.renderer.RenderType has func_230167_a_, func_230168_b_, func_230041_s_ and func_230169_u_ but typing um RenderType to the bot says no results found. Does this mean I can configure build.gradle in a way so that mappings are downloaded from somewhere else? I currently have modified ForgeGradle and published it to local Maven and I am using mavenLocal() instead of maven { url = 'https://files.minecraftforge.net/maven' } in buildscript of build.gradle. How about providing the mappings with the setup that uses custom mappings? Will that cause some legal issues?
  3. I would like an option that allows local mappings instead of downloading them from Forge Maven. Some SRG names do not appear on MCPBot and some names are misleading. I understand that those issues are supposed to be discussed at GitHub but I do not think that they are actually reviewed and resolved. Thus, it would be nice if I could just modify mappings locally and use them. So far, I have tried to put my mappings into zip file located in ForgeGradle's download destination. But it seems like it gets overwritten every time.
  4. Bump
  5. Sometimes MCP mappings contains typos and misleading names, so I manually modified csv files and put them back in the current version zip file. But it keeps getting overwritten by Forge. Is it possible to use local mappings instead of downloading them from Forge Maven?
  6. I currently store my items like below. private static final DeferredRegister<Item> REGISTER = new DeferredRegister<>(ForgeRegistries.ITEMS, Mod.ID); public static final RegistryObject<Item> MY_ITEM = register("my_item", new Item(new Item.Properties())); private static RegistryObject<Item> register(String key, Item item) { return REGISTER.register(key, () -> item); } Can I use @ObjectHolder(Mod.ID) and make method register to return Item to store items as Item instead of RegistryObject<Item>? Or is use of @ObjectHolder not encouraged?
  7. Thanks, @Draco18s and @diesieben07.
  8. When I override vanilla item, is registering it as vanilla resource location enough or do I also have to use reflection to set value in net.minecraft.item.Items?
  9. TestStructures is not used anywhere in your project. I see that you register your JigsawPiece under VillagerInit#init. It seems like you added PlainsVillagePools.init();. Did it fix your issue and were you able to add structures to vanilla villages?
  10. I am also trying to add structures to vanilla villages. If you succeeded, could you please share how you achieved it?
  11. So far, I have found out that I need to register my NBT files using JigsawPatternRegistry to generate structures. And I can use jigsaw block to spawn entity. I have registered my structures using coremod to call my PlainsVillagePools#init instead of vanilla one but I feel like there is a way to do it without using coremod. Also, how do I make my structures are generated only one per village with probability?
  12. I want to add a structure to vanilla villages where custom villager will be spawned in. I know I should ask questions after I have tried something but I absolutely have no ideas where and how to begin with. I would really appreciate some helps regarding things below. I want a custom villager who does not trade but open a GUI when right clicked. I believe I should use EntityInteract or override openMerchantContainer to open the GUI instead of trade. Then, how can I prevent the villager from getting profession and make it use one texture regardless of biomes? I want to add a custom structure to all biomes villages. I might create different structures for different biomes but for now, I just want one structure regardless of biomes. Do I just add nbt files under data/minecraft/structures/village or are there more steps I should take? Is it possible to set in which structure the villager is going to spawn? For example, if I do not want the structure to spawn all the time (which I also want to know how to set probability), I also do not want the villager to spawn without the structure. If setting probability is not possible, i just want the villager to spawn in the structure. It is okay to move around in the village, but I want the initial spawn to be the structure. Instead answering all questions, providing me with mod that achieves the same would also help.
  13. I also have considered that but I wanted to use exact values that were used before 1.9 and I do not know how should I change those values to fit in JSON.
  14. I am trying to recreate sword blocking and it requires me to modify renderItemInFirstPerson method which is private.
  15. I am trying to modify a method in FirstPersonRenderer. Since it is not declared as a field in many classes, I chose to use reflection rather than coremod. I have a method shown below in my class that extends FirstPersonRenderer. public static void patch() { FirstPersonRenderer instance = new FirstPersonRenderer(Minecraft.getInstance()); ObfuscationReflectionHelper.setPrivateValue(Minecraft.class, Minecraft.getInstance(), instance, "field_175620_Y"); ObfuscationReflectionHelper.setPrivateValue(GameRenderer.class, Minecraft.getInstance().gameRenderer, instance, "field_78516_c"); ObfuscationReflectionHelper.setPrivateValue(GameRenderer.class, ObfuscationReflectionHelper.getPrivateValue(LightTexture.class, Minecraft.getInstance().gameRenderer.getLightTexture(), "field_205116_g"), instance, "field_78516_c"); } Is it correct that I cannot call this method in main class when FMLClientSetupEvent is fired as it accesses client only classes? If so, how can I apply these patches correctly?
  16. Nevermind. The issue was not from mcmeta file. Texture size of item was the issue. Glint texture is 128 by 128 and vanilla item textures are 16 by 16. So if my item texture breaks that ratio, it starts to look weird. I wonder if I can programmatically adjust glint texture size according to item texture size.
  17. Actually, I attach the capability to the entity that is being damaged so only one player can affect the entity at the same time but one player can affect many entities at the same time. Player's unique id is stored in the capability and when LivingUpdateEvent is fired, I get Player object from World#getPlayerByUuid. How would this approach work when the entity is not tracked by any players and despawns? Is this approach wrong and should I flip it like you said and attach the capability to players?
  18. Potion effect sounds good as it has a method that gets called every tick but I want to damage the entity using DamageSource.cuasePlayerDamage, thus, I save player id in the capability. As far as I know, Effect is constructed only once so how can I store extra data? Do you mean I put start time in the capability and check every tick if difference between current game time and start time is multiple of 20 instead of decrementing duration? Or is there a different way to use it?
  19. They are named like these.
  20. I have an enchantment that deals certain damage to an entity every second over certain amount of time. I attach a capability that contains current state (active or not), player id, duration and damage to the entity. Then, I use LivingUpdateEvent to decrease duration every tick and damage the entity every 20 ticks passed. I have two questions related to this implementation. What happens when no one is tracking the entity? Will the entity still get damaged? Is this considered a bad practice in terms of performance? If so, what method would you recommend?
  21. I am trying to add different colored enchanted item glint by creating RenderTypes, adding them to fixedBuffers in RenderTypeBuffers and changing getBuffer method in ItemRenderer. I have succeeded in getting different colors from assets/[modId]/textures/misc but they are not blurred. I have put mcmeta files which are named after textures and contains { "texture": { "blur": true } } but result looks like below. Just replacing vanilla enchanted_item_glint.png looks like below so I think my issue is that mcmeta is not working properly. How can I solve this issue?
  22. I am creating a mod that adds jobs. I want to use an economy plugin on a server in order to make enchanting and repairing cost money. I will write down what I am thinking about how to integrate mod and plugin so please correct me if I am wrong. Client does not know about the plugin so a jar that goes under client's folder should not contain anything about the plugin. On the other hand, a jar that goes under server's folder can call methods from the plugin. So I need to create two jars which are basically same but one uses the plugin as a library. When a player does not have enough balance, right clicking on enchantment table or anvil should be cancelled. This is handled by server mod, as well as any other actions that require data from the plugin. If this is completely wrong, please tell me what is the correct way or provide me with an example.
×
×
  • Create New...

Important Information

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