Jump to content

[FIXED] [1.7.2] Block not working


bdkuhman

Recommended Posts

EDIT: I found out what was wrong, i was registering my block in Init, not PreInit.

 

 

I am trying to just create a basic block, but in-game, it comes out as an item named "Tile.null.name", and crashes when right clicked with. The problem is most likely a major derp on my part...

 

Also, it doesn't show up in the creative menu, i have to use /give to get it.

I left out the package names.

 

EDIT: I am using forge build 10.12.0.995 for Minecraft 1.7.2

 

Crash report:

 

 


[07:39:25] [server thread/ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking memory connection
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:181) ~[NetworkSystem.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:680) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:568) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:114) ~[integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:705) [MinecraftServer$2.class:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:138) ~[itemStack.class:?]
at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:397) ~[itemInWorldManager.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:551) ~[NetHandlerPlayServer.class:?]
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(C08PacketPlayerBlockPlacement.java:60) ~[C08PacketPlayerBlockPlacement.class:?]
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(C08PacketPlayerBlockPlacement.java:9) ~[C08PacketPlayerBlockPlacement.class:?]
at net.minecraft.network.NetworkManager.processReadPackets(NetworkManager.java:198) ~[NetworkManager.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) ~[NetworkSystem.class:?]
... 5 more
[07:39:25] [server thread/ERROR]: This crash report has been saved to: C:\Users\Brennan\Downloads\forge-1.7.2-10.12.0.995-src\.\crash-reports\crash-2014-01-08_07.39.25-server.txt
[07:39:25] [server thread/INFO]: Stopping server
[07:39:27] [server thread/INFO]: Saving players
[07:39:27] [server thread/INFO]: Saving worlds
[07:39:27] [server thread/INFO]: Saving chunks for level 'DEV'/Overworld
[07:39:28] [server thread/INFO]: Saving chunks for level 'DEV'/Nether
[07:39:28] [server thread/INFO]: Saving chunks for level 'DEV'/The End
[07:39:29] [server thread/INFO]: Unloading dimension 0
[07:39:29] [server thread/INFO]: Unloading dimension -1
[07:39:29] [server thread/INFO]: Unloading dimension 1
[07:39:31] [Client thread/FATAL]: Unreported exception thrown!
java.lang.ArrayIndexOutOfBoundsException: -1
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:138) ~[itemStack.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:375) ~[PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1440) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1947) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:951) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:869) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:103) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_09]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_09]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_09]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_09]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
[07:39:31] [server thread/INFO]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
---- Minecraft Crash Report ----
// Sorry

Time: 1/8/14 7:39 AM
Description: Unexpected error

