-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
Read your logs:
-
[Fixed] Unregistering of RenderGameOverlayEvent does not work
SanAndreaP replied to Chimaine's topic in Modder Support
@SideOnly(Side.Client) Why is this there? You can use this class for a server as well, since it doesn't have any client-related stuff there! -
[Fixed] Unregistering of RenderGameOverlayEvent does not work
SanAndreaP replied to Chimaine's topic in Modder Support
@SideOnly(Side.Client) Why is this there? You can use this class for a server as well, since it doesn't have any client-related stuff there! -
Getting the directory the minecraft_server.jar is situated
SanAndreaP replied to GiannivanMarion's topic in Modder Support
Just use new File("./pathNextToTheServerJar/file.ext") -
Getting the directory the minecraft_server.jar is situated
SanAndreaP replied to GiannivanMarion's topic in Modder Support
Just use new File("./pathNextToTheServerJar/file.ext") -
public void onBowFOVZoomDiamond(EntityPlayer player, ItemStack stack){ ; } public void onBowFOVZoomTrillint(EntityPlayer player, ItemStack stack){ ; } public void onBowFOVZoomNether(EntityPlayer player, ItemStack stack){ ; } What's the difference between those? EDIT: I see the problem here, you have many seperate TickHandlers and each reset the FOV variable, since their bow is not equal to the current used item! What I strongly suggest is that you have only ONE TickHandler, then do something like this: if(type.equals(EnumSet.of(TickType.RENDER))) { if(player != null && player.isUsingItem()) { int itemID = player.getItemInUse().itemID; if(itemID == firstBow.itemID) { MyMod.proxy.onBowFOVZoomFirstBow(player, player.getItemInUse()); } else if(itemID == secondBow.itemID) { MyMod.proxy.onBowFOVZoomSecondBow(player, player.getItemInUse()); } else if ...... } else { mod_rareores.proxy.resetSavedFOV(); } }
-
public void onBowFOVZoomDiamond(EntityPlayer player, ItemStack stack){ ; } public void onBowFOVZoomTrillint(EntityPlayer player, ItemStack stack){ ; } public void onBowFOVZoomNether(EntityPlayer player, ItemStack stack){ ; } What's the difference between those? EDIT: I see the problem here, you have many seperate TickHandlers and each reset the FOV variable, since their bow is not equal to the current used item! What I strongly suggest is that you have only ONE TickHandler, then do something like this: if(type.equals(EnumSet.of(TickType.RENDER))) { if(player != null && player.isUsingItem()) { int itemID = player.getItemInUse().itemID; if(itemID == firstBow.itemID) { MyMod.proxy.onBowFOVZoomFirstBow(player, player.getItemInUse()); } else if(itemID == secondBow.itemID) { MyMod.proxy.onBowFOVZoomSecondBow(player, player.getItemInUse()); } else if ...... } else { mod_rareores.proxy.resetSavedFOV(); } }
-
Where's your GUI handler?
-
Where's your GUI handler?
-
[SOLVED]Armor, Dye, and Tools Crafting Recipes?
SanAndreaP replied to FloatingGrapefruit's topic in Modder Support
It would be helpful to post what code you used to register your armor/tool recipes. -
[SOLVED]Armor, Dye, and Tools Crafting Recipes?
SanAndreaP replied to FloatingGrapefruit's topic in Modder Support
It would be helpful to post what code you used to register your armor/tool recipes. -
Use the OnLivingDrops event.
-
Use the OnLivingDrops event.
-
Maybe it updated while I was coding. Edit: I may be blind but I don't see any forge newer than 7.7.1 No, but look at the last number. You have .611, the latest I can see is .665
-
Maybe it updated while I was coding. Edit: I may be blind but I don't see any forge newer than 7.7.1 No, but look at the last number. You have .611, the latest I can see is .665
-
MinecraftForge v7.7.1.611 Update Forge and see if the problem persists. EDIT: I misread, you're trying to code with Forge
-
MinecraftForge v7.7.1.611 Update Forge and see if the problem persists. EDIT: I misread, you're trying to code with Forge
-
TileEntity not saving how it should (Was fine a few minutes ago)
SanAndreaP replied to Abascus's topic in Modder Support
I don't understand... if it's loading, it's saving... Please give us more details, what should happen, what is happening instead? -
TileEntity not saving how it should (Was fine a few minutes ago)
SanAndreaP replied to Abascus's topic in Modder Support
I don't understand... if it's loading, it's saving... Please give us more details, what should happen, what is happening instead? -
Underscores are allowed. yanksrock1019 Can you please make a screenshot of your ZIP, where you see your puplet_mod class file?
-
Underscores are allowed. yanksrock1019 Can you please make a screenshot of your ZIP, where you see your puplet_mod class file?
-
Here's my code. Yours is similar... find out what I did differently TickHandler (tickStart) if(type.equals(EnumSet.of(TickType.RENDER))) { if(this.mc.thePlayer != null && this.mc.thePlayer.isUsingItem() && this.mc.thePlayer.getItemInUse().itemID == ESPModRegistry.niobBow.itemID) { ESPModRegistry.proxy.onBowUse(this.mc.thePlayer.getItemInUse(), this.mc.thePlayer); } else { ESPModRegistry.proxy.resetSavedFOV(); } } CommonProxy public void onBowUse(ItemStack stack, EntityPlayer player) { ; } public void resetSavedFOV() { ; } Client Proxy public float fovModifierHand = 0F; @Override public void onBowUse(ItemStack stack, EntityPlayer player) { float f = 1.0F; if (player.capabilities.isFlying) { f *= 1.1F; } float speedOnGround = 0.1F; f *= (player.landMovementFactor * player.getSpeedModifier() / speedOnGround + 1.0F) / 2.0F; int i = player.getItemInUseDuration(); float f1 = (float)i / 10.0F; if (f1 > 1.0F) { f1 = 1.0F; } else { f1 *= f1; } f *= 1.0F - f1 * 0.25F; fovModifierHand = fovModifierHand > 0.001F ? fovModifierHand : (Float)ObfuscationReflectionHelper.getPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, "fovModifierHand", "field_78507_R"); fovModifierHand += (f - fovModifierHand) * 0.5F; if (fovModifierHand > 1.5F) { fovModifierHand = 1.5F; } if (fovModifierHand < 0.1F) { fovModifierHand = 0.1F; } ObfuscationReflectionHelper.setPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, fovModifierHand, "fovModifierHand", "field_78507_R"); } @Override public void resetSavedFOV() { this.fovModifierHand = 0F; } I saved the fovModifierHand into a class variable when first called, modify that and set this variable. When the FOV should reset, the variable is set to 0F again.
-
Here's my code. Yours is similar... find out what I did differently TickHandler (tickStart) if(type.equals(EnumSet.of(TickType.RENDER))) { if(this.mc.thePlayer != null && this.mc.thePlayer.isUsingItem() && this.mc.thePlayer.getItemInUse().itemID == ESPModRegistry.niobBow.itemID) { ESPModRegistry.proxy.onBowUse(this.mc.thePlayer.getItemInUse(), this.mc.thePlayer); } else { ESPModRegistry.proxy.resetSavedFOV(); } } CommonProxy public void onBowUse(ItemStack stack, EntityPlayer player) { ; } public void resetSavedFOV() { ; } Client Proxy public float fovModifierHand = 0F; @Override public void onBowUse(ItemStack stack, EntityPlayer player) { float f = 1.0F; if (player.capabilities.isFlying) { f *= 1.1F; } float speedOnGround = 0.1F; f *= (player.landMovementFactor * player.getSpeedModifier() / speedOnGround + 1.0F) / 2.0F; int i = player.getItemInUseDuration(); float f1 = (float)i / 10.0F; if (f1 > 1.0F) { f1 = 1.0F; } else { f1 *= f1; } f *= 1.0F - f1 * 0.25F; fovModifierHand = fovModifierHand > 0.001F ? fovModifierHand : (Float)ObfuscationReflectionHelper.getPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, "fovModifierHand", "field_78507_R"); fovModifierHand += (f - fovModifierHand) * 0.5F; if (fovModifierHand > 1.5F) { fovModifierHand = 1.5F; } if (fovModifierHand < 0.1F) { fovModifierHand = 0.1F; } ObfuscationReflectionHelper.setPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, fovModifierHand, "fovModifierHand", "field_78507_R"); } @Override public void resetSavedFOV() { this.fovModifierHand = 0F; } I saved the fovModifierHand into a class variable when first called, modify that and set this variable. When the FOV should reset, the variable is set to 0F again.
-
replace this: (EntityPlayer)tickData[0] with this: Minecraft.getMinecraft().thePlayer tickData[0] is the partialTickTime, which is a float. Also you should check if Minecraft.getMinecraft().thePlayer is not null before executing your code.
-
replace this: (EntityPlayer)tickData[0] with this: Minecraft.getMinecraft().thePlayer tickData[0] is the partialTickTime, which is a float. Also you should check if Minecraft.getMinecraft().thePlayer is not null before executing your code.