Topic category: Help with Minecraft modding (Java Edition)
So I made a custom mob in blockbench 3.8.4 and made it in Modded Entity format and added it in java class format to Mcreator 2021.1 and this mob's hitbox is quite small for it and I would like to expand and enlarge it, but I don't know how. Someone help? The .java file I downloaded has:
// Made with Blockbench 3.8.4
// Exported for Minecraft version 1.15 - 1.16
// Paste this class into your mod and generate all required imports
public class heavy_carrier extends EntityModel<Entity> {
private final ModelRenderer body1;
private final ModelRenderer body2;
private final ModelRenderer body3;
private final ModelRenderer body4;
private final ModelRenderer body5;
private final ModelRenderer body6;
private final ModelRenderer leg1;
private final ModelRenderer leg2;
private final ModelRenderer leg3;
public heavy_carrier() {
textureWidth = 256;
textureHeight = 256;
body1 = new ModelRenderer(this);
body1.setRotationPoint(0.0F, 24.0F, 0.0F);
body1.setTextureOffset(0, 0).addBox(-32.0F, -65.0F, -26.0F, 29.0F, 29.0F, 29.0F, 0.0F, false);
body2 = new ModelRenderer(this);
body2.setRotationPoint(0.0F, 24.0F, 0.0F);
body2.setTextureOffset(95, 37).addBox(-3.0F, -54.0F, -17.0F, 21.0F, 21.0F, 21.0F, 0.0F, false);
body3 = new ModelRenderer(this);
body3.setRotationPoint(0.0F, 24.0F, 0.0F);
body3.setTextureOffset(0, 58).addBox(-23.0F, -36.0F, -23.0F, 24.0F, 24.0F, 24.0F, 0.0F, false);
body4 = new ModelRenderer(this);
body4.setRotationPoint(0.0F, 24.0F, 0.0F);
body4.setTextureOffset(116, 0).addBox(1.0F, -33.0F, -16.0F, 15.0F, 15.0F, 15.0F, 0.0F, false);
body5 = new ModelRenderer(this);
body5.setRotationPoint(0.0F, 24.0F, 0.0F);
body5.setTextureOffset(79, 89).addBox(-20.0F, -47.0F, -1.0F, 27.0F, 27.0F, 17.0F, 0.0F, false);
body6 = new ModelRenderer(this);
body6.setRotationPoint(0.0F, 24.0F, 0.0F);
body6.setTextureOffset(0, 106).addBox(-25.0F, -58.0F, -1.0F, 18.0F, 18.0F, 18.0F, 0.0F, false);
leg1 = new ModelRenderer(this);
leg1.setRotationPoint(0.0F, 24.0F, 0.0F);
leg1.setTextureOffset(0, 0).addBox(-10.0F, -16.0F, -14.0F, 7.0F, 16.0F, 7.0F, 0.0F, false);
leg2 = new ModelRenderer(this);
leg2.setRotationPoint(0.0F, 24.0F, 0.0F);
leg2.setTextureOffset(63, 133).addBox(2.0F, -22.0F, -13.0F, 9.0F, 22.0F, 9.0F, 0.0F, false);
leg3 = new ModelRenderer(this);
leg3.setRotationPoint(0.0F, 24.0F, 0.0F);
leg3.setTextureOffset(99, 133).addBox(-3.0F, -24.0F, 3.0F, 8.0F, 24.0F, 8.0F, 0.0F, false);
}
@Override
public void setRotationAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){
//previously the render function, render code was moved to a method below
}
@Override
public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){
body1.render(matrixStack, buffer, packedLight, packedOverlay);
body2.render(matrixStack, buffer, packedLight, packedOverlay);
body3.render(matrixStack, buffer, packedLight, packedOverlay);
body4.render(matrixStack, buffer, packedLight, packedOverlay);
body5.render(matrixStack, buffer, packedLight, packedOverlay);
body6.render(matrixStack, buffer, packedLight, packedOverlay);
leg1.render(matrixStack, buffer, packedLight, packedOverlay);
leg2.render(matrixStack, buffer, packedLight, packedOverlay);
leg3.render(matrixStack, buffer, packedLight, packedOverlay);
and the .json mob file that was called "heavyCarrier.mod" that I found in C: \ Users \ Peterr703333 \ MCreatorWorkspaces \ modname__for_now \ elements have: {
{
"_fv": 18,
"_type": "mob",
"definition": {
"mobName": "Heavy Carrier",
"mobLabel": "",
"mobModelName": "Modelheavy_carrier",
"mobModelTexture": "texture3.png",
"mobModelGlowTexture": "",
"modelWidth": 0.6,
"modelHeight": 1.8,
"modelShadowSize": 0.5,
"mountedYOffset": 0.0,
"hasSpawnEgg": true,
"spawnEggBaseColor": {
"value": -13434880,
"falpha": 0.0
},
"spawnEggDotColor": {
"value": -10092544,
"falpha": 0.0
},
"creativeTab": {
"value": "MISC"
},
"isBoss": false,
"bossBarColor": "PINK",
"bossBarType": "PROGRESS",
"equipmentMainHand": {
"value": ""
},
"equipmentOffHand": {
"value": ""
},
"equipmentHelmet": {
"value": ""
},
"equipmentBody": {
"value": ""
},
"equipmentLeggings": {
"value": ""
},
"equipmentBoots": {
"value": ""
},
"mobBehaviourType": "Mob",
"mobCreatureType": "UNDEFINED",
"attackStrength": 3,
"attackKnockback": 0.0,
"knockbackResistance": 0.0,
"movementSpeed": 0.2,
"armorBaseValue": 0.5,
"trackingRange": 64,
"health": 17,
"xpAmount": 5,
"waterMob": false,
"flyingMob": false,
"guiBoundTo": "<NONE>",
"inventorySize": 9,
"inventoryStackSize": 64,
"disableCollisions": false,
"ridable": false,
"canControlForward": false,
"canControlStrafe": false,
"immuneToFire": false,
"immuneToArrows": false,
"immuneToFallDamage": false,
"immuneToCactus": false,
"immuneToDrowning": false,
"immuneToLightning": false,
"immuneToPotions": false,
"immuneToPlayer": false,
"immuneToExplosion": false,
"immuneToTrident": false,
"immuneToAnvil": false,
"immuneToWither": false,
"immuneToDragonBreath": false,
"mobDrop": {
"value": "CUSTOM:Tooth"
},
"livingSound": {
"value": "CUSTOM:heavycarrierrliving"
},
"hurtSound": {
"value": "CUSTOM:heavycarrierhurts"
},
"deathSound": {
"value": "CUSTOM:heavycarrierdeathandexplodessamesound"
},
"stepSound": {
"value": "CUSTOM:heavycarriersteps"
},
"spawnParticles": false,
"particleToSpawn": {
"value": "EXPLOSION_NORMAL"
},
"particleSpawningShape": "Spread",
"particleSpawningRadious": 0.5,
"particleAmount": 4,
"onPlayerCollidesWith": {
"name": "HeavyCarrierPlayerCollidesWithThisEntity"
},
"hasAI": true,
"aiBase": "(none)",
"aixml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"aitasks_container\" deletable=\"false\" x=\"40\" y=\"40\"><next><block type=\"attack_on_collide\"><field name=\"speed\">1.2</field><field name=\"longmemory\">FALSE</field><field name=\"condition\">null,null</field><next><block type=\"wander\"><field name=\"speed\">1</field><field name=\"condition\">null,null</field><next><block type=\"attack_action\"><field name=\"callhelp\">FALSE</field><field name=\"condition\">null,null</field><next><block type=\"look_around\"><field name=\"condition\">null,null</field><next><block type=\"swim_in_water\"><field name=\"condition\">null,null</field></block></next></block></next></block></next></block></next></block></next></block></xml>",
"breedable": false,
"tameable": false,
"breedTriggerItems": [],
"ranged": false,
"rangedAttackItem": {
"value": ""
},
"rangedItemType": "Default item",
"spawnThisMob": true,
"doesDespawnWhenIdle": true,
"spawningProbability": 5,
"mobSpawningType": "monster",
"minNumberOfMobsPerGroup": 1,
"maxNumberOfMobsPerGroup": 1,
"restrictionBiomes": [
{
"value": "CUSTOM:SandDunes"
}
],
"spawnInDungeons": false
}
}
You need to increase bounding box in MCreator entity editor
Where is MCreator entity editor? Sorry but i cannot find it
The entity editor is when you click on the mob in MCreator and are in the settings.