Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Izzy Axel

Forge Modder
  • Joined

  • Last visited

Everything posted by Izzy Axel

  1. I've been butting heads with this issue for a while now, I'm trying to either color a white particle black, which glColor doesn't work for, due to lower numbers decreasing opacity for an unknown reason, or inverting the additive blending, knocking out white and leaving black, but the blendfunc that should do that, GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA, results in a black square with a hole knocked out in the middle, no matter if I give it the inverted alpha map or the normal one. The tessellator's brightness also controls opacity for an unknown reason, so that's out too. Particle Renderer Edit: So, with this stuff I changed in the renderer, spawning black particles by themselves works, but spawning the rest of the colors makes either the black particles have the knockout effect I described above while none of the other colors have it, or every other color particles have the knockout effect and the black doesn't. Here's the EntityFX too in case I'm doing something here that's wrong/bad EntityFX
  2. After you have the TESR working, the rotation can be done like this (pseudocode): int angle = 0; public void renderTileEntityAt(TileEntity whatever, double xPos, double yPos, double zPos) { angle++; if(angle > 359) angle = 0; GL11.glTranslated(xPos, yPos, zPos); GL11.glTranslated(0.5, 0.5, 0.5); //These glRotates are assuming you're drawing a cube in the normal Minecraft block orientation, then rotating it into position and animating it GL11.glRotated(angle, 0, 1, 0); GL11.glRotated(35, 1, 0, 0); GL11.glRotated(45, 0, 0, 1); GL11.glTranslated(-0.5, -0.5, -0.5); draw stuff/render model GL11.glTranslated(-xPos, -yPos, -zPos); } glRotate is a real nightmare, it's unfortunate that MC likely will never update to a newer OpenGL version.
  3. Good lord, wrap those with some code tags! It's unreadable when it's just a wall of solid text.
  4. There may be a slightly hacky way to do this, but I don't know it. You can make your own item, extend Item, copy the onItemUse from Flint and Steel, and add: In the constructor: this.setMaxDamage(whatever); this.maxStackSize = 1; Override these: @Override public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack) { return false; } @Override public ItemStack getContainerItem(ItemStack stack) { ItemStack copy = stack.copy(); copy.setItemDamage(copy.getItemDamage() + 1); copy.stackSize = 1; return copy; } After you register the item: yourFlintSteel.setContainerItem(yourFlintSteel); And in your recipe, GameRegistry.addWhateverRecipe(new ItemStack(whatever), new ItemStack(yourFlintAndSteelItem, 1, Short.MAX_VALUE), whateverOtherItems); Edit: missed a few things, whoops
  5. As an addendum to this, I forgot to check if the TE's worldObj was null, checking that allowed me to use the ISBRH and TESR together with no issues.
  6. Turns out that's exactly what it was, it seemed to be switching between the inventory TE/block and world TE/block every other frame, removing the ISBRH fixed it. Now I need to figure out how to draw the model in the inventory...
  7. Could it be doing this because I'm using an ISBRH to do the inventory render for it?
  8. You should never be able to separate the dummy block and the chalice block, and when one is destroyed, the other is too. If I wanted to be completely safe, I could check that cast, but for now, it doesn't matter. Whoops, missed that, I'll add that to the TE's NBT. MaxStackSize is 1 on the pendant, but if I wanted to be safe, again I guess I could check that, but it doesn't affect anything right now. Edit: but you could pickblock the dummy, so fixed that.
  9. I have a block that you right click on to "store" a certain item in, when it's stored a boolean is made true, which is being written to NBT, when its taken out, the boolean is made false. The issue is, when I put a stdout with the boolean variable in it, I found out that it's alternating between true and false every other tick, which is a huge problem, and I can't figure out why it's doing that. TESR TileEntity Block Dummy Block
  10. Still can't figure this one out.
  11. Yyyyep, I realized that when I woke up today, I was assuming that when I created the itemstack, the item got its NBT created, but that would only happen on the next tick. Lesson here is, don't assume anything.
  12. Inside the TESR, there's a commented out line that changes the NBT of the ItemStack in the EntityItem that's created for the purpose of passing to the RenderManager. I want to change the contained Item's icon, but what I did there is throwing a NPE.
  13. I have an item set up to switch icons with NBT, but if I try to change the NBT on the EntityItem instance created just before rendering it in a TESR, it's null, so it crashes. So, how else would I go about changing the icon of the item for the render, and more specifically, changing it multiple times? TESR TileEntity Block Item
  14. Also, refactor the variable names on the vanilla functions, it makes the code a lot easier to read.
  15. This just makes me think there's something else you need to override and change. With Minecraft's pseudo-C style spaghetti logic, I couldn't say what though. Edit: I believe the ResourceLocation takes care of adding the : itself in the toString function, so that'd be modid::path.
  16. Is the console showing any missing texture errors? PS Might also have to do with the EnumArt being used, since you didn't change that call, it'd still be using the vanilla enums and handling them based on that?
  17. That's exactly what I tried: @Override public int getLightValue(IBlockAccess world, int x, int y, int z) { TELightEngine lightEngine = (TELightEngine)world.getTileEntity(x, y, z); return lightEngine.getLight(); } This still results in every instance of the block emitting the set light value. I'm not sure this is possible after looking at the Redstone Lamp code, as they do it by replacing the block with one that's lit when it gets a redstone signal, and I'm not making 15 blocks just to get this to work.
  18. The ResourceLocation should probably be new ResourceLocation(modId, "textures/painting/paintings_egpyt.png") The issue may be that not including the modid is causing the path to not be found, and it's defaulting to the vanilla textures. I had it do that with my armor textures before.
  19. Unless I misunderstand how you're telling me to use that, the return is the light value, so I can't get the block in updateEntity in the TileEntity and call that method from it to set the value, and overriding it in the BlockContainer will have the same problem as before, due to Block being a singleton. (yeah I tried overriding it, same result)
  20. Hm...then how would I make the TileEntity emit light, if it can't be done via the block?
  21. Ok, made those changes, but it's still carrying over... BlockContainer TileEntity
  22. Umm...a class variable? You are referring to 'light', right?
  23. I don't know much about TileEntities yet so I'm sure something I did is wrong, but I'm using them to make an adjustable light source, but if I put down multiple, they all get changed in unison when adjusted: BlockContainer TileEntity
  24. Then I don't know, my underwater biome's topBlock and fillerBlock worked just fine. PS, why are you making the topBlock water? The topBlock is the top block of the terrain, putting the average height below sea level is how you fill a biome with water.
  25. When you make a class that extends BiomeGenBase, you can just do this.topBlock = and this.fillerBlock =. I'm not sure why you don't want to make a custom BiomeGenBase, but it's extremely simple: BiomeGenBase And instantiated/set up here: Main

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.