Jump to content

[1.7.10] Placing seed problems


robmart

Recommended Posts

This is my seed class

package com.robmart.MoreMinecraft.items;

import com.robmart.MoreMinecraft.creativetab.CreativeTabMM;
import com.robmart.MoreMinecraft.init.InitBlock;
import com.robmart.MoreMinecraft.reference.Reference;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.IPlantable;
import net.minecraftforge.common.util.ForgeDirection;

public class ItemSeed extends Item implements IPlantable
{
    protected Block theBlockPlant;
    private final Block soilId;

    public ItemSeed(Block parBlockPlant, Block parSoilBlock, String unlocalizedName)
    {
        super();
        String fullUnlocalizedName = Reference.MOD_ID.toLowerCase() + ":" + unlocalizedName;
        this.setUnlocalizedName(fullUnlocalizedName);
        theBlockPlant = parBlockPlant;
        this.setTextureName(fullUnlocalizedName);
        soilId = parSoilBlock;
        this.setCreativeTab(CreativeTabMM.MM_FARMER);
    }

    @Override
    public boolean onItemUse(ItemStack parItemStack, EntityPlayer parPlayer,
                             World parWorld, int parX, int parY, int parZ, int par7, float par8,
                             float par9, float par10)
    {
        if (par7 != 1)
        {
            return false;
        }
        else if (parPlayer.canPlayerEdit(parX, parY+1, parZ, par7, parItemStack))
        {
            if (parWorld.getBlock(parX, parY, parZ).canSustainPlant(parWorld,
                    parX, parY, parZ, ForgeDirection.UP, this) && parWorld
                    .isAirBlock(parX, parY+1, parZ))
            {
                parWorld.setBlock(parX, parY+1, parZ, theBlockPlant);
                --parItemStack.stackSize;
                return true;
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }

    @Override
    public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z)
    {
        return EnumPlantType.Crop;
    }

    @Override
    public Block getPlant(IBlockAccess world, int x, int y, int z)
    {
        return theBlockPlant;
    }

    @Override
    public int getPlantMetadata(IBlockAccess world, int x, int y, int z)
    {
        return 0;
    }

    public Block getSoilId()
    {
        return soilId;
    }

}

And here is the code where i load the seed in

