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

ModMCdl

Members
  • Posts

    188
  • Joined

  • Last visited

Converted

  • Gender
    Male

Recent Profile Visitors

2438 profile views

ModMCdl's Achievements

Creeper Killer

Creeper Killer (4/8)

16

Reputation

  1. I believe you could do this by simply detecting whatever key is being pressed when it goes to access the container. It used to be called a KeyInputEvent, but I'm unsure if it changed for 1.15. I'd imagine it would also benefit you to do this with a Forge event, and then just have the item call your GUI whenever either keybind is activated and the item is in hand.
  2. If it is a simply a new type of wood, you can just extend it off of LogBlock instead of the default Block.
  3. Hello. I'm having a very strange issue in regards to feature placement in my custom world gen: specifically mobs and structures. (Decorators work fine). In my custom chunk generator in my dimension, the generation is nonexistent. Structures don't spawn (the /locate command finds them, but nothing is there, and often the locations is not even in the correct biome). My mobs very rarely spawn at all. I have found them, but only once or twice and not nearly as high as they are weighted to spawn. The weird part is, if I create a buffet world with just the biome, everything spawns and generates fine. Because of this, I thought that it might be related to my custom chunk generator just not being compatible with Minecraft's placement routines. My chunk gen is an adaptation of the end islands generation, just with more verticality to the islands. So I tested the generation in a buffet world with default end generation, and the spawning/placement again worked fine. Could anyone possibly take a look at maybe see something that I missed in regards to the generation, or an explanation as to why this might be happening? Thanks. Structure class at GitHub Creature Spawns class at GitHub Entire repo (if you need/want it)
  4. Hello. Really basic question here: I've been digging around, trying to replicate the obsidian spawn platform from the End, but I can't find where it is called and/or created. Does anyone know where I could find this im 1.15.2's source? Thanks!
  5. This is one such example I was referring to: https://minecraft.gamepedia.com/Custom_dimension As for 1:1 block sameness, I'm not 100% sure, as data-driven dimensions are resultants of seeds. Also, if a vanilla generator does not fall into the parameters of your project, you can still create custom generators for dimensions with forge if you need to. You'll just call said custom generator in the .json.
  6. Oh that definitely should work. As a matter of fact, I believe that the MC Wiki or even Mojang have examples for clones of the overworld, nether, and end.
  7. Data driven dimensions work fine, given other examples I have found. However work and real life forced me to stop working on mods for a while, so I have personally not gotten them implemented myself. I can't speak for the OP however.
  8. Well, it's the reason his item wasn't being accepted, was it not? The line required an instance of an item, not the item itself which with a DeferredRegister is handled with .get()?
  9. If you're registering your objects using a deferred register, you'll need to use RegistryHandler.EXOTIC_SPICE.get()
  10. Been picking this problem apart for a few hours now. This is what I'm working on, which from what I've gathered should get the spawn points for each world and place them in a BlockPos, but I'm not sure what I should be doing afterwards to return the new position to the Player. Looking through the javadocs, it appears that repositionEntity is reserved for portal placement specifically, so I don't think I want to return that as true. Right now my script does nothing, as I don't call these new dimensions anywhere. @Override public Entity placeEntity(Entity entity, ServerWorld currentWorld, ServerWorld destWorld, float yaw, Function<Boolean, Entity> repositionEntity) { BlockPos pos; if(destWorld.dimension.getType() == DimensionType.byName(VoidaicDepths.VOID_DIM_TYPE)) { pos = destWorld.getSpawnCoordinate(); } else if(destWorld.dimension.getType() == DimensionType.OVERWORLD) { pos = destWorld.getHeight(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, destWorld.getSpawnPoint()); } return repositionEntity.apply(false); } I don't really know what ask here without sounding stupid, and I know everyone hates it when people ask stupid questions here. You've given me a lot of good information on how to go about doing this, but do you have an example to point me to or an implementation? As I said before, I don't understand how it is working in the vanilla Teleporter class. I tried updating my forge mappings to try and clear up the methods in the Teleporter class, but that didn't seem to change much.
  11. I have an item that on right click, teleports the player to another dimension. I do not want it to spawn a portal. I simply want to teleport the player to their relative coordinates in either dimension, but move them to the nearest "safe" surface. (In the overworld, this would be the surface, in my "void" dimension, this would be the nearest island). Originally, this seemed like the best option. However, after going through the code, I think a better alternative and easier solution would simply be to teleport to each world's spawnpoint. I've been told that each method follows the same idea of relocating the entity, but spawnpoints have an existing implementation, and I can kind of see how it's done with the if statement in player#changeDimension relating to the end. My problem is while I have a general idea of how to do this, I do not know where to place this method so that it will successfully be called when the player teleports. I have considering putting it into my custom teleporter, but I'm not sure how to go about doing that without creating an entirely new changeDimension function. I'm lost in terms of I know the theory behind doing it, but have no idea how to actually implement it. Usually I can find an example in the vanilla code, (which is how I learn most of how I do modding, as seeing examples for me is the best sort of jumping-off point) but I can't seem to find a specific example that actually does what I want, and when I do, the specific use case does not allow me to implement it successfully.
  12. I'm using changeDimension accepts a DimensionType and then ITeleporter, at least as far as I can tell, and so right now I'm using player.changeDimension(world.dimension.getType() == DimensionType.byName(VoidaicDepths.VOID_DIM_TYPE) ? DimensionType.OVERWORLD : DimensionType.byName(VoidaicDepths.VOID_DIM_TYPE), new VoidTeleporter((ServerWorld) player.getEntityWorld())); Passing in my custom dimension and then my custom teleporter. My custom teleporter only overrides placeEntity from ITeleporter so that it does not place a portal. Forgive me, but I can't find how I would add additional methods to check, and as @vemerionhad mentioned, the place portal method that might be doing that is quite "unreadable," or at the very least hard to dissect. Custom Teleporter: https://github.com/ModMCdl/Voidaic-Depths/blob/master/src/main/java/com/modmcdl/voidaicdepths/util/VoidTeleporter.java
  13. Thank you, I had tried doing that with the players spawnpoints, and World#getHeight is definitely a good thing to hear about. I also think I might have been phrasing my question wrong this entire time. I don't know how to implement additional, conditions shall we say, into the changeDimension method. Or even if I can. Do I need to write a custom teleport method to do this? Same thing with sending each player to the spawn point. (Sorry, I just really have no idea what I'm doing in this instance.)
  14. I don't create a portal though, as I specified in my OP. I use a special item to teleport players in between dimensions.
×
×
  • Create New...

Important Information

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