Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

The_Fireplace

Forge Modder
  • Content Count

    241
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by The_Fireplace

  1. Yeah, the entire mod, including the data used for the check, is only on the server side. Since the original post, I've also tried decreasing the stack size of the block when I cancel the event then adding the block to the inventory, but that didn't fix it either.
  2. Hello, After cancelling BlockEvent.PlaceEvent on the server side, I'd like to make sure the client knows the block hasn't been placed. I've tried EntityPlayer.inventory.markDirty(), as well as overwriting the stack in the slot with itself, but neither updated the client. Ideally I'd like a way to do this on the server side only, without having to make changes to the client, because the mod I'm doing this in is intended to run on the server side only. If anyone has any suggestions about how to make this work, please let me know. I'll edit the post if I come up with a solution.
  3. The command is no longer needed. Just open IntelliJ Idea/Eclipse and import build.gradle as a gradle project.
  4. After running "gradlew setupDecompWorkspace idea" and opening the project in Idea, running the game does not detect the mod I'm working on. The only 4 mods that load are Minecraft, MCP, FML, and Forge. My build.gradle My main mod file My run configuration: Forge 14.23.5.2768 ForgeGradle 2.3-SNAPSHOT If there is any other information I can provide to help get this resolved, please let me know.
  5. SRG stands for Searge. He is one of the guys that works/worked on MCP, possibly the one that came up with that naming system.
  6. For a while, it was working fine, then my game started crashing on launch. First thing I did was disable all mods and attempt to reproduce the issue, and it continued. Here is my latest.log: http://paste.ubuntu.com/24779792/ And (I don't see how this helps any more than the log), the crash report: http://paste.ubuntu.com/24779841/ Forge 13.20.0.2313 Minecraft 1.11.2 EDIT: It looks like the resolution it was trying to run at was wrong; I had switched monitors before the crash started occurring. To fix the issue, I disabled fullscreen in options.t
  7. Depends. Is it just that you need to use server-side data for something on the client? Or are you actually trying to have the server do something? If what you want is the former, I would use packets to request the information from the server and have it sent back to the client. If you want the latter, I would look in to using LivingUpdateEvent, check if the entity is a player, and write code similar to Entity::rayTrace() (A client only method, which is why you would need to recreate something similar) to determine if the player is looking at an entity.
  8. Can we see your block code? It looks to me like one of the methods used in calculating the block's light value needs to be overridden.
  9. Hey guys, I want to render an itemstack from a slot in my entity's inventory above the entity. I would prefer for it to render like the EntityItem does. My question is, how do you recommend I do this? I would like to avoid causing a noticeable performance hit if possible. It should also be noted that I plan to have this rendering disabled by default, and enabled by either using a keybind or equipping an item.
  10. Ah, I see. Thanks for the explanation, it should be somewhat easy to fix now, since the client shouldn't have any reason in this mod to need to send that much data to the server. Thanks for the suggestions, I will work on them today. You've pointed out several problems and ways to fix them that I wouldn't have caught. As for the why of all of that bad design, that was the original author's doing, and I have been working on fixing it for a while now.
  11. So, I send a packet that contains one NBTTagCompound containing a lot of data(Mostly inventories within a tile entity). Unfortunately, it seems to be too large, since I get the following crash upon sending. http://paste.ubuntu.com/24062837/ My question to you is, how do you suggest I redesign the system to reduce the packet size? My current way of doing things involves sending the packet to the client just before the GUI opens. This packet contains all of the entity's data, including inventory, which the client needs or else it will crash upon opening the GUI. The creation
  12. Alright, found kind of a workaround. If you manipulate the item json correctly with rotation and scaling, you can flatten it and make it look like a normal item. The only part I have done so far is the gui part, which I will post below, and if I ever do the in-hand renderings, I will post that too. If anyone else needs to do it before I do, I have found that Item Transform Helper is very useful for doing this. "display": { "gui": { "rotation": [ 0, 45, 32 ], "translation": [ 0.00, 0.00, 0.00 ], "scale": [ 1.50, 1.50, 1.50 ] } } Thanks for trying to help out,
  13. item/generated wasn't introduced until 1.9(or at least, wasn't used for the vanilla items before then, idk if it existed code-wise), and I am working on 1.8.9. Still, I went ahead and gave it a shot, and it still rendered like an itemblock(same as I showed in the first post), along with giving me this error in the console. Edit: It appears that setting it to anything vanilla causes it to switch to the vanilla Compass's TextureAtlasSprite. I just tried making that line item/potato and it caused it to switch to the vanilla Compass's.
  14. And how do you suggest going about doing that? I know I'm probably derping on this one, but when I change this line to use builtin/generated, the item switches from my custom TextureAtlasSprite to the vanilla Compass's TextureAtlasSprite.
  15. Hey guys, I have made something with a custom TextureAtlasSprite, but when it renders, it looks like this: [/img] Functionally, the texture works fine, I just need it to render like an item. My TextureAtlasSprite class: https://github.com/The-Fireplace/UHC-Compass/blob/master/src/main/java/the_fireplace/uhccompass/TextureUHCCompass.java Note that this is currently for 1.8.9, though I plan on updating it once it is completed.
  16. Still no progress on this. Anyone have any ideas on the best way to go about doing this now?
  17. Hey guys, I found an old tutorial on adding hidden achievements to pages, so they don't show up until they've been achieved. However, several changes have been made since then(Achievements are now world based), and the actual code shown is pretty old. Does anyone know of a simple way to do this now?
  18. Hello everyone, I am trying to add combat AI to my custom entity, and I get the following NPE when it is trying to create Melee attack AI: http://paste.ubuntu.com/23243073/ Honestly, I' a little confused about this one, because I see no way this should throw an NPE. Anyways, the code for my entity: https://github.com/The-Fireplace/Overlord/blob/master/src/main/java/the_fireplace/overlord/entity/EntitySkeletonWarrior.java Any help with solving this would be greatly appreciated.
  19. You need to have it use your modid as well. For example: ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation("everythinginbetween:"+item.getRegistryName(), "inventory")); If that doesn't work, try the following code instead(this is how I register mine, so I know this method works): Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation("everythinginbetween:" + item.getRegistryName(), "inventory"));
  20. I have searched the forums for this issue, and after looking at about 10 different threads, I have only found a single answer that (should have) helped me with this issue: After following these instructions, my entity is still a white cube. Here is my code: If any more code is needed, here is my source code.
  21. Ok, so, my initial issue was that my custom TNT was rendering as a white cube. I searched every thread I could find related to that issue, and the only real answer I found was this: So, I tried following what it said, and it seems that when I try to read the data from the DataWatcher, it throws a NullPointerException repeatedly as long as the entity exists: And here is the important part of my code: The part surrounded by try/catch is what throws the NPE. If you need to see the full file, here is a link to it on github. Could anyone tell me what I am doing wrong?
  22. Well, I'm out of ideas; I don't see any reason for this to not work. Are there any errors that show up in the log related to texture loading?
  23. When is registerRenders() being called? It sounds to me like it is being called during FMLInitializationEvent; it needs to be called in FMLPreInitializationEvent.
  24. I need to see the code where you register it to know what the problem is. Also, this code over complicates things a bit, I didn't expect you to make an almost exact copy of the more complex of my two projectile rendering classes. My code there is designed for multiple projectiles to use the same class. Here is a simpler example, which better suits your purpose, that you can use if you want something to copy, paste, and edit, though I strongly suggest you look in to it and make sure you understand what all of it does. My renderprojectile: https://bitbucket.org/The_Fireplace/fires-rando
  25. Take a look at how my rendering is handled at https://bitbucket.org/The_Fireplace/fires-random-things/src/master/src/main/java/the_fireplace/frt/client/ClientProxy.java It isn't a big change from how you're doing it now, it just needs an extra class, the render factory. Unless something has changed again in 1.10, this way of doing it isn't deprecated.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.