Everything posted by DavidM
-
[1.14] Custom Night Vision Effect
AFAIK there is no proper way of doing so. One wild idea would be to create a custom implementation of LightTexture, and override LightTexture#updateLightmap to take your custom potion effect into account. Then use reflection to change the lightmapTexture field in GameRenderer (from the field gameRenderer in the Minecraft instance from Minecraft#getMinecraft) to an instance of your own LightTexture. However I am sure this will break many things and might not work as intended. Personally, I would just use the normal night vision effect.
-
Checking if a player swung with full attack power
Try subscribing to AttackEntityEvent. AttackEntityEvent fires before the cool down reset. Overriding IForgeItem#onLeftClickEntity should also work.
-
Checking if a player swung with full attack power
My bad. Just checked and realized LivingDamageEvent is triggered after calculations, but before the damage applies. It is probably triggered after the ticksSinceLastSwing is reset to 0.
-
Checking if a player swung with full attack power
LivingDamageEvent is triggered before the attack deals damage. LivingDamageEvent#getSource returns the damage source, which, if is an instance of EntityDamageSource (when an entity inflicts the damage), will record the entity that dealt the damage, and can be obtained with EntityDamageSource#getTrueSource. If the return entity is an instance of EntityPlayer, you can get the attack cool down with EntityPlayer#getCooldownPeriod or EntityPlayer#getCooledAttackStrength.
-
[1.12.2] how to create multitool
Depending on how you want to implement such behavior, there are multiple ways of doing so. One example can be found here (not so well written in my opinion but is the best I could find) : https://github.com/Ellpeck/ActuallyAdditions/blob/master/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAllToolAA.java.
-
server crashing
...wut? Nononononono. 1. Try with a VPN. 2. Get a better (faster) internet connection.
-
Entity's Position and its "prev" Counterpart
Is such fields only used in client-side render calculation?
-
Entity's Position and its "prev" Counterpart
An Entity contains properties such as posX, posY, rotationYaw, rotationPitch, etc. However, such fields also have "prev" counterparts like prevPosX and prevRotationYaw. What is the purpose of such "prev" fields?
-
packet receive (event ?)
Please be more specific. What packet? Vanilla or modded? On the client side or server side?
-
[1.14.3] Open GUI upon player-entity interaction
Check out the code for AbstractHorseEntity. When in doubt, always read the source code. Don't rely on tutorials.
-
How to stop forge from sending mod in server handshake modlist
Doing so is highly discouraged, as this provides cheating potential.
-
[1.14] Best way of storing multiblocks
I am creating a way to render multiblock structures in the world. I am planning to write a custom multiblock container, but I am not sure whether there is already a multiblock storage, in which case I shouldn't reinvent the wheel. Is there already a way of storing multiblock structures?
-
server crashing
The I'm afraid your modpack won't launch. Try removing mods until the crash no longer occurs, then add mods back in one-by-one until you find the culprit(s).
-
FORGE Open With Java And Command Prompt
Please only make one thread per problem. Please elaborate. I have no idea what you are talking about.
-
Getting rid of unwanted mobs
/kill @e [{some params here that specifies squid that I can't recall; look up on the Minecraft wiki}]
-
How do i register a munition-entity, using my existing registration procedure?
If your slingshot act like a bow, it shall extends the bow. There is no point in copying everything again.
-
Checking if a player swung with full attack power
@Animefan8888 You're back! @Javisel Post your code. That method gives the percentage of the attack cool down.
-
Checking if a player swung with full attack power
EntityPlayer#getCooledAttackStrength.
-
Diferentiating items on the Player's Inventory [SOLVED]
Please note that items and blocks are singleton. Your method of adding timer won't work as the same timer will be used on all players and all instances of ItemStack with your Item.
-
[1.14.4] Registering a custom Stairs Block leads to a crash
Do not use static initializers. Initialize your items and blocks during the appropriate registry events. Please post a GitHub repo of your mod.
-
[1.12.2] Particles won't spawn
That is not going to change anything. Particles must be spawned on the client. If an event on the server is supposed to create particles, the server must send packet(s) to notify the client(s).
-
[1.14] Working with the Vanilla Composter
Since the CHANCES field is public, is it recommendable to just replicate what ComposterBlock::registerCompostable does and add the entry into the CHANCES field manually?
-
Multiple face blocks showing up as black and purple
From the file name of your classes, I can already tell that you are following bad tutorials. Most YouTube tutorials on modding are rather bad as they promote bad coding practices and outdated methods. Please read the common issues and recommendations pinned at the top of this forum to learn how to fix those bad practices. I would suggest to rewrite/refractor your code after that. As for your problem, I don't see that you've added a texture for your block.
-
Using Optifine 1.14.3 with Forge
Wut? OptiFine is not compatible with Forge in 1.14.
-
egypt
Please keep this forum in English. The installer log is generated in the same directory as the installer.
IPS spam blocked by CleanTalk.