Jump to content

Sleepwalkerx

Members
  • Posts

    21
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Russian

Recent Profile Visitors

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

Sleepwalkerx's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello. I want to make a custom render of an item in the inventory. I need its texture to crawl out of the inventory slots. To make it clearer, I have provided a screenshot. I do not quite understand how to do this, please tell me. If you're wondering why I'm doing this. I do this to create some kind of animation effect on the subject and without going beyond the inventory I cannot do the way I want. In principle, if I understand how it all works, it will get better.
  2. Thank you very much for your answer, but while I was waiting for the answer I figured it out myself. Thanks to the developer Botania, I took an example from there. However, I have another question about the GUI, I have already posted it on the forum. Thank you very much for your help!
  3. List scroll button not working in my Scene. As an example, I took "ModListSceen" and did everything the same as there, but when I click on the scroll bar, nothing works. Please, help. Here is my code: public class EntityListWidget extends ExtendedList<EntityListWidget.Entry>{ private final ResourceLocation img = new ResourceLocation(ArchitectsDream.MODID, "textures/item/dark_dust.png"); //private final int listWidth; public EntityListWidget(Minecraft mcIn, int width, int height, int top, int bottom) { super(mcIn, width, height, top, bottom, mcIn.fontRenderer.FONT_HEIGHT * 2 + 8); //this.listWidth = listWidth; } public void addEntryTo(String str){ addEntry(new Entry(str)); } public class Entry extends ExtendedList.AbstractListEntry<Entry> { private final String text; public Entry(String text){ this.text = text; } @Override public void render( int entryIdx, int top, int left, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks ){ minecraft.fontRenderer.drawString(text, left + 2f, top + 2f, 0xFFFFFF); //AbstractGui.blit(getLeft() + 10, top + 20, 0, 0, 16, 16, 64, 16); } } } I also initialize and render my list. It's worth noting that scrolling the mouse wheel works.
  4. Hello. In my mod, I need my item to open the gui when the left mouse button is pressed and change the properties of the same item. I figured out how to open my gui with -> NetworkHooks :: openGui. However, I have 2 questions. 1) How to transfer the subject on which I opened? 2) How the client and server parts work. That is, I do not understand how to change the nbt tag of an item from Sceen(such as pressing a button), which works on the client, and so that this is on the server? Also, I essentially need to register my Container with Forge, but this registration is done through the IFactory method, which forces it to adhere to one pattern. In general, please help me to understand this all in advance thanks. I also wanted to ask for a bonus, is it possible to open Gui by their registration id? MC version ->1.15.2
  5. Thank you more for your help, I don't even know how to thank you However, in "gratitude" I would like to ask one more question. The fact is that my Manager supports 3 types of files and for each I have my own deserializer. And this order of events does not quite fit in with the Forge ReloadListener, where the T type is essentially the file extension that is obtained after preparation. (like for example the same RecipeManager passes keys and JsonObject). In this case, is it better to inherit from IFutureReloadListener or can you do something differently? (To put it simply, I wanted to say that the apply and prepare methods and the type T are not entirely appropriate and unnecessary). I hope you understand what I mean
  6. public ArchitectsDream() { final IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus(); eventBus.addListener(this::commonRegistry); eventBus.addListener(this::clientRegistry); eventBus.addListener(this::server); } "clientRegistry" and "commonRegistry" work
  7. No, nothing starts. As I described the problem, I need a recipe file reloader. A very similar class -> RecipeManager. You gave a class that is not present in 1.15.2. How to be in this version?
  8. Oh sorry i forgot to provide the version. my version is 1.15.2. as far as I know, what you anticipated for 1.16.x
  9. my mod has a "StructureManager" that overrides the ReloadListener <?> method. How do I register this listener correctly? I created a Listener based on RecipeManager and saw that it registers to MinecraftServer. However, nothing works for me. Here is an example of my registration code: private void server(final FMLServerAboutToStartEvent event){ LOGGER.info("SERVER ^>>>"); event.getServer().getResourceManager().addReloadListener(structureManager); } Thank you in advance for your cooperation.
  10. my mod contains its resource files. For example, as FORGE has "recipes", which is taken from all mods, I also have a similar folder. How to get it from all loaded mods, if any?
  11. How to get the "data" folder from all mods that are registered with FORGE(and if it exists)? I know the ModList class, but I don't quite understand how to use it. It is desirable that "Path" be returned to me.
  12. By scripts, I mean the mods folder, from where all mods are loaded. I do not want to clog it up and my mod will create a separate folder in the game directory from where I will take the files. However, I need to somehow, in addition to the main catalog of the language file, load files from another folder. So I would like to know how to add my own language file? (Deserialization is familiar to me, the question is in the FORGE method). Yes, I was told that it is better not to do this, but I just do not see a better way.
×
×
  • Create New...

Important Information

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