Jump to content

AnZaNaMa

Forge Modder
  • Posts

    161
  • Joined

  • Last visited

Everything posted by AnZaNaMa

  1. This is pretty old, but I figure it's worth noting that you can't make it final if you're doing it @Draco18s's way, as you have to initialize a final variable in the line that you declare it. You'd just do: import org.apache.logging.log4j.Logger; ... public static Logger logger; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); } Probably also worth noting that you want the org.apache.logging.log4j.Logger and not the java.util.Logger which your IDE may or may not default to. Side note, is there no way to insert inline code anymore?
  2. Thanks for your help. The whole corner block thing helps out. Also, I want the inside to be hollow anyway, so that makes it a bit simpler (it's a tank).
  3. Hello, I'm attempting to make a multiblock structure so that the player can form it into whatever size of rectangular prism they want. I'm having difficulties in figuring out how I can check whether or not the multiblock is complete without it being a huge monster of a method that takes forever to run, since I would need to check it pretty often. Does anyone know how I may be able to do this? The real issue here is that I don't already know what the shape is going to be or where the controller for the multiblock will be placed.
  4. Thank you for your help, I got it working. One thing I miss about the old forums is the little button you could press to thank someone for their answer.
  5. `BlockPos#getOffset()` ? One more question... I have a PropertyFacing on my block: public static final PropertyDirection FACING = PropertyDirection.create("facing"); public BlockRotable(Material material, String name, boolean addToCreativeTab) { super(material, name, addToCreativeTab); } @Override public BlockStateContainer createBlockState(){ return new BlockStateContainer(this, FACING); } @Override public int getMetaFromState(IBlockState state){ return state.getValue(FACING).getIndex(); } @Override public IBlockState getStateFromMeta(int meta){ return getDefaultState().withProperty(FACING, EnumFacing.getFront(meta)); } @Override public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing face, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer){ return getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); } So once it do `World#getBlockState` how can I use that BlockState to get the direction the block is facing? Also how do you do code snippets on the new forum design (which is amazing by the way)
  6. Hello, just a quick simple question. Is there a specific way to get a neighbor of a block based on the way it's facing (PropertyFacing)? Like if a block is facing north, is there a way to use that EnumFacing direction to get the block next to it in that direction, or do I just need to implement it myself?
  7. So.... I've been working on this for a while and the longer I spend working on it, the more complicated it seems to get. I'm attempting to make a gear. I made a model in blender and put it in the proper location and everything and set it up to load the OBJ for the block. It works fine and the model is loading great when I place it into the world. Now, I want to be able to add the functionality of the gear (make it face different directions based on how it's placed, make it rotate based on it's TE's rotation property, draw a shaft connected to the gear if it should have one, etc..) and I'm thinking the only way I'll be able to pull this off is if I use a TESR. However, I'm not sure how I can render an OBJ model in a TESR. I found an old tutorial from 1.7.10 but it was using AdvancedModelLoader, which no longer exists. If anyone has any experience with this or knows how it may be done, or has a simpler way of accomplishing it, please let me know. Thank you!
  8. So, I've decided to take on the task of attempting to make the player have wings made of smoke particles. I am planning on hard-coding all the points of the particles I want to show with their (x, y) positions relative to the center of the back, but then I'm going to need to rotate them about the z-axis (I think...) which I'm not quite sure how to do. I've been reading https://en.m.wikipedia.org/wiki/Rotation_matrix which is on Rotation Matrices and I think it may have something to do with this, but I'm not quite sure. I've only completed through Calc I and haven't taken Linear Algebra yet which is the class where I think I would learn this kinda thing. Should I just give up on this idea? Also, I'm wondering how you get the player's body rotation. I know you can get the rotation of the head (player.getRotationYawHead()), but the rotation of the head and the body are often different. I didn't really want to use OpenGL for this sort of thing, because I think it would look really cool to have the wings made of smoke particles, but if there's a way to accomplish the same sort of effect using OpenGL, I'm interested in hearing about it. Thank you for your help.
  9. Not sure what changed, but it worked eventually. Thanks for the help!
  10. sorry, no the resources are there and everything. They are in src/main/resources but they're not getting loaded when I run the client is what I'm trying to say
  11. Oh, also here are the errors I'm receiving when I start up the game.
  12. The title mostly explains it. For some reason, all my textures, localization, etc, are not loading in when I try to run the client in IDEA. I'm guessing it means that it's not correctly grabbing the resources folder when I try to run it. Where does IDEA get it's information on the directories of source and resources and such? I tried just re-cloning the repo and setting up a fresh workspace. I am running graldew setupDecompWorkspace and have tried it with --refresh-dependencies . After that I ran gradlew idea and gradlew genIntellijRuns .
  13. So, in my mod I have an object Lifeforce that has values "strength" and "purity". I want each chunk to have a Lifeforce. I figured I could accomplish this through NBT data, but a chunk doesn't seem to have an NBTTagCompound until it is saved. My question is how do I get and set data to a chunk. For example I'm subscribing ChunkGeneratorEvent.ReplaceBiomeBlocks and I want to assign the lifeforce when a chunk is created. How can I accomplish this, as a chunk doesn't have NBT?
  14. Not sure how it ended up like that but deleting those fixed it. Thanks!
  15. sorry, I did that initially, but didn't think to post it here. http://pastebin.com/jTeVxEeq Don't know why it would throw a NoClassDefFoundError on a fresh install of forge.. strange
  16. Hi all, I've been working on my mod on my PC at home which has windows. I'm currently on vacation and trying to work on it from my laptop which runs Linux Mint. I cloned my repo into a folder and attempted to run ./gradlew setupDecompWorkspace . This resulted in a permission denied error, so I used sudo chmod +x gradlew . This allows me to run ./gradlew, but it fails after about 3 seconds every time, giving me this: FAILURE: Build failed with an exception. * Where: Build file '/home/andrew/Mods/1.10.2/technika/build.gradle' line: 15 * What went wrong: A problem occurred evaluating root project 'technika'. > net/minecraftforge/gradle/tasks/GenSrgs * Try: Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. BUILD FAILED I figured it might just be a problem with my instance, so I downloaded a fresh version of forge and ran it and it's giving me the exact same error. I'm on minecraft 1.10.2 forge version 12.18.2.2099
  17. Well, it can also be used to deal damage to an entity, but I'm already raycasting, so I can do that easily. Basically, I just don't know how I would add in the visual effect. Particles don't seem right , because I'd like to be able to render the lightning bolt spanning variable distances based on how far the target is
  18. Okay, so I've got an item that will be used to shock the block the player is looking at, but I have no clue how I can make something that even remotely looks like lightning come from the wand to the block. Any ideas?
  19. Yeah, there are plenty of mods that are written entirely in scala, which is upsetting when I try to look at their source code. But for real, modded minecraft is probably the most complex java program I have ever seen, so I'd have to agree with Ugdhar.
  20. Hey, just wanted to let you know... you misspelled needsInitialization Won't really affect your code, but I'm a grammar nazi.
  21. Wow that was a simple fix... and thanks for the IDEA (pun intended) cause I never thought to install a plugin for JSON editing. I had just been using notepad... *facepalm*
  22. I've been trying to troubleshoot this for forever but I can't figure out what's wrong. I've got a block with a PropertyEnum<EnumColor> and when I load up the game, I'm getting this: [22:48:30] [Client thread/ERROR]: Exception loading model for variant everythinginbetween:bubbled_stone#color=lightorange for blockstate "everythinginbetween:bubbled_stone[color=lightorange]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model everythinginbetween:bubbled_stone#color=lightorange with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) [idea_rt.jar:?] I've registered the block and done the ModelLoader.setCustomModelResourceLocation() here, but I just get a block with the purple/black missing texture (I know the textures are in the right place btw, I'm getting a Model error, not a texture one). Also, here is the blockstate and the full log
  23. Wow I should have just tried that Thanks for the help though. Much appreciated!
  24. I will look into that thanks but what i really need is not to sync the data. It's already synced fine. I just want to know how to make it redraw the gui every frame as long as it's open.
×
×
  • Create New...

Important Information

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