Actually Additions causing NPE
TobyWanBJ opened this issue ยท 7 comments
When using alpha 18 with Actually Additions r105 (both latest releases as of time of writing) the game crashes with an NPE while initialising (see attached crash log for details). This is definitely caused by an incompatibility with AA, as I tested without it and did not receive the error. This also doesn't occur with alpha 17.
crash-2017-06-09_13.35.23-client.txt
EDIT: issue is with the provided JSON files, I have managed through testing to fix the canola plant
EDIT 2: The corrected JSON files for all of the plants are available: here
having just looked through the issues, issue #996 also contains Actually Additions r105, as do the two comments on that issue.
Edit: Hah! Jinx.
Nifty. I'm curious what's the exact cause in the code in this case. In the mean time, I've put the updated files into a branch that RlonRyan can pull from:
https://github.com/CodesCubesAndCrashes/AgriPlants/tree/patch-tobywanbj-actuallyadditions
diff --git a/mod_actuallyadditions/canola_plant.json b/mod_actuallyadditions_repaired/canola_plant.json
index 8803eba..89ff652 100644
--- a/mod_actuallyadditions/canola_plant.json
+++ b/mod_actuallyadditions_repaired/canola_plant.json
@@ -29,6 +29,8 @@
"spread_chance": 0.1,
"spawn_chance": 0.0,
"grass_drop_chance": 0.0,
+ "seed_drop_chance": 1.0,
+ "seed_drop_bonus": 0.0,
"products": {
"products": [
{
@@ -63,21 +65,20 @@
"soils": [
"farmland_soil"
],
- "bases": [],
- "nearby": {}
+ "conditions": []
},
"texture": {
"render_type": "cross",
- "seed_texture": "ActuallyAdditions:items/itemCanolaSeed",
+ "seed_texture": "actuallyadditions:items/itemCanolaSeed",
"plant_textures": [
- "ActuallyAdditions:blocks/blockCanolaStage1",
- "ActuallyAdditions:blocks/blockCanolaStage2",
- "ActuallyAdditions:blocks/blockCanolaStage3",
- "ActuallyAdditions:blocks/blockCanolaStage3",
- "ActuallyAdditions:blocks/blockCanolaStage4",
- "ActuallyAdditions:blocks/blockCanolaStage5",
- "ActuallyAdditions:blocks/blockCanolaStage5",
- "ActuallyAdditions:blocks/blockCanolaStage6"
+ "actuallyadditions:blocks/blockCanolaStage1",
+ "actuallyadditions:blocks/blockCanolaStage2",
+ "actuallyadditions:blocks/blockCanolaStage2",
+ "actuallyadditions:blocks/blockCanolaStage2",
+ "actuallyadditions:blocks/blockCanolaStage3",
+ "actuallyadditions:blocks/blockCanolaStage3",
+ "actuallyadditions:blocks/blockCanolaStage3",
+ "actuallyadditions:blocks/blockCanolaStage4"
]
}
}
diff --git a/mod_actuallyadditions/coffee_plant.json b/mod_actuallyadditions_repaired/coffee_plant.json
index 60cd669..c240bb2 100644
--- a/mod_actuallyadditions/coffee_plant.json
+++ b/mod_actuallyadditions_repaired/coffee_plant.json
@@ -29,6 +29,8 @@
"spread_chance": 0.1,
"spawn_chance": 0.0,
"grass_drop_chance": 0.0,
+ "seed_drop_chance": 1.0,
+ "seed_drop_bonus": 0.0,
"products": {
"products": [
{
@@ -51,21 +53,20 @@
"soils": [
"farmland_soil"
],
- "bases": [],
- "nearby": {}
+ "conditions": []
},
"texture": {
"render_type": "cross",
- "seed_texture": "ActuallyAdditions:items/itemCoffeeSeed",
+ "seed_texture": "actuallyadditions:items/itemCoffeeSeed",
"plant_textures": [
- "ActuallyAdditions:blocks/blockCoffeeStage1",
- "ActuallyAdditions:blocks/blockCoffeeStage2",
- "ActuallyAdditions:blocks/blockCoffeeStage3",
- "ActuallyAdditions:blocks/blockCoffeeStage3",
- "ActuallyAdditions:blocks/blockCoffeeStage4",
- "ActuallyAdditions:blocks/blockCoffeeStage5",
- "ActuallyAdditions:blocks/blockCoffeeStage5",
- "ActuallyAdditions:blocks/blockCoffeeStage6"
+ "actuallyadditions:blocks/blockCoffeeStage1",
+ "actuallyadditions:blocks/blockCoffeeStage2",
+ "actuallyadditions:blocks/blockCoffeeStage2",
+ "actuallyadditions:blocks/blockCoffeeStage3",
+ "actuallyadditions:blocks/blockCoffeeStage4",
+ "actuallyadditions:blocks/blockCoffeeStage4",
+ "actuallyadditions:blocks/blockCoffeeStage5",
+ "actuallyadditions:blocks/blockCoffeeStage6"
]
}
}
diff --git a/mod_actuallyadditions/flax_plant.json b/mod_actuallyadditions_repaired/flax_plant.json
index 7b9c198..e8cdc70 100644
--- a/mod_actuallyadditions/flax_plant.json
+++ b/mod_actuallyadditions_repaired/flax_plant.json
@@ -29,6 +29,8 @@
"spread_chance": 0.1,
"spawn_chance": 0.0,
"grass_drop_chance": 0.0,
+ "seed_drop_chance": 1.0,
+ "seed_drop_bonus": 0.0,
"products": {
"products": [
{
@@ -51,21 +53,20 @@
"soils": [
"farmland_soil"
],
- "bases": [],
- "nearby": {}
+ "conditions": []
},
"texture": {
"render_type": "cross",
- "seed_texture": "ActuallyAdditions:items/itemFlaxSeed",
+ "seed_texture": "actuallyadditions:items/itemFlaxSeed",
"plant_textures": [
- "ActuallyAdditions:blocks/blockFlaxStage1",
- "ActuallyAdditions:blocks/blockFlaxStage2",
- "ActuallyAdditions:blocks/blockFlaxStage3",
- "ActuallyAdditions:blocks/blockFlaxStage3",
- "ActuallyAdditions:blocks/blockFlaxStage4",
- "ActuallyAdditions:blocks/blockFlaxStage5",
- "ActuallyAdditions:blocks/blockFlaxStage5",
- "ActuallyAdditions:blocks/blockFlaxStage6"
+ "actuallyadditions:blocks/blockFlaxStage1",
+ "actuallyadditions:blocks/blockFlaxStage2",
+ "actuallyadditions:blocks/blockFlaxStage2",
+ "actuallyadditions:blocks/blockFlaxStage3",
+ "actuallyadditions:blocks/blockFlaxStage4",
+ "actuallyadditions:blocks/blockFlaxStage4",
+ "actuallyadditions:blocks/blockFlaxStage5",
+ "actuallyadditions:blocks/blockFlaxStage6"
]
}
}
diff --git a/mod_actuallyadditions/rice_plant.json b/mod_actuallyadditions_repaired/rice_plant.json
index 181ac2c..e6a50c8 100644
--- a/mod_actuallyadditions/rice_plant.json
+++ b/mod_actuallyadditions_repaired/rice_plant.json
@@ -29,6 +29,8 @@
"spread_chance": 0.1,
"spawn_chance": 0.0,
"grass_drop_chance": 0.0,
+ "seed_drop_chance": 1.0,
+ "seed_drop_bonus": 0.0,
"products": {
"products": [
{
@@ -36,8 +38,8 @@
"max": 3,
"chance": 0.95,
"required": true,
- "item": "actuallyadditions:itemFood:16",
- "meta": 0,
+ "item": "actuallyadditions:itemFood",
+ "meta": 16,
"tags": "",
"ignoreMeta": false,
"ignoreTags": [],
@@ -51,21 +53,20 @@
"soils": [
"farmland_soil"
],
- "bases": [],
- "nearby": {}
+ "conditions": []
},
"texture": {
"render_type": "hash",
- "seed_texture": "ActuallyAdditions:items/itemRiceSeed",
+ "seed_texture": "actuallyadditions:items/itemRiceSeed",
"plant_textures": [
- "ActuallyAdditions:blocks/blockRiceStage1",
- "ActuallyAdditions:blocks/blockRiceStage2",
- "ActuallyAdditions:blocks/blockRiceStage3",
- "ActuallyAdditions:blocks/blockRiceStage3",
- "ActuallyAdditions:blocks/blockRiceStage4",
- "ActuallyAdditions:blocks/blockRiceStage5",
- "ActuallyAdditions:blocks/blockRiceStage5",
- "ActuallyAdditions:blocks/blockRiceStage6"
+ "actuallyadditions:blocks/blockRiceStage1",
+ "actuallyadditions:blocks/blockRiceStage2",
+ "actuallyadditions:blocks/blockRiceStage2",
+ "actuallyadditions:blocks/blockRiceStage3",
+ "actuallyadditions:blocks/blockRiceStage4",
+ "actuallyadditions:blocks/blockRiceStage4",
+ "actuallyadditions:blocks/blockRiceStage5",
+ "actuallyadditions:blocks/blockRiceStage6"
]
}
}
Seeing if this is the same crash or something new: https://pastebin.com/FFcNdtbr
If it's new, I'll make a proper report.
The mod reference was changed from first-letter capitalization to all lowercase in the mod reference to Actually Additions. The null pointer is being thrown because something in the mod or in minecraft can't find the specified plants under "ActuallyAdditions," because it is under "actuallyadditions."
EDIT1: Also, the plant stages have been moved around. If you look at one of the plant jsons in the above code, you will see a set of stages with a "-" (these lines are being removed), and a set with "+" (lines added in, replacing the previous lines/stages). The stage levels are adjusted so that different stages get different amount of lines.
EDIT2: One last notable change is in the rice plan json. Currently, the meta data for the item is being tacked onto the item declaration instead of being put into the meta field.
Current:"item": "actuallyadditions:itemFood:16", "meta":0
With Change: "item": "actuallyadditions:itemFood", "meta":16
Duplicate of #985.