Everything posted by Draco18s
-
[1.12.2] [Solved] Event for connect to singlerplayer world, server world
That's because the player doesn't exist yet, that event fires before the connection is finalized and the server creates the player in the world and sends the world information to the client.
-
MCP Eclipse | How can i add a login panel?
Don't make custom launchers
-
[SOLVED] Troubles saving WorldData by appending compounds in taglist
They do, automatically. I forget what the default logging level is (things below it don't show), but I'm pretty sure Level.INFO works (I'm using it currently) but if it doesn't, you can use Level.WARN
-
[SOLVED] Troubles saving WorldData by appending compounds in taglist
Yes, because it includes information like what mod the message is coming from and where in the code it was called from.
-
Calling a function with parameters from a separate class
You're doing everything wrong. Keyboard events only happen on the client. Game state is stored on the server. You must use packets
-
TileEntity inventory readFromNBT bug.
Your Container is broken. Also, you didn't post any code.
-
[1.12] [Solved] Sending blockstate over network
I'm sure vanilla manages this somewhere. I'm sure you could look at it. Even if that fails, I'm sure an IBlockState decomposes into a collection of values that can be contained within a packet.
-
[SOLVED] Troubles saving WorldData by appending compounds in taglist
public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); }
-
Calling a function with parameters
You already have a thread about this:
-
Calling a function with parameters from a separate class
What do you mean, you can't call it because of one of the parameters? What about that parameter? Which one? What are you doing? From where?
-
[SOLVED] Troubles saving WorldData by appending compounds in taglist
Random question: Why are you printing to standard error? You know every mod had a mod specific logger, right? (Also... System.out is a Thing...)
-
[1.12.2] Smelting Recipes for Ore Variants
- [1.12] Smelting Recipe for Variants[SOLVED]
You can't create an ItemStack out of an IBlockState. You have to ask the block to give you an item stack for the given state (getDrop or getPickBlock)- [1.7.10] Rendering Multiple Textures On One Face
Not really. But I do know you'll be interested in ISimpleBlockRenderingHandler- [1.7.10] Rendering Multiple Textures On One Face
Sorry, I missed the version number you're on. 1.7.10 isn't supported here any more.- [1.7.10] Rendering Multiple Textures On One Face
Use multiple layers. For example, all of my ores use this model: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/models/block/hardore.json Note there are twelve faces specified: each face of the block (up, down, north, etc) is specified twice with different textures each time. You can use blockstates to indicate which texture-file (cross.png) gets drawn in each texture-reference (#overlay, #base, #foo).- Creating new itemsStack
Change the size of the item stack.- Creating new itemsStack
When would you like to do this?- [1.12] Smelting Recipe for Variants[SOLVED]
Second time this exact problem this week. The Block + Meta problem probably needs to go into the common issues thread.- [1.12.2] Basic metadata block, wrong inventory textures [SOLVED!]
No worries! We all have days like that. Heck, there have been times when writing up a post to as a question or figure out a bug, I'll arrive at the solution. It's called rubber duck debugging.- [1.12] Removing Vanilla Ores [SOLVED]
You can't remove the blocks from being in existence, but you can remove them from the world. There's an OreGen event, you would just need to subscribe to it, then cancel it. (I'm blanking on the exact name atm)- [1.12.2] Basic metadata block, wrong inventory textures [SOLVED!]
AH HA, that debug output solves it: String str = b.getPropertyString(state.getProperties()); ModelResourceLocation mrl = new ModelResourceLocation(state.getBlock().getRegistryName(), str); // HERE Log.info("Registering variant : " + str + " -- Meta : " + this.getMetaFromState(state) + " @ " + mrl.toString()); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(state.getBlock()), this.getMetaFromState(state), mrl);- [1.12.2] Basic metadata block, wrong inventory textures [SOLVED!]
You don't use "inventory" for metadata blocks. Well, you can, but you need to then supply a JSON item model file to specify which texture to use (this is how vanilla does it). It's way easier to reuse the blockstate json for item models when possible (all hail Forge). This is why there's all that StateMapper#getPropertyString() stuff: we need to know what the state mapper says the variant string is so we can tell the Model Loader what variant model to go locate data for from the blockstate json.- [1.12.2] Basic metadata block, wrong inventory textures [SOLVED!]
You're not using the inventory variant, you're using the other variants: String str = b.getPropertyString(state.getProperties());- [1.12.2] Basic metadata block, wrong inventory textures [SOLVED!]
Oh, and then it redirects back into the block class. :V You're making things unnecessarily complicated and duplicate code. All of this: public void initModel() { StateMapperBase b = new DefaultStateMapper(); BlockStateContainer bsc = this.getBlockState(); ImmutableList<IBlockState> values = bsc.getValidStates(); ResourceLocation mrla[] = new ResourceLocation[values.size()]; for(IBlockState state : values) { String str = b.getPropertyString(state.getProperties()); ModelResourceLocation mrl = new ModelResourceLocation(state.getBlock().getRegistryName(), "inventory"); Log.info("Registering variant : " + str + " -- Meta : " + this.getMetaFromState(state) + " @ " + mrl.toString()); Item.getItemFromBlock(state.getBlock()).getMetadata(0); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(state.getBlock()), this.getMetaFromState(state), mrl); } } Can easily be inside a library class and you pass in the relevant block/item instead of using "this." Like this. Now then... This is unused: ResourceLocation mrla[] = new ResourceLocation[values.size()]; This does nothing: Item.getItemFromBlock(state.getBlock()).getMetadata(0); Beyond that...it looks exactly like my own code, so I can't see the error. - [1.12] Smelting Recipe for Variants[SOLVED]
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.