Jump to content

Recommended Posts

Posted

Well, i have this block, which i want to have 33 subblocks, and everywhere i look, everyone just says "You need TE". i realise i need a TE... just how the heck do i make one!?

Code : MetaDataBlock

private static final TileEntityMegaBlock TileEntityMega = new TileEntityMegaBlock();
private static final TileEntityMegaBlock TE = TileEntityMega;
public static Icon[] IconArray;
    public static String[] IconNames = {"stone","stonebrick","dirt","wood","bedrock","sand","gravel","oreCoal","oreIron","oreGold","oreLapis","oreDiamond","oreRedstone","blockIron","blockGold","blockDiamond","blockLapis","blockRedstone","cloth_0","cloth_1","cloth_2","cloth_3","cloth_4","cloth_5","cloth_6","cloth_7","cloth_8","cloth_9","cloth_10","cloth_11","cloth_12","cloth_13","cloth_14","cloth_15"};

public BlockMegaBlock(int par1) {
	super(par1, Material.ground);
	this.setBlockBounds(0.30F, 0.30F, 0.30F, 0.70F, 0.70F, 0.70F);
}
public boolean hasTileEntity(int meta){
	return true;
}
public TileEntity createNewTileEntity(World world, int meta) {
	return TE;
}
@Override
public void onBlockAdded(World par1World, int par2, int par3, int par4){
	par1World.setBlockTileEntity(par2, par3, par4, TileEntityMega);
	this.TE.worldObj.setBlockTileEntity(par2, par3, par4, TileEntityMega);
	super.onBlockAdded(par1World, par2, par3, par4);
	par1World.setBlockTileEntity(par2, par3, par4, TileEntityMega);
	this.TE.worldObj.setBlockTileEntity(par2, par3, par4, TileEntityMega);
}
public boolean isOpaqueCube()
{
	 return false;
}
public void registerIcons(IconRegister par1IconRegister)
    {
	this.IconArray = new Icon[iconNames.length];
	for(int i=0;i<IconNames.length;i++){
		System.out.println("Registered MegaBlock #"+i+" With Image "+this.IconNames[i]);
		this.IconArray[i] = par1IconRegister.registerIcon(this.IconNames[i]); 
	}
    }
public Icon getIcon(int par1, int par2)
    {
	return this.IconArray[par2];		
    }
public int idDropped(int par1, Random par2Random, int par3)
    {
	return this.blockID;
    }
public int quantityDropped(Random par1Random)
    {
        return 1;
    } 
public int damageDropped(int i){ //Tells it what block it drops and also for creative mode pick block
	return i;
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) //Adds the metadata blocks to the creative inventory
{
	for(int i=0;i<IconNames.length;i++){
		par3List.add(new ItemStack(par1, 1, i));
	}
}

 

 

Tile Entity

package com.yofungate.mods.YellowMech.misc;

import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.tileentity.TileEntity;

public class TileEntityMegaBlock extends TileEntity {
public static int blockMetadata = 0;
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
blockMetadata = nbt.getInteger("BMD") & 0xFF;
System.out.print(blockMetadata);
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
System.out.print(blockMetadata);
nbt.setInteger("BMD", this.blockMetadata);
}
public static int GetMeta(){
	return blockMetadata;
}
}

 

Posted

Thats good! Now you only need an itemBlock which has this function in it to return the metadata

 

public static ItemBlockMulitBlock extends ItemBlock

{

  public ItemBlockMultiBlock(int par1)

  {

      super(par1);

      setHasSubtypes(true)

  }

 

  @Override

  public int getBlockMetadata(int par1)

  {

        return par1;

    }

 

}

 

than you also need an extra item which changes the tileentity when your placing the block. Than you can have. The Rest you have to find out yourself^^

Posted

i already have an itemblock.

 

package com.yofungate.mods.YellowMech.misc;

import com.yofungate.mods.YellowMech.common.YellowMech;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;

public class ItemBlockMegaBlock extends ItemBlock {

public ItemBlockMegaBlock(int par1) {
	super(par1);
	this.setMaxDamage(0);
	this.setHasSubtypes(true);
}
@SideOnly(Side.CLIENT)

public Icon getIconFromDamage(int par1) //Gets the texture
{
         return YellowMech.MegaBlock.getIcon(2, par1);
}
public int getMetadata(int par1) //Returns the metadata value
{
         return par1;
}
public String getItemNameIS(ItemStack is) //Get's the item incode name from an itemstack
{
         
         return "YellowMech." + BlockMegaBlock.IconNames[is.getItemDamage()];
}
}

 

Posted

i got my ItemBlock with

package com.yofungate.mods.YellowMech.misc;

