Jump to content

McJty

Members
  • Posts

    129
  • Joined

  • Last visited

Everything posted by McJty

  1. Hmm, but I only want to do this once after creation of the dimension. Later on these chunks don't need to be loaded anymore. Can I disable that flag later?
  2. Hi. I just created a new dimension and I have custom world generation (with IWorldGenerator) which is working fine for that dimension. As soon as I teleport to that dimension with the following code: WorldServer worldServerForDimension = MinecraftServer.getServer().worldServerForDimension(message.dim); MinecraftServer.getServer().getConfigurationManager().transferPlayerToDimension((EntityPlayerMP) player, message.dim, new RfToolsTeleporter(worldServerForDimension, message.x, message.y+1, message.z)); The dimension is created and my world gen is called. However. I want to create the 0,0 chunk in my dimension without having to teleport to it. I tried to do it with this: WorldServer worldServerForDimension = MinecraftServer.getServer().worldServerForDimension(me.getKey()); ChunkProviderServer providerServer = worldServerForDimension.theChunkProviderServer; if (!providerServer.chunkExists(0, 0)) { providerServer.loadChunk(0, 0); worldServerForDimension.getBlock(8, 70, ; providerServer.unloadChunksIfNotNearSpawn(0, 0); } but that isn't working. The dimension seems to load (a new dimension folder is generated in my world file). However, my IWorldGenerator implementation is never called. So how can I force my IWorldGenerator implementation to be called for the new dimension? Thanks!
  3. Nope, getWorld() doesn't load the dimension. But minecraftserver.worldServerForDimension() does so I'm using that now. Thanks.
  4. Is there a way to load a single chunk from another dimension? Possibly even when the dimension itself is not loaded (no player is there)? I have sucessfully created my custom dimensions and I can teleport in and out of them without problems. However some of my devices need to do world.getTileEntity() in locations in that other dimension (even when nobody is in it). And it currently crashes because DimensionManager.getProvider(dim) crashes with a null pointer exception (world isn't there). So how can I get around this? Thanks!
  5. How can I trigger world generation? I haven't seen any tutorials or examples that demonstrate how to do that. Thanks,
  6. Hi all, I'm trying to create a new dimension and want to put some blocks in that dimension right away. I have the following code: int id = DimensionManager.getNextFreeDimId(); DimensionManager.registerProviderType(id, GenericWorldProvider.class, false); DimensionManager.registerDimension(id, id); World newWorld = WorldProvider.getProviderForDimension(id).worldObj; However the newWorld is null. How can I make sure that my new dimension has a valid world to use? Thanks,
  7. Solved! Apparantly I had to remove CCC, NEI and WAILA from my mods folder
  8. I am using WAILA api in my mod but at this moment I'm including the WAILA interfaces with my mod itself. I would like to avoid that and use a proper maven dependency but I can't get that to work. First I changed my build.gradle as follows: http://paste.ubuntu.com/9095432/ I then did gradlew setupDecompWorkspace idea --refresh-dependencies Then when I try to do gradlew runClient (not even trying from within IntelliJ yet) I get the following log: http://paste.ubuntu.com/9095457/ Without the maven/nei dependencies all is fine. I'm using the following version of NEI: NotEnoughItems-1.7.10-1.0.3.67-dev.jar Any ideas? Thanks!
  9. Thanks! Your suggestions fixed it. I misinterpreted this tutorial (http://www.minecraftforge.net/wiki/MrGReapers_tutorials/1.7.2_sound_tutorial) when it said: So I thought the sounds.json should go inside the sounds folder. It works perfectly now.
  10. Hi all, I have a sounds.json file that looks like this: { "teleport_whoosh" : {"category": "block", "sounds": [{"name":"teleport_whoosh","stream":"false"]} } It is placed inside my assets/rftools/sounds folder. In code I try to play the sound like this: worldObj.playSoundAtEntity(teleportingPlayer, RFTools.MODID+":teleport_whoosh", 1.0f, 1.0f); But I get this error in the log and no sound: [07:59:50] [Client thread/WARN]: Unable to play unknown soundEvent: rftools:teleport_whoosh I also tried without RFTools.MODID+":" but that doesn't work either. What am I missing?
  11. If I let getCollisionBoundingBoxFromPool() return null it works perfectly but of course I have no control then.
  12. I can't use that function as it doesn't get an Entity parameter. My block needs collision detection depending on the type of entity that is on it.
  13. I just found out that mobs also seem to have a small hickup when going through my blocks. But they manage to get through. Perhaps items can't get through because they are too small. But that means that some other kind of collision detection is going on besides addCollisionBoxesToList. Any clues?
  14. I have a block that (configurable) allows to block/pass through items, passive mobs, hostile mobs and players. To do this I override addCollisionBoxesToList() to return nothing in case I recognize one of the entities above. This works great for passive mobs, hostile mobs and players. I can configure my block to let through passive mobs but block hostile mobs for example. However with items it doesn 't work as well. If I set my block to allow items to pass through (so basically let addCollisionBoxesToList do nothing in case it is an EntityItem) then the items seem to jump up and down on my block as soon as I throw one down. I checked Entity.moveEntity() which seems to be the main code that handles this collision detection and I can't find why items can't fall through my block. Any clue what could be wrong here? Thanks!
  15. Hi all, see this setup: Here you can see three setups. The one on the left works fine. The one on the right with the repeater works too. But the middle one is problematic. You can see that the big block in the middle isn't getting power because the lightning symbol isn't yellow. I don't get what I'm doing wrong in handling the redstone power and I see no (fundamental) difference between how I am doing it and how the vanilla repeater is doing it but I obviously overlooked something. Here is the code that handles the redstone output for the smaller block: https://github.com/McJty/RFTools/blob/master/src/main/java/com/mcjty/rftools/blocks/logic/LogicSlabBlock.java Thanks for any advice you can give me
  16. Hmm. I solved the issue by moving the declaration of the renderid constants inside the tile entity class. That way I avoided importing clientside code. I'm a bit surprised that this is this fragile though but lucky that I found the fix.
  17. Hi all, When I try to run my mod RFTools together with Extra Utilities on a server I get the following error: I have googled a bit and this error is triggered by Extra Utilities which seems to go over all the blocks and does some special thing. RWTema says it is not a problem in ExtraUtilities but in the mod that is being mentioned in that line above (which is my mod in this case) and I'm inclined to believe him but I can't find what the problem is. Here is the code of that specific block: https://github.com/McJty/RFTools/blob/master/src/main/java/com/mcjty/rftools/blocks/teleporter/TeleportBeamBlock.java I see nothing wrong in that code. The only thing special is that the block uses a renderer (hence the getRenderType()) and is unbreakable. That combination is probably what triggers the problem. So what can I do to make extrautilities happy? Thanks!
  18. Sorry to bump but nobody knows how this works or where I can read more about how redstone works in Minecraft (on a technical/coding level) or any example code for this? Thanks
  19. See this screenshot: You see the redstone coming into my block. That's how it should be. It should *only* do that from that specific side though. And that also works. Redstone on the right or on the left of my block should not connect (neither visually nor logically). So visually it is ok but I don't know how to check that my block is getting redstone power from that side. If the patch of redstone right before my block on the right is removed (i.e. there is a single line of redstone going into my block) then all is ok. I get notified that a redstone signal is there. But if there is a redstone 'bend' right before my block it isn't working. This is the code I'm using right now: @Override public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { int meta = world.getBlockMetadata(x, y, z); ForgeDirection k = BlockTools.getOrientationHoriz(meta); int power = world.isBlockProvidingPowerTo(x + k.offsetX, y + k.offsetY, z + k.offsetZ, k.getOpposite().ordinal()); meta = BlockTools.setRedstoneSignalIn(meta, power > 0); world.setBlockMetadataWithNotify(x, y, z, meta, 2); } So how can I make sure my block can get powered indirectly like on the screenshot but *only* from that side. Thanks!
  20. Disregard this (sorry) but it is probably an issue in my code. The reply message *is* being sent.
  21. I have a system where the GUI of a dialing device (tile entity) is trying to call a 'checkStatus' function on another tile entity. To do this I use a packet and a reply-packet to get the result back for my GUI. This works perfectly fine as long as the other tile entity is in the same dimension (overworld in my case). However. When the other tile entity is in another dimension (in my case the nether) then I can see from debug output that the checkStatus() function is correctly called but the return packet seems to be eaten by something. This happens all the time. It works 100% fine in case the other tile entity is in the same direction and it fails 100% of the time in case the tile entity is in a different dimension. I'm guessing that when I do world.getTileEntity() to fetch the other tile entity from the other dimension this causes chunks to be loaded and perhaps that messes up with my reply message somehow? Is this a known issue or should I simply not do this? And if the latter, what's the best solution to solve this problem? I'm using latest forge btw: 10.13.1.1225 but I also had the problem with 10.13.0.1205. Thanks!
  22. Fixed it by calling testIntersection on the AABB of the block and the player.
  23. Nobody can think of a solution to this problem?
  24. Hi all. I'm using onEntityCollidedWithBlock to detect if a player touches my block. It works fine. However. What I want to do is to start a certain process (teleportation in my case) when this happens. This takes a while (few seconds) and when it is done the player teleports away. However, when the player moves away from my block before he teleports this should be interrupted. So I need to find a way to detect that the entity is no longer colliding with the block. I know that onEntityCollidedWithBlock stops being called but it is hard to check for something that is not happening :-) Any clues?
  25. I have a client and a server both for 1.7.10 and with forge 10.13.1.1219 installed. Before I upgraded forge all was fine but I had to update a few mods and that required me to go to the latest version of forge. The server starts fine and the client on its own also work. So both server *and* client are ok. It is however, when the client tries to connect to the server that I'm now getting this error on the server: This is only part of the log but I have no idea how I can include more. The log is huge and if I try to put all in the spoiler here my browser simply hangs (and I cannot find any option to attach files). So if you need more information I can provide it to you. Thanks!
×
×
  • Create New...

Important Information

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