Jump to content

chxr

Members
  • Posts

    54
  • Joined

  • Last visited

  • Days Won

    2

chxr last won the day on November 19

chxr had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

chxr's Achievements

Stone Miner

Stone Miner (3/8)

2

Reputation

  1. The thought process for this would be checking the EnderMan class, as its not behaviour intrinsecally connected to the item but rather the enderman: The EnderMan.isLookingAtMeMethod should return false when a player is wearing your armour piece. In that method you can see a call to ForgeHooks.shouldSuppressEnderManAnger() which uses an ItemStack of the object on the players head. This uses IForgeItem's isEnderMask method that brings you to: default boolean isEnderMask(ItemStack stack, Player player, EnderMan endermanEntity) { return stack.getItem() == Blocks.CARVED_PUMPKIN.asItem(); } which means you can override it on your armour item (since all item classes extend from IForgeItem, including ArmorItem from which you will most likely want to extend from) As for the second thing you'll most likely need to get creative: Using levitation can work if you want to make it floaty, but you most likely want to make it work as if the player is walking on air. I'd suggest something along the lines of checking the block immediately in the direction the player is facing, and if its air, place a transparent, solid block the player will walk on. As the player walks in some arbitrarry direction, keep checking to generate blocks in their path as well as deleting the ones left behind/in any direction the player isn't looking at. You will have to get *even more creative* to think how can you implement it as for only the armour user can stand on air (placing a solid block will make anyone be able to stand on it regardless of if wearing the armour or not) So yeah. First thing pretty straightforward, second one youll have to make your own idea around it.
  2. I'm developing a dimension, but it's kinda resource intensive so some times during player teleporting it lags behind making the player phase down into the void, so im trying to implement some kind of pregeneration to force the game loading a small set of chunks in the are the player will teleport to. Some of the things i've tried like using ServerLevel and ServerChunkCache methods like getChunk() dont actually trigger chunk generation if the chunk isn't already on persistent storage (already generated) or placing tickets, but that doesn't work either. Ideally i should be able to check when the task has ended too. I've peeked around some pregen engines, but they're too complex for my current understanding of the system of which I have just a basic understanding (how ServerLevel ,ServerChunkCache and ChunkMap work) of. Any tips or other classes I should be looking into to understand how to do this correctly?
  3. You need to create a class implementing the ITeleporter Interface, and override its placeEntity() method in which you'll have the logic to safely place the teleported entity in the inbound dimension. Whenever you need to use said class just create a new instance of it and call the changeDimension method of the entity you want to teleport with the ServerLevel instance of the target dimension and the teleporter class: MinecraftServer mcServer = level.getServer(); ServerLevel targetDimension = mcServer.getLevel(TARGETDIMENSIONLEVELKEY); if (targetDimension != null) { CustomITeleporter teleporter = new CustomITeleporter(. . .); entity.changeDimension(targetDimension, teleporter); } EDIT: As far as i can tell this works on 1.19+. You didn't specify your version so I defaulted to the most recent one(s)
  4. If you need translucency (semitransparent/semiopaque) you will also need to mark the renderypes of whichever blocks you need as translucent in the client via a FMLClientSetupEvent (It is like this in 1.20+ and im pretty sure it works as well on 1.19)
  5. Como ya he dicho, si. Puedes seguir las instrucciones que te han dejado arriba si lo quieres hacer en tu ordenador, pero seguramente tendrás que hacer cosas como abrir puertos, usar programas como Hamachi o algun tipo de servidor virtual. Además de que tendrás que encargarte TU de encender tu PC y cargar el servidor cada vez que alguien quiera entrar
  6. Pues para empezar, el querer tenerlo encendido todo el día en tu PC no es recomendable, tanto por los puertos que tendrías que abrir como por el consumo. Necesitarías un buen pC para tener un servidor, jugar y hacer otras cosas a la vez y tus amigos NO podrían encenderlo ellos a no ser que les des acceso remoto a tu ordenador (cosa no recomendable) por lo que en principio te recomendaría un servicio de hosting para el servidor, aunque lo más probable es que tendrías que pagar.
  7. We might be able to help you if you tell us where exactly you have problems
  8. Te puedo ayudar, pero necesito mas info. ¿Hosteado en tu PC? ¿En una web de hosting? ¿Que version? ¿Qué problemas tienes? ¿Qué capacidades quieres que tenga el servidor? (Encendido todo el dia/Solo cuando estes tu, cuantos mods quieres, para cuanta gente. . .)
  9. Ok it was literally WAAAY easier using blockstates. Thanks for reminding me they exist lmao
  10. I've ended up doing it the "dirty" way and had 8 different subblocks spawning from placing the "full block". All of them share the same class and share a small logic block to handle what happens when they're mined. Will check the blockstate thing though.
  11. You can theoretically do this by implementing your own ChunkGenerator, but im not sure how. I'm also tinkering with dimensions so if i come to a more specific answer i'll tell you
  12. What would be the best logic to manage a multiple block block? I already know how some use halves like doors, but mine is supposed to be a 2x2x2 block. Is just decor, doesn't do anything special, so what is the recommended way to go about it since bounding boxes have a limit of 1 block?
  13. So im full into world generation right now, carving shit for a dimension I'm doing. I understand what the CarvingMask is, if i understand correctly, an array of bits that, for each chunk, marks wether the block the bit represent is (1) or isn't (0) carved. But I'm not seeing what uses it can have. Under what circumstances is good to make and keep track of a carvingmask?
  14. Yes, it is possible. You should develop the API as a separate project. Wether you want your mod to have the API integrated or have a dependency on it is up to you. I'd say that for testing the API integration, you should have it separated and add it as a dependency to your mod (at least, thats how I've done it in the past). I recall there is also option to compile different parts of your project on different jars. Either way, thats more of a forgegradle question, if i understand it correctly
  15. Yeah I had a similar idea, at some point I also just got the numBlocksCorrupted++ out of the if block so it would just do a loop numBlocksCorrupted amount of times but it still caused some troubles. I've ended up using an extra feature to generate the blob around the ore and its working wonders so I won't be scratching my head much longer with it
×
×
  • Create New...

Important Information

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