Jump to content

octa

Members
  • Posts

    20
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by octa

  1. Yep, that did it. I have no idea where it went or why it's gone, but I copied it from an old commit and re-added it. Now everything works properly. Thanks a bunch.
  2. Bump. I've put some work into this in my free time but haven't made any headway. My mind is boggled, and I'm hoping that the issue is just a simple mistake that I'm overlooking, but I've checked everything I can think of.
  3. So, I recently created data generators for all of my resources (with the exception of particles, which I am not registering or doing anything with right now). When I start up the game, I get the warning in the post title. Sure enough, when I load into the game my mod is missing all resources. I am certain that all of my resources are located in the right spot, and I've spent a while playing around with my build.gradle to see if there was any issue with that. I'd appreciate any help I can get with this. Here's a debug log of when I start the game: https://pastebin.com/8JggpiqY And here's my repo (in its broken state): https://github.com/eddie1101/Voidcraft/tree/broken
  4. Read it again, the expression is !(nether || end) Then why did registering the feature fix OP's issue? I'm just genuinely curious how this could break his code but not mine. I'll be interested if you find that source.
  5. They are the same function. isRemote is MCP mappings, isClientSide is Official mappings, which are now the default shipped with the mdk.
  6. Adding on to this, and for my curiosity, could somebody tell me why my code does work? I was looking at this post to see if I could help because we have nearly identical code, but I couldn't figure out why it wasn't working for him. Nowhere in my code do I do this, and I also don't tag any of my functions with @SubscribeEvent. Maybe I'm just misunderstanding how registries and events work. Here is my ore generation class: And here is my main: And here is my repo if anyone wants to take a deeper dive: https://github.com/eddie1101/Voidcraft
  7. This works, but it took me a little while to figure out why. I didn't realize that ITeleporter#getPortalInfo was responsible for a lot of the vanilla implementation. Thanks for the help! Here's my code for anyone else struggling, but it's very simple.
  8. So I tried this, and in looking at the vanilla code I'm making a few assumptions. It seems that when you call Entity#changeDimension, it will pass in the vanilla lambda for repositionEntity to your teleporter, which basically means in my code for Teleporter#placeEntity I want to completely ignore that lambda and do everything I need to do in placeEntity instead. I just want to teleport like normal, but without any of the vanilla portal shenanigans, so I basically just copied the vanilla lambda in changeDimension and removed the parts that I don't want, which gives me a null pointer. The problem is that using the EntityType factory gives me null instead of a ServerPlayerEntity. Maybe I'm missing something simple here, but for the life of me I can't figure this out. Any help is appreciated. Here's my code And here's my crash report
  9. I have block which reads nbt data about position and dimension from an item in its inventory and sends any entities on top of it to that position and dimension. This works fine in most cases, but in particular when sending an item, player, or mob (that I have tested) from the end to the overworld, the entity will be sent to spawn instead of the specified position. I assume this is related to how hopping in the portal after defeating the dragon sends the player back to the overworld's spawn. Does anybody know how I can get around this? Relevant code: https://github.com/eddie1101/Voidcraft/blob/master/src/main/java/erg/voidcraft/common/block/BlockPortalBase.java#L131-L181 Thanks Edit: In addition, I noticed that when travelling to or from the nether near a nether portal, the entity will occasionally be teleported to the position of the portal rather than the specified position. Again, I assume this has something to do with how Minecraft syncs nether portals across dimensions, but the only way to change dimensions that I'm aware of is Entity#changeDimension, so I'm not sure how to get around this.
  10. Thanks for the insight. I was able to resolve all my problems. Perhaps if I posted my code one of you would have noticed this before me, but I was removing any tile entities within the volume before destroying the blocks, which of course meant there was no inventory left to drop. Thanks for the help.
  11. It seems like onRemove is deprecated according to the docs, and it doesn't exist in Block or AbstractBlock according to my IDE. onReplaced is the closest I could find, (although it is also deprecated) and that's where I drop the inventory of my custom containers, so maybe that's what you meant?. onReplaced doesn't really fit what I'm trying to do here either. I was hoping there was some convenient method that handles breaking blocks in any context but that doesn't seem to be the case. Could you clarify how you might go about doing this?
  12. I have an item that on right-click destroys blocks in a 3x3x3 volume. Blocks are dropped as intended, but chests do not drop their contents. I've tried world.destroyBlock and block.harvestBlock but neither of them do the trick. Other containers don't drop their contents either, and I've also noticed that a jukebox that is playing a disc will continue playing music after being destroyed with this item, so I must be missing something important. What's the appropriate way to destroy blocks by using an item?
  13. Oh, I forgot all of the annotations in my blocks class. ¯\_(ツ)_/¯ Thanks for the eye.
  14. Hello, I've recently decided to clean up my mod because it was a huge mess, so one thing I did was move all of the registration out of the one "registration" god class and divide the registration tasks into categories of block and item. Somewhere during this process, I must have gone wrong because my mod either fails to load or inevitably crashes when loading a world. I've played around with adding listeners and registering classes to the forge and mod busses, and gotten different errors. One thing I noticed is that they all lead to null pointers to items whose fields should have been injected from registries using the @ObjectHolder tag, so this is where I focused my research. I'm struggling to find anything about object holders, and beyond the idea that I didn't update the resource locations to match my new modid I'm stumped. Latest Log and crash report (which correspond to the version on my repo) are attached. Repo: https://github.com/eddie1101/PortalTest Can someone tell me what I'm doing wrong? latest.log crash-2021-02-01_20.37.37-client.txt
  15. Can you tell me how you're viewing the image? When I view it in gimp it looks pretty clean: Edit: Using Gimp's threshold alpha tool worked wonders. Thanks for the help.
  16. You can see the handle and part of the top of the axe are flat. This is happening with all except for two of the tools I've made, and I can't discern any difference between the broken ones and the ones that work correctly. Here is the texture im using in the above example: https://github.com/eddie1101/PortalTest/blob/master/src/main/resources/assets/basicportals/textures/item/item_void_axe.png Here is the model json: { "parent": "item/handheld", "textures": { "layer0": "basicportals:item/item_void_axe" } } Here is the rest of the project: https://github.com/eddie1101/PortalTest Please let me know why this is happening. Thanks.
  17. Oh, that makes sense. Do you have a suggested way of initializing that BlockPos? I can't think of anything other than assigning a symbolic value which gets verified before use, but that seems clumsy. Edit: Nvm, I was trying to return some nbt data instead of the tileentity's actual position. Thanks for the help.
  18. Woops. Fixed the item names. According to the docs, RegistryEvent.Register is a valid way of registering entries, so I'll stick with that since I know it better. The repo should build now, so back to my original question: Why when placing a Portal Base does the client get disconnected from the server?
  19. Repo is fixed. How do I run my client with system properties? It works on the server but when I add it to JVM arguments in the launcher's installation settings the game crashes.
  20. I'm playing around with making my own mod. It works fine in Singleplayer but when I test it on a server my client gets disconnected with error message Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException (there is no further stack trace) when I place the Portal Base block. I can reconnect just fine, but will get disconnected again when I place another of those blocks. I haven't found much about this specific issue. Any help would be appreciated. Code: https://github.com/eddie1101/PortalTest/ logs: (Though they're not very helpful, is there some way to make the error more verbose? A stack trace would really help) Server: https://pastebin.com/JN6gnQyx Client: https://pastebin.com/AWVavatz Thanks in advance. Edit: Attached .jar if you want to try to reproduce basicportals-0.1.jar
×
×
  • Create New...

Important Information

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