Jump to content

darty11

Members
  • Posts

    117
  • Joined

  • Last visited

Everything posted by darty11

  1. Found your problem. Your model has a problem and renders 1.5 blocks bellow where it should In your renderHunch do public void doRender(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9){ { super.doRender(par1EntityLiving,par2,par4+1.5,par6,par8,par9) } And it should work. Edit: oops, doesn't work with in the models render code, sorry, you'll have to do it in your renderer's code
  2. Try trimming your render hutch file down to package infectModding.mob.render; import infectModding.mob.Hunch; import infectModding.mob.entity.EntityHunch; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; public class RenderHunch extends RenderLiving { private static final ResourceLocation EntityTexture = new ResourceLocation("Fakelocationtogetthedefaulttexturetomakesureyourtextureisnottheproblem")//"eternisles:textures/mobs/hunch.png"); @Override protected ResourceLocation getEntityTexture(Entity entity) { return EntityTexture; } } And use a different model when defining the renderer.
  3. Ok, here is what you are going to need: this.getDataWatcher().addObject(25,entity.getEntityId()); this.worldObj.getEntityByID(this.getDataWatcher().getWatchableObjectInt(25)); RenderManager.instance.func_147939_a(Entity entity, double x, double y, double z, float rot1, float rot2, boolean visible) I don't know the exact uses of all the parameters in RenderManager.instance.func_147939_a, so I'll leave that to you
  4. Ok, then add proxy.RenderInformation(); at the bottom of preinit, and This is the correct way to do it and if you don't it will come back to bite you eventually.
  5. You will need to use the data watcher or some other form of client server synching.
  6. Ok, Good! [spoiler=For future reference]That means that your entity is defined, but it doesn't have any rendering, so it uses the default rendering (which is a white cube the shape of your entities hit-box). Now move EVERYTHING in your @EventHandler public void load(FMLInitializationEvent event) to your @EventHandler public void PreInit(FMLPreInitializationEvent event)
  7. This is the problem, you need to register your entities in @EventHandler public void PreInit(FMLPreInitializationEvent event) { } Not in the constructor.
  8. Well he could also use a custom AI to add his own attack functionality without replacing every pig in the entire game and probably causing some compatibility problems, but it is up to him, as that can be a more difficult task.
  9. What is the crash report. Also it fixes the issue because you are registering your entity wrong.
  10. EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerGlobalEntityID(EntityHunch.class, "Hunch", EntityRegistry.findGlobalUniqueEntityId()); Replace it with EntityRegistry.registerModEntity(EntityHunch.class, "Hunch", 0, this, 128, 1,true);
  11. Not sure but you could try something like this: Make an event handler for EntityJoinWorldEvent, and in that event handler have something like: if (entity instanceof (entity you want to modify) entity.tasks.removeTask(AI's that you want to remove) entity.tasks.addTask(Your AI here)
  12. Glad I could help.
  13. Instead of placing those blocks with a new thread, could you try placing them with the teleporter? You are going to need somthing like this code: onBlockActivated: YourClass.StaticTeleportationMethod(9, par3EntityPlayer, new NewTeleporterClass(MinecraftServer.getServer().worldServerForDimension(9))); YourClass: public static void MPhelperMethod(int par1, EntityPlayerMP player, Teleporter t) { player.mcServer.getConfigurationManager().transferPlayerToDimension(player, par1,t); } /** * Teleports the entity to another dimension. Params: Dimension number to teleport to */ public static void StaticTeleportationMethod(int par1, Entity player, Teleporter t) { if (player instanceof EntityPlayerMP) { MPhelperMethod(par1, (EntityPlayerMP)player,t); return; } if (!player.worldObj.isRemote && !player.isDead) { player.worldObj.theProfiler.startSection("changeDimension"); MinecraftServer minecraftserver = MinecraftServer.getServer(); int j = player.dimension; WorldServer worldserver = minecraftserver.worldServerForDimension(j); WorldServer worldserver1 = minecraftserver.worldServerForDimension(par1); player.dimension = par1; player.worldObj.removeEntity(player); player.isDead = false; player.worldObj.theProfiler.startSection("reposition"); minecraftserver.getConfigurationManager().transferEntityToWorld(player, j, worldserver, worldserver1,t); player.worldObj.theProfiler.endStartSection("reloading"); Entity entity = EntityList.createEntityByName(EntityList.getEntityString(player), worldserver1); if (entity != null) { entity.copyDataFrom(player, true); if (j == 1 && par1 == 1) { ChunkCoordinates chunkcoordinates = worldserver1.getSpawnPoint(); chunkcoordinates.posY = player.worldObj.getTopSolidOrLiquidBlock(chunkcoordinates.posX, chunkcoordinates.posZ); entity.setLocationAndAngles((double)chunkcoordinates.posX, (double)chunkcoordinates.posY, (double)chunkcoordinates.posZ, entity.rotationYaw, entity.rotationPitch); } worldserver1.spawnEntityInWorld(entity); } player.isDead = true; player.worldObj.theProfiler.endSection(); worldserver.resetUpdateEntityTick(); worldserver1.resetUpdateEntityTick(); player.worldObj.theProfiler.endSection(); } } And then you will need to make a new teleporter class that actually behaves like a teleporter and makes a portal (the blocks you need to place).
  14. Ok, my earlier idea of extending the overworld generator is causing some problems, so could you try copying the entire overworld chunk provider over and then doing your gen from there? I forgot how many private fields there are in it.
  15. try adding a new in front of the new object you are making...
  16. A really quick fix if you didn't want to generate any structures would be adding this: public ChunkProviderDimenisonShift(World par1World, long par2, boolean par4) { super(par1World, par2, false); } If you want the other structure to generate, then you will have to override: public Chunk provideChunk(int par1, int par2); public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) public void recreateStructures(int par1, int par2) I suggest copying the code from the overworld provider but removing the this.strongholdGenerator.(Insert Function Here)(this.worldObj, this.rand, par2, par3);
  17. It looks like you have a null object that you are trying to add into a crafting recipe. Make sure that you define your crafting after you define all your items and blocks, and that you actually define all items/blocks used in crafting.
  18. @Override public boolean chunkExists(int var1, int var2) { // TODO Auto-generated method stub return false; } @Override public boolean saveChunks(boolean var1, IProgressUpdate var2) { // TODO Auto-generated method stub return false; } @Override public boolean unloadQueuedChunks() { // TODO Auto-generated method stub return false; } @Override public boolean canSave() { // TODO Auto-generated method stub return false; } @Override public ChunkPosition func_147416_a(World var1, String var2, int var3, int var4, int var5) { // TODO Auto-generated method stub return null; } @Override public int getLoadedChunkCount() { // TODO Auto-generated method stub return 0; } According to those codes, your world doesn't exist, cannot be unloaded, cannot be saved, and is not loaded. So basically it is a void. I would suggest that you extend the overworld provider instead of making your own.
  19. You are defining your black forest biome before you define you blocks. Since mod_MicroUkr.blockBlack is null when public static final BiomeGenBase blackForest = (new BiomeGenBlackForest(50)).setColor(0x000000).setBiomeName("BlackForest"); is called, this.TopBlock is set to null. You need to either define mod_MicroUkr.blockBlack before you define Black Forest, or else you will need to change black forest to not final and define it after defining and registering your blocks.
  20. Find and replace Block. with Blocks. You need to do it by case, only replace Block with Blocks if it is referencing a block for example Block.Stone but it will fix a lot of problems. Replace .blockId and .ItemId with nothing, will fix many more. Several other changes like changing setunlocolised name to set block name (only in blocks) and such will really knock out those errors.
  21. Could you post your mod_MicroUkr class? and could you confirm that you are indeed generating your biome in that dimension?
  22. Yes. And if that doesn't work, check the make sure you are using the right version of forge for the version of that mod.
  23. When are you expecting to see onimpact? Wat are the conditions?
  24. The only thing I can think of is that you have a messed up source code. I copy and pasted your exact code into my mod and it works fine. Are you absolutely sure that onEntityCollidedWithBlock is being called and then attackentityfrom is called but it doesn't work?
×
×
  • Create New...

Important Information

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