    public static final ItemSeed BlueberrySeed = new ItemSeed(InitBlock.BlueberryCrop, Blocks.farmland, "BlueberrySeed");

So i can launch minecraft fine but when placing the seed on farmland the game crashes with this crash report

---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!

Time: 19/02/15 14:30
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:86)
at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:653)
at net.minecraft.world.World.setBlock(World.java:519)
at net.minecraft.world.World.setBlock(World.java:681)
at com.robmart.MoreMinecraft.items.ItemSeed.onItemUse(ItemSeed.java:55)
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:143)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:410)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1518)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2033)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028)
at net.minecraft.client.Minecraft.run(Minecraft.java:951)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:86)
at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:653)
at net.minecraft.world.World.setBlock(World.java:519)
at net.minecraft.world.World.setBlock(World.java:681)
at com.robmart.MoreMinecraft.items.ItemSeed.onItemUse(ItemSeed.java:55)
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:143)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:410)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1518)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Robmart'/348, l='MpServer', x=-88.60, y=113.62, z=220.36]]
Chunk stats: MultiplayerChunkCache: 545, 545
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options: 
Level spawn location: World: (-216,64,212), Chunk: (at 8,4,4 in -14,13; contains blocks -224,0,208 to -209,255,223), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 339617 game time, 30000 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 142 total; [EntitySlime['Slime'/256, l='MpServer', x=-109.38, y=22.00, z=240.15], EntityZombie['Zombie'/257, l='MpServer', x=-101.50, y=65.00, z=240.50], EntityZombie['Zombie'/258, l='MpServer', x=-107.06, y=67.00, z=247.50], EntityPig['Pig'/259, l='MpServer', x=-109.53, y=85.00, z=261.56], EntityChicken['Chicken'/260, l='MpServer', x=-101.44, y=82.00, z=265.44], EntityChicken['Chicken'/261, l='MpServer', x=-98.53, y=84.00, z=262.59], EntityCow['Cow'/262, l='MpServer', x=-111.52, y=83.00, z=265.44], EntityPig['Pig'/263, l='MpServer', x=-100.81, y=80.00, z=281.34], EntityPig['Pig'/264, l='MpServer', x=-102.75, y=89.00, z=288.50], EntityBat['Bat'/270, l='MpServer', x=-90.34, y=52.00, z=156.50], EntityBat['Bat'/271, l='MpServer', x=-95.41, y=44.50, z=163.23], EntityBat['Bat'/272, l='MpServer', x=-95.25, y=42.74, z=165.16], EntityBat['Bat'/273, l='MpServer', x=-93.46, y=44.11, z=162.83], EntityPig['Pig'/274, l='MpServer', x=-86.87, y=67.11, z=176.34], EntityBat['Bat'/275, l='MpServer', x=-87.45, y=21.85, z=205.46], EntitySquid['Squid'/276, l='MpServer', x=-81.72, y=48.00, z=218.50], EntityZombie['Zombie'/277, l='MpServer', x=-88.44, y=40.00, z=238.00], EntityZombie['Zombie'/278, l='MpServer', x=-81.50, y=42.00, z=239.50], EntityBat['Bat'/279, l='MpServer', x=-77.43, y=42.00, z=240.53], EntityZombie['Zombie'/280, l='MpServer', x=-95.53, y=64.00, z=223.94], EntitySlime['Slime'/281, l='MpServer', x=-86.31, y=22.00, z=245.47], EntityBat['Bat'/282, l='MpServer', x=-86.36, y=26.09, z=245.31], EntityChicken['Chicken'/283, l='MpServer', x=-92.59, y=87.00, z=256.47], EntityPig['Pig'/284, l='MpServer', x=-88.66, y=80.00, z=279.13], EntityPig['Pig'/285, l='MpServer', x=-92.56, y=80.00, z=283.34], EntityPig['Pig'/286, l='MpServer', x=-95.94, y=80.00, z=275.97], EntitySheep['Sheep'/287, l='MpServer', x=-91.88, y=89.00, z=300.47], EntityPig['Pig'/294, l='MpServer', x=-75.81, y=73.00, z=171.50], EntitySlime['Slime'/295, l='MpServer', x=-76.38, y=38.47, z=176.38], EntityZombie['Zombie'/296, l='MpServer', x=-67.50, y=26.00, z=204.50], EntityPig['Pig'/297, l='MpServer', x=-65.50, y=90.00, z=194.69], EntityPig['Pig'/298, l='MpServer', x=-79.69, y=85.00, z=199.50], EntitySkeleton['Skeleton'/299, l='MpServer', x=-66.44, y=28.00, z=235.94], EntitySlime['Slime'/300, l='MpServer', x=-65.69, y=37.00, z=251.69], EntityChicken['Chicken'/301, l='MpServer', x=-78.38, y=85.00, z=274.44], EntityChicken['Chicken'/302, l='MpServer', x=-67.63, y=92.00, z=287.47], EntityCreeper['Creeper'/303, l='MpServer', x=-78.50, y=23.00, z=297.50], EntityCreeper['Creeper'/304, l='MpServer', x=-78.50, y=18.00, z=288.50], EntitySheep['Sheep'/305, l='MpServer', x=-76.74, y=93.00, z=297.19], EntitySkeleton['Skeleton'/306, l='MpServer', x=-66.69, y=87.00, z=295.69], EntitySheep['Sheep'/316, l='MpServer', x=-59.09, y=63.00, z=166.16], EntityPig['Pig'/317, l='MpServer', x=-55.84, y=69.00, z=175.97], EntitySheep['Sheep'/318, l='MpServer', x=-68.52, y=65.04, z=174.64], EntitySkeleton['Skeleton'/319, l='MpServer', x=-59.50, y=26.00, z=210.50], EntityCreeper['Creeper'/320, l='MpServer', x=-48.69, y=14.00, z=224.50], EntitySlime['Slime'/321, l='MpServer', x=-60.31, y=36.00, z=238.31], EntitySlime['Slime'/322, l='MpServer', x=-63.69, y=39.00, z=255.69], EntityBat['Bat'/323, l='MpServer', x=-63.60, y=37.76, z=252.98], EntityPig['Pig'/324, l='MpServer', x=-50.88, y=98.00, z=271.91], EntitySquid['Squid'/332, l='MpServer', x=-35.03, y=62.22, z=177.50], EntitySlime['Slime'/333, l='MpServer', x=-41.88, y=31.00, z=200.63], EntityPig['Pig'/334, l='MpServer', x=-36.50, y=86.00, z=219.31], EntitySkeleton['Skeleton'/335, l='MpServer', x=-45.66, y=15.00, z=226.63], EntitySkeleton['Skeleton'/336, l='MpServer', x=-49.83, y=14.00, z=227.56], EntityPig['Pig'/337, l='MpServer', x=-35.97, y=89.00, z=229.38], EntitySheep['Sheep'/338, l='MpServer', x=-44.94, y=89.00, z=224.88], EntityPig['Pig'/339, l='MpServer', x=-40.31, y=99.00, z=272.50], EntitySkeleton['Skeleton'/342, l='MpServer', x=-23.03, y=26.00, z=178.57], EntitySheep['Sheep'/343, l='MpServer', x=-18.53, y=95.00, z=193.13], EntityPig['Pig'/344, l='MpServer', x=-23.78, y=111.00, z=243.91], EntityChicken['Chicken'/345, l='MpServer', x=-22.91, y=93.00, z=277.09], EntitySheep['Sheep'/349, l='MpServer', x=-11.50, y=104.00, z=217.50], EntityPig['Pig'/351, l='MpServer', x=-13.89, y=105.00, z=239.53], EntityClientPlayerMP['Robmart'/348, l='MpServer', x=-88.60, y=113.62, z=220.36], EntityChicken['Chicken'/144, l='MpServer', x=-165.41, y=72.00, z=189.47], EntitySlime['Slime'/151, l='MpServer', x=-148.69, y=37.47, z=179.69], EntityChicken['Chicken'/152, l='MpServer', x=-158.66, y=75.00, z=193.34], EntityCreeper['Creeper'/153, l='MpServer', x=-145.50, y=42.00, z=218.50], EntityZombie['Zombie'/154, l='MpServer', x=-140.99, y=42.00, z=220.38], EntityZombie['Zombie'/155, l='MpServer', x=-148.50, y=38.00, z=210.50], EntitySkeleton['Skeleton'/156, l='MpServer', x=-153.31, y=22.00, z=253.70], EntityZombie['Zombie'/157, l='MpServer', x=-155.50, y=36.00, z=249.50], EntitySheep['Sheep'/158, l='MpServer', x=-154.93, y=91.00, z=268.14], EntityPig['Pig'/159, l='MpServer', x=-155.29, y=90.00, z=271.50], EntityZombie['Zombie'/171, l='MpServer', x=-128.94, y=25.00, z=148.50], EntityCreeper['Creeper'/172, l='MpServer', x=-128.50, y=42.00, z=175.50], EntityZombie['Zombie'/173, l='MpServer', x=-129.34, y=44.00, z=172.31], EntityChicken['Chicken'/174, l='MpServer', x=-128.41, y=72.00, z=166.63], EntityPig['Pig'/175, l='MpServer', x=-148.47, y=75.00, z=169.31], EntitySkeleton['Skeleton'/176, l='MpServer', x=-128.50, y=18.00, z=179.50], EntityZombie['Zombie'/177, l='MpServer', x=-132.47, y=21.00, z=188.25], EntitySkeleton['Skeleton'/178, l='MpServer', x=-133.66, y=20.00, z=183.58], EntitySkeleton['Skeleton'/179, l='MpServer', x=-133.64, y=21.00, z=182.74], EntitySpider['Spider'/180, l='MpServer', x=-137.72, y=20.00, z=187.94], EntitySpider['Spider'/181, l='MpServer', x=-135.93, y=20.00, z=186.46], EntityZombie['Zombie'/182, l='MpServer', x=-133.66, y=21.00, z=188.34], EntitySpider['Spider'/183, l='MpServer', x=-139.56, y=20.00, z=186.92], EntitySpider['Spider'/184, l='MpServer', x=-137.82, y=20.00, z=185.82], EntityZombie['Zombie'/185, l='MpServer', x=-141.00, y=20.00, z=183.31], EntityZombie['Zombie'/186, l='MpServer', x=-137.50, y=20.00, z=184.31], EntityZombie['Zombie'/187, l='MpServer', x=-139.63, y=20.00, z=188.22], EntityZombie['Zombie'/188, l='MpServer', x=-128.50, y=40.00, z=188.50], EntityCreeper['Creeper'/189, l='MpServer', x=-131.50, y=40.00, z=187.50], EntityBat['Bat'/190, l='MpServer', x=-121.43, y=33.99, z=232.47], EntityCreeper['Creeper'/191, l='MpServer', x=-133.50, y=32.00, z=216.50], EntityZombie['Zombie'/192, l='MpServer', x=-129.58, y=22.00, z=230.05], EntityCreeper['Creeper'/193, l='MpServer', x=-135.50, y=22.00, z=225.00], EntityPig['Pig'/194, l='MpServer', x=-139.47, y=86.00, z=286.78], EntityCow['Cow'/195, l='MpServer', x=-129.63, y=87.00, z=275.50], EntityPig['Pig'/196, l='MpServer', x=-134.82, y=89.00, z=292.66], EntityPig['Pig'/197, l='MpServer', x=-134.59, y=89.00, z=295.50], EntityCreeper['Creeper'/456, l='MpServer', x=-141.50, y=42.00, z=213.50], EntityPig['Pig'/204, l='MpServer', x=-125.50, y=69.00, z=145.25], EntitySlime['Slime'/205, l='MpServer', x=-112.31, y=27.00, z=162.69], EntitySlime['Slime'/206, l='MpServer', x=-116.64, y=18.47, z=166.69], EntitySlime['Slime'/207, l='MpServer', x=-117.69, y=27.05, z=162.69], EntitySlime['Slime'/208, l='MpServer', x=-113.63, y=18.00, z=165.38], EntityCreeper['Creeper'/209, l='MpServer', x=-118.44, y=18.00, z=164.96], EntitySkeleton['Skeleton'/210, l='MpServer', x=-125.63, y=19.00, z=177.50], EntityCreeper['Creeper'/211, l='MpServer', x=-127.50, y=19.00, z=184.50], EntityCreeper['Creeper'/212, l='MpServer', x=-127.50, y=42.00, z=177.50], EntityBat['Bat'/213, l='MpServer', x=-115.62, y=33.72, z=192.17], EntityBat['Bat'/214, l='MpServer', x=-136.38, y=24.18, z=219.47], EntityCreeper['Creeper'/215, l='MpServer', x=-112.13, y=18.00, z=235.75], EntityBat['Bat'/216, l='MpServer', x=-107.96, y=24.25, z=237.60], EntityCow['Cow'/218, l='MpServer', x=-124.44, y=87.00, z=248.47], EntityChicken['Chicken'/219, l='MpServer', x=-132.48, y=95.31, z=246.35], EntityCow['Cow'/220, l='MpServer', x=-114.44, y=89.00, z=257.38], EntityCreeper['Creeper'/221, l='MpServer', x=-120.50, y=40.00, z=274.50], EntityCreeper['Creeper'/222, l='MpServer', x=-120.50, y=40.00, z=275.50], EntityPig['Pig'/223, l='MpServer', x=-113.19, y=80.00, z=274.28], EntityPig['Pig'/224, l='MpServer', x=-124.97, y=85.00, z=275.06], EntitySkeleton['Skeleton'/225, l='MpServer', x=-116.50, y=87.00, z=287.50], EntityPig['Pig'/237, l='MpServer', x=-102.25, y=67.00, z=150.50], EntitySkeleton['Skeleton'/238, l='MpServer', x=-104.50, y=31.00, z=164.50], EntityPig['Pig'/239, l='MpServer', x=-105.34, y=69.00, z=175.72], EntitySkeleton['Skeleton'/240, l='MpServer', x=-98.09, y=35.00, z=190.22], EntityBat['Bat'/241, l='MpServer', x=-94.25, y=35.89, z=192.50], EntityChicken['Chicken'/242, l='MpServer', x=-108.38, y=78.00, z=178.41], EntityPig['Pig'/243, l='MpServer', x=-96.47, y=79.00, z=180.22], EntityBat['Bat'/244, l='MpServer', x=-93.98, y=24.87, z=199.95], EntityBat['Bat'/245, l='MpServer', x=-97.59, y=32.10, z=192.25], EntityWitch['Witch'/246, l='MpServer', x=-110.63, y=32.00, z=200.50], EntityWitch['Witch'/247, l='MpServer', x=-105.50, y=32.00, z=200.50], EntityWitch['Witch'/248, l='MpServer', x=-107.50, y=32.00, z=195.50], EntitySpider['Spider'/249, l='MpServer', x=-107.10, y=32.00, z=200.64], EntityCreeper['Creeper'/250, l='MpServer', x=-102.36, y=21.00, z=243.16], EntitySlime['Slime'/251, l='MpServer', x=-104.69, y=30.00, z=246.31], EntitySkeleton['Skeleton'/252, l='MpServer', x=-103.40, y=20.00, z=240.78], EntitySkeleton['Skeleton'/253, l='MpServer', x=-99.97, y=21.00, z=247.50], EntityCreeper['Creeper'/254, l='MpServer', x=-96.50, y=20.00, z=246.50], EntityCreeper['Creeper'/255, l='MpServer', x=-107.00, y=20.00, z=241.59]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555)
at net.minecraft.client.Minecraft.run(Minecraft.java:980)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 765120136 bytes (729 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 6 mods loaded, 6 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
CodeChickenCore{1.0.4.35} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
NotEnoughItems{1.0.4.83} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.4.83-dev.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MoreMinecraft{1.7.10-0.0.5} [More Minecraft] (More-Minecraft-1.7.10) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: GeForce GTX 745/PCIe/SSE2 GL version 4.5.0 NVIDIA 347.25, NVIDIA Corporation
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.

Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)

