Comments (1)
This bug is caused by lines 177-181 in GSListener.java:
if (item.getAmount() > 1) {
item.setAmount(item.getAmount() - 1);
} else {
inv.remove(item);
}
The problem is that setAmount() does not seem to be able to decrease the amount below 1, as that would be removing the item. Therefore, when getAmount() (the amount of items in the stack) is exactly 1, I simply tried remove(item).
Unfortunately, remove() seems to remove all items in the inventory matching the parameter. An ideal fix for this would be to generate a more comprehensive if/else statement to modify the one at lines 177-181.
from gunsmith.
Related Issues (18)
- Hits do not register when distance from target is <10 blocks
- "/giveGun bow" gives a pistol instead of a crossbow
- Ammunition does not deplete final item in stack
- Headshots do not register at certain angles HOT 1
- Recipes list has 'chamber' listed twice
- Hello, how does one install this plugin? | Ciao, come si fa a settare questo plugin? HOT 1
- Source code msgs should be translated into Spanish and placed in its own file
- Resource pack not displaying properly with MC-1.11 update HOT 2
- Error loading Gunsmith HOT 3
- README has several grammar errors, could use more info
- Grenades do not register in inventory
- ResoucePack block error ! HOT 1
- getStat command causes an ArrayOutOfBoundsException
- Custom guns and block breaking HOT 1
- block.setData
- Shots spam console with shot data
- Shooting yourself to death when moving and steadily firing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gunsmith.