-
Posts
785 -
Joined
-
Last visited
Everything posted by ItsAMysteriousYT
-
Let Blocks react on entity impact?
ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support
Thanks Awesome help - especially that the boundingbox must be smaller thatn a block!! -
Oh HAHA no Must have been thinking of something else and wrote future What i wanted to ask is if there will be a world in readFromNBT later. And for the tile - what you mean with lazy initialization? And also the tile need to know where to send the signal to or not im not connecting the two blocks with redstone or simillar blocklike structurs but just with cables that are rendered in the TESR if the tile. Thats why i need the 'to' variable in the class (if you mean that with strong reference )
-
So what im doing there atm will work in the future ? Cuz you say there is no fututre Yet. Also - the onBlockPlacedBy method i tried isn't working. Do i have to put it in the subclasses to? public abstract class RLMBlockContainer extends Block implements ITileEntityProvider{ public RLMBlockContainer(Material materialIn) { super(materialIn); } @Override public abstract TileEntity createNewTileEntity(World worldIn, int meta); public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { super.onBlockPlacedBy(worldIn, pos, state, placer, stack); TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof RLMTileEntity){ RLMTileEntity tile = (RLMTileEntity)tileentity; tile.rotation = 90 * MathHelper.floor_double((double)(placer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; worldIn.markBlockForUpdate(pos); System.out.println("Succesfully rotated "+tile.getName()); } } @SideOnly(Side.CLIENT) public EnumWorldBlockLayer getBlockLayer() { return EnumWorldBlockLayer.SOLID; } @Override public boolean isFullCube() { return true; }
-
I wanna add some cool effect too my Block when an entity collides with it e.g a minecart. What is the right place to do that?
-
OMG - MY stupidness solved the disappearing - i forgot to do super.writeToNBT() in TileENtity_Electric witch caused that all entities without NBT were okay and those with NBT where removed. But now the saving of the connected tile won't work. I try writing the BlockPos of the tile to NBT like this: But when i close the world and open it again, the 'to' variable isn't set.
-
Yes, i updated all my tiles so that the rotation is being set in OnBlockPlaced by and is initially set too zero. No i only have one constructor that looks like this: public TileEntityElectric(){ super("TileEntityElectric"); } OH - maybe i can solve the problem if i register TileEntityElectric? Cuz its just a class that is never use as itself - only as extended class?
-
Nah, but im searching for a solution too.
-
my mail is [email protected], also have skype (itsamysterious)
-
Yea often the weirdest bugs are really tiny biuts of code
-
[Solved] [1.8] Block#setLightLevel not working
ItsAMysteriousYT replied to LordMastodon's topic in Modder Support
Use setBlockBounds(minX, minY, minZ,maxX,maxY,maxZ) -
Have a look at Minecrafts EntityAI package - in there you should find all the required information.
-
1.8-block and item json generator class, interested?
ItsAMysteriousYT replied to KeeganDeathman's topic in Modder Support
It already exists, as a program and i already written an api for it -
Check that you have set the path to your clientproxy/commonproxy right in the MainModFile.
-
They are stored in radians (-180 till 180) you can convert them to degrees by doing MathHelper.toDegrees(angle) or to radians by doing MathHelper.toRadians. PS - if you need help with the beam calulation i can help you too, cuz im doing something pretty similar atm
-
How do I make my Truck work? Help Me!!!
ItsAMysteriousYT replied to WitherBoss2000's topic in Modder Support
First of all why do you write in red and second - think of what you need. Youll need a speed and the propper calculations hint - have a look at minecrafts entity boat class