Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StateMap map = (new StateMap.Builder()).addPropertiesToIgnore(new IProperty[] {BlockPC.FACING}).build();
- ModelLoader.setCustomStateMapper(pc, map);
- OBJLoader.instance.addDomain(PokecubeAdv.ID.toLowerCase());
- Item item2 = Item.getItemFromBlock(PokecubeItems.getBlock("pc"));
- ModelLoader.setCustomModelResourceLocation(item2, 0,
- new ModelResourceLocation(PokecubeAdv.ID + ":pc", "inventory"));
- ModelLoader.setCustomModelResourceLocation(item2, 8,
- new ModelResourceLocation(PokecubeAdv.ID + ":pc", "inventory"));
- {
- "forge_marker": 1,
- "defaults": {
- "textures": {
- "#pc_base": "pokecube_adventures:blocks/pc_base",
- "#pc_top": "pokecube_adventures:blocks/pc_top"
- },
- "model": "pokecube_adventures:pc.obj"
- },
- "variants": {
- "top=true": [{}],
- "inventory": [{
- "transform": "forge:default-block"
- }],
- "top=false": [{}],
- "inventory": [{
- "transform": "forge:default-block"
- }]
- }
- }
- @Override
- public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos)
- {
- List<String> visible = Lists.newArrayList();
- if (((Boolean) state.getValue(TOP)))
- {
- visible.add("pc_top");
- }
- else
- {
- visible.add("pc_base");
- }
- EnumFacing facing = (EnumFacing) state.getValue(FACING);
- facing = facing.rotateYCCW();
- TRSRTransformation transform = new TRSRTransformation(facing);
- OBJModel.OBJState retState = new OBJModel.OBJState(visible, true, transform);
- return ((IExtendedBlockState) this.state.getBaseState()).withProperty(OBJModel.OBJProperty.instance, retState);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement