Jump to content

TastyCake

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by TastyCake

  1. I'd like to make a config for my mod as well. Did you ever figure it out?
  2. Sorry. I didn't see that reply. Thanks!
  3. I have an item that, when it hits a block, drops the block and sets the block to air. My problem is that all the blocks are dropped twice but only one instance can be picked up. Here is my code Any help would be appreciated.
  4. Ok. All the issues are fixed. Thanks for all your help!
  5. So I tried Jabelar's new method and it fixed the leaf issue. The problem with the block dropping twice is still there and still, only one instance of the drop can be picked up.
  6. Jabelar's method seems to work with logs and stone types but leaves have no texture when broken and have incorrect data values. Also, everything seems to drop twice, but only one instance can be picked up and the other instance is removed on re-login Edit: I missed Jabelar's new reply. Will try it and report back
  7. Sorry for my ignorance but how am I supposed to use this? And where do I get the RayTraceResult? Thanks!
  8. So in an event, I need to get the block that gets left-clicked and then drop it and make it disappear from the world. This works but when I left-click, on, for example, a log of a type other than oak, it just drops oak. This happens with stone and andesite too. So what I need is to get the Data Value that determines the block sub-type. Here is my code Thanks for any help you can provide!
  9. I see what you mean. I'm not sure what I had it there for. I am removing it and am going to do some testing to see if I notice a difference.
  10. if (worldIn.getWorldType() != WorldType.FLAT) { // Generation Code } worldIn is a World variable
  11. My mod works on the client but when I start the server it crashes with this error, [09:17:47] [Server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.RegistryEvent$Register@2d987908: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityPlayerSP at com.warpedreality.lostpowers.init.ModTools.<clinit>(ModTools.java:55) ~[ModTools.class:?] at com.warpedreality.lostpowers.utils.handlers.RegistryHandler.onToolRegister(RegistryHandler.java:28) ~[RegistryHandler.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_RegistryHandler_onToolRegister_Register.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143) ~[EventBus$1.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) [EventBus.class:?] at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:741) [GameData.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:604) [Loader.class:?] at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98) [FMLServerHandler.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:332) [FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:128) [DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:550) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172] Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityPlayerSP at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_172] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_172] ... 13 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@518cf84a from coremod FMLCorePlugin at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:262) ~[forgeSrc-1.12.2-14.23.2.2611.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_172] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_172] ... 13 more Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/entity/EntityPlayerSP for invalid side SERVER at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62) ~[forgeSrc-1.12.2-14.23.2.2611.jar:?] at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:258) ~[forgeSrc-1.12.2-14.23.2.2611.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_172] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_172] ... 13 more [09:17:47] [Server thread/ERROR] [FML]: Index: 2 Listeners: [09:17:47] [Server thread/ERROR] [FML]: 0: NORMAL [09:17:47] [Server thread/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@7a046053 [09:17:47] [Server thread/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@250d52e4 [09:17:47] [Server thread/ERROR] [FML]: 3: net.minecraftforge.fml.common.eventhandler.EventBus$1@7e34dd87 [09:17:47] [Server thread/ERROR] [FML]: 4: net.minecraftforge.fml.common.eventhandler.EventBus$1@5b079ce4 [09:17:47] [Server thread/ERROR]: Encountered an unexpected exception java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityPlayerSP at com.warpedreality.lostpowers.init.ModTools.<clinit>(ModTools.java:55) ~[ModTools.class:?] at com.warpedreality.lostpowers.utils.handlers.RegistryHandler.onToolRegister(RegistryHandler.java:28) ~[RegistryHandler.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_RegistryHandler_onToolRegister_Register.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143) ~[EventBus$1.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) ~[EventBus.class:?] at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:741) ~[GameData.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:604) ~[Loader.class:?] at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98) ~[FMLServerHandler.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:332) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:128) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:550) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172] Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityPlayerSP at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_172] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_172] ... 13 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@518cf84a from coremod FMLCorePlugin at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:262) ~[forgeSrc-1.12.2-14.23.2.2611.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_172] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_172] ... 13 more Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/entity/EntityPlayerSP for invalid side SERVER at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62) ~[forgeSrc-1.12.2-14.23.2.2611.jar:?] at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:258) ~[forgeSrc-1.12.2-14.23.2.2611.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_172] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_172] ... 13 more I have looked at the errors but cannot find the source of the problem Here is my code https://github.com/WarpReality/Lost-Powers Thanks for any help!
  12. While I was trying to setup my GitHub Repo, I discovered that when I had renamed my mod I had forgotten to change the names in the model/blockstate files.
  13. Did you code your mod in the jar file? You need to use gradle to compile it into a jar file. Upload your code
  14. So I've exported my mod as a jar file. Everything works as expected except for the textures and models which are all missing in game. All the models, blockstates and texture files are where they should be and they were all working in my development environment. latest.log
  15. I just ran the clean gradle task and then ran build again and now everything is working! Not sure what the problem was.
  16. Sorry but I'm not totally sure what you mean. This is the code I've got public static final Block OBSIDIAN_BLOCK_1 = new BlockBase("obsidian_block_1", Material.ROCK, CreativeTabs.REDSTONE, SoundType.STONE,55, 6250, "pickaxe", 4); And this is BlockBase public BlockBase(String name, Material material, CreativeTabs tab, SoundType sound, float hardness, float resistance, String tool, int lvl) { super(material); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(tab); setHarvestLevel(tool, lvl); setSoundType(sound); setHardness(hardness); setResistance(resistance); ModBlocks.BLOCKS.add(this); ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName())); }
  17. Do you know where it is? If so, please post it on Pastebin and post a link to the paste here
  18. I ran the gradle build task Then I got the jar from /build/libs/ and I didn't use the sources jar
  19. So I have exported my mod as a jar file. I run it in Minecraft with the latest version of Forge and it's the only mod installed. It never crashed in my Development Environment but outside of that, it is crashing every time. The reason for it is "java.lang.NoSuchFieldError: ROCK". The crash report is on Pastebin here. I appreciate any help as the reason for the crash makes no sense to me.
  20. Thanks so much! I will give this a try.
  21. @Cadiboo Forge needs the vanilla server there aswell
  22. Hi. I'm trying to make a command that teleports the player to different dimensions. I've got the command working with vanilla dimensions but is there a way I could input a list of possible dimensions from other mods? Any help is appreciated.
  23. I changed if (event.getItemStack() == new ItemStack(ModTools.VOID_MULTITOOL)) to if (event.getItemStack().getItem() == ModTools.VOID_MULTITOOL) and now it works
  24. Hi. I am trying to instantly break a block when the player left clicks on it with a specific tool. I am definitely registering the event in the event bus. Any help would be greatly appreciated. public class EventVoidMultitoolBlock { @SubscribeEvent public void onPlayerInteract(PlayerInteractEvent.LeftClickBlock event) { if (event.getItemStack() == new ItemStack(ModTools.VOID_MULTITOOL)) { BlockPos pos = event.getPos(); event.getWorld().setBlockToAir(pos); } } }
×
×
  • Create New...

Important Information

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