
firstarchon
Members-
Posts
53 -
Joined
-
Last visited
Everything posted by firstarchon
-
that seemed to fix it. thanks
-
i copied the mods src folder so it has the same filestructure as the original. so the assets are in a resources folder and the code is in the java folder
-
I recently got a hold of some the src files of some mods (some from from one of my old harddrive and some from a friend of mine) on my new pc and i can't seem to figure out how to open it in a dev enviroment so i can run and modify the code. I've tried making a new dev environment and dropping the src and build.gradle into it and it lets me see the code but if i launch mc it doesn't run the mod
-
nevermind I decided to make a getter method in the Reference class that returns the item rather than referring to a constant that is equal to the item.this fixed the problem
-
my item class doesn't have any damage methods. it doesn't have a max damage either @Override public Item getTabIconItem() { return Reference.ITEM_ICON; //return ModItems.ItemRandomThing; } public static final GenericItem ITEM_ICON = ModItems.ItemRandomThing; I haven't done anything with durability because I don't intend this item to have durability.
-
for some reason I'm getting a strange crash whenever I make the get tab icon item method for my item tab use a reffrence class instead of specifiying it in the creative tab class http://pastebin.com/MfVp7bSf
-
I fixed it. the problem was the @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS , serverSide = Reference.SERVER_PROXY_CLASS) public static Iproxy proxy; and Reference.CLIENT_PROXY_CLASS was wrong.
-
I found it package com.FirstArchon.redstoneium.reference; public class Reference { public static final String MOD_ID = "redstoneium"; public static final String MOD_NAME = "Redstoneium"; public static final String VERSSION = "1.7.10-1.0"; public static final String CLIENT_PROXY_CLASS = "com.FirstArchon.RedStoneium.proxy.ClientProxy"; public static final String SERVER_PROXY_CLASS = "com.FirstArchon.RedStoneium.proxy.ServerProxy"; public static final String GUI_FACTORY_CLASS = "com.FirstArchon.RedStoneium.client.gui.GuiFactory"; } the RedStoneium references in the reference class didn't update!
-
I keep getting crashes Caused by: java.lang.NoClassDefFoundError: com/FirstArchon/RedStoneium/proxy/ClientProxy (wrong name: com/FirstArchon/redstoneium/proxy/ClientProxy) as far as I can tell it just really wants me to have the name have capital letters
-
I used a variable everywhere I entered the mod id so changing the place where the variable value is set changes it everywhere. do I need to change the name of the main class too?
-
my mod id is RedStoneium and if I change it nothing works anymore.
-
in my dev environment my textures work fine. but I tried to add it to an instance of a modpack(RR3) to do some testing for compatibility. while in rr3 one of my textures isn't loaded and the log doesn't say anything about a missing texture. what could cause a texture to work fine on its own but break with other mods and not leave a missing texture line in the log?
-
I've never used forge gradle before so I followed a guide. I went into the folder that contains my src folder and ran the comand gradlew.bat build this placed a directory in the build folder but as far as I could tell no .jar file containing my mod. so I compressed the build folder and tried to launch with that. and it crashed for java.lang.ClassNotFoundException: I googled it but i couldn't find any guides that explained what I did wrong or how I should have done it. *ps I didn't know where this should be so if this isn't the place for it I'm sorry*
-
thankyou starwarsmace for that link (also I figured out a field is and I still don't understand it. a field is a variable in a class but don't all variables (all code even) have to be in a class?) { int x; int y; int z; ForgeDirection direct = ForgeDirection.getOrientation(p_77648_7_); x = direct.offsetX; y = direct.offsetY; z = direct.offsetZ; //par2World.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, Blocks.torch); par2World.setBlock(x, y, z, Blocks.torch); } this seems to be working but I think I'm calling the cords in the wrong order because when I right click it takes a torch out of my inventory but no torch appears.
-
I would say that I do know basic java (albeit with a few holes) could you please link to a resource that will help me understand or show me some example code that I can examine? I know what an object is but I have never heard the world "field" before. If I were to set it to a variable I would assume it would be something like this. { ForgeDirection x = ForgeDirection.getOrientation(p_77648_7_); par2World.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, Blocks.torch); } (this much I admit should have been obvious when you said it was an object, but I never though of needing a constructor) but I'm still not sure how to get at these "fields"...?
-
so the xOffset, yOffset and zOffset. should be the arguments of the set block command? this might be a noobish question but how do I get these values? public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par3EntityPlayer, World par2World, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { if(par3EntityPlayer.capabilities.isCreativeMode||par3EntityPlayer.inventory.consumeInventoryItem(Item.getItemFromBlock(Blocks.torch))) { ForgeDirection.getOrientation(p_77648_7_); par2World.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, Blocks.torch); } return true; } this is what I have this now. ForgeDirection.getOrientation(p_77648_7_); translates the face into a forge direction object. how do I use the fields of the object? are they just variables I can refer to now? (If this is a derp question I'm sorry but I don't understand how this is supposed to work)
-
so I need to do p_77648_10_ ForgeDirection.getOrientation this returns a "ForgeDirection" object. and then I need an if statement that interprets the forge direction object and increments or decrements the x y or z vallue based on the ForgeDirection objects value?
-
what exactly does ForgeDirection.getOrientation. return? is it a integer? ie. top = 1 botom = 2 etc?
-
ty that fixed it. small problem though. this is deleting the clicked block and isn't placing the torch on the block as i anticipated. is their a way to place a item on the face you clicked instead of setting the block (this creates a break bedrock glitch )?
-
right...I don't see your point
-
I'm trying to make an item place a torch on rightclick. package com.FirstArchon.RedStoneium.item; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntitySnowball; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import com.FirstArchon.RedStoneium.item.ItemRedDiamondPick; import com.FirstArchon.RedStoneium.CreativeTabRS; import com.FirstArchon.RedStoneium.reference.Reference; import com.FirstArchon.RedStoneium.utility.LogHelper; import net.minecraft.world.World; public class ItemRedDiamondPick extends ItemPickaxe { public ItemRedDiamondPick(ToolMaterial material) { super(material); this.setUnlocalizedName("ItemRedDiamondPick"); this.setTextureName(Reference.MOD_ID + ":" + "ItemRedDiamondPick"); this.setCreativeTab(CreativeTabRS.RS_TAB); } public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par3EntityPlayer, World par2World, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { if(par3EntityPlayer.capabilities.isCreativeMode||par3EntityPlayer.inventory.consumeInventoryItem(Item.getItemFromBlock(Blocks.torch))) { setBlock(p_77648_4_, p_77648_5_, p_77648_6_, Blocks.torch); return true; } } } the problem is the setBlock(p_77648_4_, p_77648_5_, p_77648_6_, Blocks.torch); this is copied from the flint and steel class and I I'm using the import statement to import the setBlock method but it still won't recognize that this class exists.
-
so could instead of powering an arbitrary block could it instead check adjacent blocks to see if they are powerable and if they are provide them with a redstone pulse? that again would take some way of interacting with blocks (I have to have some way to tell the blocks what block I'm looking to interact with and I'm not sure how to do that)
-
if you have a button on a block and you right click it the button powers the block and the power propagates through the block to any redstone stuff behind it. my idea is to add a rightclick function to a tool so that when you rightclick a block with a tool it acts as if it is receiving a redstone signal from a button.
-
I have a general idea of what the code should do. on right click then some kind of code to tell that returns the some sort of unique identifier for the block that was clicked on some kind of code that instructs that block to emit redstone. do you have any suggestions to where I should look for details on the part where I tell the code to interact with the specific block that was clicked on?
-
I've tried that. the only problem is that vanilla code doesn't use descriptive names so you wind up with code that looks like public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { int i1 = p_149727_1_.getBlockMetadata(p_149727_2_, p_149727_3_, p_149727_4_); int j1 = i1 & 7; int k1 = 8 - (i1 & ; if (k1 == 0) { return true; } else { p_149727_1_.setBlockMetadataWithNotify(p_149727_2_, p_149727_3_, p_149727_4_, j1 + k1, 3); p_149727_1_.markBlockRangeForRenderUpdate(p_149727_2_, p_149727_3_, p_149727_4_, p_149727_2_, p_149727_3_, p_149727_4_); p_149727_1_.playSoundEffect((double)p_149727_2_ + 0.5D, (double)p_149727_3_ + 0.5D, (double)p_149727_4_ + 0.5D, "random.click", 0.3F, 0.6F); this.func_150042_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, j1); p_149727_1_.scheduleBlockUpdate(p_149727_2_, p_149727_3_, p_149727_4_, this, this.tickRate(p_149727_1_)); return true; } } and to my brain there is very little difference between this and binary code