Jump to content
  • Home
  • Files
  • Docs
  • Merch
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • ItsAMysteriousYT

ItsAMysteriousYT

Members
 View Profile  See their activity
  • Content Count

    785
  • Joined

    April 15, 2015
  • Last visited

    July 8

 Content Type 

  • All Activity

Profiles

  • Status Updates
  • Status Replies

Forums

  • Topics
  • Posts

Calendar

  • Events
  • Event Comments

Everything posted by ItsAMysteriousYT

  • Prev
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • Next
  • Page 8 of 29  
  1. ItsAMysteriousYT

    [SOLVED]Get the width/height of an image loaded from a resourcelocation.

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Is this alright? @Override public InputStream getInputStream(ResourceLocation p_110590_1_) throws IOException { return new FileInputStream(RealLifeMod.MinecraftDirectory+"/images/"+p_110590_1_.getResourcePath()); }
    • September 12, 2015
    • 11 replies
  2. ItsAMysteriousYT

    [SOLVED]Get the width/height of an image loaded from a resourcelocation.

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Ah - okay. Anything else?
    • September 12, 2015
    • 11 replies
  3. ItsAMysteriousYT

    [SOLVED]Get the width/height of an image loaded from a resourcelocation.

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Okay, so is everything alright in this file? Because i do not have an assets folder in that folder. package itsamysterious.mods.reallifemod; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.Set; import com.google.common.collect.ImmutableSet; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.DefaultResourcePack; import net.minecraft.client.resources.FolderResourcePack; import net.minecraft.client.resources.IResourceManager; import net.minecraft.client.resources.IResourceManagerReloadListener; import net.minecraft.client.resources.IResourcePack; import net.minecraft.client.resources.data.IMetadataSection; import net.minecraft.client.resources.data.IMetadataSerializer; import net.minecraft.util.ResourceLocation; public class Screenshotspack extends FolderResourcePack implements IResourcePack,IResourceManagerReloadListener{ public static final Set defaultResourceDomains = ImmutableSet.of("images"); public static List<String> filenames=new ArrayList<String>(); public Screenshotspack() { super(new File(RealLifeMod.MinecraftDirectory+"/images")); } @Override public InputStream getInputStream(ResourceLocation p_110590_1_) throws IOException { File f = new File(Minecraft.getMinecraft().mcDataDir,"images"); f.setReadable(true); return new FileInputStream(RealLifeMod.MinecraftDirectory+"/images/"+p_110590_1_.getResourcePath()); } @Override public boolean resourceExists(ResourceLocation p_110589_1_) { return this.getResourceStream(p_110589_1_) != null; } private InputStream getResourceStream(ResourceLocation p_110605_1_) { InputStream f=null; try { f = new FileInputStream(RealLifeMod.MinecraftDirectory+"/images/"+p_110605_1_.getResourcePath()); f.close(); } catch (Exception e) { e.printStackTrace(); } return f; } @Override public Set getResourceDomains() { return defaultResourceDomains; } @Override public IMetadataSection getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException { return null; } @Override public BufferedImage getPackImage() throws IOException { return null; } @Override public String getPackName() { return "images"; } @Override public void onResourceManagerReload(IResourceManager resourceManager) { } }
    • September 12, 2015
    • 11 replies
  4. ItsAMysteriousYT

    [SOLVED]Get the width/height of an image loaded from a resourcelocation.

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Hm, is there a better way then?
    • September 12, 2015
    • 11 replies
  5. ItsAMysteriousYT

    [SOLVED]Get the width/height of an image loaded from a resourcelocation.

    ItsAMysteriousYT posted a topic in Modder Support

    I implemet a custom path with the IResourceLocation and add it to the defaultresourcepacklist. Now i wanna get the width and height of the images in that folder. How can i do this?
    • September 12, 2015
    • 11 replies
  6. ItsAMysteriousYT

    Invalid Session when i try joining Lan-Game with my mod?

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    AH - Im so stupid
    • September 12, 2015
    • 4 replies
  7. ItsAMysteriousYT

    Use GL_LIGHT0 for Lighting?

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Where is the correct link? I can't find it on the homepage/forumpost.
    • September 12, 2015
    • 5 replies
  8. ItsAMysteriousYT

    Invalid Session when i try joining Lan-Game with my mod?

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    No, how do i do that? i tried with - email=myemail,-password=mypass but it just skipped thos arguments
    • September 12, 2015
    • 4 replies
  9. ItsAMysteriousYT

    Use GL_LIGHT0 for Lighting?

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    There is no Git anymore. The sourcecode has been removed.
    • September 12, 2015
    • 5 replies
  10. ItsAMysteriousYT

    Invalid Session when i try joining Lan-Game with my mod?

    ItsAMysteriousYT posted a topic in Modder Support

    When i start a Lan World and then try joining it in another minecraft, it just sais this: How can i fix that? I think my mod is servercompatible, i fixed all errors and the server starts up without any complains.
    • September 12, 2015
    • 4 replies
  11. ItsAMysteriousYT

    How do I make my Truck work? Help Me!!!

    ItsAMysteriousYT replied to WitherBoss2000's topic in Modder Support

    Show your code
    • September 12, 2015
    • 18 replies
  12. ItsAMysteriousYT

    Use GL_LIGHT0 for Lighting?

    ItsAMysteriousYT posted a topic in Modder Support

    Is there a way to use the GL_LIGHT0 with Minecraft, so that it emits light from a position and has effect on the world?
    • September 11, 2015
    • 5 replies
  13. ItsAMysteriousYT

    Set texture to paths outside of the mod

    ItsAMysteriousYT replied to Dijkstra's topic in Modder Support

    You do not need slick to do that. Minecraft does it already with e.g. maps. Ah - okay Never had a look at that.
    • September 11, 2015
    • 15 replies
  14. ItsAMysteriousYT

    Set texture to paths outside of the mod

    ItsAMysteriousYT replied to Dijkstra's topic in Modder Support

    But sometimes it is required to bind textures that are loaded from a BufferedImage and this is possible with slick.
    • September 11, 2015
    • 15 replies
  15. ItsAMysteriousYT

    Set texture to paths outside of the mod

    ItsAMysteriousYT replied to Dijkstra's topic in Modder Support

    You can use SlickUtil to load images from the system and also to bind it to a glContext. Download it here: http://slick.ninjacave.com/slick-util.zip
    • September 11, 2015
    • 15 replies
  16. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    I got it working Now i only need to save the entity through world start
    • September 9, 2015
    • 82 replies
  17. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Yes, deffinitly
    • September 9, 2015
    • 82 replies
  18. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Break the class down into its primitive components (strings, booleans and numbers) and write those to the buffer. Can i use the writeSpawnData method from the constructor, in that bytebuffer an id that is helt in the VehicleFile. And then i could set the file from a method that gets the file from the global list of vehicle files?
    • September 9, 2015
    • 82 replies
  19. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    But i hold all the values in one Class - the VehicleFile. This class generates for every txtfile in a custom folder. And i get the values from that class in the renderer and in the entity. How can i do this properly? EDIT: Can i use the writeSpawnData method from the constructor, in that bytebuffer an id that is helt in the VehicleFile. And then i could set the file from a method that gets the file from the global list of vehicle files?
    • September 9, 2015
    • 82 replies
  20. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    If you need any information on the client side, you'll need to send it from the server in some way. Depending on the nature of the information, you may want to use the DataWatcher or implement IEntityAdditionalSpawnData . Okay, how do i use IAdditionalSpawnData?
    • September 9, 2015
    • 82 replies
  21. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Now the entity spawns, but the files is now null which means the entity just is invisible. But i can enter it with the packet handling stuff
    • September 9, 2015
    • 82 replies
  22. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Okay - ill try that, but i have to apply a file to the entity so it knows its values and the renderer know what to render. will this make any problems?
    • September 9, 2015
    • 82 replies
  23. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Is everything okay with this method? Here is the error:
    • September 9, 2015
    • 82 replies
  24. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    Okay, i register the entity like this: public void registerEntities() { ModEntityID = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerModEntity(EntityVehicle.class, "EntityCar", ModEntityID++, RealLifeMod.instance, 80, 1, true); EntityRegistry.registerModEntity(EntityPylon.class, "EntityPylon", ModEntityID++, RealLifeMod.instance, 80, 1, true); // EntityRegistry.registerModEntity(EntitySeat.class, "EntitySeat", // EntityRegistry.findGlobalUniqueEntityId(), RealLifeMod.instance, 80, // 1, true); } Im doing this in the main class.
    • September 9, 2015
    • 82 replies
  25. ItsAMysteriousYT

    Spawning my entity causes gamecrash[STILL UNSOLVED]

    ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support

    No, didn't had this befor, i tried it with the blockpos, but same problem
    • September 9, 2015
    • 82 replies
  • Prev
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • Next
  • Page 8 of 29  
  • All Activity
  • Home
  • ItsAMysteriousYT
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community