
nidico100
Members-
Posts
41 -
Joined
-
Last visited
Everything posted by nidico100
-
ISBRH is not available in 1.7.10 anymore. I tried it another way. I tried with overriding getmobilityflag 0= don't move 1= don't move just drops 2= don't move
-
i just found an 1.6 tutorial, which doesn't work in 1.7.10 and a coremod for 1.8
-
thanks bye
-
i only knew that method how to do the other?
-
no it doesn't that's the model: that's the block: that's tileentity of slimeblock: that's the renderer that's the item renderer
-
[1.7.10] On landing on Block flying back in the sky don't work
nidico100 replied to nidico100's topic in Modder Support
i got it, but now i need to know why the block can't be moved by a piston What material is it? Does it have a TileEntity? Both of these are very important questions you should have already asked yourself. it has tileentity because it has a special model -
but i need it for special model right?
-
Why can't the block be moved with a piston? package net.bplaced.nidico100.Downgrade; import scala.tools.nsc.ConsoleWriter; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.world.World; import net.bplaced.nidico100.Downgrade.DowngradeMod; import net.bplaced.nidico100.Downgrade.TileEntityBlockSlime; import net.bplaced.nidico100.Downgrade.Proxis.DowngradeModClientProxy; public class BlockSlime extends BlockContainer { public BlockSlime(Material material) { super(material); this.slipperiness = 0.8F; this.setHardness(0F); this.setResistance(0F); this.setStepSound(soundTypeCloth); } //FUNCTION BOUNCING public void onFallenUpon (World worldIn, int x, int y, int z, Entity entityIn, float fallDistance) { if (entityIn.isSneaking()) { super.onFallenUpon(worldIn, x, y, z, entityIn, fallDistance); } else { entityIn.moveEntity(0, fallDistance/2, 0); entityIn.fallDistance = 0.0F; } } public void onEntityCollidedWithBlock(World worldIn, int x, int y, int z, Entity entityIn) { if (Math.abs(entityIn.motionY) < 0.1D && !entityIn.isSneaking()) { double d0 = 0.4D + Math.abs(entityIn.motionY) * 0.2D; entityIn.motionX *= d0; entityIn.motionZ *= d0; } super.onEntityCollidedWithBlock(worldIn, x, y, z, entityIn); } //OVERRIDE @Override public int getRenderBlockPass() { return 1; } @Override public int getRenderType() { return -1; } @Override public boolean isOpaqueCube() { return false; } @Override public boolean renderAsNormalBlock() { return false; } @Override public boolean canRenderInPass(int pass) { DowngradeModClientProxy.renderPass = pass; return true; } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityBlockSlime(); } //BLOCK ICON @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("downgrademod:slime"); } }
-
[1.7.10] On landing on Block flying back in the sky don't work
nidico100 replied to nidico100's topic in Modder Support
i got it, but now i need to know why the block can't be moved by a piston -
[1.7.10] On landing on Block flying back in the sky don't work
nidico100 replied to nidico100's topic in Modder Support
okay, thanks for your help today i will ask a friend of mine, which programs in his job with java -
[1.7.10] On landing on Block flying back in the sky don't work
nidico100 replied to nidico100's topic in Modder Support
yeah i will try, could you say me how to add something to original source code? like new methods? -
[1.7.10] On landing on Block flying back in the sky don't work
nidico100 replied to nidico100's topic in Modder Support
is there any possibility? -
[1.7.10] On landing on Block flying back in the sky don't work
nidico100 replied to nidico100's topic in Modder Support
that's how it's defined in 1.8: public void onLanded(World worldIn, Entity entityIn) { entityIn.motionY = 0.0D; } -
[1.7.10] On landing on Block flying back in the sky don't work
nidico100 replied to nidico100's topic in Modder Support
is it not possible to just add the method to block class? -
[1.7.10] On landing on Block flying back in the sky don't work
nidico100 replied to nidico100's topic in Modder Support
no it's not, i think [/img] -
I want to add a method to the block, so if you fall on it without sneaking you fly back in the sky. it shows no errors, but don't work. public void onLanded(World worldIn, Entity entityIn) { if (entityIn.isSneaking()) { entityIn.motionY = 0.0D; } else if (entityIn.motionY < 0.0D) { entityIn.motionY = -entityIn.motionY; } }
-
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
nidico100 replied to nidico100's topic in Modder Support
Reflection is an entire Java package dealing with class files. It's half way between "code that runs" and "code that modifies running code" (ASM). Here's a chunk I use: try { Class clz = BiomeGenBase.class; WildlifeEventHandler.rains = clz.getDeclaredField("enableRain");//field_76765_S WildlifeEventHandler.rains.setAccessible(true); WildlifeEventHandler.snows = clz.getDeclaredField("enableSnow");//field_76766_R WildlifeEventHandler.snows.setAccessible(true); } catch(NoSuchFieldException e ) { } Basically, I request a private field from a class, set its accessibility to public, so that later I can modify the value (if I don't, the program will crash with an exception). Eg: WildlifeEventHandler.snows.set(BiomeGenBase.plains, true); i tried: public static void main(String args[]) { try { Method method = Entity.class.getDeclaredMethod("fall"); method.setAccessible(true); } catch (Exception e) { e.printStackTrace(); } } but still there stands the method is not visible forget the reflection i just changed entityIn.fall(fallDistance, 0.0F); to entityIn.fallDistance = 0.0F; i was so easy but i was blind now i will try to add onLanded method -
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
nidico100 replied to nidico100's topic in Modder Support
Reflection is an entire Java package dealing with class files. It's half way between "code that runs" and "code that modifies running code" (ASM). Here's a chunk I use: try { Class clz = BiomeGenBase.class; WildlifeEventHandler.rains = clz.getDeclaredField("enableRain");//field_76765_S WildlifeEventHandler.rains.setAccessible(true); WildlifeEventHandler.snows = clz.getDeclaredField("enableSnow");//field_76766_R WildlifeEventHandler.snows.setAccessible(true); } catch(NoSuchFieldException e ) { } Basically, I request a private field from a class, set its accessibility to public, so that later I can modify the value (if I don't, the program will crash with an exception). Eg: WildlifeEventHandler.snows.set(BiomeGenBase.plains, true); i tried: public static void main(String args[]) { try { Method method = Entity.class.getDeclaredMethod("fall"); method.setAccessible(true); } catch (Exception e) { e.printStackTrace(); } } but still there stands the method is not visible -
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
nidico100 replied to nidico100's topic in Modder Support
i didn't find anything good about using reflection in 1.7.10 how to do? -
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
nidico100 replied to nidico100's topic in Modder Support
Do u have any idea? -
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
nidico100 replied to nidico100's topic in Modder Support
No i need slime block and Armorstand with the physics of 1.8 -
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
nidico100 replied to nidico100's topic in Modder Support
yeah okay i was right, but there is another bug entityIn.fall(fallDistance, 0.0F); There stands fall(float) is not defined for fall(float, float), but when i delete one of the floats, there stands the method is not visible i looked on the method protected void fall(float p_70069_1_) { if (this.riddenByEntity != null) { this.riddenByEntity.fall(p_70069_1_); } } how to make public? -
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
nidico100 replied to nidico100's topic in Modder Support
I want the slimeblock in my 1.7.10 modpack with its physics my problem is that protected void fall(float p_70069_1_) { if (this.riddenByEntity != null) { this.riddenByEntity.fall(p_70069_1_); } } is not public in 1.7.10