Jump to content

[1.7.10]Adjusting the speed a fluid pushes a player


theOriginalByte

Recommended Posts

Multiply entity.motionX, entity.motionY, entity.motionZ by whatever you want.

I did this:

public void onEntityCollidedWithBlock(Entity entity)
    {
            entity.motionX = entity.motionX*2;
            entity.motionY = entity.motionY*2;
            entity.motionZ = entity.motionZ*2;
    }

but it doesn't change anything... the ide says the method is never used

Link to comment
Share on other sites

You aren't overriding it correctly, that method doesn't only pass an Entity parameter.

If you are using eclipse, use the Ctrl + Space shortcut to automatically have the method overridden, and then of course use the parameters you are given

I try my best, so apologies if I said something obviously stupid!

Link to comment
Share on other sites

I figured it out... thanks guys! I have another question that i don't want to open another thread for.... how do i apply a texture to my liquid... here is the code for it:

@Override
    public void registerBlockIcons(IIconRegister register) {
        this.flowingIcon = register.registerIcon(Reference.MODID + ":" + getUnlocalizedName().substring(5) + "_flow");
        this.stillIcon = register.registerIcon(Reference.MODID + ":" + getUnlocalizedName().substring(5) + "_still");

    }
    @Override
    public IIcon getIcon(int side, int meta) {
        return (side == 0 || side == 1)? stillIcon : flowingIcon;
    }

I'm using a recolored vanilla texture... should it be a different size or am i not registering/using the icon code right?

Link to comment
Share on other sites

I got this:

 

https://bitbucket.org/Dragonisser/cobaltmod/src/178c28c1f444b11466696e40bcbfb0f8978acf76/cobaltmod/blocks/BlockFluidDarkWater.java?at=master

 

and this in the main:

 

@SubscribeEvent
@SideOnly(Side.CLIENT)
public void textureHook(TextureStitchEvent.Post event) {
	if (event.map.getTextureType() == 0) {
		CMStuff.darkwater_fluid.setIcons(CMStuff.darkwater.getIcon(0, 0), CMStuff.darkwater.getIcon(1, 0));

	}
}

 

Ii dont know if its necessary, because i didnt checked afterwards, but i think it was for the bc tanks

Link to comment
Share on other sites

I got this:

 

https://bitbucket.org/Dragonisser/cobaltmod/src/178c28c1f444b11466696e40bcbfb0f8978acf76/cobaltmod/blocks/BlockFluidDarkWater.java?at=master

 

and this in the main:

 

@SubscribeEvent
@SideOnly(Side.CLIENT)
public void textureHook(TextureStitchEvent.Post event) {
	if (event.map.getTextureType() == 0) {
		CMStuff.darkwater_fluid.setIcons(CMStuff.darkwater.getIcon(0, 0), CMStuff.darkwater.getIcon(1, 0));

	}
}

 

Ii dont know if its necessary, because i didnt checked afterwards, but i think it was for the bc tanks

I did that but i still get the ugly pink and black tiles.... what size is your texture? 16x16 or a different size?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • the mods are crashing and I'm not sure why so heres everything  crash log https://pastebin.com/RxLKbMNR  L2 Library (12library) has failed to load correctly java.lang.NoClassDefFoundError: org/antarcticgardens/newage/content/energiser/EnergiserBlock L2 Screen Tracker (12screentracker) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class dev.xkmc.12library.base.L2Registrate Create: Interiors (interiors) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class com.tterrag.registrate.AbstractRegistrate L2 Damage Tracker (12damagetracker) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class dev.xkmc.l2library.base.L2Registrate Create Enchantment Industry (create_enchantment_industry) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class com.simibubi.create.foundation.data.Createfiegistrate Create Crafts & Additions (createaddition) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class com.simibubi.create.foundation.data.CreateRegistrate Create Slice & Dice (sliceanddice) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class com.simibubi.create.foundation.data.CreateRegistrate L2 Tabs (12tabs) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class dev.xkmc.l2library.base.L2Registrate Modular Golems (modulargolems) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class dev.xkmc.l2library.base.L2Registrate Create: Steam 'n' FRails (railways) has failed to load correctly java.lang.NoClassDefFoundError : Could not initialize class com.simibubi.create.foundation.data.Createfregistrate Cuisine Delight (cuisinedelight) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class dev.xkmc.12library.base.L2Registrate Create (create) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class com.simibubi.create.Create Guardian Beam Defense (creategbd) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class com.simibubi.create.foundation.data.CreateRegistrate L2 Item Selector (12itemselector) has failed to load correctly java.lang.NoClassDefFoundError: Could not initialize class dev.xkmc.l2library.base.L2Registrate
    • hey there, I have been using Forge for years without any problems, but for some time now I have been getting this error message when I click on “Installer” under the downloads. This happens on all versions. I have tried various things but have not gotten any results. If anyone has a solution, I would be very grateful!
    • I don't have mcreator installed.
    • the session has expired, what if the modified LAN Server displays the same screen after logging in as after logging in to the premium server from a non-premium account? Minecraft Forge 1.20.1 CurseForge. I also use Mod LAN World Plug n Play
    • Hello There! In today's video I will be showing you guys the Minecraft and Google Collaboration they are doing for the 15th anniversary for Minecraft! If you guys wanna try this out for yourself go to google and type in "Minecraft"!  
  • Topics

×
×
  • Create New...

Important Information

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