Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

white custom mob texture


SimonSlime
 Share

Recommended Posts

CLIENT PROXY

 

package com.simon.simonsores;

 

import com.simon.simonsores.mobs.FireDragon;

import com.simon.simonsores.mobs.entity.EntityFireDragon;

import com.simon.simonsores.mobs.render.RenderFireDragon;

 

import cpw.mods.fml.client.registry.RenderingRegistry;

 

public class ClientProxy extends CommonProxy {

 

public void RegisterInformation() {

 

RenderingRegistry.registerEntityRenderingHandler(EntityFireDragon.class, new RenderFireDragon(new FireDragon(), 0.5F));

}

 

}

 

COMMON PROXY

 

package com.simon.simonsores;

 

public class CommonProxy {

 

public void RegisterInformation() {

 

}

 

}

 

FIREDRAGON.JAVA (model class)

 

package com.simon.simonsores.mobs;

 

import net.minecraft.client.model.ModelBase;

import net.minecraft.client.model.ModelRenderer;

import net.minecraft.entity.Entity;

 

public class FireDragon extends ModelBase

{

  //fields

    ModelRenderer dxfoot;

    ModelRenderer sxfoot;

    ModelRenderer finger1;

    ModelRenderer finger2;

    ModelRenderer finger3;

    ModelRenderer finger4;

    ModelRenderer finger5;

    ModelRenderer finger6;

    ModelRenderer dxankle;

    ModelRenderer dxknee;

    ModelRenderer sxankle;

    ModelRenderer sxknee;

    ModelRenderer body;

    ModelRenderer dxthigh;

    ModelRenderer sxthigh;

    ModelRenderer neck1;

    ModelRenderer tail1;

    ModelRenderer tail2;

    ModelRenderer tail3;

    ModelRenderer dxshoulder;

    ModelRenderer dxarm;

    ModelRenderer dxwrist;

    ModelRenderer finger7;

    ModelRenderer finger8;

    ModelRenderer finger9;

    ModelRenderer sxshoulder;

    ModelRenderer sxarm;

    ModelRenderer sxwrist;

    ModelRenderer finger10;

    ModelRenderer finger11;

    ModelRenderer finger12;

    ModelRenderer neck2;

    ModelRenderer neck3;

    ModelRenderer neck4;

    ModelRenderer neck5;

    ModelRenderer head1;

    ModelRenderer mouth;

    ModelRenderer head2;

    ModelRenderer tooth1;

    ModelRenderer tooth2;

    ModelRenderer tooth3;

    ModelRenderer tooth4;

    ModelRenderer sxwing1;

    ModelRenderer sxwing2;

    ModelRenderer dxwing1;

    ModelRenderer dxwing2;

    ModelRenderer sxwing1board;

    ModelRenderer sxwing2board;

    ModelRenderer dxwing1board;

    ModelRenderer dxwing2board;

    ModelRenderer tail4;

    ModelRenderer tail5;

    ModelRenderer tail6;

    ModelRenderer tail7;

    ModelRenderer tail8;

    ModelRenderer tail9;

 

  public FireDragon()