import com.yofungate.mods.YellowMech.common.YellowMech;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;

public class ItemBlockMegaBlock extends ItemBlock {

private static final TileEntity TileEntityMegaBlock = new TileEntityMegaBlock();
public ItemBlockMegaBlock(int par1) {

	super(par1);
	this.setMaxDamage(0);
	this.setHasSubtypes(true);
}
@SideOnly(Side.CLIENT)

public Icon getIconFromDamage(int par1) //Gets the texture
{
         return YellowMech.MegaBlock.getIcon(2, par1);
}
public int getMetadata(int par1) //Returns the metadata value
{
         return par1;
}
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10){

        if (par7 == 0)
        {
            --par5;
        }

        if (par7 == 1)
        {
            ++par5;
        }

        if (par7 == 2)
        {
            --par6;
        }

        if (par7 == 3)
        {
            ++par6;
        }

        if (par7 == 4)
        {
            --par4;
        }
        if (par7 == 5){
        	++par4;
        }
        int x=par4, y=par5, z=par6;

	par3World.setBlock(x, y, z, this.getBlockID());
	par3World.setBlockTileEntity(x, y, z, TileEntityMegaBlock);
	par3World.setBlockMetadataWithNotify(x, y, z, par1ItemStack.getItemDamage(), 3);
	return true;
}
public String getItemNameIS(ItemStack is) //Get's the item incode name from an itemstack
{
         
         return "YellowMech." + BlockMegaBlock.IconNames[is.getItemDamage()];
}
}

Posted

There is a ModLoader Mod which can help you alot. It also implemented Forge.

PowerCraft.

 

Or Read how the skulls are get Placed^^ i do not have the time (and i do not waste my time with coding for other for free). Find it out yourself.

 

I can tell you what you need.

 

You need:

 

Block & ItemBlock (which have the submeta inside(submeta can big as you want))

Thats the block now for the placeing.

 

You simply need an item which is placeing your Block. and changes the tileentity.

That the way ic2 make it with his cables. Its only 1 cable tile and the items changes only the value.

 

If you ask more than i just everytime read it from vannila there is all you need!

Posted

Moritz is mostly right. You'll need to somehow modify the TE with one or more items. Or CreativeTabs.

 

In every case, be it different algorithms on block updates, textures, or rendering, you'll first need to get the TE and do all the tests you need in order to distinguish the subtype. Example:

 

 

public Icon getBlockTexture( IBlockAccess blockAccess, int x, int y, int y, int side ) {
    MyTileEntity te = (MyTileEntity)blockAccess.getBlockTileEntity(x, y, z);
    
    switch( te.type ) {
        case 0: default:
            return Block.wood.getIcon(side, 0);
        case 1:
            return Block.grass.getIcon(side, 0);
    }
}

 

 

In this example, you'd only have 2 different types for simplicity. Depending on the state of your TE, you'd do different things respectively. Fair enough, huh? It all comes down to... well, that.

Hope that's enough to get you started. If not... explain your problem better.

  • 1 month later...
Posted

Okay, i somehow did everything untill now, now i need to know, how do i make it Save the tile entity?

 

Codes So Far,

Tile Entity

package com.yofungate.mods.YellowMech.misc;

import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet132TileEntityData;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.tileentity.TileEntity;

public class TileEntityMegaBlock extends TileEntity {
public static int blockMetadata = -1;

public TileEntityMegaBlock(){
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.blockMetadata = nbt.getInteger("BMD");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger("BMD", this.blockMetadata);
}
public int GetMeta(){
	return this.blockMetadata;
}
public void setMeta(int i) {
	this.blockMetadata = i;
}
public TileEntity returnTE(){
	return this;
}
    public Packet getDescriptionPacket()
    {
        NBTTagCompound nbttagcompound = new NBTTagCompound();
        this.writeToNBT(nbttagcompound);
        return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 4, nbttagcompound);
    }
}

 

 

ItemBlock

package com.yofungate.mods.YellowMech.misc;

import com.yofungate.mods.YellowMech.common.YellowMech;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;

