-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
[1.6.4] Make Item/block light up in hand without other mods
SanAndreaP replied to jeremy450's topic in Modder Support
you mean like actually glow (like a placed torch) or just rendered brighter than other blocks at dark? -
Is it just a simple block texture or is it an "entity texture" for a custom tile entity renderer?
-
implement IBossDisplayData (took me 1 minute looking at one of the boss-mob's class)
-
Or, as I've told you already in your thread about that matter, check if the action of right-clicking is RIGHT_CLICK_AIR (event.action == RIGHT_CLICK_AIR) if you want "those with the 0's" or RIGHT_CLICK_BLOCK for the other call. There's another one called LEFT_CLICK_BLOCK, which is called when a block is left-clicked (obviously)
-
Did you use gradlew setupDecompWorkspace or gradlew setupDevWorkspace? Latter will not give you the source code!
-
[1.7.2] Minecraft Startup Open GL error - Game Breaking
SanAndreaP replied to Masterzach32's topic in Modder Support
What forge version do you use? -
getRenderBlockPass must be getRenderType. The getRenderBlockPass only determines if the block texture should render as solid (return 0) or with transparency (return 1)
-
We need more info. Where do you register your ISBRH? Do you use the renderID also in your block class? For that we need your Mod class, Block class and ClientProxy class, too.
-
[1.7.2] Block Custom Item Renderer NullPointerExpection
SanAndreaP replied to Jacky2611's topic in Modder Support
What is the value of DimensionShift.MODID? Can we see your folder structure (Packet explorer) which shows the png file? -
Look at the GuiContainer class, it has code which does exactly what you want.
-
Because you multiply your rotateAngle with 90 again in your glRotatef.
-
Yet you still override hasContainerItem and return true without overriding getContainerItem and return a valid ItemStack. Either return false in hasContainerItem, or don't override it (remove the method) or override getContainerItem and return a valid ItemStack.
-
The first one: This shouldn't be a problem. Missing components are handled exactly the same as a space -> Missing character = empty slot what I do see is you override hasContainerItem and don't override getContainerItem and return an ItemStack there -> resulting in a NullPointerException.
-
You don't call the super constructor in your items constructor... maybe that's the problem.
-
The "compare if a stack has item" is just an example, if you wanna compare if an itemstack contains a specific item. MyItems is the class where you save your item / block instances. I personally have them in a seperate class outside of the @Mod annotated class for cleaner coding, but you can do it your way. Yes, it would be itemDiamondChisel then. The code you posted seems good, are there any problems with it? However, you may consider removing the substring(5) from this line: GameRegistry.registerBlock(blockObsidianBrick, blockObsidianBrick.getUnlocalizedName().substring(5)); since it's unnecessary and can cause problems (you register your block with the name "block", due to the substring, and if an other mod does the same, or you add another block with the unlocalized name "blockAnotherOne" (which, again, results in "block"), it will cause problems)
-
Well, I think it's your graphics card... seems like it's broken or something (if it also affects things outside of the game) Do those glitches also occur w/o Forge even installed? Try w/o Forge first and see what happens.
-
You don't use IDs for neither block nor items at all! The way of doing things now is to use the instances directly, e.g. // new ItemStack new ItemStack(MyItems.anItemInstance, 1) //compare if a stack has item stack.getItem() == MyItems.anItemInstance If you need to compare a block with an ItemStack, use stack.getItem() == Item.getItemFromBlock(MyBlocks.aBlockInstance)
-
You actually do both, if you use the IWorldGenerator and the PopulateChunkEvent. You could also try sequituri's suggestion. Seems easier (if it works) than fiddling with events.
-
You should use Items.enchanted_book.addEnchantment(stack, enchantment) instead of stack.addEnchantment(enchantment)
-
The only way of doing this is subscribing to the PopulateChunkEvent.Post event and do your dungeon generation there. Here's an example: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffplus/world/EnderStuffWorldGenerator.java#L27-L38 Also please note that if you think it is registered with the TERRAIN_GEN_BUS, it isn't, it is with the EVENT_BUS!
-
The call with the 0's in there is probably the action type RIGHT_CLICK_AIR, which is used when an item should be used. Just check for the event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR
-
[SOLVED][Other quest.]render an item on a block
SanAndreaP replied to Casual Dutchman's topic in Modder Support
look at the TileEntity superclass, the methods are called the same. Here is my tileentity for reference: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffplus/tileentity/TileEntityBiomeChanger.java (line 187 and line 319) -
[1.7.2] Rendering a custom arrow when hit a player
SanAndreaP replied to JimiIT92's topic in Modder Support
It may have to do with that you've named your client proxy "ClientPorxy" (just kidding) The RenderLivingEntity class only uses the vanilla EntityArrow as reference (look it up, the method where the arrow gets rendered is called renderArrowsStuckInEntity) The only way you could render your custom Arrow is either use ASM transformers or reset the arrow counter with entitylivingbase.setArrowCountInEntity (or never even call it if you use your own onUpdate() method w/o calling the super method), have your own arrow counter for that entity, use the RenderLivingEvent and mimic the renderArrowsStuckInEntity method with your own arrows. -
Use the PlayerInteractEvent and check if the item held by the player is a bucket. It's the closest you can get.
-
huh, I really don't see the problem then... Have a look at my code, maybe it helps you (since it's working fine for me): https://github.com/SanAndreasP/SAPManagerPack/tree/master/java/de/sanandrew/core/manpack/mod/packet https://github.com/SanAndreasP/SAPManagerPack/blob/master/java/de/sanandrew/core/manpack/mod/ModCntManPack.java