  {

    textureWidth = 512;

    textureHeight = 380;

   

      dxfoot = new ModelRenderer(this, 0, 51);

      dxfoot.addBox(0F, 0F, 0F, 17, 5, 10);

      dxfoot.setRotationPoint(-8F, 10F, -19F);

      dxfoot.setTextureSize(512, 380);

      dxfoot.mirror = true;

      setRotation(dxfoot, 0F, 0F, 0F);

      sxfoot = new ModelRenderer(this, 0, 33);

      sxfoot.addBox(0F, 0F, 0F, 17, 5, 10);

      sxfoot.setRotationPoint(-8F, 10F, 8F);

      sxfoot.setTextureSize(512, 380);

      sxfoot.mirror = true;

      setRotation(sxfoot, 0F, 0F, 0F);

      finger1 = new ModelRenderer(this, 195, 45);

      finger1.addBox(0F, 0F, 0F, 9, 2, 2);

      finger1.setRotationPoint(5F, 10F, -18F);

      finger1.setTextureSize(512, 380);

      finger1.mirror = true;

      setRotation(finger1, 0F, 0F, 0.1858931F);

      finger2 = new ModelRenderer(this, 195, 53);

      finger2.addBox(0F, 0F, 0F, 9, 2, 2);

      finger2.setRotationPoint(5F, 10F, -15F);

      finger2.setTextureSize(512, 380);

      finger2.mirror = true;

      setRotation(finger2, 0F, 0F, 0.1858931F);

      finger3 = new ModelRenderer(this, 195, 60);

      finger3.addBox(0F, 0F, 0F, 9, 2, 2);

      finger3.setRotationPoint(5F, 10F, -12F);

      finger3.setTextureSize(512, 380);

      finger3.mirror = true;

      setRotation(finger3, 0F, 0F, 0.1858931F);

      finger4 = new ModelRenderer(this, 172, 45);

      finger4.addBox(0F, 0F, 0F, 9, 2, 2);

      finger4.setRotationPoint(5F, 10F, 9F);

      finger4.setTextureSize(512, 380);

      finger4.mirror = true;

      setRotation(finger4, 0F, 0F, 0.1858931F);

      finger5 = new ModelRenderer(this, 172, 53);

      finger5.addBox(0F, 0F, 0F, 9, 2, 2);

      finger5.setRotationPoint(5F, 10F, 12F);

      finger5.setTextureSize(512, 380);

      finger5.mirror = true;

      setRotation(finger5, 0F, 0F, 0.1858931F);

      finger6 = new ModelRenderer(this, 172, 61);

      finger6.addBox(0F, 0F, 0F, 9, 2, 2);

      finger6.setRotationPoint(5F, 10F, 15F);

      finger6.setTextureSize(512, 380);

      finger6.mirror = true;

      setRotation(finger6, 0F, 0F, 0.1858931F);

      dxankle = new ModelRenderer(this, 207, 290);

      dxankle.addBox(0F, 0F, 0F, 8, 16, 8);

      dxankle.setRotationPoint(-6F, -6F, -18F);

      dxankle.setTextureSize(512, 380);

      dxankle.mirror = true;

      setRotation(dxankle, 0F, 0F, 0.0743572F);

      dxknee = new ModelRenderer(this, 251, 260);

      dxknee.addBox(0F, 0F, 0F, 9, 16, 10);

      dxknee.setRotationPoint(-11F, -17F, -19F);

      dxknee.setTextureSize(512, 380);

      dxknee.mirror = true;

      setRotation(dxknee, 0F, 0F, -0.3346075F);

      sxankle = new ModelRenderer(this, 206, 317);

      sxankle.addBox(0F, 0F, 0F, 8, 16, 8);

      sxankle.setRotationPoint(-6F, -6F, 9F);

      sxankle.setTextureSize(512, 380);

      sxankle.mirror = true;

      setRotation(sxankle, 0F, 0F, 0.0743572F);

      sxknee = new ModelRenderer(this, 209, 260);

      sxknee.addBox(0F, 0F, 0F, 9, 16, 10);

      sxknee.setRotationPoint(-11F, -17F, 8F);

      sxknee.setTextureSize(512, 380);

      sxknee.mirror = true;

      setRotation(sxknee, 0F, 0F, -0.3346075F);

      body = new ModelRenderer(this, 220, 0);

      body.addBox(0F, 0F, 0F, 35, 24, 32);

      body.setRotationPoint(-24F, -38F, -16F);

      body.setTextureSize(512, 380);

      body.mirror = true;

      setRotation(body, 0F, 0F, -0.2230717F);

      dxthigh = new ModelRenderer(this, 241, 288);

      dxthigh.addBox(0F, 0F, 0F, 14, 17, 10);

      dxthigh.setRotationPoint(-18F, -29F, -19F);

      dxthigh.setTextureSize(512, 380);

      dxthigh.mirror = true;

      setRotation(dxthigh, 0F, 0F, -0.3346075F);

      sxthigh = new ModelRenderer(this, 241, 319);

      sxthigh.addBox(0F, 0F, 0F, 14, 17, 10);

      sxthigh.setRotationPoint(-18F, -29F, 8F);

      sxthigh.setTextureSize(512, 380);

      sxthigh.mirror = true;

      setRotation(sxthigh, 0F, 0F, -0.3346075F);

      neck1 = new ModelRenderer(this, 116, 197);

      neck1.addBox(0F, 0F, 0F, 12, 21, 30);

      neck1.setRotationPoint(7F, -45F, -15F);

      neck1.setTextureSize(512, 380);

      neck1.mirror = true;

      setRotation(neck1, 0F, 0F, -0.3346075F);

      tail1 = new ModelRenderer(this, 355, 0);

      tail1.addBox(0F, 0F, 0F, 23, 20, 31);

      tail1.setRotationPoint(-45F, -30F, -16F);

      tail1.setTextureSize(512, 380);

      tail1.mirror = true;

      setRotation(tail1, 0F, 0F, -0.3346075F);

      tail2 = new ModelRenderer(this, 223, 57);

      tail2.addBox(0F, 0F, 0F, 23, 18, 29);

      tail2.setRotationPoint(-63F, -21F, -15F);

      tail2.setTextureSize(512, 380);

      tail2.mirror = true;

      setRotation(tail2, 0F, 0F, -0.4461433F);

      tail3 = new ModelRenderer(this, 123, 0);

      tail3.addBox(0F, 0F, 0F, 20, 16, 27);

      tail3.setRotationPoint(-79F, -11F, -14F);

      tail3.setTextureSize(512, 380);

      tail3.mirror = true;

      setRotation(tail3, 0F, 0F, -0.5576792F);

      dxshoulder = new ModelRenderer(this, 81, 0);

      dxshoulder.addBox(0F, 0F, 0F, 11, 15, 8);

      dxshoulder.setRotationPoint(9F, -32F, -19F);

      dxshoulder.setTextureSize(512, 380);

      dxshoulder.mirror = true;

      setRotation(dxshoulder, 0F, 0F, -0.5948578F);

      dxarm = new ModelRenderer(this, 53, 0);

      dxarm.addBox(0F, 0F, 0F, 7, 16, 6);

      dxarm.setRotationPoint(18F, -22F, -19F);

      dxarm.setTextureSize(512, 380);

      dxarm.mirror = true;

      setRotation(dxarm, 0F, 0F, -0.9666439F);

      dxwrist = new ModelRenderer(this, 472, 0);

      dxwrist.addBox(0F, 0F, 0F, 4, 9, 6);

      dxwrist.setRotationPoint(31F, -13F, -19F);

      dxwrist.setTextureSize(512, 380);

      dxwrist.mirror = true;

      setRotation(dxwrist, 0F, 0F, -1.858931F);

      finger7 = new ModelRenderer(this, 0, 22);

      finger7.addBox(0F, 0F, 0F, 2, 5, 2);

      finger7.setRotationPoint(39F, -16F, -19F);

      finger7.setTextureSize(512, 380);

      finger7.mirror = true;

      setRotation(finger7, 0F, 0.2974289F, -1.858931F);

      finger8 = new ModelRenderer(this, 11, 22);

      finger8.addBox(0F, 0F, 0F, 2, 5, 2);

      finger8.setRotationPoint(39F, -17F, -17F);

      finger8.setTextureSize(512, 380);

      finger8.mirror = true;

      setRotation(finger8, 0F, 0F, -1.858931F);

      finger9 = new ModelRenderer(this, 60, 55);

      finger9.addBox(0F, 0F, 0F, 2, 5, 2);

      finger9.setRotationPoint(39F, -16F, -15F);

      finger9.setTextureSize(512, 380);

      finger9.mirror = true;

      setRotation(finger9, 0F, -0.2974216F, -1.858931F);

      sxshoulder = new ModelRenderer(this, 82, 25);

      sxshoulder.addBox(0F, 0F, 0F, 11, 15, 8);

      sxshoulder.setRotationPoint(9F, -32F, 13F);

      sxshoulder.setTextureSize(512, 380);

      sxshoulder.mirror = true;

      setRotation(sxshoulder, 0F, 0F, -0.5948578F);

      sxarm = new ModelRenderer(this, 24, 0);

      sxarm.addBox(0F, 0F, 0F, 7, 16, 6);

      sxarm.setRotationPoint(18F, -22F, 15F);

      sxarm.setTextureSize(512, 380);

      sxarm.mirror = true;

      setRotation(sxarm, 0F, 0F, -0.9666439F);

      sxwrist = new ModelRenderer(this, 0, 0);

      sxwrist.addBox(0F, 0F, 0F, 4, 9, 6);

      sxwrist.setRotationPoint(31F, -13F, 15F);

      sxwrist.setTextureSize(512, 380);

      sxwrist.mirror = true;

      setRotation(sxwrist, 0F, 0F, -1.858931F);

      finger10 = new ModelRenderer(this, 73, 55);

      finger10.addBox(0F, 0F, 0F, 2, 5, 2);

      finger10.setRotationPoint(39F, -16F, 15F);

      finger10.setTextureSize(512, 380);

      finger10.mirror = true;

      setRotation(finger10, 0F, 0.2974289F, -1.858931F);

      finger11 = new ModelRenderer(this, 86, 55);

      finger11.addBox(0F, 0F, 0F, 2, 5, 2);

      finger11.setRotationPoint(39F, -17F, 17F);

      finger11.setTextureSize(512, 380);

      finger11.mirror = true;

      setRotation(finger11, 0F, 0F, -1.858931F);

      finger12 = new ModelRenderer(this, 100, 55);

      finger12.addBox(0F, 0F, 0F, 2, 5, 2);

      finger12.setRotationPoint(39F, -16F, 19F);

      finger12.setTextureSize(512, 380);

      finger12.mirror = true;

      setRotation(finger12, 0F, -0.2974216F, -1.858931F);

      neck2 = new ModelRenderer(this, 13, 180);

      neck2.addBox(0F, 0F, 0F, 21, 19, 30);

      neck2.setRotationPoint(16F, -48F, -15F);

      neck2.setTextureSize(512, 380);

      neck2.mirror = true;

      setRotation(neck2, 0F, 0F, -0.4833219F);

      neck3 = new ModelRenderer(this, 117, 149);

      neck3.addBox(0F, 0F, 0F, 21, 16, 30);

      neck3.setRotationPoint(29F, -52F, -15F);

      neck3.setTextureSize(512, 380);

      neck3.mirror = true;

      setRotation(neck3, 0F, 0F, -0.6320364F);

      neck4 = new ModelRenderer(this, 114, 107);

      neck4.addBox(0F, 0F, 0F, 18, 14, 26);

      neck4.setRotationPoint(44F, -62F, -13F);

      neck4.setTextureSize(512, 380);

      neck4.mirror = true;

      setRotation(neck4, 0F, 0F, -0.3346075F);

      neck5 = new ModelRenderer(this, 116, 70);

      neck5.addBox(0F, 0F, 0F, 18, 12, 24);

      neck5.setRotationPoint(55F, -66F, -12F);

      neck5.setTextureSize(512, 380);

      neck5.mirror = true;

      setRotation(neck5, 0F, 0F, -0.1487144F);

      head1 = new ModelRenderer(this, 0, 108);

      head1.addBox(0F, 0F, 0F, 24, 17, 24);

      head1.setRotationPoint(71F, -73F, -12F);

      head1.setTextureSize(512, 380);

      head1.mirror = true;

      setRotation(head1, 0F, 0F, 0F);

      mouth = new ModelRenderer(this, 0, 150);

      mouth.addBox(0F, 0F, 0F, 35, 6, 22);

      mouth.setRotationPoint(73F, -57F, -11F);

      mouth.setTextureSize(512, 380);

      mouth.mirror = true;

      setRotation(mouth, 0F, 0F, 0.2230717F);

      head2 = new ModelRenderer(this, 0, 70);

      head2.addBox(0F, 0F, 0F, 35, 15, 22);

      head2.setRotationPoint(86F, -72F, -11F);

      head2.setTextureSize(512, 380);

      head2.mirror = true;

      setRotation(head2, 0F, 0F, 0F);

      tooth1 = new ModelRenderer(this, 99, 108);

      tooth1.addBox(0F, 0F, 0F, 3, 9, 3);

      tooth1.setRotationPoint(118F, -62F, -9F);

      tooth1.setTextureSize(512, 380);

      tooth1.mirror = true;

      setRotation(tooth1, 0F, 0F, 0.1858931F);

      tooth2 = new ModelRenderer(this, 99, 120);

      tooth2.addBox(0F, 0F, 0F, 3, 9, 3);

      tooth2.setRotationPoint(118F, -62F, 6F);

      tooth2.setTextureSize(512, 380);

      tooth2.mirror = true;

      setRotation(tooth2, 0F, 0F, 0.1858931F);

      tooth3 = new ModelRenderer(this, 99, 134);

      tooth3.addBox(0F, 0F, 0F, 3, 9, 3);

      tooth3.setRotationPoint(104F, -54F, -10F);

      tooth3.setTextureSize(512, 380);

      tooth3.mirror = true;

      setRotation(tooth3, 0F, 0F, 0.1858931F);

      tooth4 = new ModelRenderer(this, 0, 180);

      tooth4.addBox(0F, 0F, 0F, 3, 9, 3);

      tooth4.setRotationPoint(104F, -54F, 7F);

      tooth4.setTextureSize(512, 380);

      tooth4.mirror = true;

      setRotation(tooth4, 0F, 0F, 0.1858931F);

      sxwing1 = new ModelRenderer(this, 292, 312);

      sxwing1.addBox(0F, 0F, 0F, 45, 1, 65);

      sxwing1.setRotationPoint(-30F, -37F, 22F);

      sxwing1.setTextureSize(512, 380);

      sxwing1.mirror = true;

      setRotation(sxwing1, 0F, 0.1858931F, -0.2230717F);

      sxwing2 = new ModelRenderer(this, 0, 323);

      sxwing2.addBox(0F, 0F, 0F, 45, 1, 55);

      sxwing2.setRotationPoint(-17F, -37F, 66F);

      sxwing2.setTextureSize(512, 380);

      sxwing2.mirror = true;

      setRotation(sxwing2, 0F, -0.2602503F, -0.2230717F);

      dxwing1 = new ModelRenderer(this, 291, 243);

      dxwing1.addBox(0F, 0F, 0F, 45, 1, 65);

      dxwing1.setRotationPoint(-20F, -37F, -86F);

      dxwing1.setTextureSize(512, 380);

      dxwing1.mirror = true;

      setRotation(dxwing1, 0F, -0.185895F, -0.2230717F);

      dxwing2 = new ModelRenderer(this, 0, 265);

      dxwing2.addBox(0F, 0F, 0F, 45, 1, 55);

      dxwing2.setRotationPoint(-34F, -37F, -119F);

      dxwing2.setTextureSize(512, 380);

      dxwing2.mirror = true;

      setRotation(dxwing2, 0F, 0.260246F, -0.2230717F);

      sxwing1board = new ModelRenderer(this, 375, 172);

      sxwing1board.addBox(0F, 0F, 0F, 4, 3, 65);

      sxwing1board.setRotationPoint(12F, -49F, 16F);

      sxwing1board.setTextureSize(512, 380);

      sxwing1board.mirror = true;

      setRotation(sxwing1board, 0F, 0.1858931F, -0.2230717F);

      sxwing2board = new ModelRenderer(this, 255, 122);

      sxwing2board.addBox(0F, 0F, 0F, 4, 3, 55);

      sxwing2board.setRotationPoint(24F, -49F, 78F);

      sxwing2board.setTextureSize(512, 380);

      sxwing2board.mirror = true;

      setRotation(sxwing2board, 0F, -0.2602503F, -0.2230717F);

      dxwing1board = new ModelRenderer(this, 375, 101);

      dxwing1board.addBox(0F, 0F, 0F, 4, 3, 65);

      dxwing1board.setRotationPoint(21F, -48F, -79F);

      dxwing1board.setTextureSize(512, 380);

      dxwing1board.mirror = true;

      setRotation(dxwing1board, 0F, -0.185895F, -0.2230705F);

      dxwing2board = new ModelRenderer(this, 255, 182);

      dxwing2board.addBox(0F, 0F, 0F, 4, 3, 55);

      dxwing2board.setRotationPoint(7F, -48F, -130F);

      dxwing2board.setTextureSize(512, 380);

      dxwing2board.mirror = true;

      setRotation(dxwing2board, 0F, 0.260246F, -0.2230717F);

      tail4 = new ModelRenderer(this, 329, 57);

      tail4.addBox(0F, 0F, 0F, 20, 14, 21);

      tail4.setRotationPoint(-94F, -4F, -11F);

      tail4.setTextureSize(512, 380);

      tail4.mirror = true;

      setRotation(tail4, 0F, 0F, -0.4461433F);

      tail5 = new ModelRenderer(this, 218, 349);

      tail5.addBox(0F, 0F, 0F, 20, 12, 17);

      tail5.setRotationPoint(-109F, 1F, -9F);

      tail5.setTextureSize(512, 380);

      tail5.mirror = true;

      setRotation(tail5, 0F, 0F, -0.2974289F);

      tail6 = new ModelRenderer(this, 0, 230);

      tail6.addBox(0F, 0F, 0F, 20, 8, 15);

      tail6.setRotationPoint(-122F, 3F, -8F);

      tail6.setTextureSize(512, 380);

      tail6.mirror = true;

      setRotation(tail6, 0F, 0F, -0.1115358F);

      tail7 = new ModelRenderer(this, 413, 53);

      tail7.addBox(0F, 0F, 0F, 16, 6, 9);

      tail7.setRotationPoint(-136F, 3F, -5F);

      tail7.setTextureSize(512, 380);

      tail7.mirror = true;

      setRotation(tail7, 0F, 0F, 0F);

      tail8 = new ModelRenderer(this, 413, 70);

      tail8.addBox(0F, 0F, 0F, 14, 5, 7);

      tail8.setRotationPoint(-149F, 1F, -4F);

      tail8.setTextureSize(512, 380);

      tail8.mirror = true;

      setRotation(tail8, 0F, 0F, 0.1487144F);

      tail9 = new ModelRenderer(this, 72, 231);

      tail9.addBox(0F, 0F, 0F, 11, 4, 5);

      tail9.setRotationPoint(-159F, 0F, -3F);

      tail9.setTextureSize(512, 380);

      tail9.mirror = true;

      setRotation(tail9, 0F, 0F, 0.1487144F);

  }

 

