![](https://forums.minecraftforge.net/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
2FastAssassin
-
Posts
88 -
Joined
-
Last visited
Posts posted by 2FastAssassin
-
-
I've just gone through and renamed all my items (just removed item from eg'itemdragongem' to make 'dragongem') and I dont know whats causing it to crash. it says something about where my items are registered but its exactly how it should be
Crash Report:
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.
Time: 24/06/15 12:17 PM
Description: Initializing game
java.lang.NullPointerException: Initializing game
at wearethewarriorsmod.items.ItemClass.registerItem(ItemClass.java:400)
at wearethewarriorsmod.items.ItemClass.mainRegistry(ItemClass.java:30)
at wearethewarriorsmod.WeAreTheWarriorsMod.preInit(WeAreTheWarriorsMod.java:209)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
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(Unknown Source)
at GradleStart.main(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at wearethewarriorsmod.items.ItemClass.registerItem(ItemClass.java:400)
at wearethewarriorsmod.items.ItemClass.mainRegistry(ItemClass.java:30)
at wearethewarriorsmod.WeAreTheWarriorsMod.preInit(WeAreTheWarriorsMod.java:209)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
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(Unknown Source)
at GradleStart.main(Unknown Source)
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation
Memory: 907403384 bytes (865 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 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: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
watwm{1.1.0} [We Are The Warriors] (bin) Unloaded->Constructed->Errored
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: ATI Radeon 3000 Graphics GL version 3.3.10750 Compatibility Profile Context, ATI Technologies Inc.
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)
ItemClass:
package wearethewarriorsmod.items;
import wearethewarriorsmod.WeAreTheWarriorsMod;
import wearethewarriorsmod.bow.burntarrow;
import wearethewarriorsmod.bow.corruptedbow;
import wearethewarriorsmod.bow.flamebow;
import wearethewarriorsmod.item.ItemAncientsword;
import wearethewarriorsmod.item.ItemDragonsword;
import wearethewarriorsmod.item.ItemSwordofcorruptedsouls;
import wearethewarriorsmod.item.Itemancientarmor;
import wearethewarriorsmod.item.Itemchosenarmor;
import wearethewarriorsmod.item.Itemdragonarmor;
import wearethewarriorsmod.item.Itemearthsword;
import wearethewarriorsmod.item.Itemladyarmor;
import wearethewarriorsmod.item.ItemsoulArmor;
import wearethewarriorsmod.item.Itemsoulsword;
import wearethewarriorsmod.item.earthArmor;
import wearethewarriorsmod.item.ladystaff;
import wearethewarriorsmod.item.swordofthechosenone;
import wearethewarriorsmod.tools.dragonpickaxe;
import wearethewarriorsmod.tools.earthpickaxe;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraftforge.common.util.EnumHelper;
public class ItemClass {
public static void mainRegistry() {
registerItem();
initualiseItem();
}
// Items
public static Item corruptedsoulgem;
public static Item soulshard;
public static Item dragonrod;
public static Item flamedust;
public static Item corruptedsoul;
public static Item flamegem;
public static Item blazeshard;
public static Item burntstring;
public static Item corruptedsoulrod;
public static Item corruptedstring;
public static Item earthshard;
public static Item hollowgem;
public static Item earthgem;
public static Item pureelementalgem;
public static Item puresoulgem;
public static Item soulrod;
public static Item sharpiron;
public static Item heartshard;
public static Item crystalheart;
public static Item quartzgem;
public static Item quartzrod;
public static Item ironrod;
// Tools & Weapons
public static Item swordofcorruptedsouls;
public static Item dragonsword;
public static Item ancientsword;
public static Item swordofthechosenone;
public static Item earthsword;
public static Item soulsword;
public static Item ladystaff;
public static Item flamebow;
public static Item corruptedbow;
public static Item burntarrow;
public static Item corruptedarrow;
public static Item dragonpickaxe;
public static Item earthpickaxe;
// Armor
public static Item corruptedhelmet;
public static Item corruptedchestplate;
public static Item corruptedleggings;
public static Item corruptedboots;
public static Item dragonhelmet;
public static Item dragonchestplate;
public static Item dragonleggings;
public static Item dragonboots;
public static Item ancienthelmet;
public static Item ancientchestplate;
public static Item ancientleggings;
public static Item ancientboots;
public static Item chosenhelmet;
public static Item chosenchestplate;
public static Item chosenleggings;
public static Item chosenboots;
public static Item soulhelmet;
public static Item soulchestplate;
public static Item soulleggings;
public static Item soulboots;
public static Item earthhelmet;
public static Item earthchestplate;
public static Item earthleggings;
public static Item earthboots;
public static Item ladyhelmet;
public static Item ladychestplate;
public static Item ladyleggings;
public static Item ladyboots;
// ToolMaterial
public static final Item.ToolMaterial soulToolMaterial = EnumHelper
.addToolMaterial("soulToolMaterial", 0, 2000, 1.0F, 19.0F, 0);
public static final Item.ToolMaterial chosenToolMaterial = EnumHelper
.addToolMaterial("chosenToolMaterial", 0, -1, 1.0F, 120.0F, 0);
public static final Item.ToolMaterial corruptedToolMaterial = EnumHelper
.addToolMaterial("corruptedToolMaterial", 0, 3000, 1.0F, 28.0F, 0);
public static final Item.ToolMaterial earthSwordMaterial = EnumHelper
.addToolMaterial("earthSwordMaterial", 0, 4000, 1.0F, 10.0F, 0);
public static final Item.ToolMaterial earthToolMaterial = EnumHelper
.addToolMaterial("earthToolMaterial", 3, 4000, 8.0F, 2.0F, 0);
public static final Item.ToolMaterial dragonSwordMaterial = EnumHelper
.addToolMaterial("dragonSwordMaterial", 0, 2000, 1.0F, 20.0F, 0);
public static final Item.ToolMaterial dragonToolMaterial = EnumHelper
.addToolMaterial("dragonToolMaterial", 3, 2000, 16.0F, 2.0F, 0);
public static final Item.ToolMaterial ancientToolMaterial = EnumHelper
.addToolMaterial("ancientToolMaterial", 0, 40, 0.0F, 0.0F, 0);
public static final Item.ToolMaterial ladyToolMaterial = EnumHelper
.addToolMaterial("ladyToolMaterial", 1, -1, 1.0F, 29.5F, 0);
// ArmorMaterial
public static final ItemArmor.ArmorMaterial ladyArmorMaterial = EnumHelper
.addArmorMaterial("ladyArmorMaterial", -1,
new int[] { 3, 11, 7, 2 }, 0);
public static final ItemArmor.ArmorMaterial soulArmorMaterial = EnumHelper
.addArmorMaterial("soulArmorMaerial", 3000, new int[] { 8, 17, 11,
7 }, 0);
public static final ItemArmor.ArmorMaterial earthArmorMaterial = EnumHelper
.addArmorMaterial("earthArmorMaerial", 6000, new int[] { 9, 20, 13,
8 }, 0);
public static final ItemArmor.ArmorMaterial chosenArmorMaterial = EnumHelper
.addArmorMaterial("chosenArmorMaterial", -1, new int[] { 25, 45,
30, 20 }, 0);
public static final ItemArmor.ArmorMaterial corruptedArmorMaterial = EnumHelper
.addArmorMaterial("corruptedArmorMaterial", 10000, new int[] { 10,
25, 16, 9 }, 0);
public static final ItemArmor.ArmorMaterial dragonArmorMaterial = EnumHelper
.addArmorMaterial("dragonArmorMaterial", 5500, new int[] { 8, 15,
10, 6 }, 0);
public static final ItemArmor.ArmorMaterial ancientArmorMaterial = EnumHelper
.addArmorMaterial("ancientArmorMaterial", 100, new int[] { 1, 2, 2,
1 }, 0);
public static void initualiseItem() {
corruptedsoulgem = new corruptedsoulgem()
.setUnlocalizedName("corruptedsoulgem")
.setTextureName("watwm:corrupted_soul_gem")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
soulshard = new soulshard().setUnlocalizedName("soulshard")
.setTextureName("watwm:soul_shard")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
dragonrod = new dragonrod().setUnlocalizedName("dragonrod")
.setTextureName("watwm:dragon_rod")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
flamedust = new flamedust().setUnlocalizedName("flamedust")
.setTextureName("watwm:flame_dust")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedsoul = new corruptedsoul().setUnlocalizedName("corruptedsoul")
.setTextureName("watwm:corrupted_soul")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
flamegem = new flamegem().setUnlocalizedName("flamegem")
.setTextureName("watwm:flame_gem")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
blazeshard = new blazeshard().setUnlocalizedName("blazeshard")
.setTextureName("watwm:blaze_shard")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
burntstring = new burntstring().setUnlocalizedName("burntstring")
.setTextureName("watwm:burning_string")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedsoulrod = new corruptedsoulrod()
.setUnlocalizedName("corruptedsoulrod")
.setTextureName("watwm:corrupted_soul_rod")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedstring = new corruptedstring()
.setUnlocalizedName("corruptedstring")
.setTextureName("watwm:corrupted_string")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
earthshard = new earthshard().setUnlocalizedName("earthshard")
.setTextureName("watwm:earth_shard")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
hollowgem = new hollowgem().setUnlocalizedName("hollowgem")
.setTextureName("watwm:hollow_gem")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
earthgem = new earthgem().setUnlocalizedName("earthgem")
.setTextureName("watwm:earth_gem")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
pureelementalgem = new pureelementalgem()
.setUnlocalizedName("pureelementalgem")
.setTextureName("watwm:pure_elemental_gem")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
puresoulgem = new puresoulgem().setUnlocalizedName("puresoulgem")
.setTextureName("watwm:pure_soul_gem")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
soulrod = new soulrod().setUnlocalizedName("soulrod")
.setTextureName("watwm:soul_rod")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
sharpiron = new sharpiron().setUnlocalizedName("sharpiron")
.setTextureName("watwm:sharp_iron")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
heartshard = new heartshard().setUnlocalizedName("heartshard")
.setTextureName("watwm:heart_shard")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
crystalheart = new crystalheart().setUnlocalizedName("crystalheart")
.setTextureName("watwm:crystal_heart")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
quartzgem = new quartzgem().setUnlocalizedName("quartzgem")
.setTextureName("watwm:quartz_gem")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
quartzrod = new quartzrod().setUnlocalizedName("quartzrod")
.setTextureName("watwm:quartz_rod")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ironrod = new quartzrod().setUnlocalizedName("ironrod")
.setTextureName("watwm:iron_rod")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
// Tools & Weapons
swordofthechosenone = new swordofthechosenone(chosenToolMaterial)
.setUnlocalizedName("ItemSwordofthechosenone")
.setTextureName("watwm:sword_of_the_chosen_one")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
swordofcorruptedsouls = new ItemSwordofcorruptedsouls(
corruptedToolMaterial)
.setUnlocalizedName("ItemSwordofcorruptedsouls")
.setTextureName("watwm:sword_of_corrupted_souls")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
dragonsword = new ItemDragonsword(dragonSwordMaterial)
.setUnlocalizedName("ItemDragonsword")
.setTextureName("watwm:dragon_sword")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ancientsword = new ItemAncientsword(ancientToolMaterial)
.setUnlocalizedName("ItemAncientsword")
.setTextureName("watwm:ancient_sword")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
soulsword = new Itemsoulsword(soulToolMaterial)
.setUnlocalizedName("ItemSoulsword")
.setTextureName("watwm:soul_sword")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
earthsword = new Itemearthsword(earthSwordMaterial)
.setUnlocalizedName("ItemEarthsword")
.setTextureName("watwm:earth_sword")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ladystaff = new ladystaff(ladyToolMaterial)
.setUnlocalizedName("ItemLadystaff")
.setTextureName("watwm:lady_staff")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
flamebow = new flamebow().setUnlocalizedName("flamebow")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedbow = new corruptedbow().setUnlocalizedName("corruptedbow")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
burntarrow = new burntarrow().setUnlocalizedName("burntarrow")
.setTextureName("watwm:burning_arrow")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedarrow = new wearethewarriorsmod.bow.corruptedarrow()
.setUnlocalizedName("corruptedarrow")
.setTextureName("watwm:corrupted_arrow")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
dragonpickaxe = new dragonpickaxe(dragonToolMaterial)
.setUnlocalizedName("Itemdragonpickaxe")
.setTextureName("watwm:dragon_pickaxe")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
earthpickaxe = new earthpickaxe(earthToolMaterial)
.setUnlocalizedName("Itemearthpickaxe")
.setTextureName("watwm:earth_pickaxe")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
// Armor
ladyhelmet = new Itemladyarmor(ladyArmorMaterial, 0, 0)
.setUnlocalizedName("Itemladyhelmet")
.setTextureName("watwm:lady_helmet")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ladychestplate = new Itemladyarmor(ladyArmorMaterial, 0, 1)
.setUnlocalizedName("Itemladychestplate")
.setTextureName("watwm:lady_chestplate")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ladyleggings = new Itemladyarmor(ladyArmorMaterial, 0, 2)
.setUnlocalizedName("Itemladyleggings")
.setTextureName("watwm:lady_leggings")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ladyboots = new Itemladyarmor(ladyArmorMaterial, 0, 3)
.setUnlocalizedName("Itemladyboots")
.setTextureName("watwm:lady_boots")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedhelmet = new wearethewarriorsmod.item.Itemcorruptedarmor(
corruptedArmorMaterial, 0, 0)
.setUnlocalizedName("Itemcorruptedhelmet")
.setTextureName("watwm:corrupted_helmet")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedchestplate = new wearethewarriorsmod.item.Itemcorruptedarmor(
corruptedArmorMaterial, 0, 1)
.setUnlocalizedName("Itemcorruptedchestplate")
.setTextureName("watwm:corrupted_chestplate")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedleggings = new wearethewarriorsmod.item.Itemcorruptedarmor(
corruptedArmorMaterial, 0, 2)
.setUnlocalizedName("Itemcorruptedleggings")
.setTextureName("watwm:corrupted_leggings")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
corruptedboots = new wearethewarriorsmod.item.Itemcorruptedarmor(
corruptedArmorMaterial, 0, 3)
.setUnlocalizedName("Itemcorruptedboots")
.setTextureName("watwm:corrupted_boots")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
dragonhelmet = new Itemdragonarmor(dragonArmorMaterial, 0, 0)
.setUnlocalizedName("Itemdragonhelmet")
.setTextureName("watwm:dragon_helmet")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
dragonchestplate = new Itemdragonarmor(dragonArmorMaterial, 0, 1)
.setUnlocalizedName("Itemdragonchestplate")
.setTextureName("watwm:dragon_chestplate")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
dragonleggings = new Itemdragonarmor(dragonArmorMaterial, 0, 2)
.setUnlocalizedName("Itemdragonleggings")
.setTextureName("watwm:dragon_leggings")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
dragonboots = new Itemdragonarmor(dragonArmorMaterial, 0, 3)
.setUnlocalizedName("Itemdragonboots")
.setTextureName("watwm:dragon_boots")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ancienthelmet = new Itemancientarmor(ancientArmorMaterial, 0, 0)
.setUnlocalizedName("ancienthelmet")
.setTextureName("watwm:ancient_helmet")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ancientchestplate = new Itemancientarmor(ancientArmorMaterial, 0, 1)
.setUnlocalizedName("ancientchestplate")
.setTextureName("watwm:ancient_chestplate")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ancientleggings = new Itemancientarmor(ancientArmorMaterial, 0, 2)
.setUnlocalizedName("ancientleggings")
.setTextureName("watwm:ancient_leggings")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
ancientboots = new Itemancientarmor(ancientArmorMaterial, 0, 3)
.setUnlocalizedName("ancientboots")
.setTextureName("watwm:ancient_boots")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
chosenhelmet = new Itemchosenarmor(chosenArmorMaterial, 0, 0)
.setUnlocalizedName("chosenhelmet")
.setTextureName("watwm:the_chosen_ones_helmet")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
chosenchestplate = new Itemchosenarmor(chosenArmorMaterial, 0, 1)
.setUnlocalizedName("chosenchestplate")
.setTextureName("watwm:the_chosen_ones_chestplate")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
chosenleggings = new Itemchosenarmor(chosenArmorMaterial, 0, 2)
.setUnlocalizedName("chosenleggings")
.setTextureName("watwm:the_chosen_ones_leggings")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
chosenboots = new Itemchosenarmor(chosenArmorMaterial, 0, 3)
.setUnlocalizedName("chosenboots")
.setTextureName("watwm:the_chosen_ones_boots")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
soulhelmet = new ItemsoulArmor(soulArmorMaterial, 0, 0)
.setUnlocalizedName("soulhelmet")
.setTextureName("watwm:soul_helmet")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
soulchestplate = new ItemsoulArmor(soulArmorMaterial, 0, 1)
.setUnlocalizedName("soulchestplate")
.setTextureName("watwm:soul_chestplate")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
soulleggings = new ItemsoulArmor(soulArmorMaterial, 0, 2)
.setUnlocalizedName("soulleggings")
.setTextureName("watwm:soul_leggings")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
soulboots = new ItemsoulArmor(soulArmorMaterial, 0, 3)
.setUnlocalizedName("soulboots")
.setTextureName("watwm:soul_boots")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
earthhelmet = new earthArmor(earthArmorMaterial, 0, 0)
.setUnlocalizedName("earthhelmet")
.setTextureName("watwm:earth_helmet")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
earthchestplate = new earthArmor(earthArmorMaterial, 0, 1)
.setUnlocalizedName("earthchestplate")
.setTextureName("watwm:earth_chestplate")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
earthleggings = new earthArmor(earthArmorMaterial, 0, 2)
.setUnlocalizedName("earthleggings")
.setTextureName("watwm:earth_leggings")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
earthboots = new earthArmor(earthArmorMaterial, 0, 3)
.setUnlocalizedName("earthboots")
.setTextureName("watwm:earth_boots")
.setCreativeTab(WeAreTheWarriorsMod.tabWeAreTheWarriorsMod);
}
public static void registerItem() {
// Items
GameRegistry.registerItem(soulshard, soulshard.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(blazeshard, blazeshard.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(earthshard, earthshard.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(corruptedsoulgem, corruptedsoulgem
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(puresoulgem, puresoulgem.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(dragonrod, dragonrod.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(flamedust, flamedust.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(corruptedsoul, corruptedsoul
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(flamegem, flamegem.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(burntstring, burntstring.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(corruptedsoulrod, corruptedsoulrod
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(corruptedstring, corruptedstring
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(hollowgem, hollowgem.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(earthgem, earthgem.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(pureelementalgem, pureelementalgem
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(soulrod, soulrod.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(sharpiron, sharpiron.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(heartshard, heartshard.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(quartzgem, quartzgem.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(crystalheart, crystalheart
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(quartzrod, quartzrod.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(ironrod, ironrod.getUnlocalizedName()
.substring(5));
// Tools & Weapons
GameRegistry.registerItem(swordofthechosenone, swordofthechosenone
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(swordofcorruptedsouls, swordofcorruptedsouls
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(dragonsword, dragonsword.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(ancientsword, ancientsword
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(soulsword, soulsword.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(earthsword, earthsword.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(ladystaff, ladystaff.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(flamebow, flamebow.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(corruptedbow, corruptedbow
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(burntarrow, burntarrow.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(corruptedarrow, corruptedarrow
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(dragonpickaxe, dragonpickaxe
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(earthpickaxe, earthpickaxe
.getUnlocalizedName().substring(5));
// Armor
GameRegistry.registerItem(ladyhelmet, ladyhelmet.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(ladychestplate, ladychestplate
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(ladyleggings, ladyleggings
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(ladyboots, ladyboots.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(corruptedhelmet, corruptedhelmet
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(corruptedchestplate, corruptedchestplate
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(corruptedleggings, corruptedleggings
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(corruptedboots, corruptedboots
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(dragonhelmet, dragonhelmet
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(dragonchestplate, dragonchestplate
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(dragonleggings, dragonleggings
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(dragonboots, dragonboots.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(ancienthelmet, ancienthelmet
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(ancientchestplate, ancientchestplate
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(ancientleggings, ancientleggings
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(ancientboots, ancientboots
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(chosenhelmet, chosenhelmet
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(chosenchestplate, chosenchestplate
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(chosenleggings, chosenleggings
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(chosenboots, chosenboots.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(soulhelmet, soulhelmet.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(soulchestplate, soulchestplate
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(soulleggings, soulleggings
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(soulboots, soulboots.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(earthhelmet, earthhelmet.getUnlocalizedName()
.substring(5));
GameRegistry.registerItem(earthchestplate, earthchestplate
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(earthleggings, earthleggings
.getUnlocalizedName().substring(5));
GameRegistry.registerItem(earthboots, earthboots.getUnlocalizedName()
.substring(5));
}
}
if its something obvious im sorry for wasting your time but please help.
-
ok, thank you, i may just keep it as it is
-
so is it possible to make stone drop stone instead of cobble
-
ok ill try
thanks in advance
-
so I tried to add it into my if statement and the only place I could add it in was here 'if (stack.copy() != null)' but it still crashed
-
how would i do this
-
Im trying to make a autosmelt pickaxe and when ever i mine a bloc it crashes please help
Pickaxe:
package wearethewarriorsmod.tools;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.World;
public class dragonpickaxe extends ItemPickaxe {
public dragonpickaxe(ToolMaterial material) {
super(material);
}
@Override
public boolean onBlockDestroyed(ItemStack itemStack, World world,
Block block, int x, int y, int z, EntityLivingBase player) {
ItemStack stack = FurnaceRecipes.smelting()
.getSmeltingResult(new ItemStack(block)).copy();
if(world.isRemote){
return false;
}
if (stack != null) {
System.out.println(stack);
world.setBlockToAir(x, y, z);
player.entityDropItem(stack, 1);
}
return true;
}
}
Crash Report:
---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!
Time: 23/06/15 2:58 PM
Description: Unexpected error
java.lang.NullPointerException: Unexpected error
at wearethewarriorsmod.tools.dragonpickaxe.onBlockDestroyed(dragonpickaxe.java:29)
at net.minecraft.item.ItemStack.func_150999_a(ItemStack.java:381)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDestroyBlock(PlayerControllerMP.java:169)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDamageBlock(PlayerControllerMP.java:288)
at net.minecraft.client.Minecraft.func_147115_a(Minecraft.java:1428)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2047)
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(Unknown Source)
at GradleStart.main(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at wearethewarriorsmod.tools.dragonpickaxe.onBlockDestroyed(dragonpickaxe.java:29)
at net.minecraft.item.ItemStack.func_150999_a(ItemStack.java:381)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDestroyBlock(PlayerControllerMP.java:169)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerDamageBlock(PlayerControllerMP.java:288)
at net.minecraft.client.Minecraft.func_147115_a(Minecraft.java:1428)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player869'/291, l='MpServer', x=-129.55, y=80.62, z=130.25]]
Chunk stats: MultiplayerChunkCache: 280, 280
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (-124,64,240), Chunk: (at 4,4,0 in -8,15; contains blocks -128,0,240 to -113,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 26273 game time, 33360 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: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 104 total; [EntitySpider['Spider'/63, l='MpServer', x=-209.63, y=19.00, z=74.16], EntityClientPlayerMP['Player869'/291, l='MpServer', x=-129.55, y=80.62, z=130.25], EntityCreeper['Creeper'/73, l='MpServer', x=-209.54, y=40.00, z=97.69], EntityCreeper['Creeper'/78, l='MpServer', x=-209.63, y=15.00, z=138.31], EntityZombie['Zombie'/79, l='MpServer', x=-208.40, y=15.00, z=138.48], EntitySkeleton['Skeleton'/93, l='MpServer', x=-204.09, y=38.00, z=69.47], EntitySquid['Squid'/95, l='MpServer', x=-195.22, y=48.37, z=76.47], EntityCreeper['Creeper'/97, l='MpServer', x=-207.41, y=40.00, z=98.00], EntityBat['Bat'/98, l='MpServer', x=-200.75, y=39.10, z=119.75], EntityCreeper['Creeper'/99, l='MpServer', x=-205.93, y=14.00, z=137.33], EntityEnderman['Enderman'/100, l='MpServer', x=-193.66, y=37.00, z=134.53], EntitySkeleton['Skeleton'/101, l='MpServer', x=-202.53, y=34.00, z=151.89], EntityZombie['Zombie'/102, l='MpServer', x=-203.22, y=13.00, z=173.31], EntityPig['Pig'/103, l='MpServer', x=-204.06, y=66.00, z=180.97], EntitySkeleton['Skeleton'/109, l='MpServer', x=-185.66, y=28.00, z=61.50], EntitySpider['Spider'/110, l='MpServer', x=-187.59, y=20.00, z=53.38], EntityBat['Bat'/111, l='MpServer', x=-184.25, y=19.02, z=61.69], EntityBat['Bat'/116, l='MpServer', x=-191.69, y=28.20, z=65.56], EntitySquid['Squid'/117, l='MpServer', x=-184.37, y=48.38, z=73.83], EntitySquid['Squid'/119, l='MpServer', x=-176.26, y=53.38, z=68.54], EntitySquid['Squid'/122, l='MpServer', x=-183.09, y=50.42, z=65.87], EntityCreeper['Creeper'/123, l='MpServer', x=-179.41, y=23.00, z=161.00], EntityPig['Pig'/124, l='MpServer', x=-183.41, y=70.00, z=188.03], EntityPig['Pig'/125, l='MpServer', x=-188.38, y=65.00, z=202.13], EntitySkeleton['Skeleton'/129, l='MpServer', x=-161.50, y=24.00, z=54.50], EntityZombie['Zombie'/131, l='MpServer', x=-164.88, y=23.00, z=70.41], EntityZombie['Zombie'/132, l='MpServer', x=-167.47, y=22.00, z=65.84], EntitySkeleton['Skeleton'/133, l='MpServer', x=-172.13, y=26.00, z=64.53], EntitySquid['Squid'/134, l='MpServer', x=-166.75, y=50.00, z=80.88], EntitySquid['Squid'/135, l='MpServer', x=-164.55, y=47.38, z=95.02], EntitySquid['Squid'/136, l='MpServer', x=-173.64, y=49.19, z=88.18], EntitySquid['Squid'/137, l='MpServer', x=-168.83, y=50.00, z=79.14], EntitySquid['Squid'/138, l='MpServer', x=-163.13, y=49.34, z=90.67], EntitySquid['Squid'/139, l='MpServer', x=-175.23, y=49.00, z=85.50], EntitySquid['Squid'/140, l='MpServer', x=-171.72, y=50.13, z=82.27], EntitySquid['Squid'/141, l='MpServer', x=-165.53, y=47.37, z=100.60], EntitySquid['Squid'/142, l='MpServer', x=-162.37, y=48.00, z=105.53], EntityCreeper['Creeper'/143, l='MpServer', x=-170.00, y=30.00, z=132.63], EntityWitch['Witch'/144, l='MpServer', x=-172.63, y=23.00, z=156.13], EntityCreeper['Creeper'/145, l='MpServer', x=-166.41, y=23.00, z=155.00], EntityPig['Pig'/146, l='MpServer', x=-169.47, y=69.00, z=190.47], EntityCreeper['Creeper'/148, l='MpServer', x=-172.50, y=24.00, z=198.50], EntityPig['Pig'/149, l='MpServer', x=-169.50, y=66.00, z=198.28], EntityBat['Bat'/152, l='MpServer', x=-158.44, y=23.10, z=64.25], EntitySquid['Squid'/153, l='MpServer', x=-149.48, y=49.38, z=77.92], EntitySkeleton['Skeleton'/154, l='MpServer', x=-156.13, y=28.00, z=92.50], EntityCreeper['Creeper'/155, l='MpServer', x=-149.50, y=28.00, z=99.50], EntitySkeleton['Skeleton'/156, l='MpServer', x=-156.66, y=28.00, z=99.53], EntitySkeleton['Skeleton'/157, l='MpServer', x=-157.53, y=29.00, z=100.10], EntityBat['Bat'/158, l='MpServer', x=-142.97, y=26.92, z=102.28], EntitySquid['Squid'/159, l='MpServer', x=-160.54, y=47.00, z=104.50], EntitySquid['Squid'/160, l='MpServer', x=-158.14, y=50.37, z=100.32], EntitySkeleton['Skeleton'/161, l='MpServer', x=-155.66, y=23.00, z=152.34], EntityCreeper['Creeper'/162, l='MpServer', x=-160.03, y=23.00, z=152.97], EntityCreeper['Creeper'/163, l='MpServer', x=-147.56, y=23.00, z=150.72], EntityBat['Bat'/164, l='MpServer', x=-155.84, y=44.02, z=175.06], EntityBat['Bat'/165, l='MpServer', x=-156.44, y=46.89, z=170.22], EntityZombie['Zombie'/166, l='MpServer', x=-152.50, y=57.00, z=169.50], EntityCreeper['Creeper'/167, l='MpServer', x=-144.72, y=45.00, z=179.47], EntityBat['Bat'/168, l='MpServer', x=-154.03, y=45.32, z=181.25], EntityBat['Bat'/169, l='MpServer', x=-147.31, y=47.42, z=181.03], EntityBat['Bat'/170, l='MpServer', x=-148.28, y=56.00, z=185.91], EntitySquid['Squid'/174, l='MpServer', x=-134.88, y=48.19, z=72.65], EntityItem['item.item.Itemdragonpickaxe'/175, l='MpServer', x=-128.78, y=65.13, z=121.81], EntityItem['item.item.Itemdragonpickaxe'/176, l='MpServer', x=-128.59, y=66.13, z=122.56], EntityItem['item.item.Itemdragonpickaxe'/177, l='MpServer', x=-128.19, y=66.13, z=121.94], EntityItem['item.item.Itemdragonpickaxe'/178, l='MpServer', x=-128.66, y=66.13, z=122.31], EntityItem['item.item.Itemdragonpickaxe'/179, l='MpServer', x=-128.63, y=65.13, z=121.88], EntityItem['item.item.Itemdragonpickaxe'/180, l='MpServer', x=-128.84, y=66.13, z=122.09], EntityItem['item.tile.stonebrick'/181, l='MpServer', x=-143.88, y=78.13, z=141.88], EntityItem['item.tile.gravel'/182, l='MpServer', x=-142.13, y=80.13, z=141.88], EntityCreeper['Creeper'/183, l='MpServer', x=-132.28, y=45.00, z=181.66], EntityBat['Bat'/184, l='MpServer', x=-149.75, y=46.17, z=181.78], EntitySquid['Squid'/194, l='MpServer', x=-125.95, y=53.44, z=80.09], EntityCow['Cow'/195, l='MpServer', x=-114.66, y=68.57, z=105.79], EntityCow['Cow'/196, l='MpServer', x=-123.53, y=84.00, z=137.53], EntityCow['Cow'/197, l='MpServer', x=-117.56, y=85.00, z=136.25], EntityCow['Cow'/198, l='MpServer', x=-121.41, y=81.00, z=133.25], EntityZombie['Zombie'/199, l='MpServer', x=-121.66, y=66.00, z=157.41], EntityZombie['Zombie'/200, l='MpServer', x=-119.56, y=66.00, z=155.41], EntitySkeleton['Skeleton'/202, l='MpServer', x=-125.59, y=66.00, z=174.16], EntityCow['Cow'/203, l='MpServer', x=-127.50, y=80.00, z=166.38], EntityBat['Bat'/204, l='MpServer', x=-123.75, y=51.10, z=182.25], EntityCreeper['Creeper'/210, l='MpServer', x=-101.50, y=27.00, z=58.50], EntitySquid['Squid'/212, l='MpServer', x=-105.52, y=50.62, z=79.67], EntitySquid['Squid'/214, l='MpServer', x=-102.26, y=54.34, z=78.12], EntitySquid['Squid'/215, l='MpServer', x=-93.38, y=54.36, z=72.02], EntitySquid['Squid'/216, l='MpServer', x=-110.47, y=54.34, z=71.34], EntitySquid['Squid'/217, l='MpServer', x=-96.47, y=54.71, z=82.57], EntityCow['Cow'/219, l='MpServer', x=-100.97, y=80.00, z=138.09], EntitySquid['Squid'/221, l='MpServer', x=-87.50, y=53.00, z=74.99], EntityCow['Cow'/222, l='MpServer', x=-80.63, y=63.00, z=77.25], EntityCow['Cow'/223, l='MpServer', x=-90.84, y=75.00, z=106.03], EntityBat['Bat'/227, l='MpServer', x=-84.31, y=61.10, z=156.72], EntityCow['Cow'/231, l='MpServer', x=-64.78, y=67.00, z=62.62], EntityCow['Cow'/232, l='MpServer', x=-74.69, y=64.00, z=72.44], EntityCow['Cow'/233, l='MpServer', x=-78.66, y=73.00, z=85.72], EntityCow['Cow'/234, l='MpServer', x=-74.84, y=78.00, z=102.19], EntityCow['Cow'/236, l='MpServer', x=-77.31, y=81.00, z=159.25], EntityCow['Cow'/237, l='MpServer', x=-77.34, y=82.00, z=164.03], EntityCow['Cow'/238, l='MpServer', x=-62.38, y=71.00, z=69.59], EntityCow['Cow'/239, l='MpServer', x=-62.94, y=76.00, z=135.97], EntityCow['Cow'/240, l='MpServer', x=-60.88, y=77.00, z=151.97], EntityCow['Cow'/241, l='MpServer', x=-55.94, y=77.00, z=174.88]]
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(Unknown Source)
at GradleStart.main(Unknown Source)
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation
Memory: 800076952 bytes (763 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 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 4 mods loaded, 4 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
watwm{1.1.0} [We Are The Warriors] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: ATI Radeon 3000 Graphics GL version 3.3.10750 Compatibility Profile Context, ATI Technologies Inc.
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)
and Im not the best at modding so dont judge please
-
after Block. where it says blockList, blockList is underlined red and it doesnt go to anyhing that i can change it to, and ench.tagAt(x); says to add cast to "ench". help is greatly appreciated
-
Im trying to make a block that acts like a furnace but its to incubate eggs and I dont know what to add to my block class to make it so I can access the GUI
-
sorry, didnt think of that D:
-
does anyone know what I have to do to add auto smelt to a pickaxe?
-
neither
-
I DID IT
!!!
-
please help, anyone that knows how to fix this
-
i did that but its still doing the same thing, and this is the PATH variable we're talking about?
-
when ever I go to compile my mod it comes up with this, please help:
-
here is what it does when i click on the Minecraft tab on the left side of the screen to view my project:
[/img]
-
how do i add the image to the reply
-
ok, i'll get one soon
-
I have relocated my mod folder and i change the workspace to the eclipse file there but it says that my mod.java file doesnt exist and if i go into it it is where it says it isnt, please help
-
, and extending creeper stops the mob from working aswell
-
heres the crash, but what I dont understand is that it says something about noise yet it has made my mob stop appearing and it crashes when i try to spawn it in.
---- Minecraft Crash Report ----
// Quite honestly, I wouldn't worry myself about that.
Time: 1/06/15 12:11 AM
Description: Unexpected error
java.lang.NullPointerException: Unexpected error
at net.minecraft.client.audio.SoundManager$SoundSystemStarterThread.playing(SoundManager.java:547)
at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:245)
at net.minecraft.client.audio.SoundHandler.update(SoundHandler.java:224)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2093)
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(Unknown Source)
at GradleStart.main(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.client.audio.SoundManager$SoundSystemStarterThread.playing(SoundManager.java:547)
at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:245)
at net.minecraft.client.audio.SoundHandler.update(SoundHandler.java:224)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player21'/175, l='MpServer', x=-286.14, y=66.75, z=269.39]]
Chunk stats: MultiplayerChunkCache: 270, 270
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (-124,64,240), Chunk: (at 4,4,0 in -8,15; contains blocks -128,0,240 to -113,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 46581 game time, 6051 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: 74 total; [EntityBat['Bat'/1, l='MpServer', x=-313.75, y=34.81, z=200.75], EntityBat['Bat'/2, l='MpServer', x=-312.19, y=34.44, z=196.51], EntitySkeleton['Skeleton'/3, l='MpServer', x=-305.91, y=32.00, z=319.50], EntityCreeper['Creeper'/4, l='MpServer', x=-317.53, y=17.00, z=326.97], EntityPig['Pig'/5, l='MpServer', x=-312.97, y=68.00, z=332.84], EntityPig['Pig'/6, l='MpServer', x=-303.22, y=64.00, z=340.38], EntityBat['Bat'/263, l='MpServer', x=-245.25, y=46.05, z=239.28], EntityPig['Pig'/7, l='MpServer', x=-305.47, y=64.00, z=337.47], EntitySlime['Slime'/30, l='MpServer', x=-299.69, y=21.00, z=196.69], EntityBat['Bat'/31, l='MpServer', x=-288.94, y=22.39, z=209.93], EntityCreeper['Creeper'/32, l='MpServer', x=-294.50, y=14.00, z=229.50], EntitySkeleton['Skeleton'/33, l='MpServer', x=-294.41, y=58.00, z=233.16], EntityBat['Bat'/34, l='MpServer', x=-297.53, y=20.10, z=269.75], EntityCreeper['Creeper'/35, l='MpServer', x=-298.94, y=25.00, z=317.66], EntityBat['Bat'/36, l='MpServer', x=-309.70, y=17.00, z=337.81], EntityClientPlayerMP['Player21'/175, l='MpServer', x=-286.14, y=66.75, z=269.39], EntityZombie['Zombie'/176, l='MpServer', x=-333.50, y=32.00, z=311.50], EntityCreeper['Creeper'/177, l='MpServer', x=-320.50, y=15.00, z=332.50], EntityPig['Pig'/49, l='MpServer', x=-276.41, y=69.00, z=198.81], EntityZombie['Zombie'/178, l='MpServer', x=-339.50, y=32.00, z=313.50], EntityZombie['Zombie'/50, l='MpServer', x=-290.59, y=21.00, z=214.75], EntitySheep['Sheep'/179, l='MpServer', x=-360.97, y=63.00, z=224.91], EntityZombie['Zombie'/51, l='MpServer', x=-277.50, y=25.00, z=211.50], EntityCreeper['Creeper'/180, l='MpServer', x=-340.34, y=12.00, z=330.53], EntityZombie['Zombie'/52, l='MpServer', x=-277.50, y=32.00, z=223.50], EntityCreeper['Creeper'/181, l='MpServer', x=-347.50, y=13.00, z=323.50], EntitySkeleton['Skeleton'/53, l='MpServer', x=-285.56, y=53.00, z=219.06], EntityCreeper['Creeper'/54, l='MpServer', x=-276.56, y=33.00, z=230.00], EntitySkeleton['Skeleton'/55, l='MpServer', x=-278.50, y=32.00, z=236.50], EntityZombie['Zombie'/56, l='MpServer', x=-284.22, y=31.00, z=232.09], EntitySkeleton['Skeleton'/57, l='MpServer', x=-292.28, y=58.00, z=232.25], EntityPig['Pig'/58, l='MpServer', x=-285.47, y=66.00, z=224.31], EntityPig['Pig'/59, l='MpServer', x=-272.09, y=64.00, z=235.06], EntityItem['item.tile.doublePlant.sunflower'/60, l='MpServer', x=-272.19, y=62.13, z=267.13], EntityBat['Bat'/61, l='MpServer', x=-284.66, y=19.10, z=286.44], EntityPig['Pig'/62, l='MpServer', x=-295.69, y=67.00, z=326.50], EntityCreeper['Creeper'/194, l='MpServer', x=-352.50, y=24.00, z=335.50], EntityChicken['Chicken'/68, l='MpServer', x=-271.84, y=70.00, z=198.03], EntityZombie['Zombie'/69, l='MpServer', x=-263.50, y=23.00, z=208.50], EntityPig['Pig'/70, l='MpServer', x=-271.41, y=64.00, z=217.84], EntityPig['Pig'/71, l='MpServer', x=-262.69, y=63.00, z=235.47], EntitySkeleton['Skeleton'/72, l='MpServer', x=-269.44, y=16.00, z=270.13], EntityCreeper['Creeper'/203, l='MpServer', x=-360.50, y=24.00, z=338.50], EntityPig['Pig'/75, l='MpServer', x=-265.03, y=64.00, z=270.03], EntityChicken['Chicken'/77, l='MpServer', x=-245.41, y=62.00, z=239.44], EntityBat['Bat'/78, l='MpServer', x=-243.00, y=52.10, z=247.75], EntityBat['Bat'/79, l='MpServer', x=-248.81, y=51.12, z=246.59], EntitySkeleton['Skeleton'/80, l='MpServer', x=-240.50, y=51.00, z=253.50], EntitySkeleton['Skeleton'/81, l='MpServer', x=-254.28, y=50.00, z=278.13], EntityPig['Pig'/82, l='MpServer', x=-249.28, y=63.00, z=296.88], EntityPig['Pig'/83, l='MpServer', x=-240.72, y=63.00, z=300.78], EntityPig['Pig'/84, l='MpServer', x=-250.09, y=63.00, z=289.94], EntityPig['Pig'/85, l='MpServer', x=-251.84, y=66.00, z=336.22], EntityPig['Pig'/88, l='MpServer', x=-236.22, y=64.00, z=229.13], EntityPig['Pig'/89, l='MpServer', x=-240.09, y=64.00, z=248.06], EntitySkeleton['Skeleton'/90, l='MpServer', x=-238.50, y=52.00, z=265.06], EntityBat['Bat'/91, l='MpServer', x=-229.27, y=50.24, z=256.51], EntitySkeleton['Skeleton'/92, l='MpServer', x=-224.88, y=50.00, z=260.31], EntitySkeleton['Skeleton'/93, l='MpServer', x=-231.34, y=56.00, z=269.34], EntityCreeper['Creeper'/94, l='MpServer', x=-239.66, y=48.00, z=280.00], EntityPig['Pig'/95, l='MpServer', x=-234.47, y=66.00, z=284.47], EntityPig['Pig'/96, l='MpServer', x=-236.22, y=67.00, z=281.09], EntityPig['Pig'/98, l='MpServer', x=-223.03, y=67.00, z=286.06], EntityPig['Pig'/99, l='MpServer', x=-215.94, y=66.00, z=293.25], EntityPig['Pig'/100, l='MpServer', x=-209.44, y=65.00, z=293.22], EntityChicken['Chicken'/101, l='MpServer', x=-211.44, y=68.00, z=314.56], EntityZombie['Zombie'/234, l='MpServer', x=-332.50, y=40.00, z=289.50], EntityZombie['Zombie'/247, l='MpServer', x=-299.50, y=21.00, z=278.56], EntityZombie['Zombie'/248, l='MpServer', x=-303.50, y=24.00, z=280.06], EntityZombie['Zombie'/249, l='MpServer', x=-298.50, y=21.00, z=274.50], EntityZombie['Zombie'/250, l='MpServer', x=-299.50, y=21.00, z=272.50], EntityZombie['Zombie'/251, l='MpServer', x=-298.50, y=21.00, z=276.50], EntityZombie['Zombie'/252, l='MpServer', x=-300.56, y=21.00, z=276.44], EntityZombie['Zombie'/253, l='MpServer', x=-296.50, y=21.00, z=278.50]]
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(Unknown Source)
at GradleStart.main(Unknown Source)
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation
Memory: 759740208 bytes (724 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 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 4 mods loaded, 4 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
watwm{1.0.9} [We Are The Warriors Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: ATI Radeon 3000 Graphics GL version 3.3.10750 Compatibility Profile Context, ATI Technologies Inc.
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)
-
now it crashes
here is my mob class
package wearethewarriorsmod.mob;
import wearethewarriorsmod.WeAreTheWarriorsMod;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIAvoidEntity;
import net.minecraft.entity.ai.EntityAICreeperSwell;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
public class EntityhugMob extends EntityCreeper {
private int lastActiveTime;
private int timeSinceIgnited;
private int fuseTime = 30;
private int explosionRadius = 5;
public EntityhugMob(World world){
super(world);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAICreeperSwell(this));
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, false));
this.tasks.addTask(5, new EntityAIWander(this, 0.8D));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
this.setSize(1.5F, 1.5F);
}
protected void applyEntityAttributes(){
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.4D);
}
public boolean isAIEnabled(){
return true;
}
public int getMaxSafePointTries(){
return this.getAttackTarget() == null ? 3 : 3 + (int)(this.getHealth() - 1.0F);
}
protected void fall(float distance){
super.fall(distance);
this.timeSinceIgnited = (int)((float)this.timeSinceIgnited + distance * 1.5F);
if (this.timeSinceIgnited > this.fuseTime - 5){
this.timeSinceIgnited = this.fuseTime - 5;
}
}
protected void entityInit(){
super.entityInit();
this.dataWatcher.addObject(16, Byte.valueOf((byte) - 1));
this.dataWatcher.addObject(17, Byte.valueOf((byte)0));
this.dataWatcher.addObject(18, Byte.valueOf((byte)0));
}
public void writeEntityToNBT(NBTTagCompound compound){
super.writeEntityToNBT(compound);
if (this.dataWatcher.getWatchableObjectByte(17) == 1){
compound.setBoolean("powered", true);
}
compound.setShort("Fuse", (short)this.fuseTime);
compound.setByte("ExplosionRadius", (byte)this.explosionRadius);
compound.setBoolean("ignited", this.isIgnited());
}
public void readEntityFromNBT(NBTTagCompound compound){
super.readEntityFromNBT(compound);
this.dataWatcher.updateObject(17, Byte.valueOf((byte)(compound.getBoolean("powered") ? 1 : 0)));
if (compound.hasKey("Fuse", 99)){
this.fuseTime = compound.getShort("Fuse");
}
if (compound.hasKey("ExplosionRadius", 99)){
this.explosionRadius = compound.getByte("ExplosionRadius");
}
if (compound.getBoolean("ignited")){
this.isOnFire();
}
}
public void onUpdate(){
if (this.isEntityAlive()){
this.lastActiveTime = this.timeSinceIgnited;
if (this.isIgnited()){
this.setCreeperState(1);
}
int i = this.getCreeperState();
if (i > 0 && this.timeSinceIgnited == 0){
this.playSound("creeper.primed", 1.0F, 0.5F);
}
this.timeSinceIgnited += i;
if (this.timeSinceIgnited < 0){
this.timeSinceIgnited = 0;
}
if (this.timeSinceIgnited >= this.fuseTime){
this.timeSinceIgnited = this.fuseTime;
this.explode();
}
}
super.onUpdate();
}
protected String getHurtSound(){
return "mob.creeper.death";
}
protected String getDeathSound(){
return "mob.creeper.death";
}
public void onDeath(DamageSource source){
super.onDeath(source);
if (source.getEntity() instanceof EntitySkeleton){
int i = Item.getIdFromItem(Items.record_13);
int j = Item.getIdFromItem(Items.record_wait);
int k = i + this.rand.nextInt(j - i + 1);
this.dropItem(Item.getItemById(k), 1);
}
}
public boolean attackEntityAsMob(Entity entity){
return true;
}
public boolean getPowered(){
return this.dataWatcher.getWatchableObjectByte(17) == 1;
}
@SideOnly(Side.CLIENT)
public float getCreeperFlashIntensity(float floatt){
return ((float)this.lastActiveTime + (float)(this.timeSinceIgnited - this.lastActiveTime) * floatt) / (float)(this.fuseTime - 2);
}
protected Item getDropItem(){
return Items.gunpowder;
}
protected void dropRareDrop(int p_70600_1_)
{
switch (this.rand.nextInt(3))
{
case 0:
this.dropItem(WeAreTheWarriorsMod.itemheartshard, 2);
break;
case 1:
this.dropItem(WeAreTheWarriorsMod.itemheartshard, 1);
break;
case 2:
this.dropItem(Items.golden_apple, 1);
}
}
public int getCreeperState(){
return this.dataWatcher.getWatchableObjectByte(16);
}
public void setCreeperState(int state){
this.dataWatcher.updateObject(16, Byte.valueOf((byte)state));
}
public void onStruckByLightning(EntityLightningBolt lightning){
super.onStruckByLightning(lightning);
this.dataWatcher.updateObject(17, Byte.valueOf((byte)1));
}
protected boolean interact(EntityPlayer player){
ItemStack itemstack = player.inventory.getCurrentItem();
if (itemstack != null && itemstack.getItem() == Items.flint_and_steel){
this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.ignite", 1.0F, this.rand.nextFloat() * 0.4F + 0.8F);
player.swingItem();
if (!this.worldObj.isRemote){
this.isOnFire();
itemstack.damageItem(1, player);
return true;
}
}
return super.interact(player);
}
private void explode(){
if (!this.worldObj.isRemote){
boolean flag = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing");
if (this.getPowered()){
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(this.explosionRadius * 2), flag);
} else {
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)this.explosionRadius, flag);
}
this.setDead();
}
}
public boolean isIgnited(){
return this.dataWatcher.getWatchableObjectByte(18) != 0;
}
public void isOnFire(){
this.dataWatcher.updateObject(18, Byte.valueOf((byte)1));
}
}
-
Done it, thanks, trying it now
[1.7.10] Crashing
in Modder Support
Posted
oh, I see now. thanks