Everything posted by Jay Avery
-
[1.8]Make booleans stay after quitting Minecraft
But Property =/= boolean
-
I'm having some problems creating crops (1.8)
It's a null pointer exception at line 42. The only variable at line 42 is associatedCropBlock , so this must be null when the method is called. Where do you initialise this? Post your whole crop class.
-
[1.10.2] Tile Entity won't save data[Solved]
So what tells you that the information isn't being saved?
-
[1.10.2] Tile Entity won't save data[Solved]
What tells you that information isn't being saved? Are the read/write methods being called at all (use your debugger and/or print statements to find out)?
-
[1.11] [Solved] How do I use BlockStates without metadata?
This could just be a copy-pasting typo, but in case it matters - in getActualState you return EnumHouse.ARRNY instead of EnumHouse.ARRYN . Also, where is your EnumHouse - can you show the code for that?
-
[1.10.2] Chickens still laying eggs
You are calling super.onLivingUpdate() , so it's doing the regular chicken update as well as your custom one.
-
[1.10.2] MalformedJsonException with valid JSON in lang file
I don't know what you were pasting into JSONLint, but I don't think it was the text you showed...
-
[SOLVED][1.10.2]replacing Playerinventory Gui with custom one
You want GuiOpenEvent - then you can check whether the event's GUI is the inventory, and set it to your custom GUI instead.
-
[1.11] Trying to kill off my mobs if they are burning and remove their drops.
You should be able to use LivingDropsEvent which is fired when an entity dies and before it drops its loot. Then you can check for the type of entity and the damage source and clear the entity's drops if it fits your criteria.
-
[Forge 1.10.2] Container Crashed java.lang.NullPointerException: Ticking player
You don't seem to initialize your worldObj or pos fields in your ContainerNeutron - that would mean they're both null when canInteractWith is called. You can use the debugger to check that.
-
Rendering TileEntity - texture map?
Bump. Can anyone advise me even on where to do some research of my own? I just don't know how to begin.
-
Rendering TileEntity - texture map?
I see how to get the right part of the texture for each individual model part, but I still don't understand how the texture is applied to the actual faces. For example the vanilla chest has a dark texture on the underside face of the lid, but the sides and top are wood texture. Obviously in the texture file there is a part that has the dark texture and other parts that have the wood texture. But if I'm starting from scratch, how do I know how to lay out my texture to get the right bits of texture applied to the correct faces?
-
[1.10.2] Textures not working.
Your json filename must be the registry name of your Item. Show us your ItemCheese class - are you setting the registry name? Also, if you want your item to display like a 'standard' vanilla item, you can set the parent to item/generated and then you don't need to set the displays manually. The displays you have set in your json won't actually do anything in this case anyway, because since dual-wielding was introduced the displays for each hand are defined separately - i.e. "thirdperson_righthand" , "firstperson_righthand" .
-
Rendering TileEntity - texture map?
I have a block which I want to render with a TESR (it has a lid opening and closing animation like a vanilla chest). I've figured out roughly how to build a model, but I don't understand how texture maps are defined. I've looked through the vanilla chest rendering code and I can't see how/where it dictates which part of the texture is used for which faces and parts of the model. Is there some secret I'm missing? Are there standard rules about which parts of the texture image the renderer uses for which face?
-
[1.10.2] See-through glass-like block acts as an x-ray, help needed
Post the code of your block, it's most likely to do with defining transparency in the code (rather than the models).
-
Issues giving a custom item a name
Is your lang file in the right place?
-
[Solved] Developing offline
Oh, thanks for the tip - that's done it! I just removed my username from the run configuration arguments and it ran offline with no problems.
-
MC1.10+ drops from leaves
Oh, apologies, I didn't realise the block was from another mod. I'm afraid I'm stumped for the moment.
-
MC1.10+ drops from leaves
Do you have any other events affecting block breaking and/or harvesting? Also, post your code for your BlockBOPLeaves - there may be something in there interfering with the event. All that said, if you only want your items to drop when one of your own blocks is broken, it will be easier to define that inside your block class itself the way vanilla blocks do, without needing to use events at all.
-
Help with setBlockState
If it 'doesn't like it with the override', that means your IDE is telling you that you're not overriding correctly. Go to the superclass and find the method you want to override and copy the exact method signature to make sure it is correct.
-
[Solved] Developing offline
This weekend I'm going to be travelling and I'd like to be able to bring my laptop and work on my mod. But I just experimented with turning off my internet and then trying to run my mod from eclipse, and I got a crash: Is there a setting I can change to allow me to run Forge while not connected to the internet? Surely it is possible, since you can play vanilla Minecraft offline?
-
Overwriting the BlockStone class
You can't override methods from vanilla classes. Instead you should use events - in this case, HarvestDropsEvent . In the event handler method, you can check whether the block is granite/andesite/diorite, and edit the list of drops to remove the vanilla block and add your cobblestone version.
-
How to use item property override, jsons and inheritance?
I've made some progress. I've got a working item property override for a single item now. But the downsides is, I had to make four models for a single item that has this property. And I'm planning to have a lot of items with the same overlay property. Does anyone have any idea if I can make a generic/abstract version of the model (which applies the overlay textures according to the item property) which I can then extend by just adding the item's base textures? It seems so excessive to have to make endless really simple models which all have the same overrides. D: Edit: for reference, I'll show how I'm using property override. My item class: My item model json: And the extra model files for the variants: And as I said, the property override and models are working as they should - I'm just hoping there's a more efficient way than creating many files for every item.
-
[1.10.2]How to create custom trees?
What do you want to achieve with your custom tree? Do you want to make something new generate in the world? Do you want a different type of sapling? Do you want new types of logs and/or leaves? Trees that grow in a different shape? 'Custom trees' is a very open question. Start by thinking of what you want and exactly how it will be different from vanilla, then you can focus on how to achieve it (and getting help for specifics as you need it).
-
Making an item which is both stackable and damageable
This is actually the decision I've come to! I'm going to have only three stages of spoiling, so that stacks can be combined if they're in the same stage but not if they're in different stages. As for the rate of spoiling, that'll need plenty of testing to get it calibrated right, but the aim of my mod is a harder survival game anyway.
IPS spam blocked by CleanTalk.