Everything posted by MattNL
-
[SOLVED] [1.15.2] A texture issue with cross models?
Okay, so in my block registry? If so, how? I tried looking at vanilla's code, but my registry resembles other small flowers' registries... so either I'm missing something, or I'm just stupid.
-
[1.15.2] Noteblocks increment by 2 notes
Just an interesting bug I noticed in 31.0.16 where note blocks seem to increment twice when clicked. I'm also not sure if others have this issue, but I just wanted to bring this issue to the spotlight.
-
[SOLVED] [1.15.2] A texture issue with cross models?
So, I'm having an... interesting bug, and, after about an hour, I'm not sure what's causing it. My rose texture is normal and transparent when held or in an item frame, but when placed, the transparency becomes black. I'm not sure if this is simply a bug with Forge, or if something significant changed from 1.15.1 to 1.15.2. I'm modding with version 31.0.16. Blockstate: { "variants": { "": { "model": "[NAMESPACE HERE]:block/rose" } } } Block Model: { "parent": "block/cross", "textures": { "cross": "[NAMESPACE HERE]:block/rose" } } Item Model: { "parent": "item/generated", "textures": { "layer0": "[NAMESPACE HERE]:block/rose" } } Item Registration (Not sure if this has anything to do with it because it's actually just a FlowerBlock): new BlockItem(ModBlocks.rose, new Item.Properties().maxStackSize(64).group(ItemGroup.DECORATIONS)).setRegistryName("[NAMESPACE HERE]", "rose"), Thanks in advance! ?
-
(1.14.4) I have a question involving BlockPos...
Thank you very much! Sometimes I stumble across the right thing and I'm just not sure about it. Also, thanks for the heads up about the key bind event. ?
-
(1.14.4) I have a question involving BlockPos...
I'm more of a C++ programmer, I'm only into Java for Minecraft modding... so I guess not? I'm not too used to the heavy object oriented programming of Java, so I'm really just looking for some clearance and assistance, with all do respect. I was just wondering if there was a way I could possibly create a new BlockPos variable, or something else along those lines. If not, then, go on with your day.
-
(1.14.4) I have a question involving BlockPos...
I need to get a block from below a block, but I haven't really found a way to do this. Is there some way to "create" a new BlockPos? Is there a better way for me to get a block under an existing block? int x = pos.getX(); int y = pos.getY() - 1; int z = pos.getZ(); // Some way to get a block at a new position? // Perhaps something like this: BlockPos example = new BlockPos(x, y, z)? // // Is that even possible? if(Minecraft.getInstance().gameSettings.keyBindSprint.isKeyDown()) { worldIn.setBlockState(pos, Blocks.NOTE_BLOCK.getDefaultState().with(NOTE, _new)); } else { worldIn.setBlockState(pos, ModBlocks.noteblock_low.getDefaultState().with(NOTE, _new)); }
-
Trouble getting contents of a Chest
Well, honestly, it's fine because I decided against including the feature. Thank you for your help though, have a great day!
-
Trouble getting contents of a Chest
Oh, I see... well that's useful to know! I'm going to try implementing your JSON-style replacement. Thank you very much!
-
Trouble getting contents of a Chest
So, I realized I didn't really mention what the problem was, oops. I need to get the contents of broken containers, not just chests, and write that data to an item stack (presumably through net.minecraft.client.Minecraft.storeTEInStack).
-
Trouble getting contents of a Chest
One of the features in my mod (for version 1.14.4) allows for containers to drop with NBT data stored when broken with a Silk Touch enchanted tool. The problem being is that I have no idea if I'm wasting my time or not. This is what I have so far: @SubscribeEvent public void onBlockBreak(BlockEvent.HarvestDropsEvent event) { if(event.getHarvester().getType() == EntityType.PLAYER) { Block blockIn = event.getState().getBlock(); TileEntity teIn = Minecraft.getInstance().world.getTileEntity(event.getPos()); if(event.isSilkTouching()) { for(ItemStack stack : event.getDrops()) { if(stack.getItem() == Items.CHEST) { stack = Minecraft.getInstance().storeTEInStack(stack, teIn); } } } } } Also, just to be clear, this does not have a class of it's own, it's in the main Mod Class. Thanks in advance!
IPS spam blocked by CleanTalk.