-
Posts
687 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Beethoven92
-
Personally i find useful to look back also at pre 1.13 mods...because while many things changed (but not all) i can still get an idea of what should be done in order to get a certain result...then it would be up to your personal research to find, for example, what methods or classes are not existent anymore, what took their place and so on. For sure it would be easier to look at mods that were made for the most recent versions though, also due to the support you can get...it really depends on your familiarity with code and your will to search and find solutions by yourself
-
[1.16.3] Giving an entity an inventory
Beethoven92 replied to Educationalmoose's topic in ForgeGradle
Take a look at GreyGhost tutorials, he shows different ways of implementing containers (among other useful tutorials), and you may find that instructive; https://github.com/TheGreyGhost/MinecraftByExample/tree/1-15-2-working/src/main/java/minecraftbyexample By the way which problem you came across? Show what you have written so far please -
Coherently to what i suggested in your other post, where you were asking what is the best way to learn modding, i would like you to think about how many mods out there already implements a player mana system. I bet there are more than 3 or 4 and i think some are also pretty well known mods. I think it could be a good idea to take a look at their code (in case they are open source) and get and idea about how something like a mana system can be implemented. Then try to code something by yourself which, as Champion Ash said, you can then show here to get help when you can not proceed anymore only by your own
-
[SOLVED] [1.16.2] Unknown Problems With Creating Basic Entity
Beethoven92 replied to BlueMond's topic in Modder Support
What vemerion said will work because deferred registers need to be registered on the Mod bus...while with this code: IEventBus eventBus = MinecraftForge.EVENT_BUS; EntityInit.ENTITY_TYPES.register(eventBus); you are registering your deferred register to the Forge event bus, which is where in-game events are posted. Registry events (for items, blocks, entities etc....) happen during the loading of the game and are posted on the mod bus (which is different from the forge bus), which can be retrieved with: FMLJavaModLoadingContext.get().getModEventBus() -
Provided you already know Java language (which is a must if you want to create mods)...there are many tutorials online, some are good and some not very much..it depends also on how you prefer to learn things. You could find modding videos to be more appealing to you than to read giant walls of code..but i should warn you that youtube tutorials won't get you very far into minecraft modding, and also do not teach "good code practices" very well. I suggest you just watch the first tutorials (items, blocks..) to get a very general idea about the modding workflow, and then to move to better tutorials. There are many example mods around, just waiting to be read..you can for example take a look at Cadiboo tutorials or GreyGhost's, both are very good. When you get a better understanding of what you are doing you can start looking directly into other people mod's code, since lot of them are open source. There you can see how they handled various situations (which you may find yourself into someday). Finally you can look into vanilla minecraft code. For example you may want to create a mod that implements a certain thing..and if you don't know how to achieve what you want, the first thing you should think is: "has vanilla minecraft already something that is even remotely similar to what i want to do?". If the answer is Yes then just look how they did it and try to understand it...then you can probably use the newly acquired knowledge to solve your own problem. If vanilla minecraft code cannot help you then you can try to search for mods that add something similar to what you want to do (read their code, understand it, repeat the process 😉). As a last resort you can always ask for support on this forum...That's basically how you learn this kind of things...once you get the basics, try to do something by yourself, read code that was already written by others and try to get to the solution only with your mind before asking others for a solution. Hope what i said will give you a little bit of a direction to follow and i will end this post saying what i said in the beginning, because its a crucial point that a lot of people trying to make mods are ignoring: Java knowledge is your best friend here
-
Well, you could take a look at the code for vanilla items that have limited durability and see how they handle usage and removal of the item, there are many examples...filnt and steel, shears, tools etc...
-
Try overriding canBreatheUnderwater() and make it return true;
-
What method would you want to use? I pointed you toward that class for code reference, not to actually use one of its methods...just wanted you to take a look at how the vanilla horizontal Hotbar is renderer and figure out how to create a vertical one. Anyway if you really need to use a private method, you can use access transformers and change the method visibility to public
-
[1.15.2] Edit Minecraft Source Code or, more simply, hooks
Beethoven92 replied to WildTan's topic in Modder Support
Food.Builder().hunger(hunger_bars_restored_number) This is a thing ^^^, and also all the other operations you mentioned are already possibile. What are you exactly trying to do? -
Because you did not tell the game to render your custom image, you told the game to take the image where all the vanilla HUD icons are (GUI_ICONS_LOCATION), here: minecraft.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION); You have to bind your own texture for it to appear on the screen
-
Well, i already told you but i try to explain better. The image you were trying to render on the screen has dimension 256x256, but with this line: minecraft.ingameGUI.blit(posX, posY, 0, 0, 32, 32); you cut only a 32x32 portion from the original image, starting from the upper left corner (x: 0, y: 0), and as a result you only render on the screen that little portion of the image.
-
Well, actually there is nothing wrong with your code, in the sense that it does exactly what you told it to do...and so it just draws a 32x32 portion of the icons texture at screen position 16-16. But it seems you actually need to render only text right? So you need to use the FontRenderer, and possibly it's drawString method
-
I think what you are searching for is inside the IngameGui class
-
It is indeed possible, and in fact someone already did something very similar. You can take a look at "The Lost Cities" mod, which is now being ported also to 1.15. This mod creates a world type which is basically an infinite city
-
[1.15.2] Edit Minecraft Source Code or, more simply, hooks
Beethoven92 replied to WildTan's topic in Modder Support
You should not want to modify minecraft source code...i think access transformers is what you are referring to. Those lets you change the accessibility of class members. Is that what you are searching for? -
Shouldn't it be CountRangeConfig? But i see from your previous post that you are using 1.16.3...world generation stuff changed a lot after 1.16.1 and forge is still fleshing out a new system to handle it. If you need world generation related stuff in your mod i suggest you stick to 1.16.1 at the moment
- 1 reply
-
- 1
-
Did you even try to use the find and replace function?? Of course you won't find it if you don't...look in the menu at the top and inside "Bearbeiten". There you can see "find and replace", or something very similar. Use that and input setRequiresTool...then you have to wait a bit because the list is pretty long. When it finds the function, it will highlight it
-
[1.15.2] Transparent block makes adjacent blocks invisible
Beethoven92 replied to Megaton_216_'s topic in Modder Support
As far as i know these are no longer a thing in 1.15.2...you now have to setup the correct VoxelShape of your block in case it is a non full cube...otherwise by default the game will treat it as if it was a full cube -
Minecarft closed while creating a new world
Beethoven92 replied to Chris78957's topic in Support & Bug Reports
Are you trying to use a minecraft asset? Then it could be minecraft:gold_block, minecraft:gold_ingot or minecraft:gold_ore...it would be easier if i knew what you are trying to do. Please show your code and jsons files..possibly post a link to your github repository if you have one -
Minecarft closed while creating a new world
Beethoven92 replied to Chris78957's topic in Support & Bug Reports
This one ^^^ -
Minecarft closed while creating a new world
Beethoven92 replied to Chris78957's topic in Support & Bug Reports
[18Sep2020 19:56:17.988] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Failed to reload data packs java.util.concurrent.ExecutionException: net.minecraft.util.ResourceLocationException: Non [a-z0-9/._-] character in path of location: minecraft:minecraft,gold One of your assets contains invalid characters in its name