Jump to content

daafganggdg

Members
  • Posts

    141
  • Joined

  • Last visited

Everything posted by daafganggdg

  1. I found drawTexturedModelRectFromIcon and tried it with: this.drawTexturedModelRectFromIcon(100, 100, new ItemStack(Items.apple).getIconIndex(), 16, 16); but that's just painting a big fat "nul" I guess I'm using that ItemStack thing completly wrong?
  2. Hey, As the topic says I want to draw an items icon in my gui that it looks just like it actually is an item How do i do that?
  3. You have to check with instanceof, since the entity is an instance of the EntityCow something like that if (evt.entity instanceof EntityCow){ evt.drops is a list of all the drops, so if u want the cow to ONLY spawn 1 leather, u can say evt.drops.clear(); and then add the leather it back in evt.drops.add(new EntityItem(evt.entity.worldObj, evt.entity.posX, evt.entity.posY, evt.entity.posZ, new ItemStack(Items.leather)));
  4. Alright, got the problem I was using this: MinecraftForge.EVENT_BUS.register(new yourClass()); Now its actually working, thanks a lot
  5. Ok, that solves my 1st Problem, but i still need a reliable event thats getting called once a minute or more often
  6. So, when a day ends at 2400, doesnt it get set to 0 again? cuz thats what i thought it does, or does it just continue with 2401? But anyway I would get into trouble when you use "/time set day" since then I would be at day 1 again
  7. Uhm, @SubscribeEvent public void onTick(TickEvent event) { System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); } isnt doing anything (other events are working) And how can i get the world from TickEvent?
  8. Hey guys So, I try to notice whenever a day ends. Is there an event for that? (guess no) Or is there an event that gets called whenever the time gets set to something new or anything reliable like that? Thanks for help
  9. hehe, it's snowing everywhere Thanks a lot
  10. Hi guys, How does minecraft save where what biomes are? And where does it decide wheather its snowing or raining (I know this depends on the biome)? Cause i'd like to make some changes there Thanks in advance
  11. Hi I'm trying to figure out what par3 in public ItemStack slotClick(int par1, int par2, int par3, EntityPlayer player) in Container class does. I know it returns 1 when shiftclicking a slot and 3 when middlemouseclicking, but it sometimes randomly returns 5? And par2 already returns 2 when middlemouseclicking, so it's actually giving this information twice, wich is quiet useless? So, what i wanna know is what par3 does, and why its not all done with par2? Thanks in advance
  12. I think u have to call it on the client, so use that world.isRemote thing
  13. Hello, how can I add a new Item as a fishable Item? I'v found this in EntityFishHook: private static final List field_146039_d = Arrays.asList(new WeightedRandomFishable[] {(new WeightedRandomFishable(new ItemStack(Items.leather_boots), 10)).func_150709_a(0.9F), new WeightedRandomFishable(new ItemStack(Items.leather), 10), new WeightedRandomFishable(new ItemStack(Items.bone), 10), new WeightedRandomFishable(new ItemStack(Items.potionitem), 10), new WeightedRandomFishable(new ItemStack(Items.string), 5), (new WeightedRandomFishable(new ItemStack(Items.fishing_rod), 2)).func_150709_a(0.9F), new WeightedRandomFishable(new ItemStack(Items.bowl), 10), new WeightedRandomFishable(new ItemStack(Items.stick), 5), new WeightedRandomFishable(new ItemStack(Items.dye, 10, 0), 1), new WeightedRandomFishable(new ItemStack(Blocks.tripwire_hook), 10), new WeightedRandomFishable(new ItemStack(Items.rotten_flesh), 10)}); private static final List field_146041_e = Arrays.asList(new WeightedRandomFishable[] {new WeightedRandomFishable(new ItemStack(Blocks.waterlily), 1), new WeightedRandomFishable(new ItemStack(Items.name_tag), 1), new WeightedRandomFishable(new ItemStack(Items.saddle), 1), (new WeightedRandomFishable(new ItemStack(Items.bow), 1)).func_150709_a(0.25F).func_150707_a(), (new WeightedRandomFishable(new ItemStack(Items.fishing_rod), 1)).func_150709_a(0.25F).func_150707_a(), (new WeightedRandomFishable(new ItemStack(Items.book), 1)).func_150707_a()}); private static final List field_146036_f = Arrays.asList(new WeightedRandomFishable[] {new WeightedRandomFishable(new ItemStack(Items.fish, 1, ItemFishFood.FishType.COD.func_150976_a()), 60), new WeightedRandomFishable(new ItemStack(Items.fish, 1, ItemFishFood.FishType.SALMON.func_150976_a()), 25), new WeightedRandomFishable(new ItemStack(Items.fish, 1, ItemFishFood.FishType.CLOWNFISH.func_150976_a()), 2), new WeightedRandomFishable(new ItemStack(Items.fish, 1, ItemFishFood.FishType.PUFFERFISH.func_150976_a()), 13)}); Can i edit this lists without changing the vanilla code? Or is there an forge event I can use where I can change the Item thats getting fished by the player?
  14. Hmm alright, thanks for help anyway ^^
  15. Damn, buddy. I have no idea, just was doing anything cuz i have no idea how this should work Is there a tutorial or anything showing how to make custom sounds without the minecraft classes?
  16. which class is actually playing sound in minecraft?
  17. kind of like that?: public class MusicResources extends ResourceLocation implements IResourcePack{ public musicresources(String par1Str) { super(par1Str); } @Override public InputStream getInputStream(ResourceLocation var1) throws IOException { return null; } @Override public boolean resourceExists(ResourceLocation var1) { return false; } @Override public Set getResourceDomains() { return null; } @Override public IMetadataSection getPackMetadata(IMetadataSerializer var1, String var2) throws IOException { return null; } @Override public BufferedImage getPackImage() throws IOException { return null; } @Override public String getPackName() { return null; } }
  18. ofc not, just I don't know how I'm going to do this. I think I'll need sth to handle if the sound is played or not, (guess I'm able to do this) then sth. to check how loud the sound should be played depending on how far ur away from the jukebox (I don't know how to do this, thought player.getDistanceSq could be usefull, but anyway it should be exactly like the vanilla records) and sth. that actually plays the sound
  19. To you as a minecraft-java-forge expert this might seem to be obvious to you, well, let me tell you, to me it's not. I don't really understand anything
  20. I'm not too sure how the vanilla code works. It all ends in void playAuxSFX(EntityPlayer var1, int var2, int var3, int var4, int var5, int var6); in IWorldAcces. (guess u call that a field?) And I don't know what IResource should do either. I'v also found ISound and ITickableSound, they look kind of helpfull..
  21. But then I would have to make a sound player and do all things like make it louder when u get closer to the jukebox and I think thats gonna be pretty complicated for a foolish noob like me So wouldnt it be easier to just copy the sounds into my mods jar file?
  22. Should I use a minecraft method like world.playAuxSFXAtEntity, cuz then I would be stuck on the same problem again I dont wanna use a config file cause I want to keep it completly in minecraft and I have made the Gui tileentity stuff for the Disk Burner block already anyway
  23. And btw I know you shouldn't do things like registering items far too late, but I'm gonna do it anyway so help me pls
  24. okokok now thats a pretty long story So I'm working on a mod where you have a new block that allows you to import music from your Computer into MC and creates a new Item record with it, so I just copie the music from the entered location into, right now, my eclipse workspace. Most things are working fine, but only in the eclipse workspace. SO, once we are here anyway I'v got another little problem, cuz what I'm doing kind of requires me to register the new Records to minecraft while the game is running, its working but the texture (and the sound probably too) is missing, when I close mc and open it again it registers the new records from the last session again in the beginning and then everything works fine, I guess thats because mc is loading all ressources in the beginning. Is there a way to tell mc to refresh the resources?
×
×
  • Create New...

Important Information

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