Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Algorithm for changing textures based on position
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 2
Cilka

Algorithm for changing textures based on position

By Cilka, August 5, 2018 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Cilka    0

Cilka

Cilka    0

  • Tree Puncher
  • Cilka
  • Members
  • 0
  • 15 posts
Posted August 5, 2018

Hi everyone, right now I'm in middle of converting my 1.7.10 code to 1.12.2. One of the blocks I had in before was a glass pane that changed its texture based on the position of where the pane was in relative to other blocks around it. Before i only used a 2D plane, but I was able to determine what axis the block was placed on using a combo of  "canPaneConnectToBlock" and "world.isSideSolid". Now that those methods are gone, I'm trying a to use a 3D plane where North(-Z) , East(-X)  and South(+Z), West(+X) are interchangeable. Up and down will be the Y axis. For now, all of my panes, no matter what position i put them in, are calculated as a bottom pane. Can anyone point me in the direction of what I should do for this?

Spoiler

package com.hexopygate.Telgttatium.blockarchtype;

import java.util.HashMap;

import javax.swing.text.html.HTMLDocument.HTMLReader.FormAction;

import com.hexopygate.Telgttatium.Telgttatium;
import com.hexopygate.Telgttatium.utils.IHasModel;

import net.minecraft.block.Block;
import net.minecraft.block.BlockAir;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockPane;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class TelGlassFrame extends BlockPane implements IHasModel{

	protected static enum Position implements IStringSerializable {
		 
		Center("center",0), 
		Top("top",1), 
		Bottom("bottom",2), 
		Left("left",3),
		Right("right",4),
		TopRight("topright",5),
		TopLeft("topleft",6),
		BottomRight("bottomright",7), 
		BottomLeft("bottomleft",8), 
		CenterFull("centerfull",9),
		CenterWalledHorizontal("centerwalledhorizontal",10), 
		CenterWalledVertical("centerwalledvertical",11), 
		BottomWalled("bottomwalled",12), 
		TopWalled("topwalled",13),
		RightWalled("rightwalled",14), 
		LeftWalled("leftwalled",15);

		private int ID;
		private String name;
		@Override
		public String getName() {
			// TODO Auto-generated method stub
			return name;
		}
		public int getID()
		{
			return ID;
		}
		private Position(String Name, int ID)
		{
			this.name = Name;
			this.ID = ID;
		}
	}


	String FaceTex;
	static String RimText = "Glass_Trim";
	String name = this.getClass().getSimpleName();
	private Position position;
	static final PropertyEnum<Position> panePosition = PropertyEnum.create("paneposition",Position.class);
	public TelGlassFrame(Material materialIn, boolean canDrop) {
		super(materialIn, canDrop);
		String name  = this.getClass().getSimpleName();
		this.setUnlocalizedName(name);
		this.setRegistryName(name);
		this.setDefaultState(this.blockState.getBaseState().withProperty(panePosition, Position.Center));
		Telgttatium.itemRef.put(name,new ItemBlock(this).setRegistryName(this.getRegistryName()));
	}
	@Override
	public void registerModels() {
		// TODO Auto-generated method stub
		Telgttatium.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory");
	}
	public TelGlassFrame(boolean canDrop) {
		this(Material.GLASS,canDrop);
	}

	@Override
	public int getMetaFromState(IBlockState state)
	{
		Position type = (Position) state.getValue(panePosition);
		return type.ordinal();
	}
	@Override
	public IBlockState getStateFromMeta(int meta)
	{
		return this.getDefaultState().withProperty(panePosition, Position.values()[meta]);
	}
	@Override 
	protected BlockStateContainer createBlockState()
	{
		return new BlockStateContainer(this, new IProperty[] {panePosition,NORTH, EAST, WEST,SOUTH});
	}
	@Override
	public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {

		
		System.out.println("Initial Position: " + this.position);
		SetPosition(world,pos);
		
		//System.out.println("postiion for " + FaceTex + " is " +this.position + " at " + String.format("(%s,%s ,%s)", x,y,z));
		String texName =  "tel:"+FaceTex;
		state.withProperty(panePosition, position);
		switch(position)
		{
		case Top:
		texName +="_Top_Frame";
			break;
		case Bottom:
			texName +="_Down_Frame";
			break;
		case BottomLeft:
			texName +="_Down_Left_Frame";
			break;
		case BottomRight:
			texName +="_Down_Right_Frame";
			break;
		case BottomWalled:
			texName +="_Down_Single_Frame";
			break;
		case Center:
			texName +="_Middle_Frame";
			break;
		case CenterFull:
			texName +="_Full_Frame";
			break;
		case CenterWalledHorizontal:
			texName +="_Horizontal_Middle_Single_Frame";
			break;
		case CenterWalledVertical:
			texName += "_Vertical_Middle_Single_Frame";
			break;
		case Left:
			texName +="_Left_Frame";
			break;
		case Right:
			texName +="_Right_Frame";
			break;
		case TopLeft:
			texName +="_Top_Left_Frame";
			break;
		case TopRight:
			texName +="_Top_Right_Frame";
			break;
		case TopWalled:
			texName +="_Top_Single_Frame";
			break;
		case RightWalled:
			texName += "_Right_Single_Frame";
			break;
		case LeftWalled:
			texName += "_Left_Single_Frame";
			break;
		default:
			break;
		}
		System.out.println("Texture name is " + texName);
		//this.blockIcon = icons.get(texName);
		
			
			//world.setBlock(x, y, z, GameData.getBlockRegistry().getObject(texName));
	
	}

	private HashMap<String, Block> buildNeighbors(World world,BlockPos pos)
	{
		HashMap<String,Block> neighbors = new HashMap<String,Block>();
		//TODO don't look for angle direction just check for what is neighboring this block pos
		neighbors.put("up", world.getBlockState(new BlockPos(pos.getX(),pos.getY()+1,pos.getZ())).getBlock());
		neighbors.put("down", world.getBlockState(new BlockPos(pos.getX(),pos.getY()-1,pos.getZ())).getBlock());
		neighbors.put("north", world.getBlockState(new BlockPos(pos.getX(),pos.getY(),pos.getZ()-1)).getBlock());
		neighbors.put("south", world.getBlockState(new BlockPos(pos.getX(),pos.getY(),pos.getZ()+1)).getBlock());
		neighbors.put("east", world.getBlockState(new BlockPos(pos.getX()+1,pos.getY(),pos.getZ())).getBlock());
		neighbors.put("west", world.getBlockState(new BlockPos(pos.getX()-1,pos.getY(),pos.getZ())).getBlock());
		return neighbors;
	}
	
	private boolean isTelGlassFrame(Block block)
	{
		return block instanceof TelGlassFrame;
	}
	private boolean isAirBlock(Block block)
	{
		return block instanceof BlockAir;
	}
	
	//1.12.2
	private void SetPosition(World world,BlockPos pos)
	{
		HashMap<String,Block> neighbors = buildNeighbors(world,pos);
		if( !(isTelGlassFrame(neighbors.get("north")) || isTelGlassFrame(neighbors.get("east")) )  
				 && !(isAirBlock(neighbors.get("north")) || isAirBlock(neighbors.get("east")))
			 &&  !(isTelGlassFrame(neighbors.get("south")) || isTelGlassFrame(neighbors.get("west")) )  
			 && !(isAirBlock(neighbors.get("south")) || isAirBlock(neighbors.get("west")))&&
			 !(isTelGlassFrame(neighbors.get("up")) && isTelGlassFrame(neighbors.get("down")) )  
			 && !(isAirBlock(neighbors.get("up")) && isAirBlock(neighbors.get("east")))
				)
		{
			position = Position.CenterFull;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("north") )|| isTelGlassFrame(neighbors.get("east"))) 
				&&
				!(isAirBlock(neighbors.get("north") )|| isAirBlock(neighbors.get("east")))
				&& 
				!(isTelGlassFrame(neighbors.get("south") )|| isTelGlassFrame(neighbors.get("west"))) 
				&&
				!(isAirBlock(neighbors.get("south") )|| isAirBlock(neighbors.get("west")))
				&&
				!isTelGlassFrame(neighbors.get("down"))  && !isAirBlock(neighbors.get("down"))
				)
		{
			position = Position.BottomWalled; 
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("north") )|| isTelGlassFrame(neighbors.get("east"))) 
				&&
				!(isAirBlock(neighbors.get("north") )|| isAirBlock(neighbors.get("east")))
				&& 
				!(isTelGlassFrame(neighbors.get("south") )|| isTelGlassFrame(neighbors.get("west"))) 
				&&
				!(isAirBlock(neighbors.get("south") )|| isAirBlock(neighbors.get("west")))
				&&
				!(isTelGlassFrame(neighbors.get("up"))  && isAirBlock(neighbors.get("up")))
				)
		{
			position = Position.TopWalled;
			return;
		}
		else if(	!(isTelGlassFrame(neighbors.get("up"))  && isAirBlock(neighbors.get("up"))) &&
				!(isTelGlassFrame(neighbors.get("down"))  && isAirBlock(neighbors.get("down")))
				&& !(isTelGlassFrame(neighbors.get("south"))|| isTelGlassFrame(neighbors.get("west")))
				&& !(isAirBlock(neighbors.get("south"))|| isAirBlock(neighbors.get("west")))
				)
		{
			position = Position.LeftWalled;
			return;
		}
		
		else if(	!(isTelGlassFrame(neighbors.get("up"))  && isAirBlock(neighbors.get("up"))) &&
				!(isTelGlassFrame(neighbors.get("down"))  && isAirBlock(neighbors.get("down")))
				&& !(isTelGlassFrame(neighbors.get("north"))|| isTelGlassFrame(neighbors.get("east")))
				&& !(isAirBlock(neighbors.get("north"))|| isAirBlock(neighbors.get("east")))
			) {
			position = Position.RightWalled;
			return;
		}
		else if((isTelGlassFrame(neighbors.get("up"))  && isAirBlock(neighbors.get("up"))) &&
				!(isTelGlassFrame(neighbors.get("down"))  && isAirBlock(neighbors.get("down")))) {
			position = Position.CenterWalledHorizontal;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("north") )|| isTelGlassFrame(neighbors.get("east"))) 
				&&
				!(isAirBlock(neighbors.get("north") )|| isAirBlock(neighbors.get("east")))
				&& 
				!(isTelGlassFrame(neighbors.get("south") )|| isTelGlassFrame(neighbors.get("west"))) 
				&&
				!(isAirBlock(neighbors.get("south") )|| isAirBlock(neighbors.get("west")))) {
			position = Position.CenterWalledVertical;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("south") )|| isTelGlassFrame(neighbors.get("west")))  
				&& !(isAirBlock(neighbors.get("south")) ||isAirBlock(neighbors.get("west")))
				&& !(isTelGlassFrame(neighbors.get("down")) && isAirBlock(neighbors.get("down"))))
		{
			position = Position.BottomLeft;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("down")) && isAirBlock(neighbors.get("down")))
				&&!(isTelGlassFrame(neighbors.get("north") )|| isTelGlassFrame(neighbors.get("east")))  
				&& !(isAirBlock(neighbors.get("north")) ||isAirBlock(neighbors.get("east"))) )
		{
			position = Position.BottomRight;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("up")) && isAirBlock(neighbors.get("up")))
				&&!(isTelGlassFrame(neighbors.get("north") )|| isTelGlassFrame(neighbors.get("east")))  
				&& !(isAirBlock(neighbors.get("north")) ||isAirBlock(neighbors.get("east"))))
		{
			position = Position.TopRight;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("south") )|| isTelGlassFrame(neighbors.get("west")))  
				&& !(isAirBlock(neighbors.get("south")) ||isAirBlock(neighbors.get("west")))
				&& !(isTelGlassFrame(neighbors.get("up")) && isAirBlock(neighbors.get("up"))))
		{
			position = Position.TopLeft;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("down")) && isAirBlock(neighbors.get("down"))))
		{
			position = Position.Bottom;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("up")) && isAirBlock(neighbors.get("up"))))
		{
			position = Position.Top;
			return;
		}
		else if(!(isTelGlassFrame(neighbors.get("north") )|| isTelGlassFrame(neighbors.get("east")))  
				&& !(isAirBlock(neighbors.get("north")) ||isAirBlock(neighbors.get("east"))))
		{
			position = Position.Right;
			return;
				}
		else if(!(isTelGlassFrame(neighbors.get("south") )|| isTelGlassFrame(neighbors.get("west")))  
				&& !(isAirBlock(neighbors.get("south")) ||isAirBlock(neighbors.get("west"))))
		{
			position = Position.Left;
			return;
		}
	}
	//1.7.10
	@Deprecated 
	private void SetPosition(HashMap<String, Block> neighbors, int x, int y) {
	
		if( !(neighbors.get("north") instanceof TelGlassPane)  && !(neighbors.get("north") instanceof BlockAir)&&
				!(neighbors.get("south") instanceof TelGlassPane)	&&!(neighbors.get("south") instanceof BlockAir)&&
				!(neighbors.get("east") instanceof TelGlassPane) &&!(neighbors.get("east") instanceof BlockAir)&&
				!(neighbors.get("west") instanceof TelGlassPane) && !(neighbors.get("west") instanceof BlockAir))
		{
			position = Position.CenterFull;
			return;
		}
		else if(!(neighbors.get("south") instanceof TelGlassPane)	&&!(neighbors.get("south") instanceof BlockAir)&&
				!(neighbors.get("east") instanceof TelGlassPane) &&!(neighbors.get("east") instanceof BlockAir)&&
				!(neighbors.get("west") instanceof TelGlassPane) && !(neighbors.get("west") instanceof BlockAir))
		{
			position = Position.BottomWalled; 
			return;
		}
		else if(!(neighbors.get("north") instanceof TelGlassPane)	&&!(neighbors.get("north") instanceof BlockAir)&&
				!(neighbors.get("east") instanceof TelGlassPane) &&!(neighbors.get("east") instanceof BlockAir)&&
				!(neighbors.get("west") instanceof TelGlassPane) && !(neighbors.get("west") instanceof BlockAir))
		{
			position =Position.TopWalled;
			return;
		}
		else if(!(neighbors.get("south") instanceof TelGlassPane)	&&!(neighbors.get("south") instanceof BlockAir)&&
				!(neighbors.get("north") instanceof TelGlassPane) &&!(neighbors.get("north") instanceof BlockAir)&&
				!(neighbors.get("west") instanceof TelGlassPane) && !(neighbors.get("west") instanceof BlockAir))
		{
			position = Position.LeftWalled;
			return;
		}
		else if(!(neighbors.get("south") instanceof TelGlassPane)	&&!(neighbors.get("south") instanceof BlockAir)&&
				!(neighbors.get("north") instanceof TelGlassPane) &&!(neighbors.get("north") instanceof BlockAir)&&
				!(neighbors.get("east") instanceof TelGlassPane) && !(neighbors.get("east") instanceof BlockAir))
		{
			position = Position.RightWalled;
			return;
		}
		else if(!(neighbors.get("south") instanceof TelGlassPane)	&&!(neighbors.get("south") instanceof BlockAir)&&
				!(neighbors.get("north") instanceof TelGlassPane) &&!(neighbors.get("north") instanceof BlockAir))
		{
			position = Position.CenterWalledHorizontal;
			return;
		}
		else if(!(neighbors.get("east") instanceof TelGlassPane)	&&!(neighbors.get("east") instanceof BlockAir)&&
				!(neighbors.get("west") instanceof TelGlassPane) &&!(neighbors.get("west") instanceof BlockAir))
		{
			position = Position.CenterWalledVertical;
			return;
		}
	
		else if(!(neighbors.get("south") instanceof TelGlassPane)	&&!(neighbors.get("south") instanceof BlockAir)&&
				!(neighbors.get("west") instanceof TelGlassPane) &&!(neighbors.get("west") instanceof BlockAir))
		{
			position = Position.BottomLeft;
			return;
		}
		else if(!(neighbors.get("south") instanceof TelGlassPane)	&&!(neighbors.get("south") instanceof BlockAir)&&
				!(neighbors.get("east") instanceof TelGlassPane) &&!(neighbors.get("east") instanceof BlockAir))
		{
			position = Position.BottomRight;
			return;
		}
		else if(!(neighbors.get("north") instanceof TelGlassPane)	&&!(neighbors.get("north") instanceof BlockAir)&&
				!(neighbors.get("east") instanceof TelGlassPane) &&!(neighbors.get("east") instanceof BlockAir))
		{
			position = Position.TopRight;
			return;
		}
		else if(!(neighbors.get("north") instanceof TelGlassPane)	&&!(neighbors.get("north") instanceof BlockAir)&&
				!(neighbors.get("west") instanceof TelGlassPane) &&!(neighbors.get("west") instanceof BlockAir))
		{
			position = Position.TopLeft;
			return;
		}
		else if(!(neighbors.get("south") instanceof TelGlassPane)	&&!(neighbors.get("south") instanceof BlockAir))
		{
			position = Position.Bottom;
			return;
		}
		else if(!(neighbors.get("north") instanceof TelGlassPane)	&&!(neighbors.get("north") instanceof BlockAir))
		{
			position = Position.Top;
			return;
		}
		else if(!(neighbors.get("east") instanceof TelGlassPane)	&&!(neighbors.get("east") instanceof BlockAir))
		{
			position = Position.Right;
			return;
				}
		else if(!(neighbors.get("west") instanceof TelGlassPane)	&&!(neighbors.get("wast") instanceof BlockAir))
		{
			position = Position.Left;
			return;
		}
		position =  Position.Center;
	}
	
	/*
	 public boolean paneIsOnAxis(World world, BlockPos pos, EnumFacing dir)
	    {
	        return canPaneConnectToBlock(world.getBlockState(pos).getBlock()) || 
	                world.isSideSolid(x, y, z, dir.getOpposite(), false);
	    }
*/
	
}

 

 

  • Quote

