
Everything posted by ChampionAsh5357
-
Render enchanting glint on placed blocks?
If you're referring to when the item is in your inventory, then you can simply use `ItemRenderer#getFoilBufferDirect` or `ItemRenderer#getFoilBuffer` if the block item is not a `HalfTransparentBlock` or `StainedGlassPaneBlock`. It's basically done by creating a `VertextMultiConsumer` of with one of the glint `RenderType`s. If you're talking for specifically a block rendering in the world, the proper but difficult way would be to recreate the `RenderType` with the glint shader for blocks and then use a `BlockEntityRenderer` to apply it. A simple alternative would be to just create the block with the enchanting glint baked in as a texture and use the mcmeta animation to cycle between the images.
-
Random mod loading failures
The best thing to do is to remove all the mods and start adding them in one by one and seeing at what point do the crashes begin to resurface. Most likely, there is one or two mods that are calling something incorrectly that could cause the issue. You may need to reload the game multiple times between adding the next mod because of how inconsistent CMEs are. If doing one by one takes too long, you can always split the mods in half and load each half to see whether or not a CME occurs and keep repeating until you've narrowed it down to one mod.
-
How to get my player's variable
If you're talking about the player on the logical client for rendering or input purposes, you can simply use Minecraft#player, with the instance of the game being `Minecraft#getInstance`. If you're talking about the player on the physical client for doing logic (logical server), then it really is context specific. However, if you are just doing testing, you can use the `PlayerTickEvent`, check the phase for either `START` or `END`, and then check to make sure its on the logical server (level#isRemote is false). Then you can use the methods provided by Luis or `Entity#position` to get the value as a three double vector.
-
How to get my player's variable
Which player? Why do you need the position of the player? When do you need the position of the player? What is the player doing when you get their position?
-
Could not resolve all files for configuration ':runtimeClasspathCopy'.
The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
-
java.lang.NullPointerException: Initializing game
The version you are using is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Currently supported versions are 1.19.2 (Latest) and 1.18.2 (LTS).
-
My forge 1.16.5 keep crashing after i press create new world
1.16.5 is no longer supported on this forum. Please update to latest (1.19.x) or LTS (1.18.x) to receive support.
-
Mods folder not being created while opening a 1.16.5 Forge server
1.16.5 is no longer supported on this forum. Please update to latest (1.19.x) or LTS (1.18.x) to receive support.
-
Help to connect my friend on my local modded server
Tell your friend to download the zip from CurseForge himself/herself. There are probably additional configurations/settings that are in that zip not in the mods folder you provided. You do not need the launcher.
-
Need direction regarding program structure.
Basically, any class that contains a `client` package will almost always be client-side only. Everything else is either executed in common code (which means both sides), or on server only (which most people never interact with). The separation is just to make sure you understand that those in the vanilla client package do not exist on a physical server, so if you ever want to directly call code for that, you need to make sure using one of the methods described in the doc that the code only gets called then. This includes playing sounds directly (not through SoundEvent), rendering objects, player interactions with keyboard and mouse, and the Minecraft instance. If you have trouble with a specific area, just ask another question in the modder support forum or on the discord. It's better to work through problems when you encounter them and you can't work out a solution on your own. Otherwise, you'll never actually program anything.
-
my world in minecraft won't load
You need to allocate more memory to your game. This can be done by opening up the Minecraft Launcher, clicking Installations, hovering over the forge profile and selecting the three ellipses and clicking edit, clicking More Options, and increasing the -Xmx option under JVM arguments (e.g. -Xmx4G). Note that you should make sure your computer can handle increasing the amount of RAM the JVM can use. You can also increase the initial pool of allocated memory using -Xms.
-
Crashing minecraft
1.12.2 is no longer supported. If you would like to receive support, please update to 1.19.x (Latest) or 1.18.x (LTS).
-
Cant download forge
If you are having trouble, you can use the direct download link instead.
-
[1.19.2] Duplicate Capability Key
That error comes as a result of adding the provider twice. According to your logs, it looks like you have the `AttachCapabilitiesEvent` registered multiple times, probably as a result of using `addListener` and the annotation.
-
[1.8.9] gradlew setupDecompWorkspace fails with ":decompileMc"
1.8.9 is no longer supported. To receive support please update to either the latest (1.19.x) or LTS (1.18.x) version.
-
Capability not syncing
`RegisterCapabilitiesEvent` is listened to on the mod event bus, not the forge event bus. Additionally, you're enqueuing work to enqueue work in your packet; this should only be done once. You are probably thinking of `DistExecutor#unsafeRunWhenOn` for the inner supplier. If using `LazyOptional#orElseThrow`, supply an actual exception to throw on failure, not `null`. You should prefer using `#ifPresent` or anything that doesn't force resolution.
-
Custom GUI png is way bigger in game
Please show the associated container screen code. Additionally, what is the size of the actual GUI? Is it 176x166 or does it take up the entire 256x256 image?
-
Reset all player stat when servers start
Statistics are loaded for a player when they first join the server. If you wanted to reset a stat, you should either do it when the player first joins after the restart via `PlayerLoggedInEvent` or read all JSONs in the player stats directory, reset the stat value, and write them back.
-
[1.16.5] Model not binding texture correctly
Please show the entire class and the ClockworksDoorModel. I'm imagining you are incorrectly binding information here. The block atlas will not hold your texture unless some block is also using it. Also, RenderMaterials do not contain the full path, just a relative ResourceLocation. I would instead follow the BoatRenderer model here since it will be much easier to use with the current data you are trying to draw.
-
Forge Data Generators not generating any data.
Did you remember to change all instances of examplemod to your mod id within build.gradle? There is an argument within the data run configuration that specifies the mods to generate data for. If your mod id is not specified there, then no data will be generated.
-
[1.17.1] BlockEntity with Renderer doesn't load/client-sync until interaction
This is relevant to you since the data is synced to the client only when you tell it to be. Otherwise, it will remain forever empty on the client.
-
1.12.2 'Item()' in 'net.minecraft.item.Item' cannot be applied to '(net.minecraft.item.Item)'
Apologies, but 1.12.2 is no longer supported. You can check the currently supported versions in the blue banner above. Please update to one of those if you would like to receive support.
-
[1.16.5] Spawning Entities in ServerWorld (Solved)
No, that is applied for every living entity so essentially you would be checking as many times as there are entities instead of once per tick.
-
[1.16.5] Spawning Entities in ServerWorld (Solved)
1. Not afaik. 2. The entity is was already added and deferred to load at the correct time already. Follow the event call and you'll see that entities are loaded at a very specific point when processing. Trying to add your own entity at any point in this process would mean you could be loading a chunk that's already loading. 3. No, that is much more difficult.
-
[1.16.5] Spawning Entities in ServerWorld (Solved)
Reading the javadoc on the event tells you: "Note: This event may be called before the underlying Chunk is promoted to ChunkStatus#FULL. You will cause chunk loading deadlocks if you don't delay your world interactions." As such, you should probably keep a queue of entities added along with the world and position you would like it to spawn at. Then, on the next tick in probably WorldTickEvent, check if the chunk is loaded at the position of spawning and if so spawn the entity. Otherwise, recycle into the queue until next tick.
IPS spam blocked by CleanTalk.