Everything posted by Draco18s
-
[1.8] Dynamic textures with NBT
Alternatively, https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/industry/item/ItemCastingMold.java#L80 https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L103-L109 Rather a bit more complicated, but very flexible.
-
[SOLVED] IntelliJ SideOnly Minecraft.getMinecraft() error
That's....not....true....even by half. @SideOnly makes the thing marked as side only stripped when run on the dedicated server. Which is not necessarily sufficient to avoid crashing the dedicated server, as you may be trying to invoke this method from common code.
-
(SOLVED)[1.11]Help with particles
Which is part of what I made my code do, specially.
-
String will not stay in proper position.
> No code Hmm.
-
[1.10.2] Getting the number of players in world [solved]
Did you try something like... ""+worldIn.playerEntities.size() ? Because a raw integer value isn't terribly useful. You'd probably really want to display something like "5 players in world" which would be worldIn.playerEntities.size()+" players in world" which wouldn't have your int->string conversion problem.
-
Shield in my mod
Probably the same way as CoFH. Using the LivingAttackEvent.
-
Getting other player inventory
Except that I don't think other player's inventories are synced to your client.
-
[1.8] Adding a Vanilla Texture to a Modded Block
You also need: @Override public boolean isOpaqueCube(IBlockState state) { return false; }
-
[1.11] Custom Crops Issue
Go look at BlockCrops.
-
[1.11] Custom Crops Issue
You will need to create your own property. It's not hard. As in, you could literally copy-paste it and change one number. Move it out of your blocks class and into your client proxy.
-
[1.8] Adding a Vanilla Texture to a Modded Block
If your IDE told you to remove the override annotation then actually, there is a problem. And it's not with the annotation. It's with the method signature.
-
[1.8] Adding a Vanilla Texture to a Modded Block
Why do you not have methods marked with @Override?
-
How to iterate through items?
Function? You mean init and postInit? Those methods have been around since forever. If you mean Items.REGISTRY (which is a field) I don't know when it was added.
-
How to iterate through items?
Items may still be being created by mods (that load after yours) during preInit, but after preInit (init, postInit, during game) the registries are finalized and cannot be modified. So yes.
-
How to iterate through items?
Not entirely true. As items/blocks/etc can only be registered during PreInit, then any point after that will see every item that exists, regardless of mod load order.
-
[Solved]redoing world generation with custom ores
It is not. When a chunk is generated fresh, it gets saved, regardless of if anything changed or not.
-
How to iterate through items?
Look at Items.REGISTRY
-
[SOLVED] Strange Forge Error
And now I'm reminded of a time when I poked around with a Microsoft HTML tool that was so buggy I had website images displaying inside the program's UI (completely breaking it).
-
Mod making 1.10.2
Personal preference, though users of one will generally espouse some feature that makes their IDE better.
-
Mod making 1.10.2
ShadowFacts has one. He does some things that make me twitch (such as having his Item or Block class contain the rendering registration code...) but it is up to date. There's also Forge's own docs, although in some respects it doesn't have everything.
-
Mod making 1.10.2
Not to mention other things that work fine for him, but which are unnecessary and make it more difficult for new modders to efficiently understand what's going on, and when asking for help, able to quickly supply the code more experienced folks want to look at. For example, if I asked you to post your main mod class so I could look at your mod lifecycle events (to see when and how you are registering your items, recipes, and renderers) would I find that information, or would there just be a proxy.preInit(ev), ModBlocks.preInit(ev) or similar line making me have to ask for that class too?
-
1.10 Blocks with multiple properties
Probably because the item is still being given to the inventory as 0/4/8/12 but you registered an item renderer for a different metadata value. i.e. this chunk: @SideOnly(Side.CLIENT) public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) { // item , amount, meta list.add(new ItemStack(itemIn)); list.add(new ItemStack(itemIn, 1, 4)); list.add(new ItemStack(itemIn, 1, 8)); list.add(new ItemStack(itemIn, 1, 12)); } If you're going to change your metadata values in one place, you need to change them in the other. THIS IS IMPORTANT, IT IS NOT ARBITRARY. Most importantly, you need to use the metadata values that your block actually drops when broken. If it exists in your inventory, then you have an item. item = new ItemMultiTexture(tudorSet, tudorSet, ModBlockTudorSet.subTypes; Surprise, there it is. In order to override the unlocalized name you need a custom ItemBlock class. Surprise! Alternatively, pass a name function to the ItemMultiTexture's constructor. E.g. here is how vanilla handles the stone variants: registerItemBlock(Blocks.STONE, (new ItemMultiTexture(Blocks.STONE, Blocks.STONE, new Function<ItemStack, String>() { @Nullable public String apply(@Nullable ItemStack p_apply_1_) { return BlockStone.EnumType.byMetadata(p_apply_1_.getMetadata()).getUnlocalizedName(); } })).setUnlocalizedName("stone"));
-
Questions about getting started with Forge modding
You need to register an entity renderer. Try this thread:
-
1.10 Blocks with multiple properties
Again, that method is only used for populating the Creative inventory. Name: you need to override the getUnlocalizedName method in your item in order to supply a name that can be localized. Meta: I don't understand your question I am not sure what you want to know here
-
[1.10.2][Solved] Solid Block renders transparancy white
Try setting the opacity as white, but at 1% opaque. When rendering transparency as transparent, Minecraft ignores transparency values below about 10%.
IPS spam blocked by CleanTalk.