-
Posts
1773 -
Joined
-
Last visited
-
Days Won
61
Everything posted by V0idWa1k3r
-
Your errorlog doesn't match your code at all. As for the code you've provided: Don't extend Gui on your event handler class, that makes no sense. The resourcelocation currently points to assets/minecraft/vezythieme/vezy.png. if (e.getType() != null) { if (e.getType() == ElementType.TEXT) The first check is redundant. If the type is TEXT it can't be null. RenderGameOverlayEvent is a parent class for Pre and Post events. Pick the one you need. However that doesn't matter since your error log indicates that the code you are using is completely different. Make sure the file is actually there. Check that it isn't test.png.png or something like that, check that eclipse isn't being a derp and is actually including your resources, etc. A screenshot of the file in your folder structure would also help.
-
[1.12.2] How do I make bedrock add stat to the player stat. [Solved]
V0idWa1k3r replied to Issac29's topic in Modder Support
This is not entirely true. https://stackoverflow.com/questions/3301635/change-private-static-final-field-using-java-reflection In fact I am pretty sure I saw similar code in forge at some point. Doing this is not a good idea though. "In some cases they are better than reflection. That is in ALL of access cases." There is nothing wrong with using reflection and you should prefer reflection to ATs in most cases IMO. Use ATs if your reflective operation is too expensive(eg. called multiple times a frame). -
As I've said Your file isn't horse_armor_wood. It's horse_armor_wood.png(I presume anyway since you have file extensions hidden it may be any other image extension - and it has an image extension because it has an image thumbnail).
-
What is "ctx associated with this type of textures"? Show what you've tried.
-
Your system will not work. Registry entries MUST be instantinated in the appropriate registry event, now more than ever. Don't ever use static inializers for registry entries. Rework this right now, before it gets too big. You will also make your code much more readable and will write way less code. The code in your repository doesn't match the code you've posted. So yeah, fix the static initializer issue first, then I can debug your repository.
-
1.14.2 missing block under custom model
V0idWa1k3r replied to PhantasticDark's topic in Modder Support
Thanks. Override Block#isFullCube and return false. For propagating light either override Block#isOpaqueCube or Block#propagatesSkylightDown and return false. -
1.14.2 missing block under custom model
V0idWa1k3r replied to PhantasticDark's topic in Modder Support
The title of your post suggests you are using 1.14.2. Please clarify what version are you actually using. And whether you are using forge at all. This has nothing to do with the model file of either of the blocks. OP just needs to override Block#isFullCube and Block#isOpaqueCube to return false. -
1.14.2 missing block under custom model
V0idWa1k3r replied to PhantasticDark's topic in Modder Support
Where'd you get 1.14 forge from? -
How do I get a NullPointerException here?
V0idWa1k3r replied to superminerJG's topic in Modder Support
https://github.com/JGgithub2018/Simple-Batteries/blob/master/src/main/java/jgcodes/sb/SimpleBatteries.java#L24 A common proxy makes no sense. Proxies exist to separate sided-only code. If your code is common then it goes anywhere else but the proxy. https://github.com/JGgithub2018/Simple-Batteries/blob/master/src/main/java/jgcodes/sb/content/ModBlocks.java#L15 Don't ever use static initializers for registry entries. They must be instantinated in the appropriate registry event. This is not how ObjectHolders are used. ObjectHolders inject values into fields. https://github.com/JGgithub2018/Simple-Batteries/blob/master/src/main/java/jgcodes/sb/proxy/CommonProxy.java#L21 Your proxy can't be an event handler since it will load the class and crash the game. https://github.com/JGgithub2018/Simple-Batteries/blob/master/src/main/java/jgcodes/sb/content/blocks/BlockBase.java Don't do XBase. There is already a BlockBase, it's called Block. Do not abuse inheritance. Your issue is caused by you not setting the registry name for your blocks/items. You need to set the registry name before registering them. -
[1.12.2] Best way to handle capability data syncing?
V0idWa1k3r replied to Alekseyev's topic in Modder Support
Just send the value as you change it. I doubt sending 4 bytes per tick is much overhead. -
LivingAttackEvent allows you to cancel the damage alltogether, with the effects. If you want to only cancel the effects then it's more tricky. You would need to use a tick handler and basically do the reverse of what the EntityLivingBase#attackEntityFrom does to the entity that took damage that you caught in this event.
-
[SOLVED] Setting translucent/opaque cube in 1.12
V0idWa1k3r replied to viveleroi's topic in Modder Support
Don't hijack old threads. Make your own, especially since your issue is unrelated to the one OP once had. You put these in your block class of course. -
[1.12.2] Looking for particular methods/ possibly events to cancel
V0idWa1k3r replied to PapaVinny's topic in Modder Support
There are a bunch of swingX fields in the EntityLivingBase class. You would need to look at what the game does with those fields to play the animation and do the reverse. -
A supplier would just give you a thing every time you asked it for one. In most cases it would be a new instance of said thing. A LazyWhatever would work in this way when asked for a thing - it would check if it has initialized it, if not it would do so, and then return the thing stored in it, thus only initializing/evaluating it once. Lazy is usually used for expensive operations that should only be done once.
-
If it's a soft dependency then nothing changed apart from Loader.isModLoaded => ModList.get().isLoaded() A hard dependency would be defined in your mods.toml file. There are already 2 examples of that in a default mods.toml provided by the example mod.
-
With the current parameters you are passing to the method the game would look for your textures in assets/modid/horse_armor_wood. Pass an actual texture path to your second parameter.
-
[1.12.2] Itemstack information is not updated [SOLVED]
V0idWa1k3r replied to GloriousAlpaca's topic in Modder Support
Capability data isn't synced by default. You need to use the NBT share tag to sync it. -
[Solved] [1.13.2] How to modify vanilla blocks drops?
V0idWa1k3r replied to Tameet's topic in Modder Support
Subscribe to a HarvestDropsEvent, then add/remove the drops from the drops list provided to you by HarvestDropsEvent#getDrops. -
[1.12.2] Looking for particular methods/ possibly events to cancel
V0idWa1k3r replied to PapaVinny's topic in Modder Support
LivingHurtEvent, LivingDamageEvent, etc. Check for the distance and the source yourselves. I am not sure there is such an event. You could still use one of the damage events to cancel the damage and just reset the cooldown/animation. -
Don't hijack old threads, make your own. This wouldn't be in the main mod class, it would be in the event handler.
-
[1.12.2] Potential Memory leak detected
V0idWa1k3r replied to GloriousAlpaca's topic in Modder Support
While it is true that the default jvm won't load classes unless it is required it isn't the only JVM in existance. -
[1.12.2] Potential Memory leak detected
V0idWa1k3r replied to GloriousAlpaca's topic in Modder Support
https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/network/VoidcomReturnMessage.java#L63 Well, you are returning the same packet as a response packet to send back, which will return itself as a response packet to send back ....... rince, repeat and you have a memory leak. Return null if you don't want to send a response packet. https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/network/VoidcomReturnMessage.java#L62 You can't do this. Minecraft is a client only class and as such this code will crash the server. https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/network/VoidcomReturnMessage.java#L66 But WHY if you are the owner of these classes? Why would you use reflection on your own classes when you can just create a setter?