-
Posts
30 -
Joined
-
Last visited
Everything posted by LavX64
-
So you meant textures right? Sorry
-
Yeah, i knew i had to do that, ty. So u asked how I did my quiver, and told bow to use it, so that's how, my quiver with arrows is ItemArrow with function isInfinite, so bow calls this func everytime it shoots
-
take a look at extends parts of both items Also what's function to replace it better?
-
I you really interested check github ItemQuiver and ItemQuiverWithArrows, code is not perfect, a lot of conditional spaghetti, but I have to check for a lot of stuff so..
-
When I asked about quiver I've head same reply, some said I can do it only with custom bow, but I found a way, so.. Don't do such statements if you not sure
-
I made a quiver which can be put into chest and legs armor slots, but it has no texture it both. So how I add different textures when it's on chest or legs?
-
I made it dirty way, onUpdate when this item in offhand just copy it from there to player's inventory(or if it's full drop it), and delete it from offhand
-
I solved my problem by casting ((EntityPlayer)entityIn)
-
Wow this code is just what I needed, ty! I didn't know I can get playerEntity from Minecraft class. And I didn't know about Minecraft.getMinecraft() either
-
what next? how do I interact with my player inventory or something?
-
Is there any function besides onItemRightClick() to check keybindings? Like if I want to Shift+RightClick
-
so func onUpdate(ItemStack, World, Entity, int, boolean) takes this parameters, but I want to look if player is holding item in offhand, but there's only Entity, not EntityPlayer, what do I do? Edit: Let me explain, I want to do entity.replaceItemInInventory() but int variable that im gettin is actually same for offhand and mainhand, also armor slots are 1-4, as well as inventory slots.
-
Is there any method to make my item not wearable on offhand(because it causes some bugs)?
-
It's okay, thank you for help but I already did my quiver.
-
I already have an idea of sonsuming item, the problem is to make bow find my arrows in my quiver, to be exact - find arrows in my inventory OR my quiver with AT LEAST 1 Arrow count in it
-
Im doing quiver for my mod, it has nbt "arrows" that stores arrow amount, and i want this arrows to be usable by the bow, how do i do this? [SOLVED] I made 2 quivers, one with arrows, with extends ItemArrow, and one blank, which extends Item, overrided some methods in both, and my quiver is now working. If anyone interested how I did it check my code at github, files ItemQuiver and ItemQuiverWithArrows.
-
Im doing quiver for my mod, it has nbt "arrows" that stores arrow amount, and i want this arrows to be usable by the bow, how do i get this?
-
[1.12.2][SOLVED] Make vanilla block unbreakable like bedrock
LavX64 replied to LavX64's topic in Modder Support
I was trying to achieve so I can only mine some blocks with proper tools, sry for my unclearness -
How do I make my item wearable, and how to do it in 2 slots of armor, like leggins and chest?
-
[1.12.2][SOLVED] Make vanilla block unbreakable like bedrock
LavX64 posted a topic in Modder Support
How do I make some vanilla blocks unbreakable like bedrock? [SOLVED] I've created this event: @SubscribeEvent public void onBlockBreaking(PlayerEvent.BreakSpeed event) { IBlockState blockstate = event.getState(); Block block = blockstate.getBlock(); Item heldItem = event.getEntityPlayer().getHeldItemMainhand().getItem(); // if instance of #SOMEBLOCK if(block instanceof BlockStone) { //if holding item instance of #SOMEITEM if (!(heldItem instanceof ItemPickaxe)) //set mining speed to 0 event.setNewSpeed(0); } } Hope this will help someone -
So I installed couple of days ago MDK for [forge-1.12.2-14.23.0.2552], setupDecompWorkspace eclipse, everything was good until now. Eclipse says that I have errors like this, getStrVsBlock is undefined for ItemTool, and efficiencyOnProperMaterial cannot be resolved or is not a field. And that's odd because my mod is working properly, but eclipse sees the error that is not there.
-
Oh, about that Forget about it, I already wrote new code like 20 times already, I don't even remember what I was gonna do
-
I do not control my ideas, it's just how it happens everytime, u can't do shit for 2 hours, go to forum, and boom u got the idea
-
Doesn't even matter, it's just this way I organize my mind by putting problem like that and deconstructing it, so forum helps me to realize how to fix the problem.
-
SOLVED as always, just by the time i ask forum about something it is starting to work. I used this function to specify amount of drops. So there's only 1 Hemp seed always, and 1 additional + 4 fibers when it is fully grown. Anyway anyone knows how to short this ugly Property checker? Cause I don't really understand how this values work. @Override public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { drops.add(new ItemStack(ItemInit.HEMP_SEEDS)); if (state.getProperties().toString().charAt(state.getProperties().toString().length() - 2) == '7') { drops.add(new ItemStack(ItemInit.HEMP_FIBER, 4)); drops.add(new ItemStack(ItemInit.HEMP_SEEDS)); } }