-
Posts
390 -
Joined
-
Last visited
-
Days Won
15
Posts posted by vemerion
-
-
6 hours ago, EveryBlu said:
I mean how do I get a reference of my listener in another class to call these methods? Vanilla code for example gets the RecipeManager via:
You should save a reference to it before you register it in AddReloadListenerEvent and then you can access that reference from wherever you need it. Here is an example of how Forge itself does it for the LootModifierManager.
-
4 hours ago, EveryBlu said:
No like how do I use my new PreperableReloadListener, I know how to set it up now and register it, I just need to know how to use it in other classes.
That completely depends on what your listener is for. For example, the vanilla RecipeManager has a method 'getRecipeFor()' which is used in various places, one of them being the furnace to see if an item can be smelted.
-
3 hours ago, EveryBlu said:
I know how to register it now, but how do I use it in other code?
You can look at the vanilla subclasses to get an idea of how to implement your PreparableReloadListener.
-
9 hours ago, perromercenary00 said:
thanks for your attention
Looks like you forgot to negate the 'warudo.isClientSide()' predicate
-
8 hours ago, Hxrl said:
#die always gave the generic death message
You have to call CombatTracker.recordDamage() before you call die().
- 1
-
17 hours ago, JimiIT92 said:
Is there a way to automatically convert the biome Id for old worlds? For example when loading the world or the chunk?
You can use the 'MissingMappingsEvent' event
-
9 hours ago, perromercenary00 said:
what i could use ?
You could use the BlockTags.MINEABLE_WITH_AXE tag.
-
47 minutes ago, Viler_of_cool said:
specific layer has a custom tint.
You can register an 'ItemColor' in the 'ColorHandlerEvent.Item' event.
-
54 minutes ago, perromercenary00 said:
this class "NetworkHooks" is resposible for open the screen
It was replaced with 'IForgeServerPlayer.openMenu()'
-
1 hour ago, perromercenary00 said:
in 1.20 cannot be done like this soo i was trying to make a list of solid blocks but is much work and also it don't have in account blocks from other mods
You can use the BlockBehaviour.canBeReplaced() method
-
3 hours ago, BaRiBoD said:
I came to something like this, but I don't know what to give to the renderSingleBlock method
You can look at the places where the method is called to get an idea of what arguments to supply.
-
18 hours ago, EveryBlu said:
I want to create a registry for a custom data file in a data-driven system I'm trying to make. I know how to use forge's built-in registries (for items, blocks, etc), but I have no idea how to setup my own, let alone one for a custom type of data pack file. Any help is appreciated.
To create your own data driven system you can extends PreparableReloadListener (or its subclass SimpleJsonResourceReloadListener) and then register it in AddReloadListenerEvent.
-
1 hour ago, Windokk said:
My question is : Is there a way to bypass the collision box size limit on blocks ?
A block should never be bigger than the standard 16x16x16 size. If you need something bigger than that you should split it into several different blocks (like how tall grass does it).
-
6 hours ago, EDGW_ said:
I created a texture with transparent parts for the block model, but the transparent parts of the texture were rendered black.
How can I render those parts transparent?
You need to add this field to the model json file of your block
"render_type": "minecraft:cutout"
or
"render_type": "minecraft:translucent"
depending on if if those parts are semi-transparent or fully transparent.
-
6 hours ago, MatNX said:
Provider is fairly straightforward, here you go. Thanks for the fast response and the tip!
Hmm, I don't see any problems with the code. You could try debugging and put breakpoints in saveNBTData() and loadNBTData() to see make sure that the methods are called and that the code in the methods works as expected.
-
20 minutes ago, MatNX said:
Either way, I'm not sure where to go, so any help would be greatly appreciated.
Can you post the code for your capability provider? Also, you can use NbtUtils.writeBlockPos()/readBlockPos() to more easily write/read BlockPos to/from NBT.
-
7 hours ago, perromercenary00 said:
i need to get the value of how much full it is
I think the method is 'Player.getAttackStrengthScale();'
-
7 hours ago, RaguRaccoon said:
I always thought the bounding box and hitbox of an entity were the same. From what I have looked up they are the same, but if anyone knows otherwise please do tell me. Anyway at this point I am just considering creating a new projectile and hoping it won't have the same issue.
The collision in this case is calculated using ProjectileUtil.getHitResult() which uses a slightly different bounding box than the bounding box of the projectile. But that bounding box should be bigger so should not be a problem. Your best bet might be to try and place some breakpoints and step throught the code to try and figure out why the collision does not work.
-
5 hours ago, NeckChickens said:
Hey, could you show me how you did it? Been bugging me for a while
You are unlikely to get a reply, since jadend has not been online in almost a year. But you can look at the vanilla Monster class to see how updateSwingTime() should be called.
-
8 hours ago, BlueFFlame said:
Ah yes, it worked. Thank you for the help!
No problem, glad I could help
-
7 hours ago, EDGW_ said:
How could I get my custom register loaded before the blocks are registered?
This is not possible. Modded registries are intentionally fired after vanilla ones.
-
2 hours ago, JohnyK said:
Essentially I'm asking for help in getting current client data.
You can access the player on the client with 'Minecraft.getInstance().player'
-
5 hours ago, BlueFFlame said:
Hi, I'm having an issue with my block entities (it's currently two) where the model isn't rendering correctly.
Looks like you are missing the blockstate json file for the fabricatormk1.
-
9 hours ago, SenkuG said:
I can look at, because I am lost. This simple thing made me consider quitting the whole project
Can you post what you tried? Then I can perhaps point you in the right direction
Appending my custom loot table to a vanilla one
in Modder Support
Posted
Best to use Global Loot Modifiers