• 0

    posted a message on Custom mob help

    Post your github repo, or at least whole entity code and code related to this entity

    Posted in: Modification Development
  • 0

    posted a message on Weird entity behaviour

    Hello, I created driveable vehicle, but when I'm driving the vehicle sometimes randomly teleports few blocks away and sometimes completely loses it's motion. Also I've written some code to allow driving to higher placed blocks and it's sometimes glitchy too... So I'm looking for some entity experts here who could help me.


    Entity Registration:


    	@SubscribeEvent
    	public static void register(RegistryEvent.Register<EntityEntry> e)
    	{
    		final EntityEntry[] entries = 
    		{
    			registerEntity("bullet", EntityBullet.class, 64, 80, true),
    			registerEntity("grenade", EntityGrenade.class, 64, 20, true),
    			registerEntity("smoke", EntitySmokeGrenade.class, 64, 20, true),
    			registerEntity("molotov", EntityMolotov.class, 64, 20, true),
    			registerEntity("flare", EntityFlare.class, 64, 80, true),
    			registerEntity("parachute", EntityParachute.class, 256, 1, true),
    			registerEntity("testVehicle", EntityTestVehicle.class, 256, 30, true)
    		};
    		
    		e.getRegistry().registerAll(entries);
    	}
    	
    	private static EntityEntry registerEntity(String name, Class<? extends Entity> entityClass, int trackingRange, int updateFrequency, boolean sendVelocityUpdates)
    	{
    		return createEntityBuilder(name).entity(entityClass).tracker(trackingRange, updateFrequency, sendVelocityUpdates).build();
    	}
    	
    	private static EntityEntry registerEntity(String name, Class<? extends Entity> entityClass, int trackingRange, int updateFrequency, boolean sendVelocityUpdates, int eggPrimary, int eggSecondary)
    	{
    		return createEntityBuilder(name).entity(entityClass).tracker(trackingRange, updateFrequency, sendVelocityUpdates).egg(eggPrimary, eggSecondary).build();
    	}
    	
    	private static <E extends Entity> EntityEntryBuilder<E> createEntityBuilder(String name)
    	{
    		EntityEntryBuilder<E> builder = EntityEntryBuilder.create();
    		ResourceLocation regName = new ResourceLocation(Pubgmc.MOD_ID, name);
    		return builder.id(regName, nextID()).name(regName.toString());
    	}
    	
    	private static int nextID()
    	{
    		ID++;
    		return ID;
    	}




    The entity class:

    import com.toma.pubgmc.common.entity.vehicles.EntityTestVehicle;
    import com.toma.pubgmc.init.PMCDamageSources;
    
    import net.minecraft.block.Block;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.MoverType;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.util.DamageSource;
    import net.minecraft.util.EnumHand;
    import net.minecraft.util.SoundEvent;
    import net.minecraft.util.math.AxisAlignedBB;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.util.math.RayTraceResult;
    import net.minecraft.util.math.RayTraceResult.Type;
    import net.minecraft.util.math.Vec3d;
    import net.minecraft.world.World;
    
    public class EntityVehicle extends Entity
    {
     private static final AxisAlignedBB BOX = new AxisAlignedBB(-0.5d, 0d, -0.5d, 1.5d, 1d, 1.5d);
     private static final float MAX_TURNING_MODIFIER = 2.0F;
     
     public int vehicleID;
     
     private boolean isWaterVehicle;
     
     /** The max damage vehicle can take before it explodes **/
     private float maxHealth;
     
     private float health;
     
     /** Acceleration speed **/
     private float acceleration;
     
     /** The max speed vehicle will be able to do **/
     private float maxSpeed;
     
     private float currentSpeed;
     
     /** How well will the vehicle drive on different surfaces **/
     private float turnModifier;
     
     /** The amount of fuel vehicle can take **/
     private float maxFuel;
     
     private float fuel;
     
     private boolean randomFuelLevel = true;
     
     /** If the vehicle is broken or not **/
     private boolean isBroken = false;
     
     private int timeInInvalidState;
     
     /** Handles inputs from player who is driving the vehicle **/
     private boolean inputForward, inputBack, inputRight, inputLeft, inputBoost;
     
     private SoundEvent driving_sound, braking_sound;
     
     public EntityVehicle(World world)
     {
     super(world);
     setSize(1f, 1f);
     preventEntitySpawning = true;
     }
     
     public EntityVehicle(World world, int x, int y, int z, boolean waterVehicle)
     {
     this(world);
     setPosition(x, y, z);
     setHealth(maxHealth);
     if(randomFuelLevel) setFuelLevel(rand.nextFloat() * maxFuel);
     else setFuelLevel(maxFuel);
     }
     
     protected void handleVehicle()
     {
     Vec3d vec = this.getLookVec();
     
     handleAcceleration();
     handleBraking();
     handleTurning();
     
     if(isVehicleMoving() && !inputForward && !inputBack)
     {
     if(isVehicleMovingForward())
     {
     if(currentSpeed > 0.02f)
     {
     currentSpeed -= 0.01f;
     }
     
     else currentSpeed = 0f;
     }
     
     else if(isVehicleMovingBackward())
     {
     if(currentSpeed < -0.02f)
     {
     currentSpeed += 0.01f;
     }
     
     else currentSpeed = 0;
     }
     }
     
     if(!inputRight && !inputLeft)
     {
     if(turnModifier != 0f)
     {
     if(turnModifier > 0f)
     {
     if(turnModifier > 0.2f)
     {
     turnModifier -= 0.2f;
     }
     
     else turnModifier = 0f;
     }
     
     else if(turnModifier < 0f)
     {
     if(turnModifier < -0.2f)
     {
     turnModifier += 0.2f;
     }
     
     else turnModifier = 0f;
     }
     }
     }
     
     motionX = (vec.x * currentSpeed) / 10;
     motionZ = (vec.z * currentSpeed) / 10;
     
     move(MoverType.SELF, motionX, motionY, motionZ);
     }
     
     @Override
     public void onUpdate() 
     {
     if(!this.isBeingRidden())
     {
     if(inputForward || inputBack || inputRight || inputLeft || inputBoost)
     {
     inputForward = false;
     inputBack = false;
     inputRight = false;
     inputLeft = false;
     inputBoost = false;
     }
     }
     
     handleVehicleBreaking();
    
     if(!isBroken)
     {
     checkSteps();
     handleVehicle();
     }
     
     if(!onGround)
     {
     motionY = -0.3d;
     }
     
     //Handling vehicle collisions with blocks to apply collision damage to passengers
     if(currentSpeed > 0 && (motionX == 0 || motionZ == 0))
     {
     if(currentSpeed > 1f)
     {
     for(Entity e : this.getPassengers())
     {
     e.attackEntityFrom(PMCDamageSources.VEHICLE, currentSpeed);
     }
     
     this.health -= currentSpeed * 2.5f;
     }
    
     currentSpeed = 0f;
     }
     
     move(MoverType.SELF, motionX, motionY, motionZ);
     super.onUpdate();
     }
     
     @Override
     public boolean attackEntityFrom(DamageSource source, float amount) 
     {
     health -= amount;
    
     return true;
     }
     
     private void checkSteps()
     {
     Vec3d vec1 = new Vec3d(posX, posY, posZ);
     Vec3d lookVec = getLookVec();
     Vec3d vec2 = new Vec3d(posX + lookVec.x * 2, posY + lookVec.y * 2, posZ + lookVec.z * 2);
     RayTraceResult trace = world.rayTraceBlocks(vec1, vec2, false, true, false);
    
     if(trace != null)
     {
     if(trace.typeOfHit == Type.BLOCK)
     {
     BlockPos potentialCollision = new BlockPos(trace.getBlockPos().getX(), trace.getBlockPos().getY(), trace.getBlockPos().getZ());
     Block block = world.getBlockState(potentialCollision).getBlock();
     
     if(!block.isReplaceable(world, potentialCollision))
     {
     if(world.isAirBlock(new BlockPos(potentialCollision.getX(), potentialCollision.getY()+1, potentialCollision.getZ())))
     {
     setPosition(posX, posY + 1, posZ);
     }
     }
     }
     
     else if(trace.typeOfHit == Type.ENTITY)
     {
     Entity e = trace.entityHit;
     
     if(e.isEntityAlive() && !e.getIsInvulnerable())
     {
     e.motionX += motionX * currentSpeed;
     e.motionY += motionY * currentSpeed;
     e.motionZ += motionZ * currentSpeed;
     e.attackEntityFrom(PMCDamageSources.VEHICLE, currentSpeed * 2.5f);
     }
     }
     }
     }
     
     private void handleAcceleration()
     {
     if(inputForward && !inputBack)
     {
     if(currentSpeed < maxSpeed)
     {
     currentSpeed += 0.1f;
     }
     }
     
     else
     {
     if(currentSpeed > 0)
     {
     currentSpeed -= 0.01f;
     }
     }
     }
     
     private void handleTurning()
     {
     if(turnModifier > MAX_TURNING_MODIFIER)
     {
     turnModifier = MAX_TURNING_MODIFIER;
     }
     
     if(turnModifier < -MAX_TURNING_MODIFIER)
     {
     turnModifier = -MAX_TURNING_MODIFIER;
     }
     
     
     if(isVehicleMovingBackward())
     {
     if(inputRight && !inputLeft && turnModifier < MAX_TURNING_MODIFIER)
     {
     turnModifier -= 0.2f;
     }
     
     if(inputLeft && !inputRight && turnModifier > -MAX_TURNING_MODIFIER)
     {
     turnModifier += 0.2f;
     }
     }
     
     else if(isVehicleMoving())
     {
     if(inputRight && !inputLeft && turnModifier < MAX_TURNING_MODIFIER)
     {
     turnModifier += 0.2f;
     }
     
     if(inputLeft && !inputRight && turnModifier > -MAX_TURNING_MODIFIER)
     {
     turnModifier -= 0.2f;
     }
     }
     
     if(!inputLeft && !inputRight && turnModifier != 0f)
     {
     if(turnModifier > 0 && turnModifier > -MAX_TURNING_MODIFIER)
     {
     turnModifier -= 0.1f;
     }
     
     else turnModifier += 0.1f;
     }
     
     if(this.isVehicleMoving())
     {
     this.rotationYaw += turnModifier;
     }
     }
     
     private void handleBraking()
     {
     if(inputBack && !inputForward)
     {
     if(isVehicleMovingForward())
     {
     currentSpeed -= 0.1f;
     }
     
     if(currentSpeed <= 0 && currentSpeed > (-maxSpeed / 4))
     {
     //reverse mode
     currentSpeed -= 0.05f;
     }
     }
     }
     
     private void handleVehicleBreaking()
     {
     if(timeInInvalidState >= 100)
     {
     isBroken = true;
     }
     
     if(health <= 0 && isAddedToWorld()) 
     {
     explode();
     }
     
     if(!isWaterVehicle)
     {
     if(isInWater() || isInLava())
     {
     timeInInvalidState++;
     }
     
     else if(timeInInvalidState > 0)
     {
     timeInInvalidState--;
     }
     }
     
     else
     {
     if(!isInWater() || isInLava())
     {
     timeInInvalidState++;
     }
     
     else if(timeInInvalidState > 0)
     {
     timeInInvalidState--;
     }
     }
     
     if(isInLava())
     {
     explode();
     }
     
     if(isBroken)
     {
     if(motionX != 0)
     {
     motionX *= 0.9d;
     }
     
     if(motionZ != 0)
     {
     motionZ *= 0.9d;
     }
     }
     }
     
     @Override
     public boolean processInitialInteract(EntityPlayer player, EnumHand hand)
     {
     if(!world.isRemote)
     {
     if(this.canBeRidden(player))
     {
     player.startRiding(this);
     }
     }
     
     return true;
     }
     
     private void explode()
     {
     if(!world.isRemote)
     {
     this.world.createExplosion(this, posX, posY, posZ, 3f, false);
     this.setDead();
     }
     }
     
     //TODO remove
     @Override
     public void applyEntityCollision(Entity entityIn) 
     {
     if(currentSpeed >= 3f)
     {
     entityIn.attackEntityFrom(PMCDamageSources.VEHICLE, currentSpeed * 2.5f);
     
     entityIn.motionX = this.motionX;
     entityIn.motionY = this.motionY * 1.5d;
     entityIn.motionZ = this.motionZ;
     }
     }
     
     public void handleInputs(boolean forward, boolean back, boolean right, boolean left, boolean boost, EntityPlayer player)
     {
     if(isPlayerDriver(player))
     {
     this.inputForward = forward;
     this.inputBack = back;
     this.inputLeft = left;
     this.inputRight = right;
     this.inputBoost = boost;
     }
     }
     
     @Override
     protected void doBlockCollisions()
     {
     super.doBlockCollisions();
     }
     
     @Override
     public void onCollideWithPlayer(EntityPlayer entityIn)
     {
     if(this.isVehicleMoving() && entityIn.getRidingEntity() != this)
     {
     entityIn.attackEntityFrom(PMCDamageSources.VEHICLE, currentSpeed * 2.5f);
    
     entityIn.motionY = currentSpeed / 5;
     entityIn.motionX = this.motionX * currentSpeed * 20;
     entityIn.motionZ = this.motionZ * currentSpeed * 20;
     }
     }
     
     @Override
     public boolean isInRangeToRenderDist(double distance) 
     {
     return true;
     }
     
     public boolean isPlayerDriver(EntityPlayer player)
     {
     return player.isRiding() && player.getRidingEntity() instanceof EntityVehicle && player.getRidingEntity().getPassengers().get(0) == player;
     }
     
     private boolean isVehicleMoving()
     {
     return currentSpeed != 0;
     }
     
     private boolean isVehicleMovingForward()
     {
     return currentSpeed > 0;
     }
     
     private boolean isVehicleMovingBackward()
     {
     return currentSpeed < 0;
     }
     
     @Override
     protected void entityInit() 
     {
     }
     
     @Override
     protected void readEntityFromNBT(NBTTagCompound compound)
     {
     posX = compound.getDouble("posX");
     posY = compound.getDouble("posY");
     posZ = compound.getDouble("posZ");
     motionX = compound.getDouble("motionX");
     motionY = compound.getDouble("motionY");
     motionZ = compound.getDouble("motionZ");
     health = compound.getFloat("health");
     fuel = compound.getFloat("fuel");
     currentSpeed = compound.getFloat("speed");
     isBroken = compound.getBoolean("isBroken");
     }
     
     @Override
     protected void writeEntityToNBT(NBTTagCompound compound) 
     {
     compound.setDouble("posX", this.posX);
     compound.setDouble("posY", this.posY);
     compound.setDouble("posZ", this.posZ);
     compound.setDouble("motionX", this.motionX);
     compound.setDouble("motionY", this.motionY);
     compound.setDouble("motionZ", this.motionZ);
     compound.setFloat("health", this.health);
     compound.setFloat("fuel", this.fuel);
     compound.setFloat("speed", this.currentSpeed);
     compound.setBoolean("isBroken", this.isBroken);
     }
     
     @Override
     public boolean canBeCollidedWith()
     {
     return true;
     }
     
     public boolean isBroken()
     {
     return isBroken;
     }
     
     public boolean hasFuel()
     {
     return fuel > 0f;
     }
     
     public void setHealth(float health)
     {
     this.health = health;
     }
     
     public void setFuelLevel(float fuel)
     {
     this.fuel = fuel;
     }
     
     public void setMaxHealth(float maxHealth)
     {
     this.maxHealth = maxHealth;
     }
     
     public void setMaxFuel(float fuel)
     {
     this.maxFuel = fuel;
     }
     
     public void setHasRandomFuelLevel(boolean fuelLevel)
     {
     this.randomFuelLevel = fuelLevel;
     }
     
     public boolean getHasRandomFuelLevel()
     {
     return randomFuelLevel;
     }
     
     public void setMaxSpeed(float maxSpeed)
     {
     this.maxSpeed = maxSpeed;
     }
     
     public void setWaterVehicle(boolean waterVehicle)
     {
     this.isWaterVehicle = waterVehicle;
     }
     
     public void setVehicleID(int id)
     {
     this.vehicleID = id;
     }
     
     public int getVehicleID()
     {
     return vehicleID;
     }
     
     public boolean isWaterVehicle()
     {
     return isWaterVehicle;
     }
     
     public float getTurnModifier()
     {
     return turnModifier;
     }
     
     public float getMaxHelth()
     {
     return maxHealth;
     }
     
     public static EntityVehicle getVehicleByID(int id, World world, BlockPos pos)
     {
     switch(id)
     {
     case 0: return new EntityTestVehicle(world, pos.getX(), pos.getY() + 1.5, pos.getZ());
     default: return null;
     }
     }
    }

    If you need more information, you can check my GitHub

    Posted in: Modification Development
  • 0

    posted a message on How do I get my mod to auto update?

    Try looking at the Forge's built in update checker

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Calculate size of worldborder based on zone center and map center?

    Okay, I have managed to solve this. Having 2 corners of the zone lined with 2 corners of the map didn't make sense at all (I think), so now I always have one side of the zone lined with one side of the map. For anyone interested into the code, you can check the GitHub Link (code related to this is inside the startGame() function

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Calculate size of worldborder based on zone center and map center?

    No, I meant it this way:

    - I have BlockPos as a map center + size parameter

    - Based on these parameters Minecraft calculates random border center


    If the border center would be in the map center for example [x = 0, z = 0] and map size from center to side of the map would be 100, I would have the border size cover all 4 corners of the map since it's in the center. But since the border center won't be in the map center, it would cut 2 corners of the map (with border size 100), so I smh need to calculate the distance of the border center to map center and add it to the border size.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Calculate size of worldborder based on zone center and map center?

    Hello everyone, I'm attempting to create shrinking zone system (like pubg and other BRs). I'm working on way to control it throught commands and in order to save it all I've made capability just for that. It all works fine.

    When creating the map you have to specify the map center and map size. When you run command to start the game, center of world border is calculated based on these values. But I need to have dynamic size of the world border to prevent it blocking some parts of the map. I have tried few things, but nothing was precise. So I am asking the Minecraft community if somebody is more experienced with all this maths stuff to help me with this. I want to be able to have always 2 sides of the map inside the border (I know I can't have all on square map with offset world border - so the other 2 sides of the border will be longer than the map size, but that doesn't matter).

    So what I have tried:


    The code

    Posted in: Modification Development
  • 0

    posted a message on Command Not Registering?

    In your main class try using the FMLServerStartingEvent for registering commands

    Posted in: Modification Development
  • 0

    posted a message on [Solved] Block Gui doesn't show the name on the top

    You should always use the @Override annotation when overriding methods. Try using that, if there are some mistakes it will help you locate them

    Posted in: Modification Development
  • 0

    posted a message on Add item to player's inventory or drop item if there is no more room.

    Use the method from EntityPlayer class - addItemStackToInventory

    Posted in: Modification Development
  • 0

    posted a message on Battle Royale in Minecraft - The PUBGMC Mod

    This mod has been inspired by popular battle royale game - PUBG. In this mod I will try to remake the game into Minecraft.


    Download the mod from curse: All versions are HERE


    MAIN FEATURES:

    Weapons with attachments

    Airdrops

    Healing items like Medkits, first aid kits

    Booster items - energy drinks

    Boost system - this allows you to gain health and speed boost

    Loot generator blocks

    Backpacks - you can use them to unlock more slots in inventory

    Inventory limit - unlockable with backpacks

    Players drop crates with their items on death

    Different levels of armor

    Ghillie suit

    Flare guns to call airdrops

    Grenades

    Parachutes

    Crafting system for most items

    Some props like fences to make your map feel better

    Config - see below

    Config (located in .minecraft/config/pubgmc.cfg)


    In this file you can configure/turn off some features which you don't want to use

    You have to use true/false in fields which have [default: true/false]

    If you're supposed to fill in numbers, there's always defined range for the number

    Example:


    # [1]Loot render style inside loot generators; 0 = Off, 1 = Fast render, 2 = Fancy render [[2]range: 0 ~ 2, default: 2 [3]]
    B:"Render loot inside loot spawners"=2[4]


    [1] - There is always located simple description what you're changing

    [2] - This is the range for the number you can fill into [4]field. This number must be 0,1 or 2!

    [3] - Default value set by me

    [4] - This is the number you're going to change


    Loot spawning:


    Loot doesn't generate by itself, you have to run /loot generate command.

    Loot will be generated ONLY INSIDE LOADED loot spawners!

    Loot gen customization:


    /loot generate > this will use default gen function and that means all weapons except airdrop ones, ammo, healing etc.

    If you want to have loot generated with airdrop weapons simply use /loot generate airdrop


    Just in case you want to play with one type of weapons you can use

    /loot generate pistol|shotgun|smg|ar|dmr|bolt_action|sniper - sniper generates both DMRs and Bolt Action sniper rifles


    To clear loot use /loot clear - this will remove all items from loot spawners



    /loot debug

    This command will fill all loaded loot spawners with items to make it easy for you to spot where is loot spawner located when you want to remove loot spawners.

    This command has no purpose for you if you have turned off loot rendering!


    Weapons

    - LMB >> Shoot

    - RMB >> ADS/Scope

    - R >> Reload

    - B >> Change Firemode

    - P >> Open attachments GUI

    - You craft weapons inside Gun Workbench

    - Not all weapons can take all attachments!

    - 8x and 15x scopes are only for DMRs and Bolt action sniper rifles


    ATTACHMENTS

    To attach something to you weapon you have to press P to open GUI for attachments

    Then put the weapon you want to modify into slot which is located in the centre of the GUI

    Grab attachments you want to add to your weapon and put them into right slots.

    To quickly attach anything to weapon, you can simply shift-click the items and they will be added into right slots

    Be careful because you might lose attachments which are already on weapon when you add another attachment into it's slot. Make sure to always remove them from the gun first.


    Airdrops:

    There are 2 version of airdrop:

    - Regular airdrop - called from /airdrop command.

    - Big airdrop - called from shooting flare straight into the sky

    Loot is automatically generated when the airdrop lands unless you turn this feature off in the config.

    Airdrops always contain top level armor and backpack + rare and powerful weapon + rare attachments and healing items.


    Grenades:

    LMB to throw close

    RMB to throw far

    If you're sprinting when you are throwing, the grenade will gain extra velocity and will fly further

    - HE Grenade - In order to throw this grenade you have to first pull the pin and then throw - this allows you to "cook" the grenade for perfect timing

    Grenades won't deal damage to players when you're playing in PEACEFUL mode!


    - Smoke Grenade - provides temporary cover.

    Water will extinguish the effect!


    - Molotov - Molotovs explode on impact with ground and they will put everything on fire for short period of time.

    Players are also getting extra damage when they stand inside the fire!


    Boost:

    You can gain boost by consuming energy drinks, painkillers or using adrenaline syringes

    While you have boost active you will get 0.5 heart every x seconds.

    When your boost is above 50% you'll also get speed boost + additional 0.5 heart bonus


    Healing:

    There are multiple ways to heal in combat:

    - Bandages

    - First Aid kits

    - Medkits

    To use healing item, you have to hold right mouse button and wait until you consume the healing item. You won't be able to move much while healing.


    Parachutes:

    In this mod you can find parachutes. You have to right click the parachute in order to open it.

    Controls are simple. Look into the direction you want to go.

    To drop down as fast as possible you have to look down under 40 degree angle to gain additional speed boost.

    This is already being reworked into better, more "PUBG" like controls. This will be implemented in next update!


    Mod should be working in multiplayer so invite your friends for even more fun.

    You can now do battles with each other and see who is the best survivor.


    Twitter for some info about updates:

    TWITTER

    Posted in: WIP Mods
  • 0

    posted a message on Could anybody help with this?

    You can simply use one of the Tick Events and add the potion effect you want to player

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] How to change my item model during Runtime

    I'm trying to get this to work too. You need to set TileEntityItemsStackRenderer to the item (client side only). You also need the item to be BakedModel, so try looking at the forge docs about baked models and teisr

    Posted in: Modification Development
  • 0

    posted a message on Adding a custom sound to minecraft not working

    Well I have no experience with 1.8.9 but from what I can tell you're calling the sound method from client only (Minecraft.getMinecraft). Atleast in 1.12.2 there are 3 methods from World to play sound. If they are there, try using them instead. Also you'll have to run it on server to play it to all players. But again, don't take it really seriously I don't know anything about 1.8

    Posted in: Modification Development
  • 0

    posted a message on ModelBase models for items

    Hello, I started working on my mod and I would like to have items in 3D model with some additional rendering on them (like atachments on guns). I can't use default .json system since theres limit on the model size. From my research I've found that there was method from ForgeClient class to register item renderer hovewer that method is gone now. I checked some forge documents on this, but I guess I don't understand them and they expect you to use item blockstates with .json models. So far I have created TileEntityItemStackRenderer and atached it to the items I need to. But now I'm lost and I don't know how to continue.

    Is it even possible to render model base items instead of the json ones? Like somehow detect if player is holding the item and then render it? I've worked a bit with TESR so as long I will be able to use GLStateManager I should be fine.

    Posted in: Modification Development
  • 0

    posted a message on How would one make a guide/book for their mod

    For the start try looking into forge docs for the basic stuff like registering blocks and items. Also if you want to add some functionality to your items/blocks the minecraft source code is good place to look into

    Posted in: Modification Development
  • To post a comment, please or register a new account.