net.minecraft.util.ResourceLocation.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(55)

本文整理了Java中net.minecraft.util.ResourceLocation.hashCode方法的一些代码示例,展示了ResourceLocation.hashCode的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceLocation.hashCode方法的具体详情如下:
包路径:net.minecraft.util.ResourceLocation
类名称:ResourceLocation
方法名:hashCode

ResourceLocation.hashCode介绍

暂无

代码示例

代码示例来源:origin: SlimeKnights/TinkersConstruct

@Override
 public int hashCode() {
  return 31 * location.hashCode() + fluid.hashCode();
 }
}

代码示例来源:origin: joshiejack/Mariculture

@Override
  public int hashCode() {
    return resource != null ? resource.hashCode() : 0;
  }
}

代码示例来源:origin: sinkillerj/ProjectE

@Override
public int hashCode() 
{
  int hash = 31 * id.hashCode();
  if (this.damage == OreDictionary.WILDCARD_VALUE)
    hash = hash * 57 ^ this.damage;
  return hash;
}

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Override
  public int hashCode() {
    return resource.hashCode();
  }
}

代码示例来源:origin: gr8pefish/IronBackpacks

@Override
  public int hashCode() {
    return identifier.hashCode();
  }
}

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Override
  public int hashCode() {
    return resource != null ? resource.hashCode() : 0;
  }
}

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Override
  public int hashCode() {
    return resource != null ? resource.hashCode() : 0;
  }
}

代码示例来源:origin: gr8pefish/IronBackpacks

@Override
public int hashCode() {
  return identifier.hashCode();
}

代码示例来源:origin: SquidDev-CC/plethora

@Override
  public int hashCode() {
    return thisModule.hashCode();
  }
}

代码示例来源:origin: gegy1000/Terrarium

@Override
public final int hashCode() {
  return this.identifier.hashCode();
}

代码示例来源:origin: gegy1000/Terrarium

@Override
public int hashCode() {
  int result = this.source.getIdentifier().hashCode();
  result = 31 * result + this.tileX;
  result = 31 * result + this.tileZ;
  return result;
}

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Override
  public int hashCode() {
    return getResource().hashCode();
  }
}

代码示例来源:origin: JurassiCraftTeam/JurassiCraft2

@Override
public int hashCode() {
  return this.metadata.getIdentifier().hashCode();
}

代码示例来源:origin: P3pp3rF1y/AncientWarfare2

@Override
public int hashCode() {
  int result = recipeType.hashCode();
  result = 31 * result + resourceLocation.hashCode();
  return result;
}

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Override
  public int hashCode() {
    return getResource().hashCode();
  }
}

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Override
  public int hashCode() {
    return getResource() == null? 0 : getResource().hashCode();
  }
}

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Override
  public int hashCode() {
    return getResource() == null? 0 : getResource().hashCode();
  }
}

代码示例来源:origin: PenguinSquad/Harvest-Festival

@Override
public int hashCode() {
  return getRegistryName() == null? 0 : getRegistryName().hashCode();
}

代码示例来源:origin: TeamLapen/Vampirism

/**
 * Notify faction about changes.
 * {@link FactionPlayerHandler#currentFaction} and {@link FactionPlayerHandler#currentLevel} will be used as the new ones
 *
 * @param oldFaction
 * @param oldLevel
 */
private void notifyFaction(IPlayableFaction oldFaction, int oldLevel) {
  if (oldFaction != null && !oldFaction.equals(currentFaction)) {
    VampirismMod.log.d(TAG, "Leaving faction %s", oldFaction.getKey());
    oldFaction.getPlayerCapability(player).onLevelChanged(0, oldLevel);
  }
  if (currentFaction != null) {
    VampirismMod.log.d(TAG, "Changing to %s %d", currentFaction, currentLevel);
    currentFaction.getPlayerCapability(player).onLevelChanged(currentLevel, Objects.equals(oldFaction, currentFaction) ? oldLevel : 0);
  }
  if (!Objects.equals(currentFaction, oldFaction)) {
    onChangedFaction();
  }
  ScoreboardUtil.updateScoreboard(player, ScoreboardUtil.FACTION_CRITERIA, currentFaction == null ? 0 : currentFaction.getKey().hashCode());
}

代码示例来源:origin: SquidDev-CC/plethora

renderFlare(oX + 0.5, oY + 0.5, oZ + 0.5, block.getRegistryName().hashCode(), 1.0f, renderManager);

相关文章