-
Content Count
1116 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Calendar
Everything posted by DavidM
-
You are playing Minecraft 1.14 but you are trying to install WorldEdit for Minecraft 1.12. This is not going to work. Check your launcher installations and make sure you've launched Minecraft 1.12.
-
[1.14.4] RunClient: Driver does not appear to support OpenGL
DavidM replied to MutantWafflez's topic in Modder Support
Does your graphic card support the required OpenGL version? -
Remove it and wait for the author to update.
-
I am trying to detect when a player clicks on an ItemStack in his inventory with another ItemStack (held by the mouse). I recall that all the inventory and GUI interactions are client-side; however, I've seen servers achieve this (clicking on ItemStack with ItemStack) with server-side plugin/mod. How would I approach this?
-
This is not a chat room; please stop bumping every minute. The version of your Refined Storage is not compatible with the version of your Forge. Either downgrade Refined Storage or update Forge.
-
Try deleting your configs. Why do modders insist on creating their own way of config and parsing though...
-
Please stop bumping, especially when we are waiting for you to post your log.
-
[SOLVED] Block Texture not showing, also no error log
DavidM replied to JamieEdwards's topic in Modder Support
Please post your code, preferably as a GitHub repo. -
Simple Summon Lightning on Right Click with Sword 1.12.2
DavidM replied to sarxworks's topic in Modder Support
I thought OP needed RayTracing. If I recall correctly RayTracing is client only? -
Simple Summon Lightning on Right Click with Sword 1.12.2
DavidM replied to sarxworks's topic in Modder Support
Entity summoning are controlled on the server side, thus summoning lightning bolts on the client will not work. Send a packet to the server when the sword is right clicked with; write a handler for that packet that summons the lightning. -
[1.12.2] Wanting to know if dropped item is gone.
DavidM replied to Lea9ue's topic in Modder Support
ItemStack will never be null. ItemStack from an EntityItem will never be empty, as the ones that are are removed from the world. -
How do I convert a 3D point to screen coordinates?
DavidM replied to nogix's topic in Modder Support
I suppose you are trying to render the health bar at exactly where the mobs are at on the original Minecraft screen, in which case you would need to offset the local position by the camera's rotation. I don't know if there is a GLM in Java or not, but if there is not, you can use the following method. To transform a 3D pos to 2D includes the following states: 3D original (global) entity position 3D relative (to camera) entity position 3D relative (to camera) entity position after camera rotation 2D screen coords To elaborate the concept better, I will assume the center of the window is (0, 0). Left side is negative x, right side is positive x, etc. This is not the case of a JFrame though, and you will have to do some manual translation of the screen coords by adding half the screen width to x, and half the screen height to y. First, subtract every axis (x, y, z) of the entity's global position by the camera's global position (the position in the Minecraft world). This will give a relative position from the camera to the entity. Next, apply the camera's rotation to the relative position. Assuming the Z-axis is the one sticking out from the camera on the local coordinates (I am not sure if this is the case of Minecraft; change this to X if necessary), multiply z by cos(camera.yaw), and multiply x by sin(camera.yaw). This takes care of the yaw (horizontal) rotation of the camera. The same applies to the pitch (vertical) rotation of the camera; simply multiply z (again) by cos(camera.pitch) and multiply y by sin(camera.pitch). You are basically done now if you want orthogonal view. Throw away the z and use the x and y as screen coords. However, I assume that you want perspective view, so you need to make x = x / z * FOV and y = y / z * FOV, where FOV is the field of view value you need to experiment with (start with something near 2). Now just throw away the z (or the x, depending on which axis is the one sticking out the camera in Minecraft when the camera has no rotation) and use x, y as the screen coords. Remember to do the manual translation of the screen coords by adding half the screen width to x, and half the screen height to y. -
Forge 1.12.2 isn't downloading a Jar file
DavidM replied to Avocado_Sauce's topic in Support & Bug Reports
This is normal. There should not be a jar. -
It is not possible as far as I am aware of.
-
The in-between phrase is the game’s attempt to interpolate the entity’s movement to create a smooth movement seen by the player.
-
[1.12.2] Wanting to know if dropped item is gone.
DavidM replied to Lea9ue's topic in Modder Support
You could try using as this should be the easiest way I see. -
[1.14.2] Custom Shield, Custom Damage Reduction
DavidM replied to MatsCraft1's topic in Modder Support
An instance of LivingEntity. Note that in 1.14 there is a third parameter that takes in a Consumer<? extends LivingEntity>. If you need help on creating a consumer, you can read about lambdas and consumers in Java here. -
[1.12.2] Wanting to know if dropped item is gone.
DavidM replied to Lea9ue's topic in Modder Support
EntityJoinWorldEvent is fired when an Entity is added to the world, during which Entity#isDead cannot be true. AFAIK there is no way to do this with an event. Neither Entity#onUpdate nor ItemEntity#onUpdate fires an event every tick. The only way I see is to replace the vanilla ItemEntity with your own version and override Entity#attackEntityFrom and check whether the DamageSource is from lava. That would not work, as dropped items are created by directly instantiating an instance of the vanilla ItemEntity. -
You did not provide your log. We need the log to help you.
-
[1.12.1] Making a mod that notify player when inventory is full
DavidM replied to Gess1t's topic in Modder Support
This is because your invChk class has syntax errors. Looking at your code, I suppose you attempted to create a constructor and put the checking of the inventory in there; however, you created a method instead of a constructor, and you never called that method. To learn about constructors in Java, read https://www.w3schools.com/java/java_constructors.asp. -
Try updating CodeChicken Lib (or use the version its dependents specify).
-
NetherEx only requires LibraryEx. No other dependencies should be needed. It is probably a dependency from another mod. Please read the installation guide of your mods to learn about their dependencies.
-
[1.12.1] Making a mod that notify player when inventory is full
DavidM replied to Gess1t's topic in Modder Support
Not really. There is Java, and Forge (and Minecraft itself) is built upon it. Java is the same inside and outside Forge. You might have the processing power to do so, but it is very unnecessary. All you have to do is to mark that method static instead of initializing the object, which will accomplish the exact same thing, but both faster and less memory-consuming. Besides, most users probably don't want their game to use processing power to run pointless operations. Anyways, this is what you have to do: Create a event subscriber for ClientTickEvent (which you already have) Create a new function to iterate through the player's inventory (which you kind of have) or just do it inside the event subscriber Create a way of informing the user of the full inventory (which you already have) -
[1.12.1] Making a mod that notify player when inventory is full
DavidM replied to Gess1t's topic in Modder Support
Umm not really. I would say the second one is easier since you are making a client side mod that only checks the client player. This should be irrelevant to your current problem though, as your method is not called from the event subscriber. Do you know Java? If not, please learn Java before making a mod.