Everything posted by DragonFerocity
-
1.12 Adding Recipes
Okay, Thanks.
-
1.12 Adding Recipes
Hey guys, So I'm not completely sure how I'm supposed to add recipes for 1.12. For my mod I need to be able to add recipes for items I've created that use other items I've created or vanilla items. I found this topic which offers a little help but not much. Thanks,
-
Custom bed doesn't let player sleep
Here's how you fix it, override the isBed function inside Block.java: public boolean isBed(IBlockState state, IBlockAccess world, BlockPos pos, @Nullable Entity player) { return true; } for your custom bed class, whether or not it extends BlockBed or is basically a copy/paste of BlockBed that extends BlockHorizontal, you'll need to override that function to allow the player to actually sleep. Technically you could override that function for any block and tell the game that it is indeed a valid place to sleep.
-
Custom bed doesn't let player sleep
You underestimate me. I tried extending BlockBed before creating this topic and it didn't work, so I naturally went to the other possible solution: to create my own bed class based off of BlockBed.
-
Custom bed doesn't let player sleep
Regardless this isn't answering my question Draco18s. I removed the MC source from my github repo. Will you help me now? Thanks a lot...
-
prevent faces from culling
I installed Forge, and then copied the proper files as per the forge documentation
-
Custom bed doesn't let player sleep
I'm using forge, I had to put the MC files there so that Eclipse would read them as actual files correctly.
-
prevent faces from culling
I guess I don't have the files patched correctly then.
-
Custom bed doesn't let player sleep
I'm creating a custom that just looks aesthetically different from the base bed. However when I use the bed, it doesn't let the player sleep. Here's my code. I figure I probably have to override a few methods but I'm not sure which ones and the only help I can find online is fro MC 1.7.* which is of no help. Thanks.
-
prevent faces from culling
I'm using forge version 13.20.0.2260. And the line I mentioned that is 1228 is from a minecraft file not a forge file. Here's my code on gitHub. check com.DragonFerocity.blocks.ModStairs
-
prevent faces from culling
Choonster, here's my line 1228 from Block.java: registerBlock(75, "unlit_redstone_torch", (new BlockRedstoneTorch(false)).setHardness(0.0F).setSoundType(SoundType.WOOD).setUnlocalizedName("notGate")); Also, so I'm trying to create an alternate version of stairs for a mod, and BlockStairs already overrides isOpaqueCube to return false always, and I wrote a custom java file that extends BlockStairs... BlockTorch also overrides isOpaqueCube to return false always. Needless to say, overriding isOpaqueCube in my class didn't change anything the faces of the other blocks still cull that my custom stairs are attached too.
-
prevent faces from culling
isOpaqueCube is deprecated as of 1.11.2 and doesSideBlockRendering doesn't exist in the Block.java file anymore.
-
prevent faces from culling
I have a model, and I don't want any of the faces of the surrounding blocks to be culled as the model isn't very big, thus its sides don't extend to touch the surrounding blocks. I found this thread on another forum where someone asked the same thing, and the response was that it's not possible, and that you should just copy from a block that doesn't cull the faces. This has me confused however. When you look at net.minecraft.block.BlockTorch, it extends Block but we all know that when a torch is placed it doesn't cull the faces. However, when we look at stairs, it also extends block but it does cull the faces. What?!? There has to be some code difference between the two but for the life of me I can't figure it out. Looking at the JSON model files, I can't see anything that would cause faces of other blocks to be culled or not culled. My question is How Do I Do This? There has to be something somewhere. You can't just tell me that a torch magically doesn't cull the faces. There should be a way to turn this off in the code! Any help is appreciated.
-
Adjust max light level
I was beginning to wonder about that. Thanks,
-
Adjust max light level
I also seem to have found how Minecraft handles light colors: in BlockModelRenderer#renderQuadsSmooth and BlockModelRenderer#renderQuadsFlat. If anyone knows more about this, I'd love to hear your insight too.
-
Adjust max light level
So, I found this topic on another forum of someone mentioning that you can adjust the max light level that a block can have by changing the way minecraft stores light from being 4bits to 8 bits. This all makes sense. I'm just wondering: where in the minecraft code can I change this?
-
Overwritten getItemDropped not being called
Well, it does drop its respect item when I switch to survival... Could have avoided this if I knew about /gamemode 0.. But oh well. Now I do. Thanks,
-
Overwritten getItemDropped not being called
No, I didn't. I'll try that. I haven't owned Minecraft very long. About 3 weeks.
-
Overwritten getItemDropped not being called
Ok, that's... interesting I'm not sure. I started a survival mode world and destroyed some blocks, and the breakpoint still never triggered.
-
Overwritten getItemDropped not being called
Let me restate that. I realize that that is wrong. In creative mode, when you destroy a block, is it supposed to drop it's corresponding item? Currently nothing is dropping anything - zilch - when I destroy something in creative mode.
-
Overwritten getItemDropped not being called
So, I tried setting a breakpoint on Block#harvestBlock, and it doesn't appear to hit it. Ever. Also, in creative mode, when you destroy a block is it supposed to drop itself? Nothing is dropping itself currently. And in survival, when I break a block, the harvestBlock function doesn't call the breakpoint I set. Maybe I'm doing something wrong though.
-
Overwritten getItemDropped not being called
Here's the compiler output when I uncomment the piece of the return statement: warning: [options] bootstrap class path not set in conjunction with -source 1.6 R:\Minecraft\1.11.2\ExpandedAesthetics\build\sources\main\java\com\DragonFerocity\expanded\blocks\ModBlockDoor.java:57: error: cannot find symbol return state.getValue(HALF) == BlockDoor.EnumDoorHalf.UPPER ? Items.field_190931_a : this.getModItem(); ^ symbol: variable field_190931_a location: class Items Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error 1 warning :compileJava FAILED As for the log output? That's exactly it, getItemDropped function appears to not be being called since the the text in the println statement never shows up. Also, I'm using Visual Studio, instead of Eclipse. Probably should have stated that before. Also, everything builds just fine, and runs without any errors in the game-run log.
-
Overwritten getItemDropped not being called
Hello, Here's my code. I'm having trouble getting the getItemDropped function to actually be called. I created a new class called ModBlockDoor that extends BlockDoor. I overwrote the getItemDropped function like this: @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { System.out.println("INSIDE"); return /*state.getValue(HALF) == BlockDoor.EnumDoorHalf.UPPER ? Items.field_190931_a : */this.getModItem(); } public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) { return new ItemStack(this.getItem()); } private Item getModItem() { System.out.println("Blocks equal? " + (this == BlockHandler.glassDoor) + " : " + (this.blockName == BlockHandler.glassDoor.blockName)); return this.blockName == BlockHandler.glassDoor.blockName ? BlockHandler.iGlassDoor : null; } Also, I had to comment out part of the line in the return of getItemDropped because otherwise forge complains that it can't find the symbol for Items.field_190931_a. (And yes, net.minecraft.init.Items is imported at the top..., and when I go to Items.java, I can see the field, which is public, so I don't know why I get this error....) Anyway, nothing get's printed out into the console when I destroy the block in-game, and an item doesn't drop. Any help would be appreciated.
-
Custom Door: Top doesn't get placed
Yes, I know. I mean Item and ItemBlock. Sorry
-
Custom Door: Top doesn't get placed
I found what I was doing wrong. You can't register a block and an ItemBlock with the same name. So I have an item now that successfully places a door. I just need to find out how to make the texture show up. Thanks,
IPS spam blocked by CleanTalk.