Jump to content

Recommended Posts

Posted

Hello when I run this mod and activate the spawn egg the mob spawns and makes its sound but is invisible and doesnt render

 

BaseMod:

package com.fredtech.tutorial.wuppy;

import java.awt.Color;
import java.util.Map;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
import net.minecraft.src.BaseMod;
import net.minecraft.src.ModLoader;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;

@Mod(modid = Wuppy.modid, name = "Wuppy", version = "1.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Wuppy extends BaseMod {

public static final String modid = "FredTech_Wuppy";

public static Block testBlock;

public static Item testItem;
public static Item blaster;

@Init
public void load(FMLInitializationEvent event){
	testBlock = new TestBlock(500, Material.rock).setUnlocalizedName("testBlock");
	testItem = new TestItem(5000).setUnlocalizedName("testItem");
	blaster = new Blaster(5001).setCreativeTab(CreativeTabs.tabCombat).setUnlocalizedName("blaster");
	EntityRegistry.registerModEntity(Bolt.class, "Bolt", 0,this,256,1,true);
	RenderingRegistry.registerEntityRenderingHandler(Bolt.class, new BoltRenderer());

	ModLoader.registerEntityID(MobTest.class, "TestMob", 31);
	ModLoader.addSpawn("TestMob", 15, -5, 1, EnumCreatureType.creature);
	ModLoader.addLocalization("entity.TestMob.name", "Test Mob");
	EntityList.entityEggs.put(Integer.valueOf(31), new EntityEggInfo(31, 894731, (new Color(21,15,6).getRGB())));


	Register.registerItems();


}

@Override
public String getVersion() {
	// TODO Auto-generated method stub
	return null;
}

@Override
public void load() {


}

@Override
public void addRenderer(Map var1)
{
	var1.put(MobTest.class, new RenderLiving(new ModelMob(),.5f));
}



}

 

Register:

package com.fredtech.tutorial.wuppy;

import java.awt.Color;

import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

public class Register {

public static void registerItems(){

	ItemStack godSword = new ItemStack(Item.swordDiamond);
	godSword.addEnchantment(Enchantment.unbreaking, 10);
	godSword.addEnchantment(Enchantment.smite, 10);
	godSword.addEnchantment(Enchantment.knockback, 2);
	godSword.addEnchantment(Enchantment.looting, 10);
	godSword.addEnchantment(Enchantment.fireAspect, 10);
	godSword.addEnchantment(Enchantment.sharpness, 10);
	godSword.addEnchantment(Enchantment.baneOfArthropods, 10);

	GameRegistry.registerBlock(Wuppy.testBlock, Wuppy.modid+Wuppy.testBlock.getUnlocalizedName2());
	GameRegistry.addShapelessRecipe(new ItemStack(Wuppy.testBlock), new Object[]{
		new ItemStack(Item.diamond, 1), new ItemStack(Block.stone, 1),new ItemStack(Item.dyePowder, 1, 15)
	});
	GameRegistry.addRecipe(new ItemStack(Wuppy.testBlock), new Object[]{
	"XZX",
	"CXC",
	'X', Item.ingotGold, 'C', Block.stone, 'Z', new ItemStack(Item.dyePowder, 1, 15)
	});
	GameRegistry.addRecipe(godSword, new Object[]{
	"  C",
	" B ",
	"A  ",
	'A', Item.stick, 'B', new ItemStack(Item.diamond, 5), 'C', new ItemStack(Item.emerald, 5)
	});	

	ModLoader.registerEntityID(MobTest.class, "TestMob", 50);
	ModLoader.addSpawn("TestMob", 15, -5, 1, EnumCreatureType.creature);
	ModLoader.addLocalization("enity.TestMob.name", "Test Mob");
	EntityList.entityEggs.put(Integer.valueOf(50), new EntityEggInfo(50,894731, (new Color(21,15,6).getRGB())));


	LanguageRegistry.addName(Wuppy.testBlock, "Test Block");
	LanguageRegistry.addName(Wuppy.testItem, "Test Item");
	LanguageRegistry.addName(Wuppy.blaster, "Blaster");



	MinecraftForge.EVENT_BUS.register(new ItemClickHandle());

}

}

 

MobTest:

package com.fredtech.tutorial.wuppy;

import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.world.World;