I know it's saying theBlockPlant has a nullpointer but how do i fix this?

Link to comment
Share on other sites

No, you create your seed item in a static initializer. Don't do that. Do it in preInit.

@Mod.EventHandler

    public void preInit(FMLPreInitializationEvent event){

        ConfigurationHandler.init(event.getSuggestedConfigurationFile());

        FMLCommonHandler.instance().bus().register(new ConfigurationHandler());

 

        InitBlock.Init();

        InitItem.Init();

 

        LogHelper.info("Pre Initialization Event Complete");

    }

Link to comment
Share on other sites

No, you create your seed item in a static initializer. Don't do that. Do it in preInit.

    public static final ItemSeed BlueberrySeed = new ItemSeed(InitBlock.BlueberryCrop, Blocks.farmland, "BlueberrySeed");

Well well well, what do we have here...

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

No, you create your seed item in a static initializer. Don't do that. Do it in preInit.

    public static final ItemSeed BlueberrySeed = new ItemSeed(InitBlock.BlueberryCrop, Blocks.farmland, "BlueberrySeed");

Well well well, what do we have here...

Then i can't reference it can i

 

EDIT: also moving this first in preinit does nothing

        GameRegistry.registerBlock(InitBlock.BlueberryCrop, "BlueberryCrop");

Link to comment
Share on other sites

No, you create your seed item in a static initializer. Don't do that. Do it in preInit.

    public static final ItemSeed BlueberrySeed = new ItemSeed(InitBlock.BlueberryCrop, Blocks.farmland, "BlueberrySeed");

Well well well, what do we have here...

Then i can't reference it can i

Well, you call
InitItem.Init()

from pre-init, so if you declare your item outside the method, and instantiate the item in pre-init and register it there as well, it should work just fine.

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

No, you create your seed item in a static initializer. Don't do that. Do it in preInit.

    public static final ItemSeed BlueberrySeed = new ItemSeed(InitBlock.BlueberryCrop, Blocks.farmland, "BlueberrySeed");

Well well well, what do we have here...

Then i can't reference it can i

Well, you call
InitItem.Init()

from pre-init, so if you declare your item outside the method, and instantiate the item in pre-init and register it there as well, it should work just fine.

Same crash, same report

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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