This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"forge_marker": 1, | |
"defaults": { | |
"model": "transitmod:construction_tape.obj", | |
"transform": "forge:default-block", | |
"custom": { | |
"groupConfigs": { | |
"dot": {"show": ["dot"], "flags": ["alwaysActive"]}, | |
"north": {"show": ["north"]}, | |
"south": {"show": ["south"]}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[System.Serializable] | |
public class Metadata : MonoBehaviour { | |
public int primary = 0; | |
public int secondary = 0; | |
public int ring = 0; | |
public int x, y, z; | |
public Vector3 position = Vector3.zero; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean saveTemplateToFile(MinecraftServer server, ResourceLocation id) { | |
if (this.blocks == null || this.blocks.isEmpty()) return false; | |
File file = server.getFile("templates"); | |
if ((!file.exists() && !file.mkdirs()) || !file.isDirectory()) return false; | |
file = new File(file, id.getResourcePath()); | |
NBTTagCompound compound = new NBTTagCompound(); | |
OutputStream outputStream = null; | |
boolean success; | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { | |
StructureLathe lathe = new StructureLathe(placer.getHorizontalFacing(), pos); | |
if (lathe.addComponentParts(world, null, lathe.getBoundingBox())) { | |
IBlockState retState = this.getDefaultState().withProperty(ContentBlocks.HORIZONTAL, placer.getHorizontalFacing()); | |
world.setBlockState(pos, retState, 3); | |
((TileEntityLathe) world.getTileEntity(pos)).structureLathe = lathe; | |
return retState; | |
} | |
return Blocks.air.getDefaultState(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean canBuildStructure(World world, StructureBoundingBox box, EnumFacing facing) { | |
BlockPos min = new BlockPos(box.minX, box.minY, box.minZ); | |
BlockPos max = new BlockPos(box.maxX, box.maxY, box.maxZ); | |
return Lists.newArrayList(BlockPos.getAllInBox(min, max)).stream().allMatch(pos -> world.getBlockState(pos).getBlock().isReplaceable(world, pos)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"forge_marker": 1, | |
"defaults": { | |
"model": "forgedebugmodelloaderregistry:group_test.obj", | |
"transform": "forge:default-block", | |
"custom": { | |
"groupConfigs": { | |
"center": { "show": ["center"], "flags": ["alwaysActive"] }, | |
"up": { "show": ["up"] }, | |
"down": { "show": ["down"] }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class Main : MonoBehaviour { | |
public GameObject gem; | |
public int currentLayer = -1; | |
private int lastLayer = -1; | |
public Vector3 gridDimensions; | |
public Vector3 centerOfGridWorld = new Vector3(); | |
private Vector3 centerOfGridGame = new Vector3(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class RenderBus extends Render<EntityBus> | |
{ | |
private static IBakedModel bakedModel = null; | |
private static final ResourceLocation loc = new ResourceLocation(TestBus.MODID.toLowerCase() + ":item/olympian1.obj"/* ":item/group_test.obj"*/); | |
public RenderBus(RenderManager manager) | |
{ | |
super(manager); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f 599/583/48 602/586/48 600/584/48 601/585/48 | |
v 2.75000 2.62500 -8.31250 | |
f 599/583/48 602/586/48 600/584/48 601/585/48 | |
v 2.75000 2.62500 -8.31250 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected <T extends Comparable<T>> IBlockState func_185055_a(IProperty<T> p_185055_1_, Comparable<?> p_185055_2_) | |
{ | |
return this.doubleSlab.getDefaultState().withProperty(p_185055_1_, (T)p_185055_2_); | |
} |