FRicsi / No-more-Mine-in-Hell

Minecraft mod
0 stars 0 forks source link

Guns #14

Open FRicsi opened 6 years ago

FRicsi commented 6 years ago

I thought there will be easy to add gunst to mod, but I have to open a unique issue for it.

Guns: Just set as an arrow, change tecture, bullet, bullet parameters.

Problem: how can I count the clip size, adding clipo parameters and forcing player to reload the weapon?

FRicsi commented 6 years ago

pressing a key (R) will trigger the event the event inspects what kind of item is in hand, in case of gun, continues removes a clip from inventory then adds max amount of ammo to gun. If there is any ammo in the gun, the remains added to inventory as spare bullets. Then enables the shooting on gun. When the gun depleted, disabling shooting. Counter is do-while loop, inspecting if gun has >0 ammo. Every shoot decrease the variable's value.

FRicsi commented 6 years ago

gun gui added, coding required to use gue whenever any kind of gun is in hand really required? different gui (same display order) for different guns maybe?

FRicsi commented 6 years ago

added R key for reloading; stacked event: inspects which weapon is in hand, then R restores ammo amount must added: ammo withdrawn from inventory

task: inspecting ammo amount and add clipsize or as much as possible

FRicsi commented 6 years ago

if (flag || par3EntityPlayer.inventory.hasItemStack(new ItemStack(mcreator_ammo9mm.block)|| glockammo > 0))

maybe this code is the start of disabling shooting when ammo depleted?

FRicsi commented 6 years ago

Weapons knockback effect too big, almost 30 blocks. Why?