# IScriptFactory.vector4 [← IScriptFactory](index.md) · [← Master](../../wiki.md) Parça 1/11 · [sonraki](vector4-2.md) vector4() default Vector4d Create a 4D vector. --- vector4(double x, double y, double z, double w) default Vector4d Create a 4D vector. default Vector4d vector4(Vector4d v) Copy a 4D vector. Method Detail createBlockState IScriptBlockState createBlockState(java.lang.String blockId, int meta) Get a block state that can be used to place and compare blocks in the IScriptWorld. var fence = mappet.createBlockState("minecraft:fence", 0); // minecraft:fence 0 c.send(fence.getBlockId() + " " + fence.getMeta()); createBlockState IScriptBlockState createBlockState(java.lang.String blockId) Create a block state that can with the default meta value. var fence = mappet.createBlockState("minecraft:fence"); // minecraft:fence 0 c.send(fence.getBlockId() + " " + fence.getMeta()); createCompound default INBTCompound createCompound() Create an empty NBT compound. var tag = mappet.createCompound(); tag.setString("id", "minecraft:diamond_hoe"); tag.setByte("Count", 1); var item = mappet.createItemNBT(tag); // {id:"minecraft:diamond_hoe",Count:1b,Damage:0s} c.send(item.serialize()); createCompound INBTCompound createCompound(java.lang.String nbt) Parse an NBT compound data out of given string, if string NBT was invalid then an empty compound will be returned. var tag = mappet.createCompound("{id:\"minecraft:diamond_hoe\",Count:1b}"); var item = mappet.createItemNBT(tag); // {id:"minecraft:diamond_hoe",Count:1b,Damage:0s} c.send(item.serialize()); createCompoundFromJS INBTCompound createCompoundFromJS(java.lang.Object jsObject) Turn a JS object into an NBT compound.