Share this post


Link to post
Share on other sites

Cadiboo    277

Cadiboo

Cadiboo    277

  • Reality Controller
  • Cadiboo
  • Members
  • 277
  • 3303 posts
Posted August 6, 2018

Have a look at MBE05 in Minecraft by example, I think it’s exactly what you want

  • Quote

Share this post


Link to post
Share on other sites

Cilka    0

Cilka

Cilka    0

  • Tree Puncher
  • Cilka
  • Members
  • 0
  • 15 posts
Posted August 6, 2018
52 minutes ago, Cadiboo said:

Have a look at MBE05 in Minecraft by example, I think it’s exactly what you want

I'll take a look at that. Thanks!

  • Quote

Share this post


Link to post
Share on other sites

Cilka    0

Cilka

Cilka    0

  • Tree Puncher
  • Cilka
  • Members
  • 0
  • 15 posts
Posted August 10, 2018
On 8/5/2018 at 9:30 PM, Cadiboo said:

Have a look at MBE05 in Minecraft by example, I think it’s exactly what you want

I looked at the example, and there isn't really much i can go off of given what I was trying to do. In the Block3DWeb it only seems to care about what next to the block first. Say if there were two blocks on the bottom and the left side, if the block saw the left block first, It would only care about the left block, not noticing the bottom block. What I need to determine is how block is facing in the world so i know which neighbors to use. It's a good example, but a bit over complicated for what I'm trying to do now ^^".

  • Quote

