
Everything posted by Cadiboo
-
Mod for multiplayer on client-side only?
public static final IProxy PROXY = DistExecutor.executeForDist(()->()->new ClientProxy(), ()->()->new ServerProxy());
-
Mod for multiplayer on client-side only?
@Mod(clientSideOnly=true)
-
Serverside chat function
You should read https://mcforge.readthedocs.io/en/latest/concepts/sides/. After that you should be able to understand your problem better. Have you checked if there is a Forge event for what you’re trying to do? This will mean you don’t need a proxy, to can just specify the side in the event subscriber annotation.
-
Getting Potion Texture from ItemStack
I can see that, what I was saying is that if you break something, just go back up a method until it works again
-
Getting Potion Texture from ItemStack
The way I would do this is get it to work calling vanilla methods, then copy the stuff from inside the methods and remove the stuff you don’t want until you’re happy.
-
Generate new Crops Inside a world
You could make this higher
-
[1.12.2] Horizon colour going crazy in certain areas.
- no code - no logs - no examples of the issue We really don’t have much to work with
-
[1.12.2] Repairing tool duplicates tool
I think that this is why you should use an IRecipe implementation instead of overriding getContainerItem.
-
Getting Potion Texture from ItemStack
1 push and 2 pops?
-
About I18n
That method formats/translates a translation key. Example: item.dirt.name -> Dirt.
-
[1.13.2] Client on screen text rendering
Rendering text hasn’t changed from 1.12.2 to 1.13.2, any code from 1.12.2 should work fine. You should also look at the vanilla classes to see how they do it
-
[1.12.2] How to use deobf file to make addon
(Assuming 1.12.2) Drop it in /libs/, make sure that your build.gradle has useDepATs=true, rerun setupDecompWorkspace, refresh the gradle project
-
About I18n
What do you mean ? I18n is an API for internationalising messages.
- About I18n
-
Create blockstate from string
The way I do it is to simply use the toString method on blockstates to turn them into strings, and then use the command block parser to parse them. I use it so that users can copy blockstates from their debug overlay and add them manually. It works pretty well, but if you can use a better system, do. https://github.com/Cadiboo/NoCubes/blob/2d116b923e584ecfaa05823ffbccc2e9aedf537e/src/main/java/io/github/cadiboo/nocubes/config/ModConfig.java#L220
-
About I18n
Translation should only be done on the client. If you translate on a server it will 1) only translate to English and 2) send the English text to the client. You can translate a string with TextComponentTranslation or I18n.format
-
[1.12.2]Let players navigate and walk to a location automatic
You could copy whatever the navigator from EntityLiving does and apply it to the EntityLivingBase probably
-
[1.13.2] New to this, Help required
I’ve worked on https://cubicoder.github.io/tutorials/1-12-2/tutorials/ myself, they’re pretty good but only cover setting up the basics.
-
how to give an item as soon a he joins when the player is offline
You could save a the player’s dragon died in a file (as a list of players and dragons) and then periodically check that file and act on it if the player is online
-
[1.12.2] Making player move/float towards certain destination
You can use linear interpolation to smoothly move between two points. You will need the original start position, the final destination position and the amount between them the player should be.
-
[1.13.2] Cannot import Gradle project
I solved this by restarting my computer. I’m guessing this could be caused by one of the old 1.12.2 gradle processes lying around somewhere.
-
[1.12.2] [Solved] Trying to understand (Fast)TESR
The darkness is caused by your block being a full block. Either make your block able to have light pass through/into it OR average the light from the surrounding blocks OR get the light from the proper place for each vertex. Rendered textures have an issue with 1 pixel around their edge being transparent. You can get around this the way vanilla does for block rendering (subtracting a tiny bit from the part of the texture it renders). You can see me doing this where I fix a number of issues with Vanilla’s fluid rendering at https://github.com/Cadiboo/NoCubes/blob/2d116b923e584ecfaa05823ffbccc2e9aedf537e/src/main/java/io/github/cadiboo/nocubes/client/render/SmoothLightingBlockFluidRenderer.java#L272. I add smooth lighting and fix the transparent lines between fluids.
-
Getting Potion Texture from ItemStack
This is an example of how not to ask for help with an error. You haven’t provided any context at all. We need - your updated code - the actual error I would guess that you’re forgetting to push or pop a matrix somewhere
-
How to link Recipe.json to Item?
Post your json files
-
{1.12.2} Issues with moving item entities (EntityItem)
This indicates a big error in your mod. Make sure to do all stuff with entities on the server. Try stepping through your code with the debugger
IPS spam blocked by CleanTalk.