public class ItemBlockMegaBlock extends ItemBlock {
    public static String[] IconNames = {"stone","stonebrick","dirt","wood","bedrock","sand","gravel","oreCoal","oreIron","oreGold","oreLapis","oreDiamond","oreRedstone","blockIron","blockGold","blockDiamond","blockLapis","blockRedstone","cloth_0","cloth_1","cloth_2","cloth_3","cloth_4","cloth_5","cloth_6","cloth_7","cloth_8","cloth_9","cloth_10","cloth_11","cloth_12","cloth_13","cloth_14","cloth_15"};
private static final TileEntity TE = new TileEntityMegaBlock();
public ItemBlockMegaBlock(int par1) {

	super(par1);
	this.setMaxDamage(33);
	this.setHasSubtypes(true);
}
@SideOnly(Side.CLIENT)

public Icon getIconFromDamage(int par1) //Gets the texture
{		 
	     this.TE.blockMetadata=par1;
         return YellowMech.MegaBlock.getIcon(2, this.TE.blockMetadata);
}
public int getMetadata(int par1) //Returns the metadata value
{
         return this.TE.blockMetadata;
}
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10){

        if (par7 == 0)
        {
            --par5;
        }

        if (par7 == 1)
        {
            ++par5;
        }

        if (par7 == 2)
        {
            --par6;
        }

        if (par7 == 3)
        {
            ++par6;
        }

        if (par7 == 4)
        {
            --par4;
        }
        if (par7 == 5){
        	++par4;
        }
        int x=par4, y=par5, z=par6;
        this.TE.blockMetadata = par1ItemStack.getItemDamage();
	par3World.setBlock(x, y, z, this.getBlockID());
	par3World.setBlockTileEntity(x, y, z, this.TE);
	par3World.getBlockTileEntity(x, y, z).blockMetadata=this.TE.blockMetadata;
	par3World.getBlockTileEntity(x,y,z).blockMetadata=this.TE.blockMetadata;
	System.out.println("Placed? meta = "+this.TE.blockMetadata+"Block Meta = "+par3World.getBlockTileEntity(x,y,z).blockMetadata);
        if (par1ItemStack.stackSize == 0)
        {
            return false;
        }
        else if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack))
        {
            return false;
        }
	return true;
}
    public int damageDropped(int par1)
    {
        return this.TE.blockMetadata;
    }
public String getItemNameIS(ItemStack is) //Get's the item incode name from an itemstack
{
			this.TE.blockMetadata=is.getItemDamage();
         return "YellowMech." + this.IconNames[is.getItemDamage()];
}
}

 

Block.

 

package com.yofungate.mods.YellowMech.misc;

import java.util.List;
import java.util.Random;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class BlockMegaBlock extends BlockContainer{
private static TileEntity TE  = new TileEntityMegaBlock();
public static Icon[] IconArray;
public BlockMegaBlock(int par1) {
	super(par1, Material.ground);
	this.setBlockBounds(0.30F, 0.30F, 0.30F, 0.70F, 0.70F, 0.70F);

}
public boolean hasTileEntity(int meta){
	return true;
}
public TileEntity createNewTileEntity(World world) {
	this.TE.blockMetadata = 9;
    	System.out.println("Block Method Recieved. Meta = "+this.TE.blockMetadata);
	return new TileEntityMegaBlock();
}
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
	this.setBlockBounds(0.30F, 0.30F, 0.30F, 0.70F, 0.70F, 0.70F);
	float miX,miY,miZ,maX,maY,maZ;
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2-1, par3, par4)){
			this.setBlockBounds(0, miY, miZ, maX, maY, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2+1, par3, par4)){
			this.setBlockBounds(miX, miY, miZ, 1, maY, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2, par3-1, par4)){
			this.setBlockBounds(miX, 0, miZ, maX, maY, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2, par3+1, par4)){
			this.setBlockBounds(miX, miY, miZ, maX, 1, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2, par3, par4-1)){
			this.setBlockBounds(miX, miY, 0, maX, maY, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2, par3, par4+1)){
			this.setBlockBounds(miX, miY, miZ, maX, maY, 1);
		}
    }
    public void func_82541_d(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
	this.setBlockBounds(0.30F, 0.30F, 0.30F, 0.70F, 0.70F, 0.70F);
	float miX,miY,miZ,maX,maY,maZ;
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2-1, par3, par4)){
			this.setBlockBounds(0, miY, miZ, maX, maY, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2+1, par3, par4)){
			this.setBlockBounds(miX, miY, miZ, 1, maY, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2, par3-1, par4)){
			this.setBlockBounds(miX, 0, miZ, maX, maY, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2, par3+1, par4)){
			this.setBlockBounds(miX, miY, miZ, maX, 1, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2, par3, par4-1)){
			this.setBlockBounds(miX, miY, 0, maX, maY, maZ);
		}
	miX = (float)this.getBlockBoundsMinX();miY = (float)this.getBlockBoundsMinY();miZ = (float)this.getBlockBoundsMinZ();maX = (float)this.getBlockBoundsMaxX();maY = (float)this.getBlockBoundsMaxY();maZ = (float)this.getBlockBoundsMaxZ();
		if(!par1IBlockAccess.isAirBlock(par2, par3, par4+1)){
			this.setBlockBounds(miX, miY, miZ, maX, maY, 1);
		}
    }
    public void setBlockBoundsForItemRender()
    {
        	this.setBlockBounds(0.30F, 0.30F, 0.30F, 0.70F, 0.70F, 0.70F);
    }