Share this post


Link to post
Share on other sites

Cilka    0

Cilka

Cilka    0

  • Tree Puncher
  • Cilka
  • Members
  • 0
  • 15 posts
Posted October 17

Post from the dead here. I finally got around to implementing the glass pane frames for my mod. Code wise I think I got the blockstate thing down. There are 16 states that these glass pane frames can be in along with the 4 states that I'm inheriting (North, South, East, West). I took a look at how the blockstate json handles its 4 states. Example here for Cyan Stained Glass Pane:

Spoiler

{
    "multipart": [
        {   "apply": { "model": "cyan_stained_glass_pane_post" }},
        {   "when": { "north": true },
            "apply": { "model": "cyan_stained_glass_pane_side" }
        },
        {   "when": { "east": true },
            "apply": { "model": "cyan_stained_glass_pane_side", "y": 90 }
        },
        {   "when": { "south": true },
            "apply": { "model": "cyan_stained_glass_pane_side_alt" }
        },
        {   "when": { "west": true },
            "apply": { "model": "cyan_stained_glass_pane_side_alt", "y": 90 }
        },
        {   "when": { "north": false },
            "apply": { "model": "cyan_stained_glass_pane_noside" }
        },
        {   "when": { "east": false },
            "apply": { "model": "cyan_stained_glass_pane_noside_alt" }
        },
        {   "when": { "south": false },
            "apply": { "model": "cyan_stained_glass_pane_noside_alt", "y": 90 }
        },
        {   "when": { "west": false },
            "apply": { "model": "cyan_stained_glass_pane_noside", "y": 270 }
        }
    ]
}
 

