Need some help guys.

This forum is for anything that doesn't specifically have to do with Better Than Wolves
User avatar
userzero
Posts: 103
Joined: Sun Nov 04, 2012 6:22 pm

Re: Need some help guys.

Post by userzero »

That's really cool. I actually just got into Android Development making games for my toddler. She loves running around with the Kindle fire, so I made a few little apps, a Piano, a drum kit, a couple of simple games etc... which led to making a few platformers and some neat little apps using box2d (physics engine) that let her bounce balls around and move objects by how she holds the kindle. It's scary how fast they learn stuff.
User avatar
userzero
Posts: 103
Joined: Sun Nov 04, 2012 6:22 pm

Re: Need some help guys.

Post by userzero »

DNoved1 wrote:.....

Anyhow, here's the link to the mod if you or anyone ever wants it. Link

Just put it in the jar like you would BTW and delete META-INF, and it should allow all players to step up 1 block instead of the default 1/2 a block.

And yes, due to this being a baseclass edit on EntityLiving, which BTW also modifies, I can not make it work for BTW (or rather it may be possible, and I'm just too much of a newb to fiqure it out).

Edit: I forgot to mention that this will likely only work with Vanilla, or Modloader mods which don't affect EntityPlayer(assuming Modloader itself doesn't modify that class...)

I'm really a noob when it comes to the minecraft code but I think if you changed entityliving to do this your making the change for all subclasses like zombies,dragons, almost everything. Since the stepHeight field is public you should be able to change it in the entityplayer after the call to super in the constructor and not affect anything but the player. I assume since it's public you could also get the player instance and set it from anywhere you want.
Rianaru
Posts: 760
Joined: Wed Jul 11, 2012 1:01 pm

Re: Need some help guys.

Post by Rianaru »

My girlfriend sqee'd so hard at that video xD
FlowerChild wrote: -----

A short while later:

FlowerChild: What is this pussy shit?
User avatar
DNoved1
Posts: 221
Joined: Wed Jan 23, 2013 5:29 pm

Re: Need some help guys.

Post by DNoved1 »

userzero wrote:... Since the stepHeight field is public you should be able to change it in the entityplayer after the call to super in the constructor and not affect anything but the player.
That's actually exactly what I did, I just meant to say EntityPlayer when I said EntityLiving. Either way, BTW modifies both classes, however I can see what I can do about calling an instance and changing it there (Good idea btw, hadn't thought about that). I'm not sure where/when I should call it though.
tom_savage wrote:Sorry for the double post. But I thought everyone involved might like to see this:

http://www.youtube.com/watch?v=JUHpFkMoppw

Thanks everyone!
Haha, that's awesome! I wish my little brother was into minecraft, but unfortunately he seems to be more into dressing up and playing with dolls.
User avatar
userzero
Posts: 103
Joined: Sun Nov 04, 2012 6:22 pm

Re: Need some help guys.

Post by userzero »

@DNoved1
I just started looking at the minecraft code the last two days and just started looking at modloader a few minutes ago, so I think there should be a different way to do this that doesn't get called every tick, since it should really only be called when the player is spawned or moves to a new world(which is probably the same thing). But here is some code that would do this and work with BTW and requires modloader.
Spoiler
Show

Code: Select all

package net.minecraft.src;

import net.minecraft.client.Minecraft;

public class mod_SKBigStep extends BaseMod{

	public static final String VERSION = "0.0.0.1";
	
	@Override
	public String getVersion() {
		return VERSION;
	}

	@Override
	public void load() {
		//ModLoader.isModLoaded("mod_FCBetterThanWolves");
		ModLoader.setInGameHook(this, true, false);

		
	}
    @Override
	public boolean onTickInGame(float f, Minecraft mc)
    {
	
    			mc.thePlayer.stepHeight = 1;
    			return false;
    }

    
}
User avatar
DNoved1
Posts: 221
Joined: Wed Jan 23, 2013 5:29 pm

Re: Need some help guys.

Post by DNoved1 »

Well, I've tried a couple things in regards to making this work but not performing an operation every tick.
Spoiler
Show

Code: Select all

@Override
public void clientConnect(NetClientHandler var1) 
{
	ModLoader.getMinecraftInstance().thePlayer.stepHeight = 1.0F;
}
This will work so long as the player doesn't change worlds, suggesting you are correct about needing to target the spawning.

Code: Select all

public Packet23VehicleSpawn getSpawnPacket(Entity var1, int var2)
{
	if (var1 instanceof EntityPlayer)
	{
		var1.stepHeight = 1.0F;
	}
        return new Packet23VehicleSpawn(var1, var2);
}
This doesn't seem to work, though I may be using the method incorrectly since it seems to be meant for adding custom mobs.
The best option in the end might be to instead use some sort of KeyBinding for it.
Post Reply