-
Posts
1830 -
Joined
-
Last visited
-
Days Won
12
Everything posted by DavidM
-
Task 'setupDecompWorkspace' not found in root project 'Forgemod'.
DavidM replied to FireFlash101's topic in Modder Support
*tried to find a meme jared tweeted a while regarding the removal of setupDecompWorkspace but failed* The mdk directory contains a file called gradlew. Simply import that directory as a gradle project. -
If you really want to return something obtained from the value of a LazyOptional, you could use LazyOptional#orElse. Note that in 99% of the cases you could just use ifPresent and do what you want in there.
-
You have to attach the forge energy capability to your stack. Please refer the the documentation on capabilities: https://mcforge.readthedocs.io/en/1.14.x/datastorage/capabilities/#attaching-capabilities. If you are still having difficulties, please post your code.
-
Haven't looked at the code regarding this yet (currently on mobile), but I believe this is caused by the player's model is not being rendered in first person view (the game still thinks the player is in first person view). I would suggest to check out the rendering of the player in third person view (see references to GameSettings::thirdPersonView)
-
Mod file says it's for an older version of Forge
DavidM replied to MrIntarnet's topic in Support & Bug Reports
Where did you download the mod? Judging by the file name, it seems like you downloaded the mod from a sketchy rehost site rather than the official site, resulting in the obtaining of a mislabeled mod. -
[1.15.2] Access another mod's Block without having to import it
DavidM replied to squidlex's topic in Modder Support
Values are injected into fields marked with @ObjectHolder regardless if a mod is present. It is capable of obtaining any registry entry. Think of it as an “event handler” for registering a registry entry. If at any point in time (not literally; please only register stuff during the appropriate event) an object is registered, Forge looks through all object holder and injects the value into according ones. If an entry is never registered (i.e. the mod is not installed), then the “event” of registering that specific entry will not occur, and therefore will leave the field to null. -
Minecraft modding is programming in Java. If you cannot program in Java, you cannot make a mod independently (refer to certain mod maker’s license).
-
Minecraft.getMinecraft().player.inventory.getStackInSlot(i).stackSize
DavidM replied to uwucat's topic in Modder Support
1.12 is no longer supported on these forums due to its age. Please update to a modern version of Minecraft (1.14 and above) to receive support. -
1.7.10 is no longer supported on these forums due to its age. Please update to a newer version of Minecraft (1.14 and above) to receive support.
-
I don't see a problem.
-
how can I assign more cpu cores to the forge server?
DavidM replied to KingplaysYT's topic in Support & Bug Reports
Splitting CPU is not magical; it will not turn a potato computer into NASA's computer. Yes, it might increase the speed by 2-3 times, but that is no where close to making a personal computer able to host a server the size of a server like Hypixel (which is one of the biggest server in the world; its hardware cost is hundredths, or even thousandth, more than a personal computer). However since Hypixel itself (not sure about other server) is a custom game instance created by its staffs, it is possible that they rewrote the game so that it supports splitting workload across cores. -
how can I assign more cpu cores to the forge server?
DavidM replied to KingplaysYT's topic in Support & Bug Reports
They have better hardware for hosting server. -
Using the Forge method would indeed be preferred. My thought on the matter is: Vanilla methods that are marked deprecated means they should not be called by outside methods. Due to this, the method can be removed at any time by Mojang or Forge without undergoing the "oh look I'm deprecated, that means I will get removed in the next version; your IDE should be shouting at you to use the newly introduced approach instead!" Therefore the Forge provided method is often considered a better approach and often more future-proof.
-
How do i check if a block is rightclicked in an event class?
DavidM replied to martiblq's topic in Modder Support
In your case you might be looking for BlockState#getBlock, and compare that with an instance of Block (i.e. Blocks.DIRT). -
[1.15.2] Check if it is snowing in the chunk an entity is in
DavidM replied to izofar's topic in Modder Support
Have you tried Right Click on Project -> Refresh? Eclipse does not automatically refresh if there are changes done on the disk (that is not managed by Eclipse). Seems to be fixed. -
I think so. However I am not sure why it exists on the server side though (since in creative the client dictates the inventory).
-
Get unloaded entity or prevent entity from unloading
DavidM replied to Nani1234567890's topic in Modder Support
What are you trying to do from a user's perspective? This is becoming the xy problem. If an entity is unloaded then you should not get it from UUID. Remember: unloaded entities do not exist! You cannot interact with them. -
It is likely a user error rather than a Forge problem.
-
Get unloaded entity or prevent entity from unloading
DavidM replied to Nani1234567890's topic in Modder Support
There is no way without loading the chunks. What are you trying to achieve? -
Get unloaded entity or prevent entity from unloading
DavidM replied to Nani1234567890's topic in Modder Support
You cannot prevent a single entity from unloading. You can only prevent the chunk it is in from unloading, which will in turn prevent the entity from unloading. -
Getting entity currently being looked at, server-side [SOLVED]
DavidM replied to Turtledove's topic in Modder Support
Yes. Especially when there is lag, the entity under attack might already moved away from the player's look vac by the time the packet reaches the server. You should send the entity under attack from the client to the server, and implement some sort of check to prevent cheating. AFAIK AABB is precise enough for this.