Jump to content

Nicholas1010

Members
  • Posts

    10
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Nicholas1010's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Oh, thank you, it now generates in world, and I also made it drop ore after mining it. solved.
  2. Well, my problem with tutorials or guides is that they all use different styles and do different things, and when I switch from one author to another, I get very confused, well, I had a lot of errors and I had to remove "private" off variables, but I still get one error, heres code: package nika10.craftfortress.blocks;import net.minecraft.block.Block;import net.minecraft.block.material.Material;import net.minecraft.creativetab.CreativeTabs;import net.minecraft.item.Item;public class NativeCopperOreBlock extends Block { public NativeCopperOreBlock(Material materialIn) { super(materialIn); Item drop; int meta; int least_quantity; int most_quantity; this.setHarvestLevel("pickaxe", 1); this.setHardness(10.0f); this.setResistance(15.0f); this.setUnlocalizedName(unlocalizedName); //This line is giving me error. this.setCreativeTab(CreativeTabs.tabBlock);}} error is "The field Block.unlocalizedName is not visible. and I commented on line that error is being thrown. unlocalizedName IS private when I checked, I don't know what to do.
  3. Hello, I just made my first block (ore) in forge and I am trying to make it to generate in world (underground, like iron, coal, diamond ores etc), I am very confused on how to make it, maybe someone can provide very basic example? or just give me link to latest and most easiest/reliable guide/tutorial/manual? Sorry if I posted in wrong section. Also, since I opened this thread - off topic question, am I only one or this site (and wiki too) is taking 12-15 seconds to load? (my internet is fine and every other pages loads much faster) Thanks for attention
  4. Oh..! thank you, guess I'll need to work on my observation skills.
  5. package nika10.craftfortress; import net.minecraft.block.Block; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import nika10.craftfortress.init.Items; import nika10.craftfortress.proxy.CommonProxy; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION) public class CraftFortress { @SidedProxy(clientSide = Reference.CLINET_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; //public static Block nativeCopperOre; //public static final String MODID = "craftfortress"; //public static final String VERSION = "1.0"; @EventHandler public void preInit(FMLInitializationEvent event) { Items.init(); Items.register(); //nativeCopperOre = new NativeCopperOre(Material.rock).setUnlocalizedName("native_copper_ore"); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenders(); } @EventHandler public void postInit(FMLInitializationEvent event) { } } Its a bit messy, sorry about that.
  6. Hey, TheGreyGhost. I am little confused, I used if operator to check if cheese is null, and it is null, but whats wrong? why is it null?
  7. I am following a tutorial on youtube as I said on my last topic, and I have another problem, I had few errors when I started, mostly spelling errors which I fixed, but now I am getting this crash message (no errors detected by eclipse) ---- Minecraft Crash Report ---- // Ouch. That hurt Time: 6/1/15 6:10 PM Description: Initializing game java.lang.NullPointerException: Initializing game at nika10.craftfortress.init.Items.registerRender(Items.java:31) at nika10.craftfortress.init.Items.registerRenders(Items.java:26) at nika10.craftfortress.proxy.ClientProxy.registerRenders(ClientProxy.java:10) at nika10.craftfortress.CraftFortress.init(CraftFortress.java:34) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:518) 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 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) 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 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:692) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:291) at net.minecraft.client.Minecraft.startGame(Minecraft.java:521) at net.minecraft.client.Minecraft.run(Minecraft.java:356) at net.minecraft.client.main.Main.main(Main.java:117) 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: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 nika10.craftfortress.init.Items.registerRender(Items.java:31) at nika10.craftfortress.init.Items.registerRenders(Items.java:26) at nika10.craftfortress.proxy.ClientProxy.registerRenders(ClientProxy.java:10) at nika10.craftfortress.CraftFortress.init(CraftFortress.java:34) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:518) 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 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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) 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 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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:692) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:291) at net.minecraft.client.Minecraft.startGame(Minecraft.java:521) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:356) at net.minecraft.client.main.Main.main(Main.java:117) 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: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.8 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 866950624 bytes (826 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.37.1334 Minecraft Forge 11.14.1.1334 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized FML{8.0.37.1334} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized->Initialized Forge{11.14.1.1334} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized->Initialized craftfortress{1.0} [Craft Fortress] (bin) Unloaded->Constructed->Pre-initialized->Errored Loaded coremods (and transformers): Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: GeForce GTX 550 Ti/PCIe/SSE2 GL version 4.4.0 NVIDIA 344.75, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No 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) and this is class that is causing it potentially. package nika10.craftfortress.init; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; import nika10.craftfortress.Reference; public class Items { public static Item cheese; public static void init() { cheese = new Item().setUnlocalizedName("cheese"); } public static void register() { GameRegistry.registerItem(cheese, cheese.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(cheese); } public static void registerRender(Item item) //SOMEWHERE HERE IS ERROR. { //Item item = Item.getItemFromBlock(block); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } Please, help . Sorry if I made silly mistakes since this is porbably spelling error which I can't detect and guy who made tutorial didn't provide source code so I can check.
  8. I've re done that and it somehow worked, thanks!
  9. I followed few tutorials on youtube on how to get into modding and set up basic mods, and yes I got experience (not too much though) in Java (mainly in C++ actually) but something went wrong, I might be making a stupid mistake, but I made bat files for setting up workspace and eclipse and everything seems fine but my examplemod package and even my own package gives me errors, most likely because imports don't work. error message is "import net cannot be resolved" and its all over the lines. must be something wrong with importing, I tried doing ctrl + shift + o since I saw that on google as a solution, but all it does is remove imports and make it worse. Heres code if its needed. package nika10.craftfortress; import net.minecraft.init.Blocks; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @Mod(modid = CraftFortress.MODID, version = CraftFortress.VERSION) public class CraftFortress { public static final String MODID = "examplemod"; public static final String VERSION = "1.0"; @EventHandler public void init(FMLInitializationEvent event) { // some example code System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName()); } } btw, I didn't tried going any further I just want to solve my error and continue with tutorials, thanks for attention, help will be appreciated
  10. Recommended 1.7.10 is giving me error while I am first setting it up for eclipse (not sure if I said it right, I am using command prompt in Windows): When I type "gradlew setupDecompWorkspace eclipse" When I type "gradlew setupDecompWorkspace --refresh-dependencies": Help will be really appreciated Sorry if I did something stupid, its 2 am and I am sleepy.
×
×
  • Create New...

Important Information

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