Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Whale Cancer

Members
  • Posts

    26
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Whale Cancer's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. Hi Folks, I'm trying to remove vanilla biomes so that my world generates only with custom biomes. I assume the process is like removing recipes, but I can't figure it out. I use the following code to remove recipes: Iterator<IRecipe> iterator = CraftingManager.getInstance().getRecipeList().iterator(); while(iterator.hasNext()){ ItemStack r = iterator.next().getRecipeOutput(); //Remove Jack O lantern Recipe if(r != null && r.itemID == Block.pumpkinLantern.blockID) iterator.remove(); } I think you would need to look through BiomeGenBase[] biomeList and delete the biomes you don't want, but I'm not clear on how to do that. Thanks for any help in advance.
  2. The console information showing where it is trying to find the texture would be useful in figuring out the problem.
  3. You probably want to start by making a custom furnace, as that is a simple vanilla machine. Here is the first in a youtube tutorial series: http://www.youtube.com/watch?v=ZONhMz-oH9A. I have not followed this one yet, but his other stuff is good. Take a look over the playlist that includes that video before you get started (I just got burned following a tutorial on chest gui that the guy didn't finish after a few hours of video )
  4. My ParticleEffects class looks like this: However, I am not sure this is the problem. If I don't pass a velocity to the particles they spawn a bit over my flowers and a bit over my hive and just fall to the ground with no warping. When I do pass a velocity, they quickly warp to the appropriate location and then float back to their origin (that is, where they would spawn if I didn't give them a velocity). I don't/didn't think it had anything to do with my ParticleEffects class as this behavior is consistent with what happens to glyphs on the enchanting table in vanilla.
  5. @diesieben07 I assumed you meant super.renderParticle so I looked through that and found the logic that limited it to 8x8 textures. I tried making a custom tesselator class and changing that logic, but I ended up running into an error through making a non-static refrence to a static method (IIRC). I messed around with setParticleIcon and it seems to return 8x8 as well. It is currently used in vanilla to grab an 8x8 texture from the texture of a side of a block for the purpose of creating those little damage particles when you hit something.
  6. .rar files can use .zip compression and .rar has two unique compression formats (rar and rar5)
  7. Ok, so I've used the enchanting table particle effects to develop some bee particles that go back and forth between nearby flowers (it triggers way more often than it should right now for the purposes of testing). My problem is that - much like the vanilla enchanting table, which is much less noticeable - the particles spawn at their destination and then extremely quickly teleport to their origin before floating back to their destination at the desired speed. Here is my code: //randomly called to generate particles, adapted from BlockEnchantmentTable @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, int x, int y, int z, Random random) { int sizeX = 5; int sizeZ = 5; super.randomDisplayTick(world, x, y, z, random); for (int targetX = x - sizeX; targetX <= x + sizeX; ++targetX){ for (int targetZ = z - sizeZ; targetZ <= z + sizeZ; ++targetZ){ if (targetX > x - 2 && targetX < x + 2 && targetZ == z - 1){ targetZ = z + 2; } if (random.nextInt(16) == 0){ for (int targetY = y; targetY <= y + 1; ++targetY){ if ((world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_allium.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_bellflower.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_chrysanthemum.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_daisy.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_echinacea.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_ginger.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_hibiscus.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_houstonia.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_hydrangea.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_morningglory.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_nasturtium.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_orchid.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_paeonia.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_syringa.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_tulip.blockID) || (world.getBlockId(targetX, targetY, targetZ) == DoorMod.flower_oxeyedaisy.blockID)){ // if (!world.isAirBlock((targetX - x) / 2 + x, targetY, (targetZ - z) / 2 + z)){ // break; // } double xVelocity = (double)((float)(targetX - x) + random.nextFloat()) - 0.5D; double yVelocity = (double)((float)(targetY - y) - random.nextFloat() - 1.0F); double zVelocity = (double)((float)(targetZ - z) + random.nextFloat()) - 0.5D; //originates from flowers but is reversed due to velocity ParticleEffects.spawnParticle("bee_1", targetX + 0.5D, targetY + 2.0D, targetZ + 0.5D, -xVelocity, yVelocity, -zVelocity); //originates from hive but is reversed due to velocity ParticleEffects.spawnParticle("bee_1", x + 0.5D, y + 2.0D, z + 0.5D, xVelocity, yVelocity, zVelocity); } } } } } } Here is a video to demonstrate the teleporting bee particles (apologies for TotalBiscuit in the background, didn't think to pause that video before recording). [embed=425,349] [/embed] Is this unavoidable when using particles? I really don't understand why it would be doing this if spawnParticle is simply accepting x, y, z coordinates and x, y, z velocities. Edit: Just noticed this behavior is noticeable even in the animated gif found in the wiki: http://hydra-media.cursecdn.com/minecraft.gamepedia.com/6/60/Enchantment_Table_animated_experience.gif[/img]
  8. No problem, always glad to help cocaine along. Also, in case you need to know, you can find the potion effects in Items.java. Just search for setPotionEffect and you will find them all.
  9. Not sure about making it edible while full (though why you would make cocaine a food that you can eat rather than just a straight out potion effect is beyond me). Here is an example of a food that poisons you: carrotPoisonous = new ItemFood(IDtracker, 1, false).setPotionEffect(Potion.poison.id, 5, 0, 1.0F).setUnlocalizedName("carrot_poisonous").setTextureName(modPath + "carrot_poisonous"); Just use that ".setPotionEffect" to add effects to your food.
  10. Been playing around with particle effects for a few hours now and I've been trying to understand how getTextureManager.bindTexture works when setting the texture of the particle. Here is bindTexture: public void bindTexture(ResourceLocation par1ResourceLocation) { Object object = (TextureObject)this.mapTextureObjects.get(par1ResourceLocation); if (object == null) { object = new SimpleTexture(par1ResourceLocation); this.loadTexture(par1ResourceLocation, (TextureObject)object); } TextureUtil.bindTexture(((TextureObject)object).getGlTextureId()); } I can't really see where in that code it would limit the texture to 8x8, so I must be looking in the wrong place? I believe this is the only relevant section of my mod for the actual setting of the texture of the particle (other than the actual spawning of the particle stuff, which all works): @Override @SideOnly(Side.CLIENT) public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7){ tessellator.draw(); Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("doormod:textures/particle/custom_particles.png")); tessellator.startDrawingQuads(); tessellator.setBrightness(200); super.renderParticle(tessellator, par2, par3, par4, par5, par6, par7); tessellator.draw(); Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("textures/particle/custom_particles.png")); tessellator.startDrawingQuads(); } If I am not mistaken, par2 through par7 are just the origin and motion of the particle and tessellator only has to do with rendering the particle and nothing to do with setting the texture. So... any help or direction? Thanks in advance!
  11. Just set up a Techne ladder and, during the process of making it work like a ladder, I noticed ladders use 2, 3, 4, and 5 as their metadata for facing. That is probably why you have it set up like that. Just something I noticed that might be useful. Edit: Also, this is cool:
  12. EntityLiving != EntityLivingBase Your function is not identical to the function in the Block class (which is why the @Override is throwing an error and why the function is not being called). Not variable name, variable type. Great! Now I don't have to use those messy variable names. Really, I am just going through every idea I have and making sure I can implement them; so, this is basically a learning process. I've done a whole bunch of stuff like pillars that change their textures so the top and bottom look like a pillar (will probably re-do those as techne models), overridden default recipes to add stuff (got rid of vanilla door and added doors for each wood), custom crops, custom mushrooms, etc., I think this is a good way to learn before getting into modding and I've done this process for other games I've done modding in (zDoom, Terraria, FTL, etc.,) This model is just a table decoration with an arrow on it for debugging. Going to make it extend into a long 2 block table when another table is placed next to it in the way vanilla chests behave. Also, THANK YOU EVERYONE. Here is the fruit of our endeavors:
  13. Ahh, figured it out. You need to use the same variable names and not just the same variable order. Heh. Didn't think of this as this is not the way it works in C#, if I recall correctly.
  14. I did try to override, but I get the error "The method onBlockPlacedBy(World, int, int, int, EntityLiving, ItemStack) of type BlockCustomTable must override or implement a supertype method" despite this being a method found in Block. I had eclipse auto-add the method to block just to compare them, and they appear to be the exact same thing.
  15. Hmm, ok, thanks for letting me know it is not an issue with the function (isn't it a method?) being used. I think I might delete everything and just try again from scratch. I'll also try 'onBlockAddedToWorld' You are talking about Mecblader's solution, right? As onBlockPlacedBy is called when the block is placed by a living entity, right? @Mecblader I have been trying to learn from the 'tutorials' on using techne models. The problem is that they are often like throwing you into the deep end of a pool, there is no slower build up or explanation of smaller bits of code. My main problem is not understanding much of the GL11 functions. I think I'll break it down even simpler and perhaps assign a random metadata between 0-3 and assign rotation based on that. And then move on to have its rotation based on the facing of the placing player. This seems like a way to learn as I already understand how to place a static techne model-as-block. EDIT: Ok, ROTATION WORKS! The problem is only with setting the metadata. If i set a given metadata when I right click the model, it will rotate it appropriately. Even if I try to just set a static value in my onBlockPlacedBy it does not work... i.e. public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving entityLiving, ItemStack par6ItemStack){ world.setBlockMetadataWithNotify(x, y, z, 2, 2); } This does not work. However, if I set the metadata to 2 using the onBlockActivated it does work. So clearly I am doing something wrong in onBlockPlacedBy.
×
×
  • Create New...

Important Information

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