Everything posted by Vizuall
-
[SOLVED] [1.10.2] Get block hardness
Ok so how to increase breaking duration for player?
-
[SOLVED] [1.10.2] Get block hardness
Is there any way to change block hardness in a specific position? Lets say, I want ot change hardness of stone on x=5, y=64, z=20..
-
[SOLVED] [1.10.2] Get block hardness
Hello, Is there any way to get the original hardness of block, not affected by .setHardness()? I need to use it in PlayerInteractEvent.. Thanks
-
[SOLVED][1.10.2] Using API of other mod
Ok I simply made a new class with @Optional.Interface(iface = "package", modid = "MOD_ID") and everything is fine
-
[SOLVED][1.10.2] Using API of other mod
Hello, I want to use API of other mod, but I get error, even if I use it in a try.. I would like to make it work even without having that API mod. So should I check if player has this API mod, or is there some other better way? try { world.setBlockState(position), BlockBOPSapling.paging.getVariantState(BOPTrees.BAMBOO)); } catch (NoClassDefFoundError e) { System.out.println(e); } net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: biomesoplenty/api/enums/BOPTrees at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:186) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:790) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:322) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:520) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:351) at net.minecraft.client.main.Main.main(SourceFile:124) 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.NoClassDefFoundError: biomesoplenty/api/enums/BOPTrees at mymode.core.EventHandler.<init>(EventHandler.java:20) at mymode.core.Fauns.init(Fauns.java:34) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:595) 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:239) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217) 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:142) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:788) ... 10 more Caused by: java.lang.ClassNotFoundException: biomesoplenty.api.enums.BOPTrees at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 39 more Caused by: java.lang.NullPointerException at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ... 41 more
-
[1.10.2] Get every leaves of a tree
That's how I do right now more or less.. But it can interfere with close trees and destroy their leaves.
-
[1.10.2] Get every leaves of a tree
Hello, I would like to destroy every leaf of a tree. Do you have any suggestions, how to do that? Thx
-
[SOLVED] [1.10.2] Block placed by player or generated by world?
Hi, is there any way to know, if specific block (e.g. stone) was placed by player, or generated by world? Thanks
-
[SOLVED] [1.10.2] Collection in config
Ok I fixed it.. Just use Property and ImmutableList Property property = config.get("Data", "Allowed", new String[]{"item1", "item2", "item3"}); list = ImmutableList.copyOf(property.getStringList());
-
[SOLVED] [1.10.2] Collection in config
Ok I made this: List<String> types = new ArrayList<String>(); types = Arrays.asList(config.getStringList("", "Allowed", new String[]{"item1", "item2", "item3"}, "Comment")); It works perfectly, but if I add new item into config, it throws this error: An exception occurred while loading config file mod.cfg. This file will be renamed to mod.cfg_20160825_141457.errored and a new config file will be generated. [14:14:57] [Client thread/INFO] [sTDERR]: [net.minecraftforge.common.config.Configuration:<init>:140]: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
-
[SOLVED] [1.10.2] Collection in config
Hi, I need to make a collection of allowed items.. Something like this: # Configuration file allowed { item1 item2 ....... ....... } And then, the whole collection load into Set<String> Thanks
-
[SOLVED] [1.10.2] Player has stopped breaking block
I mean every block.. The thing is, that I need to keep stage of destruction, even after player stops destroying block. So he can continue in breaking it later.
-
[SOLVED] [1.10.2] Player has stopped breaking block
Hi, How determine if player has stopped breaking the block, but the block is not destroyed. Thanks
-
[SOLVED] [1.10.2] How to get log type
Hi, I have a situation, with log type: System.out.println(event.getState().getValue(BlockOldLog.VARIANT)); System.out.println(event.getState().getValue(BlockNewLog.VARIANT)); How to determinate which type should be used? Because BlockOldLog contains only Oak, Spruce, Birch and Jungle and BlockNewLog contains Acacia and Dark Oak. Is there something like BlockLog.VARIANT? something universal.. Thanks
-
[Solved] [1.10.2] Place sapling in the world
Hi, I need quick advice. How to place Acacia Sapling (ID 6:4) in to world? I managed to place oak sapling.. Block sapling = Block.getBlockById(6); world.setBlockState(new BlockPos(xCoord, yCoord, zCoord), sapling.getDefaultState()); Thanks
IPS spam blocked by CleanTalk.