Package com.pahimar.ee3.reference

Examples of com.pahimar.ee3.reference.Textures$Model


    @Override
    public int getLightValue(IBlockAccess world, int x, int y, int z)
    {
        if (world.getTileEntity(x, y, z) instanceof TileEntityGlassBell)
        {
            TileEntityGlassBell tileEntityGlassBell = (TileEntityGlassBell) world.getTileEntity(x, y, z);

            return tileEntityGlassBell.getState();
        }

        return 0;
    }
View Full Code Here


    @Override
    public MovingObjectPosition collisionRayTrace(World world, int x, int y, int z, Vec3 startVec, Vec3 endVec)
    {
        if (world.getTileEntity(x, y, z) instanceof TileEntityGlassBell)
        {
            TileEntityGlassBell tileGlassBell = (TileEntityGlassBell) world.getTileEntity(x, y, z);

            switch (tileGlassBell.getOrientation())
            {
                case DOWN:
                {
                    this.setBlockBounds(0.125F, 0.33F, 0.125F, 0.875F, 1.0F, 0.875F);
                    break;
View Full Code Here

    @Override
    public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
    {
        if (tileEntity instanceof TileEntityGlassBell)
        {
            TileEntityGlassBell tileEntityGlassBell = (TileEntityGlassBell) tileEntity;

            GL11.glDisable(GL11.GL_CULL_FACE);

            /**
             * Render the Glass Bell
             */
            GL11.glPushMatrix();

            // Scale, Translate, Rotate
            renderGlassBellByOrientation(x, y, z, tileEntityGlassBell.getOrientation());

            // Bind texture
            this.bindTexture(Textures.Model.GLASS_BELL);

            modelGlassBell.render();

            GL11.glPopMatrix();

            /**
             * Render the ghost item inside of the Glass Bell, slowly spinning
             */
            GL11.glPushMatrix();

            if (tileEntityGlassBell.outputItemStack != null)
            {
                // TODO Stop the ghost item rendering in the event that the client's game is paused
                float scaleFactor = getGhostItemScaleFactor(tileEntityGlassBell.outputItemStack);
                float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);

                EntityItem ghostEntityItem = new EntityItem(tileEntityGlassBell.getWorldObj());
                ghostEntityItem.hoverStart = 0.0F;
                ghostEntityItem.setEntityItemStack(tileEntityGlassBell.outputItemStack);

                translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), x, y, z, tileEntityGlassBell.getOrientation());
                GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
                GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);

                customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
            }
View Full Code Here

    }

    @Override
    public TileEntity createNewTileEntity(World world, int metaData)
    {
        return new TileEntityResearchStation();
    }
View Full Code Here

     * this.setModel(model); </code>
     *
     *
     */
    public Model createAndSetModel() {
        Model newValue = new Model();
        this.setModel(newValue);
        return newValue;
    }
View Full Code Here

  public boolean acceptFeature(Feature feature) {
    return this.styleFilter.match(feature);
  }

  public Model getKmlModel(Feature feature, Point point) {
    Model kmlModel = KmlFactory.createModel()
        .withId(feature.getName().toString())
        .withAltitudeMode(getAltitudeMode(feature, point));
    kmlModel.createAndSetLocation().withLongitude(point.getCoordinate().x)
        .withLatitude(point.getCoordinate().y)
        .withAltitude(getAltitude(feature, point));
    kmlModel.createAndSetOrientation()
        .withHeading(
            getGenericRotationValue(feature, model.getHeading()))
        .withTilt(getGenericRotationValue(feature, model.getTilt()))
        .withRoll(getGenericRotationValue(feature, model.getRoll()));
    kmlModel.createAndSetLink()
        .withHref(
            styleFilter.getExpressionValue(model.getHref(), feature))
        .withRefreshMode(RefreshMode.ON_CHANGE);
    return kmlModel;
  }
View Full Code Here

  public Kml getKml() {
    return kml;
  }

  private void addPoint(Feature feature, Point point, List<KmlModel> kmlModels) {
    Model kmlModel = getKmlModel(feature, point, kmlModels);
    if (kmlModel != null) {
      Placemark placemark = new Placemark().withName(feature.getName()
          .toString());
      placemark.createAndSetLookAt()
          .withLongitude(point.getCoordinate().x)
View Full Code Here

    /**
     * Find the Model of a ressource (UML2 Model)
     */
    public static Model findModel(final UML2Resource resource)
    {
        Model model = (Model)EcoreUtil.getObjectByType(
                resource.getContents(),
                EcorePackage.eINSTANCE.getEObject());
        if (logger.isDebugEnabled())
        {
            logger.debug("Model found: " + model);
View Full Code Here

            null);
        final ModelAccessFacade modelFacade = repository.getModel();
        assertNotNull(modelFacade);
        assertNotNull(modelFacade.getModel());
        assertTrue(modelFacade.getModel() instanceof UML2Resource);
        Model model = (Model)EcoreUtil.getObjectByType(
            ((UML2Resource)repository.getModel().getModel()).getContents(),
            EcorePackage.eINSTANCE.getEObject());
        assertEquals(
            "Test Model",
            model.getName());
        Collection elements = UML2Util.findNamedElements(
                model.eResource(),
                "Test Model::testPackage::Top",
                true);
        org.eclipse.uml2.Class umlClass = (org.eclipse.uml2.Class)elements.iterator().next();
        assertEquals(
            "Top",
View Full Code Here

    }
    return null;
  }

  private Package addPackage(String name, ModelAccessFacade model) {
    Model m = (Model) ((UML2Resource) model.getModel()).getContents()
        .get(0);
    return m.createNestedPackage(name);
  }
View Full Code Here

TOP

Related Classes of com.pahimar.ee3.reference.Textures$Model

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.