Everything posted by DavidM
-
Task 'setupDecompWorkspace' not found in root project 'Forgemod'.
*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.
-
LazyOptional crushes casting to IEnergyStorage
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.
-
[KIND OF SOLVED][1.15.2] Using Minecraft#setRenderViewEntity without player disappearing
You can subscribe to RenderWorldLastEvent and render the player model in the subscriber.
-
Item with Energy 1.14.4
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.
-
[KIND OF SOLVED][1.15.2] Using Minecraft#setRenderViewEntity without player disappearing
It might be better to manually render a player there instead of creating a new entity, as the effect is intended for visual only.
-
[KIND OF SOLVED][1.15.2] Using Minecraft#setRenderViewEntity without player disappearing
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
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
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.
-
Ink Pet Mod! [BETA VERSION]
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
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.
-
mods for 1.7.10
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.
-
Can't Download Forge
I don't see a problem.
-
how can I assign more cpu cores to the forge server?
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?
They have better hardware for hosting server.
-
[1.15.2] How to get Registry ids?
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.
-
[1.15.2] How to only enable an item to be crafted under certain conditions
This one is outdated, but the explanation of the concept is still the same:
-
How do i check if a block is rightclicked in an event class?
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
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.
-
Modifier public not allowed here
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
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.
-
Internal Sever error
It is likely a user error rather than a Forge problem.
-
Get unloaded entity or prevent entity from unloading
There is no way without loading the chunks. What are you trying to achieve?
- Infinity Ingot like glow
-
Get unloaded entity or prevent entity from unloading
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]
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.
IPS spam blocked by CleanTalk.