I have done a lot more work. Now I only need to render the other players correctly and not just the current player themselves. Right now the other players render inside me in the same exact place...
NOTE: I don't know if this was the right place to put this thread in the forums, but tell me if it is wrong!
Hello there. I wanted to share a weird Minecraft Forge modding glitch I made possible! All I did was bind my tile entity to my block, and then it happened... I really screwed up the rendering!!! LOL
I have an idea for your tutorials. It doesn't have to be in the tutorials right now, since it is very advanced. My idea is the multiblock structures and the big, custom models from Immersive Engineering, such as the Arc Furnace. You should cover multiblock structures first, and eventually get into custom multiblock structure models.
I am trying to detect if the player right-clicks my item, a syringe in this case, on a zombie. When this happens, it gives the player my zombie blood syringe and deletes to old syringe. If It is anywhere else when right-clicked, it will do the same, except give the player a player blood syringe. But it just seems to do the same thing no matter what I click on or where... Give the player a player blood syringe. I don't know what I'm doing wrong!
public class Syringe extends ModItems{
private Minecraft mc = Minecraft.getMinecraft();
public Syringe(String name, CreativeTabs tab) {
super(name, tab);
}
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack item, World world, EntityPlayer user, EnumHand hand)
What method would I use? I have a list of events with me but I don't know which one of them to use instead of itemtossevent. As for the texture, the video creator made a mistake that I followed. So I fixed it for real.
This code doesn't do anything when I drop the blaze powder (the code that is inside ItemDropEvent.) I want to know how to detect if the dropped item is blaze powder but I can't seem to figure it out.
2
When will it update to a newer version, because that one is only updated up to 1.7?
0
I will try this out. What version did you want it to be for?
0
THANKS SO MUCH! I was having the same error and it helped.
0
UPDATE:
I have done a lot more work. Now I only need to render the other players correctly and not just the current player themselves. Right now the other players render inside me in the same exact place...
Here is my code:
https://pastebin.com/kuR60HrX
@SubscribeEvent
public void onPlayerRender(RenderPlayerEvent.Pre event) {
if (event.getEntity() instanceof EntityPlayer && !event.getEntity().isInvisible()) {
event.setCanceled(true);
EntityPlayer player = (EntityPlayer) event.getEntity();
EntityLivingBase living = (EntityLivingBase) event.getEntity().getEntityWorld()
.getEntityByID(player.getEntityId());
if (RenderHelper.currentRender == null) {
RenderHelper.currentRender = RenderHelper.getRenderFromID(0);
} else {
RenderHelper.currentRender.doRender((EntityLivingBase) event.getEntity(), 0, 0, 0, 0, 0);
}
}
}
Hello there. I am trying to disguise players and I have setup a bunch of stuff already!
But the only issue is.... The player renders invisible! When entityshadows in on, there are shadows.
Any help would be appreciated. Thanks!
https://pastebin.com/RgFKDnE4
https://pastebin.com/3VS5FL4V
https://pastebin.com/wFuABxdH
https://pastebin.com/Sqb5XxB0
https://pastebin.com/7mtPFRTz
0
NOTE: I don't know if this was the right place to put this thread in the forums, but tell me if it is wrong!
Hello there. I wanted to share a weird Minecraft Forge modding glitch I made possible! All I did was bind my tile entity to my block, and then it happened... I really screwed up the rendering!!! LOL
0
What about CJMinecraft's YT modding tutorials? Here is his channel:
https://www.youtube.com/channel/UCTkGJvB1v6dfV8ZyryRKPHQ
0
I have an idea for your tutorials. It doesn't have to be in the tutorials right now, since it is very advanced. My idea is the multiblock structures and the big, custom models from Immersive Engineering, such as the Arc Furnace. You should cover multiblock structures first, and eventually get into custom multiblock structure models.
0
It still isn't doing anything. Wierd. I am using
package me.creepinson.item;
import me.creepinson.handlers.ItemHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteract;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class Syringe extends ModItems{
public Syringe(String name, CreativeTabs tab) {
super(name, tab);
}
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack item, World world, EntityPlayer user, EnumHand hand)
{
RayTraceResult raytrace = ForgeHooks.rayTraceEyes(user, 5);
if(raytrace.entityHit instanceof EntityZombie){
user.inventory.deleteStack(item);
user.inventory.addItemStackToInventory(new ItemStack(ItemHandler.Syringe_Full_Zombie, 1));
new ActionResult<ItemStack>(EnumActionResult.SUCCESS, item);
}else{
user.inventory.deleteStack(item);
user.inventory.addItemStackToInventory(new ItemStack(ItemHandler.Syringe_Full_Player, 1));
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, item);
}
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, item);
}
}
0
I am trying to detect if the player right-clicks my item, a syringe in this case, on a zombie. When this happens, it gives the player my zombie blood syringe and deletes to old syringe. If It is anywhere else when right-clicked, it will do the same, except give the player a player blood syringe. But it just seems to do the same thing no matter what I click on or where... Give the player a player blood syringe. I don't know what I'm doing wrong!
Here is my code for the syringe:
package me.creepinson.item;
import me.creepinson.handlers.ItemHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteract;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class Syringe extends ModItems{
private Minecraft mc = Minecraft.getMinecraft();
public Syringe(String name, CreativeTabs tab) {
super(name, tab);
}
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack item, World world, EntityPlayer user, EnumHand hand)
{
RayTraceResult raytrace = user.rayTrace(10, 30);
if(raytrace.entityHit instanceof EntityZombie){
user.inventory.deleteStack(item);
user.inventory.addItemStackToInventory(new ItemStack(ItemHandler.Syringe_Full_Zombie, 1));
new ActionResult<ItemStack>(EnumActionResult.SUCCESS, item);
}else{
user.inventory.deleteStack(item);
user.inventory.addItemStackToInventory(new ItemStack(ItemHandler.Syringe_Full_Player, 1));
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, item);
}
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, item);
}
}
0
oh i see - nice idea
0
did you code this from scratch? either way nice work!!!
0
thank you!
0
What method would I use? I have a list of events with me but I don't know which one of them to use instead of itemtossevent. As for the texture, the video creator made a mistake that I followed. So I fixed it for real.
0
This code doesn't do anything when I drop the blaze powder (the code that is inside ItemDropEvent.) I want to know how to detect if the dropped item is blaze powder but I can't seem to figure it out.
0
then what about this:
(the image file in this post)
Also did I make the right code to do what I wanted to do?
and about the texture not working - I did NOT fix it