
tminor1
Members-
Posts
103 -
Joined
-
Last visited
Everything posted by tminor1
-
Hey so a while back I asked about how to set textures fro my blocks in 1.8 and I was told that it is done with JASON files and I was sent some links on how to make them. However no one told me how to use them for example. } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(main.modid + ":" + this.getUnlocalizedName().substring(5)); } That it how you set the textures in 1.7 but now that it is done with JASON files how do I set the JASON files to my blocks.
-
Thank you. I now should now be able to create the json files. Can you now just show me how I tell forge to use them for my blocks?
-
Can you send me a link to one of the tutorials?
-
Hey I need help setting the texture for my blocks in 1.8. I know how to set them back in 1.7 but in 1.8 I think it has changed. How do I set the textures for my blocks in 1.8?
-
Ok, thank you.
-
As diesieben07 pointed out, you shouldn't really be doing the version check on the server, or at least if you want to do that you'd probably do it specifically for server. Mostly you want to tell the client, especially in shieldbug1's attempt where he was doing it every time a player joined. So I just run the thread in the client proxy, so then it is only run on client (or integrated client). From your question, it sounds like maybe you're not confident in how the proxys work. Do you need further explanation for that? Anyway, if you run it in your main class, then it will be run on both sides (both client and server) and that may not be really appropriate for this purpose. I see, well I have never done something like this before. I thought that because when you do things like make your own event or tool or whatever for it to work you need to register it in the main.class so forge will go and grab the code from the class file on which holds the code for the event, ect because if you don't then your code will not be ran. I thought you would have to register it in a main class or it will not be imported. Because what I thought I needed to do was first make a main.class like you would for a mod. Then from that you extend off with a new class file that checks for the update and you register it in the main.class so forge will load and run it. But it seems that I do not understand. I an making a mod pack and you choose what mods you want to use all it is is a zip file will a bunch of mods in it and you just drag and drop what ones you want to use. I also wanted to make the update checker like that to so you could choose to use it or not because if I did not do that then I would need an update checker attached to every mod and I think that would mess things up. When I create the VersionChecker and ClientProxy.class are those the only files I need or do I have to construct it like I would a mod with a main.class that contains the things for forge to load it and then just have it import it?
-
Ok I will try it later.
-
Will it work if I upload the version textfile to mediafire? Also in the main class do I register the VersionChecker or the ClientProxy.class? From your code it looks like I have to register the ClientProxy.class then when it runs it will import the VersionChecker.class.
-
What happened to the code that shiledbug1 posted? It is gone I didn't get a chance to copy it.
-
Thank you shieldbug1. I have two questions though. For the raw text file is that just a normal .txt file or a diffrent file? And for String version = sc.nextLine(); if(!Reference.MOD_VERSION.equals(version)) Do I need to add something there or in the text file if I have v1.0 will it check my mod version from the code then if I change the v1.0 in the text file to v1.1 it will display the message to update?
-
How do you make an update checker? I have my mod pack uploaded now and whenever there is an update for it I want a message to show up in the chat saying there is an update for Fun Craft Mod Pack 2. How would I do that? My modpack is uploaded to MediaFire.
-
Thank you it is working now.
-
This is what the code for the fly event looks like(by the way the reason the name is boatDrop is because I was working on a diffrent mod befor trying to make this one and I didn't rename the files.) And I have it registered like this in my main class. boatDrop eventFly = new boatDrop(); @EventHandler public void PreInit(FMLPreInitializationEvent preEvent){ MinecraftForge.EVENT_BUS.register(new boatDrop()); }
-
I made the changes that you told me to make and I have no errors but I still can't fly in survival mode.
-
If by any chance the error could be caused by an id you set for your block and something in minecraft already has that id things will not work. You do not need to set an id for your blocks that can make problems with other mods forge will auto assign an id to blocks an Items. Here is an example of a mod I made I do not give ids forge does that for me. I only posted the code for one of my items but you can get the idea from one. I also posted code for a diffrent mod I made that adds new blocks. Again I only added the code for one block.
-
Hey so I was board and decided to work on my mod pack. So after trying to tweak the boat drops and failing I decided to see if I could make a fly mod. However I don't know if what I tried to de will work and I ran in to a problem with my code and I am not sure what eclips is wanting me to do do fix it it says to insert } but I can't find where it wants me to put the }. Anyways, am I on the right track for making a fly mod with what I have done here?
-
Thanks to all of you. Sorry I could not reply quicker I have not been able to get on in a while.
-
Hey now that I have my glassDrops working I was working on more of my mods and one of things I want to do is every time a cow dies it will spawn 1 leather. I got a start on it but I am having some trouble. Can some one help me with this? package net.glassDrops.mod; import java.util.Random; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.BlockGlass; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingDropsEvent; public class leatherDrop { @SubscribeEvent public void giveLeather(LivingDropsEvent evt){ if (evt.entity == Entity.Cow){ EntityItem item = new EntityItem(evt.world, evt.x, evt.y, evt.z, new ItemStack(Items.leather)); EntityPlayer player = evt.getPlayer(); if(!player.capabilities.isCreativeMode) evt.world.spawnEntityInWorld(item); } }}
-
Thanks. But is there a way to not make the glass item go straight for the player causing the player to instantly pick it up and not have it fall to the ground like normal. Because that is what is happening I mine the glass block and the glass item spawns and goes to the player. If I had to I would just go with that, but I would like it to fall to the ground like normal and the player has to walk over to pick it up not it come to the player. Also, how would I make this work for if a boat crashes and breaks so I can make it drop 5 planks?
-
Hey by any chance is this doing anything? package net.Cristalore.mod; import java.util.Random; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.BlockGlass; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraftforge.event.world.BlockEvent; public class glassDrop { @SubscribeEvent public void blockBreak(BlockEvent.BreakEvent event) { if (Blocks.glass != null); } public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(Blocks.glass); } }
-
Well as for making a class file for the event that is what I was trying to do and the reason I have the part of the code for the glass in there is because I didn't know what I needed to do to make it check to see if you destroyed a glass block and there for drop a glass block. as for the crash report here it is.
-
Would something like this work? I tried to do this and minecraft crashed. Am I on the right track or have I just completely messed up?
-
Ok well I tried to make something work but can't figure it out. package net.Cristalore.mod; import net.minecraftforge.event.world.BlockEvent; public class glassDrop { @ForgeSubscribe public void blockBreak(BlockEvent.BreakEvent event) { } It says that @ForgeSubscribe cannot be resolved to a type. I am trying to make the glassDrop mod.
-
Ok lets start over. I believe I will understand better if some one can give me an example. So lets do the glass drop mod. Can someone give me an example of how I would make glass drop itself when broken without silcktouch?
-
Ok. So to do that would I go in my main mod class and do this? @EventHandler public void (BlockEvent.BreakEvent event) If so then what would I do? And where is it that I can read about forge events?