  public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)

  {

    setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);

    dxfoot.render(par7);

    sxfoot.render(par7);

    finger1.render(par7);

    finger2.render(par7);

    finger3.render(par7);

    finger4.render(par7);

    finger5.render(par7);

    finger6.render(par7);

    dxankle.render(par7);

    dxknee.render(par7);

    sxankle.render(par7);

    sxknee.render(par7);

    body.render(par7);

    dxthigh.render(par7);

    sxthigh.render(par7);

    neck1.render(par7);

    tail1.render(par7);

    tail2.render(par7);

    tail3.render(par7);

    dxshoulder.render(par7);

    dxarm.render(par7);

    dxwrist.render(par7);

    finger7.render(par7);

    finger8.render(par7);

    finger9.render(par7);

    sxshoulder.render(par7);

    sxarm.render(par7);

    sxwrist.render(par7);

    finger10.render(par7);

    finger11.render(par7);

    finger12.render(par7);

    neck2.render(par7);

    neck3.render(par7);

    neck4.render(par7);

    neck5.render(par7);

    head1.render(par7);

    mouth.render(par7);

    head2.render(par7);

    tooth1.render(par7);

    tooth2.render(par7);

    tooth3.render(par7);

    tooth4.render(par7);

    sxwing1.render(par7);

    sxwing2.render(par7);

    dxwing1.render(par7);

    dxwing2.render(par7);

    sxwing1board.render(par7);

    sxwing2board.render(par7);

    dxwing1board.render(par7);

    dxwing2board.render(par7);

    tail4.render(par7);

    tail5.render(par7);

    tail6.render(par7);

    tail7.render(par7);

    tail8.render(par7);

    tail9.render(par7);

  }

 

  private void setRotation(ModelRenderer model, float x, float y, float z)

  {

    model.rotateAngleX = x;

    model.rotateAngleY = y;

    model.rotateAngleZ = z;

  }

 

  public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)

  {

  }

 

}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • so i watched this tutorial on youtube(https://www.youtube.com/watch?v=vZgYjHwKcHA&t=691s) for make sittable blocks and even if is a 1,12,2 tutorial video a kind of translated it to 1.16.5 code but is not working "correctly"; the SeatEntity spawns in MY position and not in the position of the chair, and it blocks me the mouse movement in Y, and i can't shift for exit the chair, i can break blocks but my hand is kind of freeze in time (https://imgur.com/a/6xoKrV5)   this is my code:  @SubscribeEvent public static void test(PlayerInteractEvent.RightClickBlock event) { PlayerEntity player = event.getPlayer(); if(player.getRidingEntity() != null) { return; } World world = event.getWorld(); BlockPos pos = event.getPos(); Vector3d vec = new Vector3d(pos.getX() + 0.5f,pos.getY(), pos.getZ() + 0.5f); double maxDistance = 4.5D; if((vec.x - player.getPosX()) * (vec.x - player.getPosX()) + (vec.y - player.getPosY()) * (vec.y - player.getPosY()) + (vec.z - player.getPosZ()) * (vec.z - player.getPosZ()) > maxDistance * maxDistance) { return; } BlockState state = world.getBlockState(pos); ItemStack mainStack = player.getHeldItemMainhand(); ItemStack offStack = player.getHeldItemOffhand(); if(!mainStack.isEmpty() || !offStack.isEmpty()) { return; } if(state.getBlock() instanceof StairsBlock) { //List<SeatStair> seats = world.getEntitiesWithinAABB(SeatStair.class, new AxisAlignedBB(pos,pos.add(1,1,1))); SeatStair seat = new SeatStair(EntityType.ARMOR_STAND,world,pos); world.addEntity(seat); player.startRiding(seat); } } public static class SeatStair extends Entity { public SeatStair(EntityType<QUESTIONMARK extends Entity> type, World world, BlockPos pos) { super(type,world); setPosition(pos.getX() + 0.5D,pos.getY() + 0.2D,pos.getZ() + 0.5D); } @Override protected void registerData() { } @Override public void tick() { super.tick(); BlockPos pos = getPosition(); if(!(getEntityWorld().getBlockState(pos).getBlock() instanceof StairsBlock)) { setDead(); return; } List<Entity> passengers = getPassengers(); if(passengers.isEmpty()) { setDead(); } for(Entity entity : passengers) { if(entity.isSneaking()) { setDead(); } } } @Override protected void readAdditional(CompoundNBT compound) { } @Override protected void writeAdditional(CompoundNBT compound) { } @Override public IPacket<QUESTIONMARK> createSpawnPacket() { return null; } }  
    • I keep getting the following error when I try to start up minecraft. Brief report: I already tried to uninstall forge and download it again, uninstall the mods and download others, I changed the version (before 1.17.1 to 1.18.1), I already deleted the phrase "forge-common.toml of type COMMON for modid forge" and even saving it magically returned to the report.  I also put the crash report here.
    • Hello, I'm trying to make a forge server for me and a few friends to play on. Generally this goes over without too many problems but just recently when i was trying to make a new modpack the server wouldnt start, so I went through removing mods until I could find the error and as it turned out no mods were erroring, as just lone forge wouldnt start. the error I seem to be getting is "19.01 21:59:37 [Server] INFO ERROR StatusLogger Reconfiguration failed: No configuration found for '232204a1' at 'null' in 'null'" I have no idea what this means but after this the console wont send any messages other than "Auto-saving world..." after a couple minutes, and when out of curiosity I tried to join on a client it acted like the server was up but I could not join and there was no response console side from me trying to do so. It does recieve stop and start commands fine though. Thank you
    • Any help or advice would be appreciated. I'm trying to learn how to add particles to a mod, using a tutorial from TheGreyGhost. Trying to get the particle to appear in the Entity's tick() method. The vanilla FLAME particle appears but not my particle. @Override public void tick() { if(entity == null) return; try { // Adds a particle to every entity while in the overworld! //this.level.addParticle(ParticleTypes.FLAME, this.getX(), this.getY() + 1, this.getZ(), 0, 0.04, 0); // Try to add a custom particle to every entity in the overworld. Color tint = Color.CYAN; // does this do anything if the particle texture is already colored? double diameter = this.getEntityScale(); FlameParticleData flameParticleData = new FlameParticleData(tint, diameter); this.level.addParticle(flameParticleData, this.getX(), this.getY() + 2, this.getZ(), 0, 0.05, 0); } catch (Exception e) { The other code I have setting up the Particle Registration, the FlameParticle, the FlameParticleData, the FlameParticleFactory, and the FlameParticleType: ParticleRegistration.java. I also have a flame_particle.json that references the flame.png that I want to use. @Mod.EventBusSubscriber(modid = MyMod.MODID, bus = Bus.MOD, value = Dist.CLIENT) public class ParticleRegistration { public static final DeferredRegister<ParticleType<?>> PARTICLES_TYPES = DeferredRegister.create( ForgeRegistries.PARTICLE_TYPES, MyMod.MODID); // This sets the FlameParticleType to use the textures specified in flame_particle.json. public static final RegistryObject<ParticleType<FlameParticleData>> FLAME_PARTICLE = PARTICLES_TYPES.register( "flame_particle", FlameParticleType::new); // Is this necessary? public static ParticleType<FlameParticleData> flameParticleType = new FlameParticleType(); @SuppressWarnings("resource") @SubscribeEvent public static void registerParticleFactory(ParticleFactoryRegisterEvent event) { Minecraft.getInstance().particleEngine.register(ParticleRegistration.FLAME_PARTICLE.get(), FlameParticleFactory::new); } } FlameParticle.java /** * Based on TheGreyGhost's MinecraftByExample * Custom Particle to illustrate how to add a Particle with your own texture and movement/animation behaviour * */ public class FlameParticle extends SpriteTexturedParticle { /** * Construct a new FlameParticle at the given [x,y,z] position, with the given initial velocity, the given color, and the * given diameter. * We also supply sprites so that you can change the sprite texture in the tick() method (although not needed for this example) */ public FlameParticle(ClientWorld world, double x, double y, double z, double velocityX, double velocityY, double velocityZ, Color tint, double diameter, IAnimatedSprite sprites) { super(world, x, y, z, velocityX, velocityY, velocityZ); this.sprites = sprites; setColor(tint.getRed()/255.0F, tint.getGreen()/255.0F, tint.getBlue()/255.0F); setSize((float)diameter, (float)diameter); // the size (width, height) of the collision box. final float PARTICLE_SCALE_FOR_ONE_METRE = 0.5F; // if the particleScale is 0.5, the texture will be rendered as 1 metre high // sets the rendering size of the particle for a TexturedParticle. this.scale(PARTICLE_SCALE_FOR_ONE_METRE * (float)diameter); //maxAge = 100; // lifetime in ticks: 100 ticks = 5 seconds this.lifetime = 100; final float ALPHA_VALUE = 1.0F; this.alpha = ALPHA_VALUE; //the vanilla Particle constructor added random variation to our starting velocity. Undo it! this.xd = velocityX; this.yd = velocityY; this.zd = velocityZ; // the move() method will check for collisions with scenery this.hasPhysics = true; // I think hasPhysics replaces canCollide } // Comments from TheGreyGhost // ---- methods used by TexturedParticle.renderParticle() method to find out how to render your particle // the base method just renders a quad, rotated to directly face the player // can be used to change the skylight+blocklight brightness of the rendered Particle. @Override public int getLightColor(float partialTick) // previously protected int getBrightnessForRender(float partialTick) { final int BLOCK_LIGHT = 15; // maximum brightness final int SKY_LIGHT = 15; // maximum brightness final int FULL_BRIGHTNESS_VALUE = LightTexture.pack(BLOCK_LIGHT, SKY_LIGHT); // .pack replaces .packLight return FULL_BRIGHTNESS_VALUE; // if you want the brightness to be the local illumination (from block light and sky light) you can just use // the Particle.getBrightnessForRender() base method, which contains: // BlockPos blockPos = new BlockPos(this.posX, this.posY, this.posZ); // return this.world.isBlockLoaded(blockPos) ? WorldRenderer.getCombinedLight(this.world, blockPos) : 0; } // Choose the appropriate render type for your particles: // There are several useful predefined types: // PARTICLE_SHEET_TRANSLUCENT semi-transparent (translucent) particles // PARTICLE_SHEET_OPAQUE opaque particles // TERRAIN_SHEET particles drawn from block or item textures // PARTICLE_SHEET_LIT appears to be the same as OPAQUE. Not sure of the difference. In previous versions of minecraft, // "lit" particles changed brightness depending on world lighting i.e. block light + sky light public IParticleRenderType getRenderType() { return IParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; } /** * call once per tick to update the Particle position, calculate collisions, remove when max lifetime is reached, etc */ @Override public void tick() { // if you want to change the texture as the particle gets older, you can use //setSpriteFromAge(sprites); // not sure whether this should be uncommented yet this.xo = x; // previously prevPosX and posX this.yo = y; // previously prevPosY and posY this.xo = z; // previously prevPosZ and posZ move(xd, yd, zd); // simple linear motion. You can change speed by changing xd, yd, // zd every tick. For example - you can make the particle accelerate downwards due to gravity by // final double GRAVITY_ACCELERATION_PER_TICK = -0.02; // yd += GRAVITY_ACCELERATION_PER_TICK; // calling move() also calculates collisions with other objects // collision with a block makes the ball disappear. But does not collide with entities if (onGround) { // onGround is only true if the particle collides while it is moving downwards... this.remove(); // this.setExpired() is probably this.remove() } if (yo == y && yd > 0) { // detect a collision while moving upwards (can't move up at all) this.remove(); } if (this.age++ >= this.lifetime) { // this.maxAge becomes this.lifetime this.remove(); } } private final IAnimatedSprite sprites; // contains a list of textures; choose one using either // newParticle.selectSpriteRandomly(sprites); or newParticle.selectSpriteWithAge(sprites); } FlameParticleData.java /** * Based on TheGreyGhost's MinecraftByExample * The particle has two pieces of information which are used to customise it: * * 1) The colour (tint) which is used to change the hue of the particle * 2) The diameter of the particle * * This class is used to * 1) store this information, and * 2) transmit it between server and client (write and read methods), and * 3) parse it from a command string i.e. the /particle params */ public class FlameParticleData implements IParticleData { public FlameParticleData(Color tint, double diameter) { this.tint = tint; this.diameter = constrainDiameterToValidRange(diameter); } public Color getTint() { return tint; } /** * @return get diameter of particle in metres */ public double getDiameter() { return diameter; } @Nonnull @Override public ParticleType<FlameParticleData> getType() { return ParticleRegistration.flameParticleType; } // write the particle information to a PacketBuffer, ready for transmission to a client @Override public void writeToNetwork(PacketBuffer buf) { buf.writeInt(tint.getRed()); buf.writeInt(tint.getGreen()); buf.writeInt(tint.getBlue()); buf.writeDouble(diameter); } // used for debugging I think; prints the data in human-readable format @Nonnull @Override public String writeToString() { return String.format(Locale.ROOT, "%s %.2f %i %i %i", this.getType().getRegistryName(), diameter, tint.getRed(), tint.getGreen(), tint.getBlue()); } private static double constrainDiameterToValidRange(double diameter) { final double MIN_DIAMETER = 0.05; final double MAX_DIAMETER = 1.0; return MathHelper.clamp(diameter, MIN_DIAMETER, MAX_DIAMETER); } private Color tint; private double diameter; // Comments from the TheGreyGhost // --------- these remaining methods are used to serialize the Particle Data. // I'm not yet sure what the Codec is used for, given that the DESERIALIZER already deserializes using read. // Perhaps it will be used to replace the manual read methods in the future. // The CODEC is a convenience to make it much easier to serialise and deserialise your objects. // Using the builder below, you construct a serialiser and deserialiser in one go, using lambda functions. // eg for the FlameParticleData CODEC: // a) In order to serialise it, it reads the 'tint' member variable (type: INT) and the 'diameter' member variable (type: DOUBLE) // b) In order to deserialise it, call the matching constructor FlameParticleData(INT, DOUBLE) public static final Codec<FlameParticleData> CODEC = RecordCodecBuilder.create( instance -> instance.group( Codec.INT.fieldOf("tint").forGetter(d -> d.tint.getRGB()), Codec.DOUBLE.fieldOf("diameter").forGetter(d -> d.diameter) ).apply(instance, FlameParticleData::new) ); private FlameParticleData(int tintRGB, double diameter) { this.tint = new Color(tintRGB); this.diameter = constrainDiameterToValidRange(diameter); } // The DESERIALIZER is used to construct FlameParticleData from either command line parameters or from a network packet public static final IDeserializer<FlameParticleData> DESERIALIZER = new IDeserializer<FlameParticleData>() { // parse the parameters for this particle from a /particle command @Nonnull @Override public FlameParticleData fromCommand(@Nonnull ParticleType<FlameParticleData> type, @Nonnull StringReader reader) throws CommandSyntaxException { reader.expect(' '); double diameter = constrainDiameterToValidRange(reader.readDouble()); final int MIN_COLOUR = 0; final int MAX_COLOUR = 255; reader.expect(' '); int red = MathHelper.clamp(reader.readInt(), MIN_COLOUR, MAX_COLOUR); reader.expect(' '); int green = MathHelper.clamp(reader.readInt(), MIN_COLOUR, MAX_COLOUR); reader.expect(' '); int blue = MathHelper.clamp(reader.readInt(), MIN_COLOUR, MAX_COLOUR); Color color = new Color(red, green, blue); return new FlameParticleData(color, diameter); } // read the particle information from a PacketBuffer after the client has received it from the server @Override public FlameParticleData fromNetwork(@Nonnull ParticleType<FlameParticleData> type, PacketBuffer buf) { // warning! never trust the data read in from a packet buffer. final int MIN_COLOUR = 0; final int MAX_COLOUR = 255; int red = MathHelper.clamp(buf.readInt(), MIN_COLOUR, MAX_COLOUR); int green = MathHelper.clamp(buf.readInt(), MIN_COLOUR, MAX_COLOUR); int blue = MathHelper.clamp(buf.readInt(), MIN_COLOUR, MAX_COLOUR); Color color = new Color(red, green, blue); double diameter = constrainDiameterToValidRange(buf.readDouble()); return new FlameParticleData(color, diameter); } }; } FlameParticleFactory.java /** * Based on TheGreyGhost's MinecraftByExample * On the client side: * When the client wants to spawn a Particle, it gives the FlameParticleData to this factory method * The factory selects an appropriate Particle class and instantiates it * */ public class FlameParticleFactory implements IParticleFactory<FlameParticleData> { //IParticleFactory private final IAnimatedSprite sprites; // contains a list of textures; choose one using either // not sure if i still need this // newParticle.selectSpriteRandomly(sprites); or newParticle.selectSpriteWithAge(sprites); // this method is needed for proper registration of your Factory: // The ParticleManager.register method creates a Sprite and passes it to your factory for subsequent use when rendering, then // populates it with the textures from your textures/particle/xxx.json public FlameParticleFactory(IAnimatedSprite sprite) { this.sprites = sprite; } @Nullable @Override public Particle createParticle(FlameParticleData flameParticleData, ClientWorld world, double xPos, double yPos, double zPos, double xVelocity, double yVelocity, double zVelocity) { FlameParticle newParticle = new FlameParticle(world, xPos, yPos, zPos, xVelocity, yVelocity, zVelocity, flameParticleData.getTint(), flameParticleData.getDiameter(), sprites); newParticle.pickSprite(sprites); // not quite the newParticle.selectSpriteRandomly(sprites) that was used. return newParticle; } // This is private to prevent you accidentally registering the Factory using the default constructor. // ParticleManager has two register methods, and if you use the wrong one the game will enter an infinite loop private FlameParticleFactory() { throw new UnsupportedOperationException("Use the FlameParticleFactory(IAnimatedSprite sprite) constructor"); } } FlameParticleType.java /** * Based on TheGreyGhost's MinecraftByExample * Simple class used to describe the Particle */ public class FlameParticleType extends ParticleType<FlameParticleData> { private static boolean ALWAYS_SHOW_REGARDLESS_OF_DISTANCE_FROM_PLAYER = false; public FlameParticleType() { super(ALWAYS_SHOW_REGARDLESS_OF_DISTANCE_FROM_PLAYER, FlameParticleData.DESERIALIZER); } // get the Codec used to // a) convert a FlameParticleData to a serialised format // b) construct a FlameParticleData object from the serialised format public Codec<FlameParticleData> codec() { return FlameParticleData.CODEC; } } The flame_particle.json, which is located in resources/asset.MyMod/particles, that references the flame.png, located in resources/asset.MyMod/particles/textures/particles { "textures": [ "MyMod:flame" ] }  
    • How did you figure out the texture changing? I looked at your code and I can't seem to replicate your solution.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.