Everything posted by Jacknoshima
-
How do you make plants grow on custom blocks?
I've made a custom dirt/grass block and I've made a custom BlockFlower class and in that I've added my custom dirt/grass block to protected boolean canThisPlantGrowOnThisBlockID(int par1) but the plant still doesn't grow on it I THINK it has something to do with public boolean canBlockStay(World par1World, int par2, int par3, int par4) { Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)]; return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) && (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this)); } I've checked the vanilla grass block and there's nothing in there that it uses to enable plants to grow on it, so I know it's all contained within the flower class and I'm relatively certain that it's something to do with the above code, but I don't know what I'm supposed to change or how I'm supposed to change it. Can anyone help?
-
[1.6.2] What am I doing wrong? (Creating custom bow)
Only way I've found to get the animation for the pull back is to use code from 1.5.2 combined with the newer code now, you've got yours set out completely different to mine, so I'm just gunna post my code and you can extrapolate from it what you need and see if it helps as for rendering it in the right position, you need a custom item render there's a few places that have it posted online but they're kinda hard to find from what I've seen, extending ItemBow or using .setFull3D does nothing really
-
[1.6.2] Passive mob attack player?
couldn't you just extend entity creature instead and see how pig zombies do it? actually looking at the code for wolves it seems they basically do it in the same way any reference to anger or an anger level is what you're looking for they make it so that the mob is peaceful but when it gets attacked it gets angry and when it's angry it attacks and the EntityAIHurtByTarget is in the wolf entity file so you should be fine adding it but you will probably need to extend something other than EntityLiving, namely EntityCreature wolves extend EntityTameable, which extends EntityAnimal, which extends EntityAgeable which extends EntityCreature, so extending EntityCreature may work better for you
-
[1.6.2] Solved Mob won't render correct
At a guess I'd say that it's because there isn't really alot in your render file atm, so it might not be connecting the render and entity to the model erm... I'd suggest taking a look at the bat render file it's probably the closest you're gunna get to a bee in vanilla it could be this public void func_82443_a(EntityBat par1EntityBat, double par2, double par4, double par6, float par8, float par9) { int i = ((ModelBat)this.mainModel).getBatSize(); if (i != this.renderedBatSize) { this.renderedBatSize = i; this.mainModel = new ModelBat(); } super.doRenderLiving(par1EntityBat, par2, par4, par6, par8, par9); } so try public void func_82443_a(EntityBee par1EntityBat, double par2, double par4, double par6, float par8, float par9) { int i = ((ModelBee)this.mainModel); this.mainModel = new ModelBee(); super.doRenderLiving(par1EntityBat, par2, par4, par6, par8, par9); } however, that is just a guess exploring the render files would be a better option and there are some 1.6.2 entity tutorials out there that may be a better help than me
-
[1.6.2] Solved Mob won't render correct
no, if you're working in Eclipse, they're placed in forge/mcp/src/minecraft/assets mine is forge/mcp/src/minecraft/assets/jnosh_advzelda/textures/entity/chu.png at least, that's the way that I've seen them all set up since 1.6.1 arrived you might wanna invest some time into looking up how to update from 1.5.2 to 1.6.x if you've still got things set up the old way
-
[1.6.2] Solved Mob won't render correct
The way that resource locations are done is defaulted to the vanilla minecraft assets folder you need to change it to so it's directed towards yours for instance, with mine it's private static final ResourceLocation field_110890_f = new ResourceLocation("jnosh_advzelda", "textures/entity/chu.png"); as the folder structure goes "assets" folder > "jnosh_advzelda" folder > "textures" folder > "entity" folder > "chu.png" assets/jnosh_advzelda/textures/entity/chu you need to do yours in a similar way, but using your own folders (obviously)
-
Model Problems
I just noticed the plus in the block icon code in the block code as well, which may need changing but anyway did the tutorial tell you to put ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTreetap.class, new TileEntityTreetapRenderer()); in initrendering? I only ask because when I've done custom blocks I've put it in the public void registerRenderThings() method I'm not sure if it'll make any difference but you could try it for nothing?
-
[DOUBLE _ SOLVED] - Forge 1.6.2 Texturing Problem (Black/Purple)
you could always just get rid of that registerIcons code and stick .func_111022_d("wreckitmod:Amethyst") on the end of where you call your block in the main class like mine I use unchangingdirt = new BlockUnchangingDirt(3005, Material.ground).setUnlocalizedName("unchangingdirt").setHardness(2.0F).setResistance(2.0F).func_111022_d("jnosh_advblocks:dirt").setCreativeTab(Advblockstab).setStepSound(soundGravelFootstep); with ".func_111022_d("jnosh_advblocks:dirt")" being what's used to call my custom dirt texture and "jnosh_advblocks" being my modid
-
Help! Custom mob w/Spawn Egg and Explaining the Config File?
I learned from tutorials like that and I get along just fine *shrugs* if the OP can follow the tutorial and it works, then why not? and they can use a tutorial to get the basics down and then explore what other code is available besides, following the entire course that you linked will probably end up with them re-going over stuff they already know, considering they never said they knew nothing about java and didn't say they didn't know basics may as well give them a tutorial more specific to what they asked for rather than assume they're inept and give them a full course which they probably won't do anyway
-
How do you get a custom modelled block to face the player?
Well, after looking at various sources for several hours, I decided to just split it into 4 blocks facing in 4 directions I believe it's something in my render code that's not working, I have an idea what's wrong so I'm just gunna work on it over time Thanks for the pointers though At least I know I'm headed in the right direction now
-
Help! Custom mob w/Spawn Egg and Explaining the Config File?
There's a decent enough tutorial for creating mobs in 1.6.2 here It's designed for macs but if you're using a real computer then it shouldn't be hard to translate across There're 3 parts to the tutorial on this guy's channel as for spawn eggs, just do a google search on getting spawn eggs, there're a few tutorials out there and the code hasn't changed from 1.5.x to 1.6.x so you can use 1.5.x tutorials if you'd like
-
Model Problems
I dunno about the rest of the code but the resource location has been declared wrong it needs to be a comma instead of a plus like ResourceLocation resourceLocation = new ResourceLocation(Core.modid, ":textures/models/Model.png") I just tested it on my own render and when I used the plus it gave a missing texture changing it to what it is above gave the right texture
-
Need help with blocks changing depending on neighbours
Ah, awesome I'll have a look into that thanks
-
How do you get a custom modelled block to face the player?
Similar to how anvils and stairs work. I need my custom modelled block to face the player when placed. I've looked in every block class I can think of that does this (pumpkins, furnace, chest, anvil, stairs) and none of the code relating to on block place seems to work. I think it may be my render file but the only info I can get on this is months old and the code doesn't work anymore can anyone help? my block file is: the the renders are:
-
[solved] Need Help with onBlockDestroyed Method
I just stuck the code GoToLink sent onto a sword to test it and it works perfectly for me...
-
Need help with blocks changing depending on neighbours
Okay, so, I want to create a block which changes depending on if other blocks of the same block are next to it Like with fences and redstone wire If you've got redstone wire and place another redstone wire next to it, it changes to the line and the corners/crosses if you put more next to it how does that work? I know it's something to do with and the textures are but I don't really get how it works more in that I don't really get how it knows what texture to use can anyone point me in the direction of a tutorial or explain how this sorta thing works?
-
Extend attack range of item
I wouldn't call it weird It's more logical than anything If you make a long sword, it's reach would be further than a regular sword If you've got a pike or a halberd it's reach would be a lot further than a regular sword similarly, if you've got a dagger, it's reach would be less than a normal sword anyway I'll look into reach distance thanks
-
Extend attack range of item
Is it possible to extend the range at which an item can hit an entity? like, a sword that can hit an entity at twice the distance away that vanilla can if so, how? would you need to use a custom item model to make the weapon bigger, or wouldn't that affect it?
-
weird line in the code of EntityLivingBase
He's one of the Minecraft game developers
-
How do I use IItemRender to rotate an item when it's held?
Putting "this.setFull3D();" into the constructor changed absolutely nothing... nor did using the "public boolean isFull3D()" method, nor did any other variation of those that I could think of
-
How do I use IItemRender to rotate an item when it's held?
So, I've been looking for a decent tutorial on how IItemRender works, but I can't really find much. I checked the forge wiki tutorial but that's for something else. Basically, I want my sling shot to be in a different position when in first person view By rotating the texture I can change it's position but I can't get it to the right place best I can get it is: but I want it to be rotated round like: (excuse the crappy editing) I THINK I need an IItemRenderer for it and I've got the skeleton for the class and I can register it in my main mod file easily enough I just don't know what I need to put into public void renderItem(ItemRenderType type, ItemStack itemStack, Object... data) { } any help?
-
[SOLVED] [1.6.2] Texture not loading
You need to make sure your folders are set up right Go into forge/mcp/src/minecraft Create a folder called "assets" if there isn't one already then create a folder inside assets called "komag" then create a folder inside komag called "textures" then create your "items" "blocks" "entities" ect folders put your texture inside the relevant folder that's the setup I use and all my textures work fine
-
New Entity, egg not showing up?
I cba explaining it on here, because I'm tired and about to go to bed, but I wrote out a tutorial on how to get your spawn eggs into a custom creative tab, if you can understand it http://www.minecraftforum.net/topic/1921545-162-mob-spawn-egg-in-custom-creative-tab-tutorial/ and if you don't care about putting them in a custom creative tab, I uploaded my old way onto my github here https://github.com/Jacknoshima/Mods/blob/master/Pre-Alt%20Main%20Mod%20File which puts them into the misc tab the parts that get you spawn eggs are: public static int getUniqueID(){ int EntityId = 400; do{ EntityId++; } while(EntityList.getStringFromID(EntityId) != null); return EntityId; } public static void EntityEgg(Class<? extends Entity > entity, int primaryColor, int secondaryColor){ int id = getUniqueID(); EntityList.IDtoClassMapping.put(id, entity); EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor)); } and EntityEgg(EntityStatVillager.class, 0xFFCCDD, 0x1900FF);
-
Simple Flying mob AI
If it's just flying you want to focus on atm, you could try looking at the bat code From what I've seen, they tend to fly quite low, albeit in a slightly random pattern
-
[1.6.2] Fire doesn't extinguish correctly
The part of the code you used that turns the block from fire to 0 would be helpful Either way though, I would've though extinguishFire() would work... but seeing the code would help to work out where it's gone wrong also that mod sounds REALLY awesome I don't think I've ever seen a mod like that before
IPS spam blocked by CleanTalk.