Java Code Examples for net.minecraft.util.EnumFacing#byName()
The following examples show how to use
net.minecraft.util.EnumFacing#byName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TileEntityShoji.java From Sakura_mod with MIT License | 6 votes |
@Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); if (compound.hasKey("type")) { type = compound.getInteger("type"); } if (compound.hasKey("facing")) { facing = EnumFacing.byName(compound.getString("facing")); } if (compound.hasKey("open")) { open = compound.getBoolean("open"); } if (compound.hasKey("animation")) { animation = compound.getInteger("animation"); } }
Example 2
Source File: WrapperEnumFacing.java From ClientBase with MIT License | 4 votes |
public static WrapperEnumFacing byName(String var0) { return new WrapperEnumFacing(EnumFacing.byName(var0)); }
Example 3
Source File: FacingEntry.java From ForgeHax with MIT License | 4 votes |
public FacingEntry(String str) { this(EnumFacing.byName(str)); }
Example 4
Source File: EnumFacingDeserializer.java From customstuff4 with GNU General Public License v3.0 | 4 votes |
@Override public EnumFacing deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { return EnumFacing.byName(json.getAsString()); }
Example 5
Source File: HandMethods.java From pycode-minecraft with MIT License | 4 votes |
public void face(String direction) { EnumFacing turned = EnumFacing.byName(direction); if (turned != null) { this.hand.setYaw(turned.getHorizontalAngle()); } }