• 0

    posted a message on HarvestDropsEvent help?

    Update: Fixed.

    import net.minecraft.block.Block;
    import net.minecraft.init.Blocks;
    import net.minecraft.init.Items;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    
    public class LeavesDropHandler {
    	@SubscribeEvent
    	public void addDropForType(HarvestDropsEvent event) {
    		Block block = event.getState().getBlock();
    		Item item = event.getHarvester().getHeldItemMainhand().getItem();
    		System.out.println(item);
    		if (block == Blocks.LEAVES && item == Items.ARROW) {
    			event.getDrops().add(new ItemStack(ModItems.yeast));
    		}
    	}
    }
    Posted in: Modification Development
  • 0

    posted a message on HarvestDropsEvent help?
    public class LeavesDropHandler {
    	public static void addDropForType(HarvestDropsEvent event) {
    		Block block = event.getState().getBlock();
    		java.util.List<ItemStack> drops = event.getDrops();
    		if (block == Blocks.LEAVES) {
    			drops.add(new ItemStack(Items.ARROW));
    		}
    	}
    }


    is what I have so far. However, I'm doing something wrong as leaves aren't dropping arrows. Eventually, I plan to change the drop to a custom item, just I want to handle the part I'm unfamiliar with first. What am I doing wrong, and how could I customise this so if I'm holding a certain tool?

    Would it be better to have it coded into the tool, something like (pseudocode warning)

    if (breakingLeaves) {
        drop(Items.Arrow)
    } 



    (Forge 14.21.1.2387)
    Yes I've imported everything necessary, and will import anything needed

    Edit: In my actual Mod File, I add this to preInit:

    MinecraftForge.EVENT_BUS.register(new LeavesDropHandler());
    Posted in: Modification Development
  • 0

    posted a message on how to code a minecraft server in eclipse

    That program seems to just be a default minecraft server for which you code your own plugins...

    Posted in: Modification Development
  • 0

    posted a message on gradlew problems

    in the .gradle folder create gradle.properties


    and make the first and only line

    org.gradle.jvmargs=-Xmx2G
    Posted in: Modification Development
  • 0

    posted a message on Forge Mod Crashes on Load

    For some reason, del and reloading this mod from my mods folder worked. Weird.

    Posted in: Modification Development
  • 0

    posted a message on Forge Mod Crashes on Load

    I created my mod, which adds a new dimension, and several blocks. When I tried loading it, it crashed and gave this error:



    <div>---- Minecraft Crash Report ----
    // Oops.</div>
    <div> </div>
    <div>Time: 8/23/15 3:06 PM
    Description: There was a severe problem during mod loading that has caused the game to fail</div>
    <div> </div>
    <div>net.minecraftforge.fml.common.LoaderException: java.lang.NoSuchFieldError: ground
     at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:163)
     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:538)
     at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:214)
     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:413)
     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:325)
     at net.minecraft.client.main.Main.main(SourceFile:120)
     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)
    Caused by: java.lang.NoSuchFieldError: ground
     at mod.mcreator.mcreator_netherStarBlock$BlockNetherStarBlock.<init>(mcreator_netherStarBlock.java:147)
     at mod.mcreator.mcreator_netherStarBlock.<clinit>(mcreator_netherStarBlock.java:121)
     at mod.mcreator.TestEnvironmentMod.<init>(TestEnvironmentMod.java:106)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
     at java.lang.Class.newInstance(Class.java:438)
     at net.minecraftforge.fml.common.ILanguageAdapter$JavaAdapter.getNewInstance(ILanguageAdapter.java:174)
     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:511)
     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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
     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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:507)
     ... 10 more</div>
    <div> </div>
    <div>
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------</div>
    <div> </div>
    <div>-- System Details --
    Details:
     Minecraft Version: 1.8
     Operating System: Windows 10 (amd64) version 10.0
     Java Version: 1.8.0_25, Oracle Corporation
     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
     Memory: 128763800 bytes (122 MB) / 252325888 bytes (240 MB) up to 1060372480 bytes (1011 MB)
     JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
     FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1499 4 mods loaded, 4 mods active
     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
     UC mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
     UC FML{8.0.99.99} [Forge Mod Loader] (forge-1.8-11.14.3.1499.jar) 
     UC Forge{11.14.3.1499} [Minecraft Forge] (forge-1.8-11.14.3.1499.jar) 
     UE TestEnvironmentMod{1.0} [TestEnvironmentMod] (test_mod.jar) 
     Loaded coremods (and transformers): 
     GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4252' Renderer: 'Intel(R) HD Graphics 4000'</div>
    




    Thanks!

    Posted in: Modification Development
  • 0

    posted a message on OPMinecraft Looking For Builder
    Here's my most recent build. Community mines should be easy! I could easily incorporate redstone into the builds if wanted. Please consider me.

    http://imgur.com/3Y90Hwm,fHPPHRC,mtWZlU7,ffetNlY,NlNQjsr,AYTEe6h

    IGN: Carrots084

    Time playing Minecraft: Since around 2011, with Beta 1.3

    Skills as a builder: Definitely not the best, but not bad.

    Skills at redstone: Definitely not the best, but not bad.
    Posted in: Server Recruitment
  • 0

    posted a message on [[Ignore]]
    Irresponsible Craft
    This server is a Computercraft (and Perihperals) It uses a Technic Platform so you don't have to do anything!


    We have a dedicated staff of 3 members at the moment:
    Sxw1212 [Founder and Owner]
    sethxia [Co-Owner]
    carrots084 [Admin]
    We have a very friendly community that is active, and even have a server email system. Our owner, Sxw1212, has gone so far to even develop
    Posted in: PC Servers
  • 0

    posted a message on RuneScape to Minecraft MegaBuild!
    Quote from kazumiyumi

    hi

    banana
    Quote from Jonj57

    just.... wow

    what he said hi. Whats wrong with that.
    Quote from piiiwiii1

    haha i remember varrock and stuff Good times


    ..

    No just joking runescape wasted 6 year's of my life


    ..

    But i liked it :)

    3 years here. but it was fun. i just hated cancelling my mem 3 or 4 times xD
    Quote from LoganNZL

    *sigh* I'm sick of you nerds

    if you're gonna troll get off the forums. we're not nerds. You especially can't say that because, you play minecraft. minecraft is a game for nerds.
    Posted in: Screenshots
  • 0

    posted a message on RuneScape to Minecraft MegaBuild!
    Quote from Animator1

    Runescape was one of the games I quit for Minecraft...

    Sam here...
    Posted in: Screenshots
  • 0

    posted a message on Minecraft Trivia Quiz
    I scored 91% on the Minecraft Trivia Quiz. How much do you know about Minecraft?
    Posted in: Discussion
  • 0

    posted a message on Flan's Mod 5.5.2 Update : 1.12.2, 100s of new Skins! : Helicopters, Mechas, Planes, Vehicles, 3D Guns, Multiplayer, TDM, CTF
    Quote from DeWolf

    Hello jamioflan or who ever reads this could you please tell me how to make this mod compatible with industrial craft 2? Or if just flan reads this could you please update the mod to be compatible with industrial craft 2?


    jamoiflan is flan. and it is compatible with ic2 1.12 jsut except guns dont work. But that isnt because of ic2 it is a glitch with flans coding

    Quote from carrots084 »

    Loves you's flan
    Posted in: Minecraft Mods
  • 0

    posted a message on Flan's Mod 5.5.2 Update : 1.12.2, 100s of new Skins! : Helicopters, Mechas, Planes, Vehicles, 3D Guns, Multiplayer, TDM, CTF
    Now launching...
    Failed to launch
    java.lang.VerifyError: (class: net/minecraft/client/MinecraftApplet, method: fmlInitReentry signature: ()V) Bad type in putfield/putstatic
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sk89q.mclauncher.launch.GameLauncher$1.run(GameLauncher.java:177)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)


    i got this error log :(
    Posted in: Minecraft Mods
  • 0

    posted a message on I can't get on to my server
    do you have a whitelist? if so, make sure you are whitelisted
    Posted in: Server Support and Administration
  • 0

    posted a message on SERVER - SWAG.
    173.93.190.167:25565



    Managed 4 servers before. Not an amateur.

    SERVER RULES

    -NO GRIEFING. IF YOU GRIEF, YOU WILL BE BANNED, AND HAVE A BAD REVIEW ON SERVER LIST WEBSITES.
    -NO SPAWN KILLERS. PEOPLE HATE THEM, AND WE DON'T BAD REVIEWS FOR LETTING PEOPLE SPAWN KILL.
    -HAVE FUN!
    Posted in: Minecraft Survival Servers (archive)
  • To post a comment, please .