Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Gun Mod


thatbritshgamer
 Share

Recommended Posts

So basically i made a Gun mod, but through A series of crashes i Lost the work thank god i had a compiled version on my drop box and have managed to decompile it.

So now i need help to finish it off so basically the problems when i try to reload i crash and on the screen says lost connection fatal error has occurred and when i shoot the gun takes bullets but does not damage the mob.

and here is all my code on github

https://github.com/britishcoding/gun-mod/tree/master/gun

Link to comment
Share on other sites

okay so i have narrowed it down to this being wrong

  if (player.inventory.func_146028_b(gun.getMagazineItem()))

        {

          nbt.setInteger("remainingAmmo", magazine.getMaxDamage());

          if (!player.capabilities.isCreativeMode) {

            player.inventory.func_146026_a(gun.getMagazineItem());

          }

        }

and i need to know what these are

146028_b

146028_a

Link to comment
Share on other sites

Look at what you think the methods would do. Inside the 1st if-statement you set an integer to NBT, and do something when you are NOT in creative mode. You are working on a gun

Item

, and you have a variable called

magazine

. Now I guess that you check if you got a magazine in your inventory, set an integer to NBT and consume the Item when you are NOT in creative mode. Now looking at the

InventoryPlayer 

class, it has the methods

hasItem

and

consumeInventoryItem

. So

func_146028_bis 

hasItem

and

func_146026_a

is

consumeInventoryItem

.

 

So you see, with a little logic it's very easy to figure out the proper names (writing this took me longer than getting the proper names without an IDE).

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

  • 1 year later...

Probably 1.7.10. Next time, don't bump a year old post.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hey i was just installing forge 1.8.9 latest and it wont install, it is saying that certain libraries have failed to download, i am 100% sure that I have no firewalls enabled, i have gone into my routers settings, everything is fine, i have even tethered to my mobile data and i get the same message. ( not gonna embed images as the formatting just dies and takes up half the screen and moves text lol ) https://i.imgur.com/8ZfSfzT.png error message, and progress bar, after dismissing the message the installer just hangs there... taking a quick look into the log its saying that files arent found in the installer archive, there are a bunch of ssl cert errors???    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target File not found in installer archive: /maven/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.jar pastebin to full log  https://pastebin.com/PTX1ah8c
    • just refreshed this page and saw this, i just posted about this myself with a different issue but inside the log it says the same thing, i think it is a error on forge's side, what version were you trying to install?
    • Hey i was just installing forge 1.8.9 latest and it wont install, it is saying that certain libraries have failed to download, i am 100% sure that I have no firewalls enabled, i have gone into my routers settings, everything is fine, i have even tethered to my mobile data and i get the same message. ( not gonna embed images as the formatting just dies and takes up half the screen and moves text lol ) https://i.imgur.com/8ZfSfzT.png error message, and progress bar, after dismissing the message the installer just hangs there... taking a quick look into the log its saying that files arent found in the installer archive, there are a bunch of ssl cert errors???    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target File not found in installer archive: /maven/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.jar pastebin to full log  https://pastebin.com/PTX1ah8c
    • why? since there are thousands of Blocks each render-tick which are rendered
    • it is highly recommended to use the debugger of the IDE it depends on the usage of the Capability and where the data is used i would recommend you to use a Git Client to upload files, since the Git repo is missing existential data, so im not be able to clone your repo to debug this locally
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.