Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by naturaGodhead

  1. So I'm working on an addon mod for a smaller mod. I've got the environment working fine, and I can reference classes from the main mod. Once I try to run it, the game crashes with the following error: https://pastebin.com/D00kSPug The error is coming from the main mod itself, which I don't really understand. I've talked to the devs of the mod and the most they can offer me is that there's an obfuscation problem somewhere. Here's my code: https://github.com/linkisheroic/minestuckarsenal
  2. I've tried setting up a listener and changing some things around, and it seems like the biome is never actually being registered at all. Any idea why? I would've thought the registry.register would do that...
  3. My biome handler class subscribes to the registryevent. I'm not completely sure that it isn't working, but turning the weight up and exploring for hours hasn't shown anything.
  4. So I'm having a go at biomes just for kicks, but I get stuck at getting it to actually show up in the world. Feels like I'm missing something and everything I can find online is old information from previous versions. Biome Handler: https://pastebin.com/LPt9bFfJ Biome: https://pastebin.com/dz6Kca2Q CommonProxy: (Relevant bit) public void preInit(FMLPreInitializationEvent e) { MinecraftForge.EVENT_BUS.register(new RosetteBiomes()); }
  5. Nevermind, it evidently was just the old data. I loaded up a new world and the block functions correctly.
  6. It did at one point. I made a new world when I started trying to figure it out though. Passing 0 as the index for each one makes the slots work fine, but I can't reference them with onSlotChanged that way.
  7. When I label all of the slots as index 0 it works just fine.
  8. That doesn't work. ItemStackHandler accepts an int value as a size parameter. It's not an array.
  9. When opening my gui, it pauses for about 2 seconds, then crashes. Container class: https://github.com/linkisheroic/rosetteMod/blob/master/main/java/com/natura/rosette/tileentity/PedestalContainer.java Tile entity class: https://github.com/linkisheroic/rosetteMod/blob/master/main/java/com/natura/rosette/tileentity/PedestalEntity.java Crash: java.lang.RuntimeException: Slot 1 not in valid range - [0,1) at net.minecraftforge.items.ItemStackHandler.validateSlotIndex(ItemStackHandler.java:210) at net.minecraftforge.items.ItemStackHandler.getStackInSlot(ItemStackHandler.java:75) at net.minecraftforge.items.SlotItemHandler.getStack(SlotItemHandler.java:79)
  10. I've been able to get the metadata working just fine, but I haven't been able to figure out what I need to do to make the sub blocks render in the inventory. I feel like there has to be a simple solution. They just show the missing texture, but don't show the missing model text, so I assume they're trying to use the main block's model as a parent. https://github.com/linkisheroic/rosetteMod/blob/master/main/resources/assets/rosette/blockstates/table.json Blockstate JSON https://github.com/linkisheroic/rosetteMod/tree/master/main/resources/assets/rosette/models/block Block Models https://github.com/linkisheroic/rosetteMod/blob/master/main/java/com/natura/rosette/block/BlockTable.java Block in question.
  11. So I'm more or less just trying to track how metadata properties get set with a basic flower with color meta. When I place in the world, I only get the color=white variety, no matter what the color was when I had it in my inventory. What's up? I'm just not really understanding something I think. https://github.com/linkisheroic/rosetteMod/blob/master/main/java/com/natura/rosette/block/BlockFlowerBase.java I know naming conventions/etc are probably not the best way. I'm genuinely attempting to learn what I'm doing. I've noticed that the replies on here tend to lean on the "learn java" side.
  12. I've been working on a beehive block, and I've been using the furnace metadata to attempt to get the rotation for the block working correctly. For some reason even though everything looks the same as the vanila furnace, when I load up the game the entire block is just a pink + black missing texture. What am I doing wrong? Code: package com.natura.artifacts.block; import java.util.Random; import com.natura.artifacts.Main; import com.natura.artifacts.item.ArtifactItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class BeeHive extends Block { private Item drop; private int meta; private int least_quantity; private int most_quantity; @SideOnly(Side.CLIENT) public IIcon iconFront; @SideOnly(Side.CLIENT) public IIcon blockIcon; @SideOnly(Side.CLIENT) public IIcon iconBottom; protected BeeHive(Material material, Item drop, int least, int most) { super(material); this.setBlockName("beeHive"); this.setCreativeTab(ArtifactItems.tabArtifacts); this.setHardness(0.6F); this.setResistance(0.2F); this.setHarvestLevel("axe", 2); this.setStepSound(soundTypeWood); this.setBlockTextureName(Main.MODID + ":beeHiveSide"); this.drop = drop; this.least_quantity = least; this.most_quantity = most; } public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) { int l = MathHelper.floor_double((double)(p_149689_5_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if (l == 0) { p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, 2, 2); } if (l == 1) { p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, 5, 2); } if (l == 2) { p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, 3, 2); } if (l == 3) { p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, 4, 2); } } @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int meta) { return side == 1 ? this.iconBottom : (side == 0 ? this.iconBottom : (side != meta ? this.blockIcon : this.iconFront)); } @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister reg) { this.blockIcon = reg.registerIcon("beeHiveSide"); this.iconBottom = reg.registerIcon("beeHiveBottom"); this.iconFront = reg.registerIcon("beeHiveFront"); } @Override public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { if(!p_149727_1_.isRemote) { if(p_149727_5_.getCurrentEquippedItem() != null) { if(p_149727_5_.getCurrentEquippedItem().getItem() == Items.bucket) { p_149727_5_.inventory.consumeInventoryItem(Items.bucket); p_149727_5_.inventory.addItemStackToInventory(new ItemStack(ArtifactItems.honeyBucket, 1, 0)); p_149727_5_.inventoryContainer.detectAndSendChanges(); return true; } } } return true; } @Override public Item getItemDropped(int meta, Random random, int fortune) { return this.drop; } @Override public int quantityDropped(int meta, int fortune, Random random) { if (this.least_quantity >= this.most_quantity) return this.least_quantity; return this.least_quantity + random.nextInt(this.most_quantity - this.least_quantity + fortune + 1); } }
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.