当前位置: 首页>>代码示例>>Java>>正文


Java Debug.dbg方法代码示例

本文整理汇总了Java中me.planetguy.lib.util.Debug.dbg方法的典型用法代码示例。如果您正苦于以下问题:Java Debug.dbg方法的具体用法?Java Debug.dbg怎么用?Java Debug.dbg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在me.planetguy.lib.util.Debug的用法示例。


在下文中一共展示了Debug.dbg方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onItemUse

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public boolean onItemUse(ItemStack stack, EntityPlayer player, World w, int x, int y, int z, int par7, float par8, float par9, float par10){
	TileEntity te=w.getTileEntity(x, y, z);
	Debug.dbg(w.getBlock(x, y, z)+":"+w.getBlockMetadata(x,y,z));
	if(te != null) {
		NBTTagCompound tag=new NBTTagCompound();
		te.writeToNBT(tag);
		TileEntity teCopy;
		try {
			teCopy = te.getClass().newInstance();
			teCopy.readFromNBT(tag);
			Debug.details(teCopy);
		} catch (Exception ignored) {
			
		}
	}
	return true;
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:18,代码来源:ItemDebugWandReloading.java

示例2: establishPortal

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public static void establishPortal(World w, int x, int y, int z, int side){
	if(!Properties.enableSpecialPortals)
		return;
	Debug.dbg("Establishing portal");
	int[] newPos=correct(x, y, z, side);
	x=newPos[0];
	y=newPos[1];
	z=newPos[2];
	int meta=1;
	HashSet<Point> pts=discoverPortalXYPlane(w, x, y, z);
	if(pts==null){
		pts=discoverPortalYZPlane(w, x, y, z);
		meta=0;
	}
	Debug.dbg("Points: "+pts);
	if(pts!=null){
		for(Point p:pts){
			w.setBlock(p.x, p.y, p.z, Blocks.portal, meta, 0x02);
		}
	}
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:22,代码来源:PortalHandler.java

示例3: repopulateOres

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public static void repopulateOres(WorldServer w, int cx, int cz){
	prePopulate(w,cx,cz, new XorShift(cx, cz, w.getSeed()));
	BlockMeta ore=getOre(w, cx, cz);
		Debug.dbg(cx+" "+cz+": Generating "+ore);
	if(ore!=null)
		repopulateOre(w,cx, cz, ore, new XorShift(cx, cz, w.getSeed()));
}
 
开发者ID:planetguy32,项目名称:Enterprise,代码行数:8,代码来源:ODTGen.java

示例4: onItemUse

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public boolean onItemUse(ItemStack stack, EntityPlayer player, World w, int x, int y, int z, int par7, float par8, float par9, float par10){
	TileEntity te=w.getTileEntity(x, y, z);
	Debug.dbg(w.getBlock(x, y, z)+":"+w.getBlockMetadata(x,y,z));
	if(te != null) {
		NBTTagCompound tag=new NBTTagCompound();
		te.writeToNBT(tag);
		Debug.dbg(tag);
	}
	return true;
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:11,代码来源:ItemDebugWandNBT.java

示例5: onItemUse

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public boolean onItemUse(ItemStack stack, EntityPlayer player, World w, int x, int y, int z, int par7, float par8, float par9, float par10){
	TileEntity te=w.getTileEntity(x, y, z);
	Debug.dbg(w.getBlock(x, y, z)+":"+w.getBlockMetadata(x,y,z));
	player.addChatMessage(new ChatComponentText(w.getBlock(x, y, z)+":"+w.getBlockMetadata(x,y,z)+"\n"+Debug.dump(te)));
	Debug.details(te);
	return true;
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:8,代码来源:ItemDebugWandFieldwise.java

示例6: closeInventory

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
@Override
public void closeInventory() {
	Debug.dbg("Closed");
	Random rand = new Random();

    IInventory inventory = this;
    
    for (int i = 0; i < inventory.getSizeInventory(); i++) {
    	ItemStack item = inventory.getStackInSlot(i);
    	
    	if (item != null && item.stackSize > 0) {
    		float rx = rand.nextFloat() * 0.8F + 0.1F;
    		float ry = rand.nextFloat() * 0.8F + 0.1F;
    		float rz = rand.nextFloat() * 0.8F + 0.1F;
    		
    		EntityItem entityItem = new EntityItem(world,
    					x + rx, y + ry, z + rz,
    					new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
    		
            if (item.hasTagCompound()) {
            	//entityItem.getEntityData().setTagCompound((NBTTagCompound) item.getTagCompound().copy());
            }	
            
            float factor = 0.05F;
            entityItem.motionX = rand.nextGaussian() * factor;
            entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
            entityItem.motionZ = rand.nextGaussian() * factor;
            world.spawnEntityInWorld(entityItem);
            item.stackSize = 0;
    	}
    }
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:33,代码来源:InventoryInserter.java

示例7: onPickupFromSlot

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
@Override
   public void onPickupFromSlot(EntityPlayer par1EntityPlayer, ItemStack me){
	super.onPickupFromSlot(par1EntityPlayer, me);
	if(type==TYPE_TOOL_IN){
		ItemStack otherItem=inventory.getStackInSlot(0);
		if(otherItem==null){
			Debug.dbg("No combining, stack is null");
			return;
		}
		HiddenItemUtil.hideItem(me, otherItem);
		inventory.setInventorySlotContents(0, null);
	}
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:14,代码来源:SlotConcealmentItem.java

示例8: onConfigChanged

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent evt){
	Debug.dbg("Event: "+evt);
	if(evt.modID.equals(Properties.modID)){
		Properties.update();
	}
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:8,代码来源:ForgeEventHandler.java

示例9: PLHelper

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public PLHelper(String modID){
	this.modID=modID;
	File f=new File(PlanetguyLib.instance.configFolder, this.modID+".cfg");
	try {
		f.createNewFile();
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	Debug.dbg("PL config file for mod "+modID+": "+f.exists());
	cfg=new Configuration(f);
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:13,代码来源:PLHelper.java

示例10: shouldLoad

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public boolean shouldLoad(Class c){
	cfg.load();
	boolean b=cfg.getBoolean("Allow "+c.getSimpleName(),"itemRestrict", true, "");
	Debug.dbg(b+" : "+c);
	cfg.save();
	return b;
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:8,代码来源:PLHelper.java

示例11: breakBlock

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public void breakBlock(World w, int x, int y, int z, Block b, int m)
  {
Debug.dbg("breakBlock");
super.breakBlock(w, x, y, z, b, m);
  }
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:6,代码来源:BlockLogger.java

示例12: onNeighborBlockChange

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_){
	Debug.dbg("onNeighborBlockChange");
	super.onNeighborBlockChange(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, p_149695_5_);
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:5,代码来源:BlockLogger.java

示例13: validate

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public void validate() {
	super.validate();
	Debug.dbg("Validated");
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:5,代码来源:TileEntityInvenswapper.java

示例14: invalidate

import me.planetguy.lib.util.Debug; //导入方法依赖的package包/类
public void invalidate() {
	super.invalidate();
	Debug.dbg("Invalidated");
}
 
开发者ID:planetguy32,项目名称:Gizmos,代码行数:5,代码来源:TileEntityInvenswapper.java


注:本文中的me.planetguy.lib.util.Debug.dbg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。