This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean blockActivated(World world, int i, int j, int k, | |
EntityPlayer entityplayer) { | |
super.onBlockClicked(world, i, j, k, entityplayer); | |
if( entityplayer != null && | |
entityplayer.getCurrentEquippedItem() != null && | |
world.getBlockMetadata(i, j, k) != 7 && | |
entityplayer.getCurrentEquippedItem().isItemEqual(new ItemStack(Item.dyePowder, 1, 15))) { | |
growTree(world, i, j, k, world.rand); | |
entityplayer.getCurrentEquippedItem().stackSize--; | |
if(entityplayer.getCurrentEquippedItem().stackSize <= 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void renderLightText(String s, int xPos, int yPos, int color, FontRenderer fontrenderer) { | |
GL11.glDepthMask(true); | |
fontrenderer.drawString(s, xPos, yPos, 0x000000); | |
this.drawString(s, xPos, yPos, color, true, fontrenderer); | |
this.drawString(s, xPos, yPos, color, false, fontrenderer); | |
} | |
protected void drawString(String s, int d, int d1, double d2, boolean blend, FontRenderer fontrenderer) { | |
byte byte0 = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// declaration | |
HashMap<String, Block> map = new HashMap<String, Block>(); | |
// add new values | |
map.put("DirtBlock", new BlockDirt(blockID1).setIconIndex(6)); | |
map.put("SandBlock", new BlockSand(blockID1).setIconIndex(8)); | |
// get sand block | |
BlockSand dummySand = map.get("SandBlock"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setOthersTarget() { | |
List<Entity> entities = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(16D, 16D, 16D)); | |
for(Entity entity : entities) { | |
if(entity instanceof EntityLiving && ((entity instanceof EntityMob) || (entity instanceof IMob))) { | |
if(((EntityLiving)entity).getAttackTarget() == null) ((EntityLiving)entity).setAttackTarget(this); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package SanAndreasP.mods; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FilenameFilter; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
color 0f | |
echo ===================================================================== | |
echo SanAndreasPs JAR packager for Minecraft Forge modifications | |
echo ===================================================================== | |
set /p mcppath=<mcp.txt | |
:Programm | |
set /p modfolder="Enter mod foldername: " | |
set /p jarfilename="Enter jar filename: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sanandreasp.mods.EnderStuffPlus.client.render; | |
import java.lang.reflect.Method; | |
import org.lwjgl.opengl.GL11; | |
import org.lwjgl.opengl.GL12; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.entity.EntityClientPlayerMP; | |
import net.minecraft.client.renderer.ItemRenderer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "wxRTLogger.hpp" | |
wxRTLogger::wxRTLogger(std::string name, wxRichTextCtrl* wxRTBox) { | |
this->richTextBox = wxRTBox; | |
this->progName = name; | |
this->richTextBox->BeginTextColour(wxColour(0,0,0)); | |
this->richTextBox->WriteText(_(this->progName + "\n\n")); | |
this->richTextBox->EndTextColour(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sanandreasp.mods.EnderStuffPlus.client.render; | |
import org.lwjgl.opengl.GL11; | |
import sanandreasp.core.manpack.ItemRenderHelper; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.entity.EntityClientPlayerMP; | |
import net.minecraft.client.renderer.ItemRenderer; | |
import net.minecraft.client.renderer.OpenGlHelper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sanandreasp.core.manpack; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.renderer.ItemRenderer; | |
import net.minecraft.client.renderer.OpenGlHelper; | |
import net.minecraft.client.renderer.RenderHelper; | |
import net.minecraft.client.renderer.Tessellator; | |
import net.minecraft.client.renderer.texture.TextureMap; | |
import net.minecraft.entity.EntityLiving; | |
import net.minecraft.entity.EntityLivingBase; |
OlderNewer