-
Posts
785 -
Joined
-
Last visited
Everything posted by ItsAMysteriousYT
-
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) { } }
-
Where is the correct link? I can't find it on the homepage/forumpost.
-
There is no Git anymore. The sourcecode has been removed.
-
How do I make my Truck work? Help Me!!!
ItsAMysteriousYT replied to WitherBoss2000's topic in Modder Support
Show your code -
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?
-
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. -
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. -
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 -
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 -
Spawning my entity causes gamecrash[STILL UNSOLVED]
ItsAMysteriousYT replied to ItsAMysteriousYT's topic in Modder Support
Yes, deffinitly -
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? -
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? -
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? -
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 -
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? -
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: -
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. -
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