本文整理汇总了Java中me.ichun.mods.ichunutil.common.core.util.ObfHelper类的典型用法代码示例。如果您正苦于以下问题:Java ObfHelper类的具体用法?Java ObfHelper怎么用?Java ObfHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObfHelper类属于me.ichun.mods.ichunutil.common.core.util包,在下文中一共展示了ObfHelper类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doRender
import me.ichun.mods.ichunutil.common.core.util.ObfHelper; //导入依赖的package包/类
@Override
public void doRender(EntityShattered shattered, double x, double y, double z, float entityYaw, float partialTicks)
{
if(shattered.model == null)
{
shattered.model = new ModelShattered(shattered);
}
ResourceLocation rl = getEntityTexture(shattered);
if(shattered.model.entRenderer instanceof RenderLivingBase && rl != null)
{
GlStateManager.pushMatrix();
GlStateManager.translate(x, y, z);
GlStateManager.rotate(180F, 0F, 1F, 0F);
GlStateManager.scale(-1.0F, -1.0F, 1.0F);
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
bindTexture(rl);
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.003921569F);
ObfHelper.invokePreRenderCallback((RenderLivingBase)shattered.model.entRenderer, shattered.model.entRenderer.getClass(), shattered.acquired, partialTicks);
GlStateManager.translate(0F, -1F, 0F);
shattered.model.render(shattered, 0F, 0F, 0F, 0F, 0F, 0.0625F);
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
GlStateManager.disableBlend();
GlStateManager.popMatrix();
}
}
示例2: onGuiActionPerformed
import me.ichun.mods.ichunutil.common.core.util.ObfHelper; //导入依赖的package包/类
@SubscribeEvent
public void onGuiActionPerformed(GuiScreenEvent.ActionPerformedEvent.Pre event)
{
if(!ObfHelper.obfuscated() && Minecraft.getMinecraft().getSession().getProfile().getName().equals("iChun") && (event.getGui().getClass() == GuiIngameMenu.class && event.getButton().id == 12 || event.getGui().getClass() == GuiMainMenu.class && event.getButton().id == 6) && !GuiScreen.isShiftKeyDown())
{
event.setCanceled(true);
Minecraft.getMinecraft().displayGuiScreen(new GuiConfigs(Minecraft.getMinecraft().currentScreen));
}
}
示例3: onPreInit
import me.ichun.mods.ichunutil.common.core.util.ObfHelper; //导入依赖的package包/类
@Mod.EventHandler
public void onPreInit(FMLPreInitializationEvent event)
{
ObfHelper.detectObfuscation();
config = ConfigHandler.registerConfig(new Config(event.getSuggestedConfigurationFile()));
proxy.preInit();
UpdateChecker.registerMod(new UpdateChecker.ModVersionInfo(MOD_NAME, iChunUtil.VERSION_OF_MC, VERSION, false));
}
示例4: getEntityTexture
import me.ichun.mods.ichunutil.common.core.util.ObfHelper; //导入依赖的package包/类
@Override
protected ResourceLocation getEntityTexture(EntityGib gib)
{
Render render = Minecraft.getMinecraft().getRenderManager().getEntityRenderObject(gib.parent);
return ObfHelper.getEntityTexture(render, render.getClass(), gib.parent);
}
示例5: getEntityTexture
import me.ichun.mods.ichunutil.common.core.util.ObfHelper; //导入依赖的package包/类
@Override
protected ResourceLocation getEntityTexture(EntityShattered entity)
{
return ObfHelper.getEntityTexture(renderManager.getEntityRenderObject(entity.acquired), renderManager.getEntityRenderObject(entity.acquired).getClass(), entity.acquired);
}
示例6: onClientTick
import me.ichun.mods.ichunutil.common.core.util.ObfHelper; //导入依赖的package包/类
@SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event)
{
Minecraft mc = Minecraft.getMinecraft();
if(event.phase.equals(TickEvent.Phase.END))
{
if(mc.world != null)
{
if(connectingToServer)
{
connectingToServer = false;
if(((net.minecraftforge.registries.ForgeRegistry<IRecipe>)net.minecraftforge.fml.common.registry.ForgeRegistries.RECIPES).getID(new ResourceLocation("ichunutil", "compact_porkchop")) == -1)
{
iChunUtil.config.enableCompactPorkchop = 0;
}
MinecraftForge.EVENT_BUS.post(new ServerPacketableEvent());
}
if(patronUpdateServerAsPatron)
{
patronUpdateServerAsPatron = false;
iChunUtil.channel.sendToServer(new PacketPatronInfo(iChunUtil.proxy.getPlayerId(), iChunUtil.config.patronRewardType, iChunUtil.config.showPatronReward == 1));
}
for(KeyBind bind : keyBindList)
{
bind.tick();
}
for(Map.Entry<KeyBinding, KeyBind> e : mcKeyBindList.entrySet())
{
if(e.getValue().keyIndex != e.getKey().getKeyCode())
{
e.setValue(new KeyBind(e.getKey().getKeyCode()));
}
e.getValue().tick();
}
hasScreen = mc.currentScreen != null;
if(!mc.isGamePaused())
{
EntityTrackerHandler.tick();
GrabHandler.tick(Side.CLIENT);
if(!ObfHelper.obfuscated() && Minecraft.getMinecraft().getSession().getProfile().getName().equals("iChun") && mc.player.isElytraFlying() && mc.gameSettings.keyBindJump.isKeyDown())
{
mc.player.motionY += 0.05F;
}
}
}
ticks++;
}
}