java.lang.ArrayIndexOutOfBoundsException: -1
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:138)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:375)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1440)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1947)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:951)
at net.minecraft.client.Minecraft.run(Minecraft.java:869)
at net.minecraft.client.main.Main.main(Main.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:138)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:375)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1440)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player857'/207, l='MpServer', x=13.50, y=70.62, z=154.50]]
Chunk stats: MultiplayerChunkCache: 225, 225
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (5,64,155), Chunk: (at 5,4,11 in 0,9; contains blocks 0,0,144 to 15,255,159), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 5863 game time, 5863 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 137 total; [EntityCreeper['Creeper'/2443, l='MpServer', x=-30.50, y=18.00, z=188.50], EntityCreeper['Creeper'/4064, l='MpServer', x=23.50, y=42.00, z=126.50], EntitySkeleton['Skeleton'/4073, l='MpServer', x=-22.09, y=42.00, z=130.53], EntityCreeper['Creeper'/4072, l='MpServer', x=-14.50, y=41.00, z=127.50], EntitySkeleton['Skeleton'/4075, l='MpServer', x=-16.38, y=41.00, z=129.66], EntitySkeleton['Skeleton'/4074, l='MpServer', x=-16.34, y=41.00, z=126.78], EntityEnderman['Enderman'/4077, l='MpServer', x=-14.50, y=41.00, z=129.69], EntityEnderman['Enderman'/4076, l='MpServer', x=-17.75, y=42.00, z=126.22], EntitySquid['Squid'/3839, l='MpServer', x=-33.72, y=54.06, z=191.28], EntityEnderman['Enderman'/4078, l='MpServer', x=-12.31, y=41.00, z=130.53], EntitySquid['Squid'/3811, l='MpServer', x=-41.22, y=61.81, z=218.31], EntitySquid['Squid'/3810, l='MpServer', x=-44.03, y=62.38, z=220.44], EntitySquid['Squid'/3809, l='MpServer', x=-49.47, y=62.00, z=219.94], EntitySquid['Squid'/3808, l='MpServer', x=-52.44, y=58.19, z=220.63], EntitySquid['Squid'/3813, l='MpServer', x=-47.44, y=61.38, z=218.81], EntitySkeleton['Skeleton'/1902, l='MpServer', x=18.31, y=40.00, z=130.50], EntitySquid['Squid'/3812, l='MpServer', x=-46.50, y=62.38, z=217.31], EntityCreeper['Creeper'/3277, l='MpServer', x=-51.50, y=41.00, z=210.50], EntitySkeleton['Skeleton'/3276, l='MpServer', x=-49.91, y=42.00, z=208.50], EntityCreeper['Creeper'/3278, l='MpServer', x=-51.50, y=41.00, z=211.50], EntitySkeleton['Skeleton'/2712, l='MpServer', x=1.69, y=32.00, z=154.56], EntityCreeper['Creeper'/4382, l='MpServer', x=12.50, y=38.00, z=162.50], EntitySquid['Squid'/3777, l='MpServer', x=16.69, y=58.94, z=196.81], EntitySquid['Squid'/3776, l='MpServer', x=18.22, y=58.34, z=206.28], EntitySquid['Squid'/3779, l='MpServer', x=17.38, y=56.25, z=205.31], EntitySquid['Squid'/3781, l='MpServer', x=14.78, y=59.22, z=209.66], EntityEnderman['Enderman'/1870, l='MpServer', x=-35.69, y=26.00, z=141.31], EntitySquid['Squid'/3782, l='MpServer', x=14.06, y=59.31, z=215.63], EntitySquid['Squid'/3787, l='MpServer', x=27.50, y=57.00, z=218.50], EntitySquid['Squid'/3786, l='MpServer', x=23.78, y=55.22, z=219.38], EntitySquid['Squid'/3788, l='MpServer', x=28.50, y=58.28, z=216.28], EntityBat['Bat'/4469, l='MpServer', x=-5.34, y=33.95, z=146.70], EntityZombie['Zombie'/1306, l='MpServer', x=23.41, y=59.00, z=169.99], EntityZombie['Zombie'/66, l='MpServer', x=-35.50, y=43.00, z=133.91], EntityBat['Bat'/4467, l='MpServer', x=27.66, y=41.00, z=121.75], EntityHorse['Horse'/67, l='MpServer', x=-38.59, y=71.00, z=130.25], EntitySquid['Squid'/3774, l='MpServer', x=9.66, y=58.31, z=199.91], EntityBat['Bat'/4477, l='MpServer', x=6.56, y=35.00, z=147.41], EntitySquid['Squid'/3775, l='MpServer', x=17.69, y=58.84, z=202.47], EntityZombie['Zombie'/4015, l='MpServer', x=-62.50, y=19.00, z=159.50], EntitySquid['Squid'/3772, l='MpServer', x=14.31, y=56.00, z=212.84], EntitySquid['Squid'/3773, l='MpServer', x=8.41, y=59.34, z=201.56], EntityBat['Bat'/4472, l='MpServer', x=7.72, y=37.31, z=151.75], EntityBat['Bat'/4474, l='MpServer', x=8.44, y=36.87, z=154.63], EntityBat['Bat'/4475, l='MpServer', x=7.69, y=38.56, z=149.56], EntityHorse['Horse'/85, l='MpServer', x=-22.06, y=65.00, z=141.97], EntityHorse['Horse'/84, l='MpServer', x=-21.91, y=63.00, z=130.97], EntityCreeper['Creeper'/3067, l='MpServer', x=-31.50, y=43.00, z=136.50], EntityCreeper['Creeper'/4017, l='MpServer', x=69.50, y=60.00, z=186.50], EntitySquid['Squid'/3733, l='MpServer', x=-18.63, y=61.16, z=218.44], EntityZombie['Zombie'/3973, l='MpServer', x=40.47, y=44.00, z=160.97], EntityItem['item.item.seeds'/98, l='MpServer', x=-15.28, y=63.13, z=120.25], EntitySquid['Squid'/3729, l='MpServer', x=-30.13, y=58.16, z=207.63], EntitySquid['Squid'/3731, l='MpServer', x=-28.13, y=62.28, z=217.31], EntityCreeper['Creeper'/3983, l='MpServer', x=-57.50, y=15.00, z=231.50], EntityHorse['Horse'/110, l='MpServer', x=10.94, y=72.00, z=92.16], EntityHorse['Horse'/111, l='MpServer', x=9.13, y=74.00, z=95.75], EntityHorse['Horse'/109, l='MpServer', x=12.72, y=72.00, z=89.16], EntityBat['Bat'/3015, l='MpServer', x=-3.83, y=19.00, z=157.75], EntityEnderman['Enderman'/3990, l='MpServer', x=14.66, y=35.00, z=141.69], EntityBat['Bat'/119, l='MpServer', x=7.16, y=33.90, z=166.25], EntityZombie['Zombie'/1800, l='MpServer', x=44.50, y=19.00, z=168.50], EntityHorse['Horse'/112, l='MpServer', x=10.44, y=72.00, z=90.28], EntityBat['Bat'/4189, l='MpServer', x=-10.31, y=19.22, z=220.75], EntitySquid['Squid'/3724, l='MpServer', x=-26.81, y=61.91, z=217.28], EntitySkeleton['Skeleton'/3996, l='MpServer', x=58.50, y=28.00, z=179.50], EntitySkeleton['Skeleton'/4427, l='MpServer', x=54.50, y=29.00, z=179.50], EntitySquid['Squid'/3721, l='MpServer', x=-38.84, y=62.25, z=216.78], EntitySkeleton['Skeleton'/4426, l='MpServer', x=52.50, y=29.00, z=179.50], EntitySkeleton['Skeleton'/3995, l='MpServer', x=65.09, y=29.00, z=178.50], EntitySquid['Squid'/3723, l='MpServer', x=-32.31, y=59.88, z=218.53], EntitySkeleton['Skeleton'/3406, l='MpServer', x=-8.50, y=40.00, z=141.50], EntityHorse['Horse'/137, l='MpServer', x=16.50, y=72.00, z=92.56], EntitySkeleton['Skeleton'/3407, l='MpServer', x=-9.50, y=40.00, z=142.50], EntityHorse['Horse'/138, l='MpServer', x=16.44, y=72.00, z=89.59], EntitySkeleton['Skeleton'/4529, l='MpServer', x=-3.50, y=37.00, z=159.50], EntitySkeleton['Skeleton'/4532, l='MpServer', x=-7.50, y=40.00, z=144.66], EntityBat['Bat'/159, l='MpServer', x=6.28, y=29.59, z=164.22], EntitySpider['Spider'/3680, l='MpServer', x=30.50, y=61.00, z=175.28], EntitySkeleton['Skeleton'/150, l='MpServer', x=29.50, y=40.00, z=172.50], EntityZombie['Zombie'/151, l='MpServer', x=27.01, y=60.00, z=165.75], EntityZombie['Zombie'/4234, l='MpServer', x=-23.50, y=15.00, z=146.50], EntityZombie['Zombie'/4235, l='MpServer', x=-25.50, y=15.00, z=147.50], EntityZombie['Zombie'/4236, l='MpServer', x=-15.50, y=33.00, z=116.50], EntityEnderman['Enderman'/4237, l='MpServer', x=-19.50, y=33.00, z=119.50], EntityHorse['Donkey'/174, l='MpServer', x=63.81, y=67.00, z=175.22], EntityHorse['Donkey'/173, l='MpServer', x=58.75, y=70.00, z=183.50], EntityHorse['Donkey'/172, l='MpServer', x=56.88, y=71.00, z=183.03], EntityHorse['Horse'/163, l='MpServer', x=41.09, y=71.00, z=190.09], EntityBat['Bat'/1534, l='MpServer', x=-16.25, y=17.81, z=229.44], EntityHorse['Horse'/167, l='MpServer', x=40.09, y=70.00, z=192.09], EntityCreeper['Creeper'/2015, l='MpServer', x=-9.72, y=32.00, z=116.22], EntityHorse['Horse'/166, l='MpServer', x=42.94, y=71.00, z=197.38], EntityHorse['Donkey'/165, l='MpServer', x=47.09, y=71.00, z=189.19], EntitySkeleton['Skeleton'/4231, l='MpServer', x=-8.50, y=32.00, z=113.50], EntityHorse['Horse'/164, l='MpServer', x=35.38, y=71.00, z=183.03], EntitySkeleton['Skeleton'/3453, l='MpServer', x=-58.94, y=17.00, z=100.44], EntitySkeleton['Skeleton'/3658, l='MpServer', x=34.50, y=23.00, z=181.50], EntitySpider['Spider'/3176, l='MpServer', x=54.44, y=54.00, z=181.88], EntityCreeper['Creeper'/3174, l='MpServer', x=50.50, y=53.00, z=189.50], EntitySlime['Slime'/176, l='MpServer', x=76.69, y=34.00, z=110.72], EntityCreeper['Creeper'/3173, l='MpServer', x=51.50, y=53.00, z=188.50], EntityZombie['Zombie'/4334, l='MpServer', x=-54.50, y=26.00, z=134.50], EntityZombie['Zombie'/4335, l='MpServer', x=-54.50, y=26.00, z=133.50], EntityZombie['Zombie'/2674, l='MpServer', x=0.50, y=38.00, z=137.31], EntityZombie['Zombie'/4333, l='MpServer', x=-54.50, y=26.00, z=132.50], EntityBat['Bat'/1020, l='MpServer', x=-1.03, y=33.90, z=152.97], EntityZombie['Zombie'/3102, l='MpServer', x=-60.50, y=19.00, z=163.50], EntityCreeper['Creeper'/1982, l='MpServer', x=-8.56, y=33.00, z=118.03], EntitySkeleton['Skeleton'/2931, l='MpServer', x=-66.50, y=31.00, z=170.50], EntityCreeper['Creeper'/4347, l='MpServer', x=35.50, y=16.00, z=178.25], EntityBat['Bat'/3620, l='MpServer', x=30.79, y=36.90, z=183.82], EntityClientPlayerMP['Player857'/207, l='MpServer', x=13.50, y=70.62, z=154.50], EntityBat['Bat'/3619, l='MpServer', x=30.77, y=52.67, z=192.49], EntityZombie['Zombie'/4336, l='MpServer', x=-56.50, y=26.00, z=131.50], EntityBat['Bat'/2392, l='MpServer', x=83.08, y=30.00, z=100.98], EntityBat['Bat'/3613, l='MpServer', x=42.83, y=37.00, z=160.79], EntityCreeper['Creeper'/1943, l='MpServer', x=-36.50, y=14.00, z=83.50], EntityBat['Bat'/4302, l='MpServer', x=30.25, y=16.74, z=171.50], EntityBat['Bat'/4303, l='MpServer', x=49.44, y=15.00, z=172.56], EntityZombie['Zombie'/3371, l='MpServer', x=-64.00, y=19.00, z=96.44], EntityCreeper['Creeper'/1941, l='MpServer', x=-41.50, y=12.00, z=92.72], EntitySquid['Squid'/3850, l='MpServer', x=-32.22, y=54.34, z=196.81], EntitySquid['Squid'/3848, l='MpServer', x=-33.63, y=53.19, z=199.28], EntitySquid['Squid'/3849, l='MpServer', x=-27.84, y=51.28, z=195.72], EntityBat['Bat'/4292, l='MpServer', x=8.53, y=46.16, z=128.59], EntitySquid['Squid'/3846, l='MpServer', x=-23.72, y=54.25, z=201.44], EntityBat['Bat'/4293, l='MpServer', x=30.50, y=44.00, z=130.50], EntitySquid['Squid'/3847, l='MpServer', x=-30.84, y=49.88, z=195.81], EntitySquid['Squid'/3844, l='MpServer', x=-25.38, y=54.16, z=197.53], EntitySquid['Squid'/3845, l='MpServer', x=-27.50, y=52.34, z=199.72], EntitySquid['Squid'/3842, l='MpServer', x=-34.66, y=54.06, z=192.88], EntityCreeper['Creeper'/2409, l='MpServer', x=-52.50, y=19.00, z=155.50], EntitySquid['Squid'/3840, l='MpServer', x=-30.50, y=54.13, z=195.34], EntitySquid['Squid'/3841, l='MpServer', x=-37.22, y=51.03, z=189.53], EntityEnderman['Enderman'/2899, l='MpServer', x=22.03, y=37.00, z=146.69], EntityEnderman['Enderman'/2898, l='MpServer', x=21.50, y=37.00, z=144.50]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:384)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2430)
at net.minecraft.client.Minecraft.run(Minecraft.java:898)
at net.minecraft.client.main.Main.main(Main.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_09, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 80688312 bytes (76 MB) / 251936768 bytes (240 MB) up to 450101248 bytes (429 MB)
JVM Flags: 0 total;
AABB Pool Size: 16594 (929264 bytes; 0 MB) allocated, 4 (224 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.01-pre FML v7.2.45.995 Minecraft Forge 10.12.0.995 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.45.995} [Forge Mod Loader] (forge-1.7.2-10.12.0.995-mcp.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.0.995} [Minecraft Forge] (forge-1.7.2-10.12.0.995-mcp.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
deconstruction{1.0} [The Deconstruction Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.7.2
LWJGL: 2.9.0
OpenGL: AMD Radeon HD 6290 Graphics      GL version 4.1.10834 Compatibility Profile Context, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: ~~ERROR~~ NullPointerException: null
Profiler Position: N/A (disabled)
Vec3 Pool Size: 38151 (2136456 bytes; 2 MB) allocated, 22 (1232 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
#@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Brennan\Downloads\forge-1.7.2-10.12.0.995-src\.\crash-reports\crash-2014-01-08_07.39.31-client.txt
[/Code]

 

 

 

[b]DeconTable.java[/b] (Main mod class)

 

 

[Code]
import net.minecraft.init.Blocks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;

@Mod(modid = DeconTable.MODID, name=DeconTable.NAME, version = DeconTable.VERSION)
public class DeconTable
{
    public static final String MODID = "deconstruction";
    public static final String VERSION = "1.0";
    public static final String NAME = "The Deconstruction Mod";
    public static final Block deconTable = (BlockDeconTable) new BlockDeconTable();
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    GameRegistry.registerBlock(deconTable, "DeconTable");
    LanguageRegistry.addName(deconTable, "Deconstruction Table");
       
    }
}
[/Code]

 

 

 

[b]BlockDeconTable[/b] (custom block class)

 

 

[Code]
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;


public class BlockDeconTable extends Block
{
public BlockDeconTable(){
super(Material.field_151575_d);
func_149647_a(CreativeTabs.tabDecorations);
}
}
[/Code]

 

 

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.