Jump to content

JB

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    NZ
  • Personal Text
    Very New

JB's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hi, I've just started playing Minecraft again after more than a 2-year break. Unfortunately my time schedule will not allow me to do any modding so I'll be solely relying on other people's mods to shape my experience. Now from the get-go I'm really missing two of my quality-of-life tweaks. The first tweak was to adjust the player jump/movement to clear a 1 high fence without the need to place a step block. The second tweak was to set the step-height when sprinting so the player didn't have to continuously hold jump to go uphill. I've noticed the new "auto-jump" in the options but I soon discovered while modding my own tweak way back that having a step-height increase while walking can be very annoying or even dangerous in certain situations therefore I quickly locking it down on sprint only. So now I'm bugging you guys in the hopes that someone knows about light-weight mods or even forge config settings to that could allow for the tweaks mentioned above. Hope someone can help me Thanks!
  2. Hi TGG, Well, that was really 'learning the hard way' for me. The onLivingUpdateEvent() fires on both clients for both Foo & Bar. All sorted now, thanks!
  3. Hi, Ok so two separate PC have the same effect. Here's an ugly little piece of code that have the same behavior. Maybe I just read the wrong tutorial! @NetworkMod(clientSideRequired = true, serverSideRequired = true) @Mod(modid = "Scratchpad", name = "Scratchpad", version = "0.1 Nothing") public class Scratchpad { public int _tick; @Instance("Scratchpad") public static Scratchpad instance; @EventHandler public void load(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new Scratchpad()); } public Scratchpad() { } @ForgeSubscribe public void onLivingUpdateEvent(LivingUpdateEvent event) { _tick++; if (_tick % 100 != 0) return; if (event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; if (!player.worldObj.isRemote) return; if (!player.username.equalsIgnoreCase("Foo")) return; Minecraft.getMinecraft().sndManager.playSoundFX("mob.sheep.say", 1.0f, 1.0F); } } }
  4. Maybe I've misunderstood what you said here - how can you tell which client is making the sound if you only have one set of speakers? I'd suggest you use two separate clients (on separate PCs) just to make sure there isn't something funny going on. Also, with two PCs you can insert a breakpoint on one and then step through the code to see which method makes the sound play on the other client. Perplexing... -TGG Hi I have two test users, foo and bar, really --username foo and bar . So I just get foo to make noises and drop his volume to zero and get bar to stand next to him. Bar is still able to hear foo's sound effects. I'll still test it on two separate PCs after work, maybe there is something strange going on running all those instances on the same machine.
  5. Hi Definitely happens when testing it with a server and two separate clients on my pc. Can it have something to do with running two clients and a server on the same machine? I can't really see that being the problem as when I go into the UI and click buttons those clicks doesn't end up on the other client. And those clicks also use this.mc.sndManager.playSoundFX(...); method. Will mock up a small demo when time allows isolating the core code. On a side note the sound generated with playSoundFX() does not have the center balanced as in the code comment. The sound is definitely off-center and also doesn't rotate with my character. This is what made me suspicious about the sound being in the 'world'. This might be completely unrelated but I would have expected a local sound being completely center balanced.
  6. How does one create a sound on the client only? All playSound*() methods I've come across puts the sound in the World. I'm a bit confused as to how the GUI limits the sound to the client only as it also calls the sndManager.playSoundFX(...). Is there a flag somewhere that the SoundManager or something lower down look at to avoid the sound being broadcasted?
  7. The mod will be changing the player's sleep behavior and I can do most magic using Forge. There's however code in the EntityPlayer.onUpdate() that needs to be disabled. Now hacking away in the pre-tick I can change the World.skylightSubtracted to force isDaytime() to return false and restore it in the post-tick. I just don't know enough about MineCraft to go and do something like that. Are there multiple threads that might want to access the World.skylightSubtracted? I'm pretty sure there would be, or at least there should be. I've read before that minecraft it's not multi-threaded which should make the skylightSubtracted 'hack' safe. Any input welcome before I break something. if (!this.worldObj.isRemote) { if (!this.isInBed()) { this.wakeUpPlayer(true, true, false); } // else if (this.worldObj.isDaytime()) <---- this code // { // this.wakeUpPlayer(false, true, true); // }
  8. Thanks all for the input. Thinking maybe "world event" wasn't the best term to use in the context of the post.. forum The 'world event' I was referring to is some low chance environmental occurrence that should destroy certain blocks.
  9. Every so often a world event would require the mod to retrieve a list of blocks with a certain ID for all loaded chunks. There is one parameters that might or might not help in the retrieval process performance. We are only concerned with TOP blocks, i.e. blocks with no other blocks above them. What would be the most efficient way of doing this?
×
×
  • Create New...

Important Information

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