Everything posted by coolboy4531
-
[1.6.4] my textures are not loaded by minecraft
Is your object a Block or an Item? You decide.
-
[1.7.2] [SOLVED] Custom Sapling won't grow on custom blocks
Why not just override the method?
-
ASM : changing fields.
Thank you, I actually learned a lot with reflection. Now, here's the problem, I don't know how to implement it to the events. Too much .... Exceptions (NoSuchFieldException, IllegalArgumentException, etc.) idk. I feel so retarded.
-
ASM : changing fields.
Okay, hold it. I need you to restate that, because my brain - just too much work and stress happenin' right now . So you are trying to tell me that the "instance" is the SRG name ("field_****")? If so, would Forge automatically change that when the srg name is changed - to the actual value instead of field_**** to (e.g. getBlockName() )? Also, how would I use it with the event? @SubscribeEvent public void onEntityJoinedWorld(EntityJoinWorldEvent event) { if (event.entity instanceof EntitySkeleton) { //what do I do here? //do I do -- Field.set(instance, value) -- ? } }
-
ASM : changing fields.
Yep, made perfect sense Yeah, I was leaning towards that, I learned a few things about Java reflection but not so deep into that. If you can teach me a thing or two about how to replace that field, that would be greatful. (You don't have to show me like noob codes, just need to get some advice ) If you would like to know how little I know about reflection I'll be happy to show what I know. I know how to use "Field" to get the private value. public class RandomClass { private String s = "hi"; } public class RandomClazz { public static void main(String[] args) throws Exception { RandomClass randClass = new RandomClass (); Field f = randClass.getClass().getDeclaredField("s"); f.setAccessible(true); System.out.println(f.get(randClass)); } } In my opinion, I don't even THINK this would work, because it was a long time ago that I learned this
-
ASM : changing fields.
Learnt how to change methods in ASM, was worth it. lol Now, I'm trying to learn how to change fields. They're probably extremely similar, and probably easy to grab on to but I don't know where to learn What I'm trying to do is lower the skeleton attack speed (I probably don't need to make a coremod, imo I don't know any alternatives) Converting: private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 20, 60, 15.0F); to private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 60, 60, 15.0F); Any suggestions?
-
[1.6.2] Custom armor doesn't renders correctly
Code please.
-
[1.7.2] NullPointerException: Rendering item
We can't do anything without your code. Base class, the items you use to craft the item, etc.
-
1.6.4 Minecraft crashes every time I join a Pixelmon Server
Look dude, wrong forum. But I'll help you out *hint* version =/= Server Version *hint*
-
[1.6.4] Eclipse Error: "AL lib: (EE) alc_cleanup: 1 device not closed"
You did what? No no no no no no no no no no no no no no no. NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO. lol, just don't edit base classes pls. Okay I'll help you with your item and block names, including your ores (I'm 100% positive they won't generate) What's the problem?
-
[1.7.2][UNSOLVED] Container - Basic Issue
Have you used NBT tags to save your inventory slots?
-
[1.7.4] Gui Handler [not solved]
Break points are to separate things (its kinda complex don't want to explain now) Switches are used to do different things if the value of what is inside the switch corresponds to your case. For example, you should make your code like this: switch(ID){ case mainRegistry.guiIDSaltFurnace: if(entity instanceof TileEntitySaltFurnace){ return new ContainerSaltFurnace(player.inventory, (TileEntitySaltFurnace) entity); } break; case mainRegistry.guiIDgrinder: if(entity instanceof TileEntityGrinder){ return new ContainerGrinder(player.inventory, (TileEntityGrinder) entity); } break; In my opinion, I think you 'ought to know more Java before jumping into complex things.
-
Using Custom Item As Ore Drop
You don't get your item object from Items, because you never put it in there (its for vanilla items). You have to get the item object, from your OWN main class. Give us code, please. It was hard to understand what you were talking about, without code of course.
-
[Solved] CustomFurnace player.openGui not working
Misread, let me see what I can do.
-
[1.7.4] Gui Handler [not solved]
Then why do it? mainRegistry:guiIDgrinder What is this suppose to be? The ID of the block/item? Come on dude, you should know that IDs were removed in 1.7 and uses the Block/Item object itself. Also, never use @SupressWarnings("unused") or other things that you have NO IDEA does. Another thing is to use context clues ("unused") = not being used. So why do you think it says "Connection lost?" If you give me more information of what you are trying to do with your switches, then I'll gladly help you out
-
[1.7.2] Registering Events
PlayerInteractEvent is posted on the MinecraftForge bus not the FML bus. FML Bus = FMLCommonHandler.instance().bus() MinecraftForge Bus = MinecraftForge.EVENT_BUS In other words, use the MinecraftForge EventBus.
-
[Solved] CustomFurnace player.openGui not working
player.openGui(ExampleMod.instance, 0, world, x, y,z); dafuq is this, you are calling your mods instance and then doing nothing?
-
[1.7.4] Gui Handler [not solved]
@SuppressWarnings("unused")
-
[1.7.2] setColor trouble
Should work unless you are using the wrong color (hex). If you look into your BiomeGenBase you can look at the other biome's { .setColor(int) } Also, have you registered your Biome? If so, can I take a peek at it?
-
[1.7.2] Custom Tools Causing Crash on Use
Give us your main class.
-
[1.7.2 - FIXED] Crafting Error NullPointerException
Why the **** do you have 4 characters? _ ## Underscore, space, numbersign, numbersign?
-
Enchantment on weapons
Use MinecraftForge events. PlayerEvent.ItemCraftedEvent - for crafting an item (applying the enchantment) TickEvents - for making the item enchanted no matter what (creative inventory, etc.)
-
[SOLVED] How to stop a block causing shadows?
From what I remember, I don't think you need to set it. Completely remove: this.setLightOpacity(0);
-
[SOLVED]Help with achievements code. Forge 1.7.2 modding
Dirt = new Achievement("Dirt", "Dirt", 0, 0, Blocks.dirt, null).registerAchievement(); Source files as in Vanilla Minecraft run: gradlew.bat setupDevWorkspace
-
Forge Modding Trouble
You don't OPEN gradlew.bat (you need to follow the instructions on this post) http://www.minecraftforge.net/forum/index.php/topic,14048.0.html
IPS spam blocked by CleanTalk.