public class MobTest extends EntityCreature {

public MobTest(World worldObj) {
	super(worldObj);
	this.texture = "/mob/GreenMonster.png";
	this.moveSpeed = 0.4f;//sets how fast this mob moves
	isImmuneToFire = false;
	//below this is all the ai tasks that specify how the mob will behave mess around with it to see what happens
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
	this.tasks.addTask(2, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
	this.tasks.addTask(3, new EntityAIWander(this, this.moveSpeed));
	this.tasks.addTask(4, new EntityAILookIdle(this));
	this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, false));
	this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 25.0F, 0, true));

}

@Override
public int getMaxHealth() {
	// TODO Auto-generated method stub
	return 10;
}

public boolean isAIEnabled()
{
	return true;
}

protected String getLivingSound()
{
return "mob.pig.say";
}

protected String getHurtSound()
{
return "mob.pig.say";
}

protected String getDeathSound()
{
return "mob.pig.death";
}

protected int getDropItemId()
{
return 200;
}
protected boolean canDespawn()
{
return true;
}


}

 

ModelMob (Generated by Techne):

package com.fredtech.tutorial.wuppy;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class ModelMob extends ModelBase {

//fields
ModelRenderer Leg2;
ModelRenderer Leg1;
ModelRenderer Body;
ModelRenderer Arm1;
ModelRenderer Arm2;
ModelRenderer Head;

public ModelMob()
{
textureWidth = 64;
textureHeight = 128;

Leg2 = new ModelRenderer(this, 48, 49);
Leg2.addBox(-2F, 0F, -2F, 4, 11, 4);
Leg2.setRotationPoint(-4F, 13F, 0F);
Leg2.setTextureSize(64, 128);
Leg2.mirror = true;
setRotation(Leg2, 0F, 0F, 0F);
Leg1 = new ModelRenderer(this, 31, 49);
Leg1.addBox(-2F, 0F, -2F, 4, 11, 4);
Leg1.setRotationPoint(2F, 13F, 0F);
Leg1.setTextureSize(64, 128);
Leg1.mirror = true;
setRotation(Leg1, 0F, 0F, 0F);
Body = new ModelRenderer(this, 0, 68);
Body.addBox(0F, 0F, 0F, 12, 7, 7);
Body.setRotationPoint(-7F, 7F, -3F);
Body.setTextureSize(64, 128);
Body.mirror = true;
setRotation(Body, 0F, 0F, 0F);
Arm1 = new ModelRenderer(this, 0, 34);
Arm1.addBox(0F, -1F, -9F, 4, 3, 12);
Arm1.setRotationPoint(5F, 8F, -3F);
Arm1.setTextureSize(64, 128);
Arm1.mirror = true;
setRotation(Arm1, 0F, 0F, 0F);
Arm2 = new ModelRenderer(this, 0, 19);
Arm2.addBox(-4F, -1F, -10F, 4, 3, 12);
Arm2.setRotationPoint(-7F, 8F, -3F);
Arm2.setTextureSize(64, 128);
Arm2.mirror = true;
setRotation(Arm2, 0F, 0F, 0F);
Head = new ModelRenderer(this, 0, 0);
Head.addBox(-3F, -6F, -2F, 8, 6, 5);
Head.setRotationPoint(-2F, 7F, 0F);
Head.setTextureSize(64, 128);
Head.mirror = true;
setRotation(Head, 0F, 0F, 0F);
}

public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5);
Leg2.render(f5);
Leg1.render(f5);
Body.render(f5);
Arm1.render(f5);
Arm2.render(f5);
Head.render(f5);
}

private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}

public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
// super.setRotationAngles(f, f1, f2, f3, f4, f5);
}
}

 

This is all the code that has to do with this issue GreenMonster.png is located at /forge/mcp/src/minecraft/mobs

Posted

Wow, your base class is extending BaseMod and it has the @Mod annotation. You shouldn't extends BaseMod and add all the required things to make it a forge mod, suchlike: the @SidedProxy, the @PreInit and the @PostInit annotation.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Sorry my code is a little messy at the moment as a result of me trying to fix this stupid error, just ignore that I really need help on the problem of the non-rendered mob.

Posted

		ModLoader.registerEntityID(MobTest.class, "TestMob", 50);
	ModLoader.addSpawn("TestMob", 15, -5, 1, EnumCreatureType.creature);
	ModLoader.addLocalization("enity.TestMob.name", "Test Mob");

 

Any reason you're not using the native Forge calls?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 6/21/2013 at 5:49 PM, robodude said:

How do I do that and still get a spawn egg and natural spawns?

 

The magic of Forge methods.

EntityRegistry.addSpawn(...)

EntityList.entityEggs.put(...)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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

    • 🌍 TITLE:   Herobrine vs Null – Rise of Prime   > “Rewrite Minecraft history. Witness the rise… and the fall.”         ---   🧩 MOD VERSION:   Minecraft Forge 1.20.1   Built with MCreator   Ultra-cinematic style, custom mobs, weapons, quests, effects, emotional cutscenes       ---   📖 FULL STORY (Final Draft):   ⚔️ ACT 1: Alex’s Death – The Beginning of Darkness   Peaceful world. Alex and Steve explore a new cave.   Suddenly, Null appears from the shadows, corrupts the land, and strikes Alex with a void blade.   A powerful cinematic cutscene plays. Alex dies in Steve’s arms.   Steve collapses crying, lightning and rain begin, music swells.       ---   ⚔️ ACT 2: Broken and Angry – The Herobrine Awakening   Days pass. Steve visits ancient ruins. He decides to face Null without powers.   He finds Null again — and gets hit violently, almost dying.   This triggers a transformation:   > “Awaken... Herobrine.”       Cinematic animation: glowing eyes, thunderstorm, ancient symbols appear. Steve transforms into Herobrine Ascendant.   Emotional soundtrack + glowing UI changes.       ---   ⚔️ ACT 3: The Rift of Eternity – The Legendary Path   The world is glitching. Shadow minions appear.   Herobrine travels through corrupted biomes: 🔹 Glitch Wastes 🔹 Soul Caverns 🔹 Void Forest 🔹 Darkstorm Mountains   Defeats powerful bosses:   🩸 Glitch Revenant   🔥 Flamebound Brute   ⚡ Stormcaller   🧊 Entity 303 (secret optional boss!)   🗡️ Shadowbound Warrior         ---   ⚔️ FINAL ACT: Rise of Prime – The Final War Begins   Arrives at The Rift of Eternity (final battle map): ⛰️ Floating mountains 🔥 Lava eruptions ⛓️ Chains from sky 🌩️ Storm and glitch FX everywhere   Final Cutscene Begins:   > "So… Herobrine finally wakes." – Prime Null         👑 FINAL BATTLE:   Boss Fight: Prime Null vs Herobrine Ascendant   3 Phases: Teleportation, Blade of the Void, Summon Minions   Environment collapses: blocks fly, camera shakes   Epic soundtrack plays with subtitles (EN + Sinhala)   Cutscene finishes with Null screaming:   > “I… will come back… from the Dark Prison!”       Black screen: “Season 2 Coming Soon”         ---   💥 WHAT’S INCLUDED IN THE MOD:   🎮 GAMEPLAY   4–6 hours of playtime   Hard mode with permadeath   Questline system with cutscene triggers   Save/load checkpoints       ---   🦸 CHARACTERS (Fully Animated)   Steve / Herobrine Ascendant   Alex (dies early)   Null (base + Prime Null final form)   Optional Bosses:   Entity 303   Flamebound Brute   Soul Warden   Shadowbound Warrior   Stormcaller   Glitch Revenant         ---   🧩 QUESTS   12+ main quests   6+ side quests (some unlock alternate endings)   Ritual quests to summon Herobrine powers       ---   🔫 WEAPONS / ITEMS   ⚡ Lightning Staff   🗡️ Void Piercer Blade   🔥 Flame Reaper   🧊 Frozen Thunder Shuriken   💎 Alex’s Amulet (used in story)       ---   💥 PARTICLE EFFECTS & CINEMATICS   Crying, rain, lightning, fire   Custom shaders (optional but NOT required)   Camera shake, blur, glow   Flying blocks during battles   Realistic terrain destruction       ---   🎬 TRAILER   Cinematic shots   Text overlays   Background score   Your name and mine: Developed by: Navindu Heshan & The Golden Friend   Ends with🌍 TITLE:   Herobrine vs Null – Rise of Prime   > “Rewrite Minecraft history. Witness the rise… and the fall.”         ---   🧩 MOD VERSION:   Minecraft Forge 1.20.1   Built with MCreator   Ultra-cinematic style, custom mobs, weapons, quests, effects, emotional cutscenes       ---   📖 FULL STORY (Final Draft):   ⚔️ ACT 1: Alex’s Death – The Beginning of Darkness   Peaceful world. Alex and Steve explore a new cave.   Suddenly, Null appears from the shadows, corrupts the land, and strikes Alex with a void blade.   A powerful cinematic cutscene plays. Alex dies in Steve’s arms.   Steve collapses crying, lightning and rain begin, music swells.       ---   ⚔️ ACT 2: Broken and Angry – The Herobrine Awakening   Days pass. Steve visits ancient ruins. He decides to face Null without powers.   He finds Null again — and gets hit violently, almost dying.   This triggers a transformation:   > “Awaken... Herobrine.”       Cinematic animation: glowing eyes, thunderstorm, ancient symbols appear. Steve transforms into Herobrine Ascendant.   Emotional soundtrack + glowing UI changes.       ---   ⚔️ ACT 3: The Rift of Eternity – The Legendary Path   The world is glitching. Shadow minions appear.   Herobrine travels through corrupted biomes: 🔹 Glitch Wastes 🔹 Soul Caverns 🔹 Void Forest 🔹 Darkstorm Mountains   Defeats powerful bosses:   🩸 Glitch Revenant   🔥 Flamebound Brute   ⚡ Stormcaller   🧊 Entity 303 (secret optional boss!)   🗡️ Shadowbound Warrior         ---   ⚔️ FINAL ACT: Rise of Prime – The Final War Begins   Arrives at The Rift of Eternity (final battle map): ⛰️ Floating mountains 🔥 Lava eruptions ⛓️ Chains from sky 🌩️ Storm and glitch FX everywhere   Final Cutscene Begins:   > "So… Herobrine finally wakes." – Prime Null         👑 FINAL BATTLE:   Boss Fight: Prime Null vs Herobrine Ascendant   3 Phases: Teleportation, Blade of the Void, Summon Minions   Environment collapses: blocks fly, camera shakes   Epic soundtrack plays with subtitles (EN + Sinhala)   Cutscene finishes with Null screaming:   > “I… will come back… from the Dark Prison!”       Black screen: “Season 2 Coming Soon”         ---   💥 WHAT’S INCLUDED IN THE MOD:   🎮 GAMEPLAY   4–6 hours of playtime   Hard mode with permadeath   Questline system with cutscene triggers   Save/load checkpoints       ---   🦸 CHARACTERS (Fully Animated)   Steve / Herobrine Ascendant   Alex (dies early)   Null (base + Prime Null final form)   Optional Bosses:   Entity 303   Flamebound Brute   Soul Warden   Shadowbound Warrior   Stormcaller   Glitch Revenant         ---   🧩 QUESTS   12+ main quests   6+ side quests (some unlock alternate endings)   Ritual quests to summon Herobrine powers       ---   🔫 WEAPONS / ITEMS   ⚡ Lightning Staff   🗡️ Void Piercer Blade   🔥 Flame Reaper   🧊 Frozen Thunder Shuriken   💎 Alex’s Amulet (used in story)       ---   💥 PARTICLE EFFECTS & CINEMATICS   Crying, rain, lightning, fire   Custom shaders (optional but NOT required)   Camera shake, blur, glow   Flying blocks during battles   Realistic terrain destruction       ---   🎬 TRAILER   Cinematic shots   Text overlays   Background score   Your name and mine: Developed by: Navindu Heshan & The Golden Friend   Ends with release date: JULY 16       ---   🧠 SPECIAL FEATURES:   Secret ending (if you don’t kill Null)   Killcam-style boss finishers   Hidden rooms + “Void Realm” area   Hard mode unlocks Glitched Steve as final secret .can you make it real.       ---   🧠 SPECIAL FEATURES:   Secret ending (if you don’t kill Null)   Killcam-style boss finishers   Hidden rooms + “Void Realm” area   Hard mode unlocks Glitched Steve as final secret .can you make it
    • Make a test with another Launcher like the Curseforge Launcher, MultiMC or AT Launcher
    • can anyone help me i am opening forge and add modpacks and then it says unable to update native luancher and i redownlaod java and the luancher it self?
    • The problem occurs also in 1.20.1 Forge, but with an "Error executing task on client" instead. I have "Sinytra Connector" installed. On 1.21.5 Fabric, there is no problem. When this happens, the chat message before the death screen appears gets sent, with an extra dash added.
    • Well, as usual, it was user error. Naming mismatch in sounds.json.  Please delete this post if you find it necessary. 
  • Topics

×
×
  • Create New...

Important Information

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