Now the 16 blockstates I've created are to go with the original 4 from BlockPane. If I do what I am thinking of doing, I will have to have 128 models just for 1 glass pane frame. Here is the question, is there a less painful way to create the blockstate and models?

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    677

Animefan8888

Animefan8888    677

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 677
  • 5746 posts
Posted October 17
49 minutes ago, Cilka said:

If I do what I am thinking of doing, I will have to have 128 models just for 1 glass pane frame.

I believe that is wrong...cant you just have two models per color/whatever(16). And then an extra one that's empty. Then an extra one that is empty to apply when it is false. Which comes to 16x2+1=33 which is a lot, but you can just parent the glass pane model and change the texture.

 

  • Quote

Share this post


Link to post
Share on other sites

Cilka    0

Cilka

Cilka    0

  • Tree Puncher
  • Cilka
  • Members
  • 0
  • 15 posts
Posted October 18
Quote

I believe that is wrong...cant you just have two models per color/whatever(16). And then an extra one that's empty. Then an extra one that is empty to apply when it is false. Which comes to 16x2+1=33 which is a lot, but you can just parent the glass pane model and change the texture.

I see what you are saying. My concern would be if leave the false sides without a model, the model would not look as intended. I'll try what you are suggesting. It will be a good starting point at least. 

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 2
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • DragonITA
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA · Posted 7 minutes ago

      No, you have said that i should make that modelUnicorn extends ModelEntity and not ModelHorse, but i need the AbstractHorseEntity, else the gui, animations and etc. wont work and i should rewrite the code.
    • Simon_kungen
      [1.14.4] TileEntityItemStackSpecialRenderer (TEISR)

      By Simon_kungen · Posted 12 minutes ago

      Other mods I can find add their TEISR directly in the item constructor (which crashes the server). But doing the same I at least expect it to do something while in Single Player.
    • salvestrom
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By salvestrom · Posted 25 minutes ago

      ModelUnicorn should extend ModelHorse. Everything else you want will come from your UnicornEntity class extending EntityHorse.
    • mindstorm3223
      1.12.2-Problem with tile entity custom crafting table

      By mindstorm3223 · Posted 30 minutes ago

      Sorry, I looked around and couldn't figure out how to do that, do you know of any good place where it can tell me how to?
    • Jaffaaaaa
      ScreenGui does nothing

      By Jaffaaaaa · Posted 31 minutes ago

      I'm trying to make a gui to edit values and settings using a command, but the gui just does nothing apart from showing me the "init gui" message I put i the initGui() method. package xyz.jaffaaaa.zealotmanager; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.util.ChatComponentText; public class GuiHandler extends GuiScreen { private GuiButton reset; private ZealotManager zm; public GuiHandler(ZealotManager zm) { this.zm=zm; } @Override public void initGui() { super.initGui(); this.buttonList.clear(); Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("init gui")); this.buttonList.add(reset = new GuiButton(0, this.width / 2 - 100, this.height / 2, "Reset Counters")); } @Override protected void actionPerformed(GuiButton button) { if (button == reset) { zm.counter.zealotsSinceLastEye = 0; zm.counter.totalEyes = 0; zm.counter.totalZealots = 0; } } @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawScreen(mouseX, mouseY, partialTicks); drawDefaultBackground(); } }  
  • Topics

    • DragonITA
      26
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA
      Started Monday at 10:06 AM

    • Simon_kungen
      3
      [1.14.4] TileEntityItemStackSpecialRenderer (TEISR)

      By Simon_kungen
      Started Saturday at 02:50 PM

    • mindstorm3223
      2
      1.12.2-Problem with tile entity custom crafting table

      By mindstorm3223
      Started Yesterday at 02:18 AM

    • Jaffaaaaa
      0
      ScreenGui does nothing

      By Jaffaaaaa
      Started 32 minutes ago

    • Yanny7
      0
      [1.14.4] Stone Age mod

      By Yanny7
      Started 33 minutes ago

  • Who's Online (See full list)

    • LexManos
    • Simon_kungen
    • mindstorm3223
    • diesieben07
    • DragonITA
    • XanterMails
    • Yanny7
    • D4Rk
    • Darkfiend009
    • moronwmachinegun
    • Jaffaaaaa
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Algorithm for changing textures based on position
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community