-
Posts
687 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Beethoven92
-
I guess i have to thanks again because i was not aware even of that..
-
Oh well, i was not aware of that...i mean, those files are literally on a public github page that anyone can consult...its not like i ripped those myself and then distributed them..i just linked an existing resource on the web. But i understand what the problem could be, so i apologize if i broke the rules. I will remember next time. Thank you for letting me know that.
-
(1.16.1) How to add another texture layer to chestplate
Beethoven92 replied to iSyriux's topic in Modder Support
This was your original custom_model class, it exists and you do not need to create another one, so delete the last things you added. The custom_model class, from what i can see by your picture is located in com.isyriux.divinerod.armour package, right? Which is the same package as the PowerReenforcedArmourItem class...so in theory you do not even need to import the package. -
Deleted link to minecraft assets
-
(1.16.1) How to add another texture layer to chestplate
Beethoven92 replied to iSyriux's topic in Modder Support
The code above is now correct, even if it is terribly inefficient for the reasons i explained above. You already created a class named custom_model...you probably did not import it in the PowerReinforcedArmourItem file. When you hover with the mouse on the line that gives you the error it should also ask you if you want to import the package containing your custom_model class. -
What you need help with? reporting the issue to the author of the mod?
-
mmm i don't have knowledge on the matter, but i took a look inside the vanilla cs_cz.json and i see they are using a lot of formatting codes which look like that: \u00e1..i believe those are doing the job to get the special characters you need. Take a look into the vanilla file
-
(1.16.1) How to add another texture layer to chestplate
Beethoven92 replied to iSyriux's topic in Modder Support
Again, you did not create an object of your custom_model class, with the last thing you added you now created a function which name is custom_model, which returns null. Then you are returning this function from getArmorModel, so that in the end getArmorModel returns null...this way your armor will never show up, so delete the last line of code you added and listen. To instantiate (create in other terms) a custom_model object you need to use new custom_model(a_float_value) , where a_float_value, as i said above, is a float number. Forget about caching at the moment... -
(1.16.1) How to add another texture layer to chestplate
Beethoven92 replied to iSyriux's topic in Modder Support
1) with: public custom_model(float modelSize) { return null; } you are not creating a variable, its just the constructor for the custom_model class, which you already have in the model class. Its out of place in your PowerReinforcedArmourItem class, and wrong. Delete it. 2) (float modelSize) is the parameter requested by the constructor of your custom_model class, so when you are actually creating an object from the class, you need to pass in a value, not a parameter declaration...in this case you need to pass in a float, which is a number...for clarification: custom_model(float modelSize) // This is a parameter declaration, you are specifying what kind of value your constructor will accept custom_model(1.0f) // this is how a call to the constructor above will look like when creating a custom_model object, where 1.0f is the float value that will be passed to the contructor parameter "modelSize" -
(1.16.1) How to add another texture layer to chestplate
Beethoven92 replied to iSyriux's topic in Modder Support
Nope, the constructor of your model is this: public custom_model(float modelSize) It requires a float value. Item#Properties is used by items and has nothing to do with the 3d model of your armor. Also what ChampionAsh5357 meant by caching is: right now, you are creating a new instance of your armor model in a function that gets called very often, which is very inefficient. You can just create an instance of your model once and for all in your client class (which is the place that rendering related objects belongs to)..and then returning that instance from getArmorModel. You can think it like that..Its like printing newspapers..normally you have a template newspaper and you can make thousands of prints with only that one template. Instead what you are doing is basically like making a new copy of the newspaper from scratch for every single print you have to do, Sorry if this example was stupid ๐, but i think it can help you understand better what is going on here -
Determining the distance to the nearest town
Beethoven92 replied to Luminaire's topic in Modder Support
You could do the same thing that the /locate command does for you ingame. I took a look at the command implementation and i see that it calls the function ServerWorld#func_241117_a_, which is what actually returns a BlockPos representing the position of the nearest structure of the specified type. I believe this function is gonna be remapped to getStructureLocation..i don't know your mappings version but you can try both and see which one you have. After you get the position of the structure, finding how far is from the mob you spawned is trivial -
Allright but the problem we already pointed out to you still persist and its caused by this line: damageReductionAmountArray[slotIn.getSlotIndex()] when it gets called with the head piece slotIndex value. Again if you look into the EquipmentSlotType enum, you will see that there are two sets of indexes for the various slots. There is a slotIndex (the one you are requesting^^^^) which as you can see goes from 0 to 5 (because it includes also both hand slots) and is a general index for all the possible slots you can have (6 in total)..and then there is a index which can be seen as a "local" index (hands slots are a thing and armor slots are another), which you can see has values 0 and 1 for the two hands, and 0, 1, 2 and 3 for the four armor slots. Hope this gives you a better idea on which is the value you need to put inside the brackets: damageReductionAmountArray[put the right index here]
-
You can use blockbench or tabula...both are good and there are quite a few tutorials around
-
Read what Danebi said...i suggest you look into the EquipmentSlotType class, so you can see which values are returned by getSlotIndex(). And remember array indexes start from 0, not from 1..so your damageReductionAmountArray which contains four values can only be indexed with 0, 1, 2 or 3...if you put a higher number inside the [ ] brackets you will get an error.
-
If the mod was required on both sides in the first place, its very likely there was a good reason for that, and it is not possible to have it only on the server side. If otherwise the mod has no reasons to be required on the client, but it still is, then you should complain with the author of the mod
-
There are actually many examples around the web on creating food items, its pretty strange you didn't find any. There are a good number of youtube tutorials around, which also show how to make foods...however i wouldn't really suggest to rely on them for anything more than creating a food item. There are better and more reliable sources to learn minecraft modding, and the best, probably, is looking directly into vanilla code, as poopoodice suggested you
-
Same exact issue: https://forums.minecraftforge.net/topic/90986-fucntion-mappings/
-
It was enough to look at the vanilla "Items" class, there you can find all the vanilla items and see how they are initialized.
-
Your door probably needs to be added to the doors tag
- 1 reply
-
- 1
-
I suppose from what you say that you want the message to be sent to the player only when it eats your custom food right? Then you can override onItemUseFinish in your food class, get the PlayerEntity who has eaten the food and use player.sendMessage, where "player" is whatever you name your PlayerEntity variable
-
Oh sorry, i get what you want to do now ๐ ...so you can subscribe to the AttackEntityEvent..check if the target entity is a sheep and then use World#createExplosion to create an explosion with configurable values (position, radius etc...)
-
What do you mean you want the sheep to explode? You mean...visually? Flying limbs, pieces everywhere etc? ๐
-
Nothing wrong in being a beginner, everyone is at some point, but under the Modder Support section of this forum you can read this: Getting used to java before trying to mod minecraft will avoid you so so so many head aches, believe me
-
Its not really helpful to copy paste code from youtube tutorials, as you won't understand what the code does... in your ModClientEvents class there is an event listener set up to prevent the crafting table GUI from showing up, this one: @SubscribeEvent (priority = EventPriority.HIGHEST) public static void onCraftingTableOpen(GuiOpenEvent event) { if (event.isCancelable()) { if (event.getGui() instanceof CraftingScreen) { event.setCanceled(true); Tutorial.LOGGER.info("Player tried to open a crafting table!"); } } }