nexusnode / crafting-dead

The Minecraft zombie survival mod.
http://craftingdead.net
Other
59 stars 36 forks source link

Bigfixes for Open Beta. #265

Closed 0xE69 closed 6 months ago

0xE69 commented 7 months ago

-- Important Feature Update

Each weapon should have a heat variable. This variable starts at 0 and increases every time the weapon is fired. Over time, this variable should decrease gradually back toward 0, simulating the weapon cooling down.

You'll need to pick a non-random function that will determine the radius (r) and angle (theta, t) of the bullet spread based on the current heat (h) of the weapon. This function defines the shape of your spray pattern (V or diamond). For simplicity, let's start with a basic V-shaped pattern.

We need a heat veriable for weapons. protected float heat = 0.0F; protected final float heatIncreasePerShot = 1.0F; // Adjust as needed protected final float heatDecreasePerTick = 0.05F; // Adjust as needed Whenever the gun fires, increase the heat variable. This could be done in the handleShoot method or wherever the gun's shooting logic is implemented. In the handleTick method, gradually decrease the heat over time to simulate cooling down. Create a method to calculate the bullet spread (radius r and angle theta) based on the current heat. For a simple V-shaped pattern, you might increase the spread linearly with heat and alternate the angle to spread shots left and right as heat increases. When handling a shot in handleShoot, use the bullet spread calculations to adjust the bullet's trajectory. We need to be able to adjust the heat increase per shot, the heat decrease per tick, and the bullet spread calculation.

0xE69 commented 6 months ago

Checked off a few of them.

0xE69 commented 6 months ago

Clothing should already be shreddable so if that's not working that's a bug

0xE69 commented 6 months ago

Close - Separated the issues.