Comments (11)
will somebody look intro it? i was unable to prevent it with a null check as it already errors when asking for the hardness
from forestrymc.
Could this be caused by the log taking damage from the tool and thus changing the damage value that is used to determine what type of log it is?
How is Meta values separated from damage on the block during mining? Is mining damage a value we can get in addition to meta/damage?
Edit:
nvm, nuub questions :)
from forestrymc.
All Forestry Wood have a Hardness. The issue here is that Forestry fails to identify the type of Wood because there is no given world object. The world variable is null.
I can't find any other reason for why this could fail like this.
This is one of those things I don't understand. How can the world variable be null? Is there a common cause?
Lastly I'd like to know if we should change the code to check for missing arguments. Should the code fail like now or should we return the default hardness.
from forestrymc.
in cases like this i think it is best to return the default hardness. If it heapens with my custom tools, i'm sure it heapens with others as well
from forestrymc.
Tried to reproduce, couldn't get the tool to break anything at all, even vanilla trees.
Tried spawning a kinetic multitool with NEI, added a sawblade with integration table, and gave it a filled kinetic capsule. Nothing...
latest forestry
Eureka 1.2
Buildcraft 6.0.18
Buildcraft-Additions 1.6.4
from forestrymc.
what do you mean could not get it to break anything? where you in creative?
from forestrymc.
Thanks, I was in creative because the tool would break from lack of knowledge in regular mode.
I was able to reproduce the crash now, we get a null world object. (confirmed)
We can't determine the type of wood without the world object.
I'll look more into it.
from forestrymc.
Your code has world=null, x=y=z=0 when getDigSpeed
is called. It seems to expect ItemPoweredBase onBlockStartBreak
to be called first (which sets the world and position), but that's not what happens.
player is also null in getDigSpeed
, so you call readBateries(stack, player)
with a null player, even before calling anything related to Forestry.
This is definitely a bug on your side.
One solution could be to move the energy check to onBlockStartBreak
and return true if there's not enough energy.
I'll wait for your response before closing this in case I missed something again. I hope I was able to help.
from forestrymc.
my code indeed asumes that that function is called (as it should be called when you start breakings something) The odd thing is that all of this works for non-forestry wood (works fine with BoP as far as i know)
moving the energy check still won't solve it as the world and x,y, z values will still be incorrect (or null)
from forestrymc.
onBlockStartBreak
is called after you've been hitting the block for a while, when it's full of cracks and about to break. getDigSpeed
will always be called first.
Vanilla doesn't use the world, x, y, or z, it just returns a hardness value for that block. Forestry has different woods depending on the meta value so it needs that information to be valid in order to determine what kind of wood it is.
from forestrymc.
you where right, all fixed now, thanks
AEnterprise/Buildcraft-Additions@553b65a
from forestrymc.
Related Issues (20)
- [1.18.2] Doors drop 2 items when broken
- Forest Bees Don't spawn? HOT 2
- [1.12.2][5.8.2.422] Bio Generator explode IC2 machines HOT 1
- [suggestion] allow compost be alternative of fertilizer in mutifarm and make Moistener great again!
- Crashes while pressing shift in jei while hovering over certain items with chisel & bits installed
- [1.16.5][6.0.14][Server]Worktable can't use, also cannot destroy on server.
- Wiki Link in README.md is broken for both the dev/1.18.x and mc-1.12 branches
- [1.12.2] [5.8.2.422] Stair lighting bug
- Tin Cans and Capsules
- (1.12.2) I break Chisel variants of nether bricks, and the game crashes. Error report says Forestry has to do with it
- Infinity Charcoal HOT 2
- Intricate Circuit Board (4 type) farms containing Managed Orchards don't accept saplings
- Managed Orchards don't pick up / support Binnie's Extra Trees fruit HOT 1
- Farm w/ circuit containing Orchard tube twice doesn't utilize whole area
- No automatic reed farm? HOT 1
- "Very Large" farm layout in Forester's Manual is wrong
- Forestry crashing game
- 1.16.5 Orchards Not Picking Forestry Fruits/Nuts
- Unable to insert circuit board into Forestry Farm block
- Cocoa Plantation farm does not auto-plant harvested cocoa beans
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 forestrymc.