TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
Everything posted by TheGreyGhost
-
[1.8] Unable to resolve texture due to upward reference: #all
TheGreyGhost replied to uniqueT's topic in Modder Support
Hi THis link will probably help http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html (See the three under Block Rendering) you want block/cube, not block/cube_all your block's particle is set using "particle": -TGG -
For example: In your preInit event (FMLPreInitializationEvent ) GameRegistry.registerBlock(blockTileEntityData, "mbe20_tileentity_data_block"); GameRegistry.registerTileEntity(TileEntityData.class, "mbe20_tileentity_data_te"); -TGG
-
[1.7.10] [SOLVED] Custom Crafting Manager
TheGreyGhost replied to Whyneb360's topic in Modder Support
BTW you should get rid of the __OBFID , it's used during (de)obfuscation for vanilla only. I suggest you add a breakpoint to your onCraftMatrixChanged and step into your WorkBenchCraftingManager.findMatchingRecipe(). That should show you straight away where the problem is. -TGG -
It means you haven't registered your TileEntity properly. Which tutorial are you following? -TGG
-
Hi You forgot implements ITileEntityProvider on your block. @Override will can save you endless pain from these errors... http://stackoverflow.com/questions/94361/when-do-you-use-javas-override-annotation-and-why -TGG
-
[1.8] How do we use ISmartItemModel to create dynamic models?
TheGreyGhost replied to TrashCaster's topic in Modder Support
Hi well, I _think_ nulls for world and blockPos are probably ok, because of this in getModelFromBlockState: try { p_175022_1_ = block.getActualState(p_175022_1_, p_175022_2_, p_175022_3_); } catch (Exception exception) { ; } but I reckon it would be better to bypass it properly, using just IBakedModel ibakedmodel = blockModelShapes.getModelForState(blockState); You can get blockModelShapes from BlockRendererDispatcher using the corresponding get method. -TGG -
It's not weird or stupid at all. ClientProxy = code for {client+integrated server} only ServerProxy = code for dedicated server only CommonProxy = code for both {client+integrated server} and dedicated server Seems very logical to me. Purely a matter of taste whether your common code goes in a CommonProxy base class or stays in your Mod class. If there's no code in CommonProxy you may as well use IProxy instead of CommonProxy (but not both as per OP code). -TGG
-
your getIconItemStack() method does nothing because no code ever calls it. When your creative tab is rendered, it calls the getTabIconItem() method to find out which Item's icon it should draw on the tab. You return null, the caller tries to draw it, and crashes because it expects a proper item. Your getTabIconItem() method needs to return the block's corresponding item as Voltab suggested. Which tutorial did you use? -TGG
-
This link might help you understand how Proxy works http://greyminecraftcoder.blogspot.com.au/2013/11/how-forge-starts-up-your-code.html -TGG
-
I'm pretty sure this isn't right... where's your implements? public class ClientProxy { As a matter of interest, why the extra complication of IProxy? Client and Server extending Common, with public static CommonProxy proxy, will work just as well and be less complicated? Also, Capital letters in your Mod ID and package names is going to cause you grief sooner or later. Packages should always be lower case by convention, and I've seen quite a few subtle bugs arise because the Mod ID had upper case letters. -TGG
-
New Furnaces, improving how furnaces are added
TheGreyGhost replied to plnx's topic in Modder Support
Hi Although I like the idea, in my opinion the last thing Forge needs is more specialised features that seldom get used. It's groaning under the weight of all the "nice to haves" already, and every extra one just adds to the maintenance burden and slows down each update. I'd suggest you make a good example and let folks copy it. They'll need to update it for every minecraft update, but I think that work is better placed on the shoulders of the individual developer rather than Lex & co. -TGG -
Hi Are you using Intellij 14 perhaps? If so, see here about sourceSets http://www.minecraftforge.net/forum/index.php/topic,21354.0.html Otherwise, your file StrawberryCrop.json either doesn't exist or is in the wrong folder. The folder structure should look like this src/main/resources/assets/moreminecraft/blockstates I also suggest you use lower case for all your filenames, it will probably save you pain later on. -TGG
-
What dieSieben said. FYI this link might help understand what proxies do. http://greyminecraftcoder.blogspot.com.au/2013/11/how-forge-starts-up-your-code.html -TGG
-
By crikey dude, what did you think this line would do? @Override public Item getTabIconItem() { // TODO Auto-generated method stub return null; and where did this method come from? getIconItemStack() This tutorial might help... http://tutorials.darkhax.net/custom-creative-tabs.html -TGG
-
[1.8] How do we use ISmartItemModel to create dynamic models?
TheGreyGhost replied to TrashCaster's topic in Modder Support
Vanilla uses BlockRendererDispatcher.getModelFromBlockState() you can get BlockRendererDispatcher from Minecraft.getMinecraft.getBlockRendererDispatcher() The TextureAtlasSprite is just used for the block breaking texture I think. I think that if your block models are registered in the normal way, the uv mappings will all be correct because the textures are automatically stitched together into a single sheet and the BlockModel already got its own uv when it was baked. I'm not sure of that - try it and let us know? -TGG -
Dude It means that Mojang has changed their code. The method to construct a packet now looks like this public FMLProxyPacket(PacketBuffer payload, String channel) { this.channel = channel; this.payload = payload; } so you need to figure out how to turn a PacketBuffer into a ByteBuf... This looks promising... public class PacketBuffer extends ByteBuf { private final ByteBuf buf; private static final String __OBFID = "CL_00001251"; public PacketBuffer(ByteBuf wrapped) { this.buf = wrapped; } If you're converting network code from 1.7 to 1.8 you might find this link on thread safety for packets helpful too http://greyminecraftcoder.blogspot.com.au/2015/01/thread-safety-with-network-messages.html -TGG
-
[1.8] BlockState Files for custom fluids [SOLVED]
TheGreyGhost replied to techstack's topic in Modder Support
Hi Fluids don't have blockstates. they define a different render type Each block also has a render type, specified by Block.getRenderType(): -1 = doesn’t render at all, eg BlockAir 1 = renders as a flowing liquid (animated texture) using BlockFluidRenderer.renderFluid – eg lava and water. 2 = doesn’t render anything in the block layers, but has an associated TileEntitySpecialRenderer which does draw something, eg BlockChest. 3 = renders using an IBakedModel, BlockModelRenderer.renderModel. This is described in more detail below. -TGG -
[1.8] How do we use ISmartItemModel to create dynamic models?
TheGreyGhost replied to TrashCaster's topic in Modder Support
Hi The key bit to understand is that ISmartItemModel lets you choose which IBakedModel to return, based on the itemstack given to its method IBakedModel handleItemState(ItemStack stack); So- you can create as many SimpleBakedModels as you like - and pick which one to return. I'd suggest you create a variant for each one just like you would normally register them and just return the variant by name. This example 12 does something very similar using the Item.getModel() method instead of handleItemState(). https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe12_item_nbt_animate Alternatively, if you implement IBakedModel with your own class, you can change which faces are returned by getFaceQuads() and getGeneralQuads() depending on what your handleItemState has told it to. For example (won't compile but you get the idea?) IBakedModel handleItemState(ItemStack stack) { if (stack.stackSize == 1) return new MyBakedModel(SINGLE_FACE); if (stack.stackSize == 2) return new MyBakedModel(TWO_FACES); return new MyBakedModel(MANY_FACES); } where class MyBakedModel implements IBakedModel { private FaceCount facecount; public MyBakedModel(FaceCount i_facecount) { facecount = i_facecount; } public List getFaceQuads(EnumFacing p_177551_1_) { List allfaces = new List(); allfaces.add(FIRST_BAKED_QUAD); if (facecount == SINGLE_FACE) return allFaces; allfaces.add(SECOND_BAKED_QUAD); if (facecount == TWO_FACES) return allFaces; allfaces.add(THIRD_BAKED_QUAD); return allFaces; } } In your specific case, you might implement an IBakedModel that contains a number of mini-blocks and the getFaceQuads method compiles a list from all the miniblocks listed one after the other. -TGG -
[1.7.10] How to convert the code, which works in 1.8 to 1.7.10
TheGreyGhost replied to nidico100's topic in Modder Support
how to define the blockpos with 3 ints? Seriously dude? World:: [1.8] public boolean isAirBlock(BlockPos pos) [1.7.10] public boolean isAirBlock(int x, int y, int z) -TGG -
Hi You may find this link useful http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html Especially the topics under "Blocks" and "Items". This example project also has several working examples of blocks and items with custom textures and with the switching states you said. https://github.com/TheGreyGhost/MinecraftByExample -TGG
-
show your class(es) where you create your items & blocks and register them? -TGG
-
[1.7.10]Need help with custom IItemRenderer
TheGreyGhost replied to Jedispencer21's topic in Modder Support
Hi Your renderItem method calls itself renderItem(type, item, data); which then calls itself, which calls itself, which calls itself, etc until you run out of stack space. that renderItem call should be to something which actually draws the icon. There seems to be a bunch of unused code in there. What is it all supposed to be doing? -TGG -
Render Model face closest player function(s)
TheGreyGhost replied to Durand1w's topic in Modder Support
Hi I'm not sure I understand why you used static float enderpadyaw = TileEntityEnderPadEye.getEnderPadYaw(); float enderpadpitch = TileEntityEnderPadEye.getEnderPadPitch(); instead of per-tile-entity-instance variables, i.e. float enderpadyaw = entity.getEnderPadYaw(); float enderpadpitch = entity.getEnderPadPitch(); Alternatively, your renderer doesn't actually need the tileentity to do the calculations. The x, y, z passed to your renderTileEntityAt is the relative position of the tile entity compared to the player's eyes, which is enough to calculate which direction the tile entity needs to face to be looking at the player - i.e. the d0, d1, d2 in EntityLookHelper.onUpdateLook() -TGG -
Hi First thing to try - generate a fresh world. Sometimes, when you're developing a mod, the worlds you create along the way can have strange bugs due to Forge's auto-item-and-block-ID-replacement algorithm. -TGG