public boolean isOpaqueCube()
{
	 return false;
}
public void registerIcons(IconRegister par1IconRegister)
    {
	this.IconArray = new Icon[itemBlockMegaBlock.IconNames.length];
	for(int i=0;i<ItemBlockMegaBlock.IconNames.length;i++){
		this.IconArray[i] = par1IconRegister.registerIcon(ItemBlockMegaBlock.IconNames[i]); 
	}
    }
 public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
	 try{
        return this.getIcon(par5, par1IBlockAccess.getBlockTileEntity(par2,par3,par4).blockMetadata);
	 }catch(Exception e){
		return this.getIcon(par5, 0);
	 }
	}
public Icon getIcon(int par1, int par2)
{
	return this.IconArray[par2];
    }
public int idDropped(int par1, Random par2Random, int par3)
    {
	return this.blockID;
    }
public int quantityDropped(Random par1Random)
    {
        return 1;
    } 
public int damageDropped(int i){ //Tells it what block it drops and also for creative mode pick block
	return this.TE.blockMetadata;
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) //Adds the metadata blocks to the creative inventory
{
	for(int i=0;i<ItemBlockMegaBlock.IconNames.length;i++){
		par3List.add(new ItemStack(par1, 1, i));
	}
}
}

 

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Could you send a screenshot of your weapon code? Here is the one I made (for a dagger): protected static final double DAGGER_REACH_MOD = -1.5D; protected final Multimap<Attribute, AttributeModifier> defaultModifiers;     public DaggerItem(Tier pTier, int pAttackDamageModifier, float pAttackSpeedModifier, Properties pProperties) {         super(pTier, pAttackDamageModifier, pAttackSpeedModifier, pProperties);         this.attackDamage = (float) pAttackDamageModifier + pTier.getAttackDamageBonus();         ImmutableMultimap.Builder<Attribute, AttributeModifier> builder = ImmutableMultimap.builder();         builder.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Weapon modifier", this.attackDamage, AttributeModifier.Operation.ADDITION));         builder.put(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_UUID, "Weapon modifier", pAttackSpeedModifier, AttributeModifier.Operation.ADDITION));         builder.put(ForgeMod.ENTITY_REACH.get(), new AttributeModifier(ToolUtils.BASE_ATTACK_REACH_UUID, "Weapon modifier", DAGGER_REACH_MOD, AttributeModifier.Operation.ADDITION));         this.defaultModifiers = builder.build(); } @Override     public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot pEquipmentSlot) {         return pEquipmentSlot == EquipmentSlot.MAINHAND ? this.defaultModifiers : super.getDefaultAttributeModifiers(pEquipmentSlot);     }
    • https://images.app.goo.gl/1PxFKdxByTgkxvSu6
    • That's what we'll try out. I could never figure out how to recreate the crash, so I'll just have to wait and see.
    • Ok, I updated to the latest version and now the models are visible, the problem now is that the glowing eyes are not rendered nor any texture I render there when using shaders, even using the default Minecraft eyes RenderType, I use entityTranslucent and entityCutout, but it still won't render. Something I noticed when using shaders is that a texture, instead of appearing at the world position, would appear somewhere on the screen, following a curved path, it was strange, I haven't been able to reproduce it again. I thought it could be that since I render the texture in the AFTER ENTITIES stage which is posted after the batches used for entity rendering are finished, maybe that was the reason why the render types were not being drawn correctly, so I tried injecting code before finishing the batches but it still didn't work, plus the model was invisible when using shaders, there was a bug where if I look at the model from above it is visible but if I look at it from below it is invisible. So in summary, models are now visible but glowing eyes and textures are not rendered, that hasn't changed.
    • https://pastebin.com/99FA0zvK Attempting to run genIntellijRuns, this task fails with pasted error. IntelliJ IDEA 2024.3 (Community Edition) eclipse_adoptium-21-x86_64-os_x.2/jdk-21.0.6+7 Steps followed: Step 1: Open your command-line and browse to the folder where you extracted the zip file. Step 2: You're left with a choice. If you prefer to use Eclipse: 1. Run the following command: `./gradlew genEclipseRuns` 2. Open Eclipse, Import > Existing Gradle Project > Select Folder    or run `gradlew eclipse` to generate the project. If you prefer to use IntelliJ: 1. Open IDEA, and import project. 2. Select your build.gradle file and have it import. 3. Run the following command: `./gradlew genIntellijRuns` 4. Refresh the Gradle Project in IDEA if required.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.