conflict_resolution
stringlengths
27
16k
<<<<<<< import org.apache.commons.math3.util.FastMath; ======= import org.esa.beam.util.logging.BeamLogManager; >>>>>>> import org.esa.beam.util.logging.BeamLogManager; import org.apache.commons.math3.util.FastMath;
<<<<<<< angles[k] = (float)((a0 + a1 * rangeDist[k] / 1000.0 + a2 * Math.pow(rangeDist[k] / 1000.0, 2.0) + a3 * Math.pow(rangeDist[k] / 1000.0, 3.0) + a4 * Math.pow(rangeDist[k] / 1000.0, 4.0) + a5 * Math.pow(rangeDist[k] / 1000.0, 5.0)) * MathUtils.RTOD); ======= angles[k] = (float)((a0 + a1 * rangeDist[k] / 1000.0 + a2 * FastMath.pow(rangeDist[k] / 1000.0, 2.0) + a3 * FastMath.pow(rangeDist[k] / 1000.0, 3.0) + a4 * FastMath.pow(rangeDist[k] / 1000.0, 4.0) + a5 * FastMath.pow(rangeDist[k] / 1000.0, 5.0)) * Constants.RTOD); >>>>>>> angles[k] = (float)((a0 + a1 * rangeDist[k] / 1000.0 + a2 * Math.pow(rangeDist[k] / 1000.0, 2.0) + a3 * Math.pow(rangeDist[k] / 1000.0, 3.0) + a4 * Math.pow(rangeDist[k] / 1000.0, 4.0) + a5 * Math.pow(rangeDist[k] / 1000.0, 5.0)) * Constants.RTOD);
<<<<<<< public static GeoPoint defineExtraPhiLam( final double heightMin, final double heightMax, final Window window, final SLCImage meta, final Orbit orbit) throws Exception { ======= public static GeoPoint defineExtraPhiLam(final double heightMin, final double heightMax, final Window window, final SLCImage meta, final Orbit orbit) throws Exception { // compute Phi, Lambda for Tile corners double[] latLonMax; double[] latLonMin; latLonMin = orbit.lph2ell(window.pixels()/2, window.lines()/2, heightMin, meta); latLonMax = orbit.lph2ell(window.pixels()/2, window.lines()/2, heightMax, meta); >>>>>>> public static GeoPoint defineExtraPhiLam( final double heightMin, final double heightMax, final Window window, final SLCImage meta, final Orbit orbit) throws Exception { // compute Phi, Lambda for Tile corners
<<<<<<< import org.geotools.feature.DefaultFeatureCollection; ======= import org.geotools.feature.FeatureCollection; import org.geotools.feature.simple.SimpleFeatureBuilder; >>>>>>> import org.geotools.feature.DefaultFeatureCollection; import org.geotools.feature.simple.SimpleFeatureBuilder;
<<<<<<< private String getPicturesPath() { String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); String imageFileName = "IMG_" + timeStamp + (this.encodingType == JPEG ? ".jpg" : ".png"); File storageDir = Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES); String galleryPath = storageDir.getAbsolutePath() + "/" + imageFileName; return galleryPath; } private void refreshGallery(Uri contentUri) { Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); mediaScanIntent.setData(contentUri); this.cordova.getActivity().sendBroadcast(mediaScanIntent); } private String outputModifiedBitmap(Bitmap bitmap, Uri uri) throws IOException { ======= private String getPicutresPath() { String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); String imageFileName = "IMG_" + timeStamp + (this.encodingType == JPEG ? ".jpg" : ".png"); File storageDir = Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES); String galleryPath = storageDir.getAbsolutePath() + "/" + imageFileName; return galleryPath; } private void refreshGallery(Uri contentUri) { Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); mediaScanIntent.setData(contentUri); this.cordova.getActivity().sendBroadcast(mediaScanIntent); } /** * Converts output image format int value to string value of mime type. * @param outputFormat int Output format of camera API. * Must be value of either JPEG or PNG constant * @return String String value of mime type or empty string if mime type is not supported */ private String getMimetypeForFormat(int outputFormat) { if (outputFormat == PNG) return "image/png"; if (outputFormat == JPEG) return "image/jpeg"; return ""; } private String ouputModifiedBitmap(Bitmap bitmap, Uri uri) throws IOException { // Some content: URIs do not map to file paths (e.g. picasa). String realPath = FileHelper.getRealPath(uri, this.cordova); // Get filename from uri String fileName = realPath != null ? realPath.substring(realPath.lastIndexOf('/') + 1, realPath.lastIndexOf(".") + 1) : "modified."; // Append filename extension based on output encoding type fileName += (this.encodingType == JPEG ? "jpg" : "png"); >>>>>>> private String getPicturesPath() { String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); String imageFileName = "IMG_" + timeStamp + (this.encodingType == JPEG ? ".jpg" : ".png"); File storageDir = Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES); String galleryPath = storageDir.getAbsolutePath() + "/" + imageFileName; return galleryPath; } private void refreshGallery(Uri contentUri) { Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); mediaScanIntent.setData(contentUri); this.cordova.getActivity().sendBroadcast(mediaScanIntent); } /** * Converts output image format int value to string value of mime type. * @param outputFormat int Output format of camera API. * Must be value of either JPEG or PNG constant * @return String String value of mime type or empty string if mime type is not supported */ private String getMimetypeForFormat(int outputFormat) { if (outputFormat == PNG) return "image/png"; if (outputFormat == JPEG) return "image/jpeg"; return ""; } private String outputModifiedBitmap(Bitmap bitmap, Uri uri) throws IOException {
<<<<<<< ======= import org.springframework.http.client.ClientHttpRequestFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; >>>>>>> import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; <<<<<<< ======= private static final String SUBREPORT_DIR = "SUBREPORT_DIR"; >>>>>>> <<<<<<< double[] maxDpi = maxDpi(values); ======= values.put(SUBREPORT_DIR, jasperTemplateDirectory.getAbsolutePath()); >>>>>>> double[] maxDpi = maxDpi(values);
<<<<<<< import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; ======= >>>>>>> import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern;
<<<<<<< ======= import org.mapfish.print.config.Configuration; import org.mapfish.print.config.HasConfiguration; import org.mapfish.print.config.WorkingDirectories; >>>>>>> import org.mapfish.print.config.Configuration; import org.mapfish.print.config.HasConfiguration; import org.mapfish.print.config.WorkingDirectories; <<<<<<< ======= import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; >>>>>>> import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; <<<<<<< ======= @Autowired private WorkingDirectories workingDirectories; private File dynamicReportDirectory; private Configuration configuration; >>>>>>> private File dynamicReportDirectory; private Configuration configuration; @Autowired private WorkingDirectories workingDirectories; <<<<<<< @Override protected final void extraValidation(final List<Throwable> validationErrors) { // no validation needed } ======= public final void setDynamicReportDirectory(final String dynamicReportDirectory) { this.dynamicReportDirectory = new File(this.configuration.getDirectory(), dynamicReportDirectory); } @Override public final void setConfiguration(final Configuration configuration) { this.configuration = configuration; } >>>>>>> @Override protected final void extraValidation(final List<Throwable> validationErrors) { // no validation needed } public final void setDynamicReportDirectory(final String dynamicReportDirectory) { this.dynamicReportDirectory = new File(this.configuration.getDirectory(), dynamicReportDirectory); } @Override public final void setConfiguration(final Configuration configuration) { this.configuration = configuration; }
<<<<<<< if (this.styleObject == null) { final StyleParserPlugin parser = new SLDParserPlugin(); ======= if (this.styleObject == null && this.style != null) { final StyleParserPlugin parser = new StringSLDParserPlugin(); >>>>>>> if (this.styleObject == null && this.style != null) { final StyleParserPlugin parser = new SLDParserPlugin();
<<<<<<< import com.forgeessentials.api.APIRegistry; import com.forgeessentials.api.permissions.Zone; import com.forgeessentials.util.FunctionHelper; import com.forgeessentials.commons.selections.WarpPoint; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent; import cpw.mods.fml.common.gameevent.TickEvent; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.common.MinecraftForge; ======= >>>>>>>
<<<<<<< import com.forgeessentials.commons.selections.Point; ======= import java.util.HashMap; import java.util.List; import net.minecraft.command.ICommandSender; import net.minecraft.command.PlayerSelector; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.permissions.PermissionsManager; import net.minecraftforge.permissions.PermissionsManager.RegisteredPermValue; >>>>>>> import com.forgeessentials.commons.selections.Point; import java.util.HashMap; import java.util.List; import net.minecraft.command.ICommandSender; import net.minecraft.command.PlayerSelector; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.permissions.PermissionsManager; import net.minecraftforge.permissions.PermissionsManager.RegisteredPermValue; <<<<<<< import com.forgeessentials.commons.selections.WarpPoint; import com.forgeessentials.util.teleport.TeleportCenter; import cpw.mods.fml.common.FMLCommonHandler; import net.minecraft.command.ICommandSender; import net.minecraft.command.PlayerSelector; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.permissions.PermissionsManager; import net.minecraftforge.permissions.PermissionsManager.RegisteredPermValue; ======= import com.forgeessentials.util.selections.Point; import com.forgeessentials.util.selections.WarpPoint; >>>>>>> import com.forgeessentials.commons.selections.WarpPoint; import com.forgeessentials.util.teleport.TeleportCenter; import com.forgeessentials.util.selections.Point; import com.forgeessentials.util.selections.WarpPoint;
<<<<<<< for (StyleParserPlugin plugin : this.plugins) { try { Optional<? extends Style> style = plugin.parseStyle(configuration, clientHttpRequestFactory, styleString, mapContext); if (style.isPresent()) { if (LOGGER.isDebugEnabled()) { try { final SLDTransformer transformer = new SLDTransformer(); final StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(); final UserLayer userLayer = styleFactory.createUserLayer(); userLayer.addUserStyle(style.get()); final StyledLayerDescriptor sld = styleFactory.createStyledLayerDescriptor(); sld.addStyledLayer(userLayer); LOGGER.debug("Loaded style from: \n\n '" + styleString + "': \n\n" + transformer.transform(sld)); } catch (Exception e) { LOGGER.debug("Loaded style from: \n\n '" + styleString + "' \n\n<Unable to transform it to xml>: " + e, e); } } return style; ======= if (styleString != null) { for (StyleParserPlugin plugin : this.plugins) { try { Optional<? extends Style> style = plugin.parseStyle(configuration, clientHttpRequestFactory, styleString, mapContext); if (style.isPresent()) { return style; } } catch (Throwable t) { throw new RuntimeException(t); >>>>>>> if (styleString != null) { for (StyleParserPlugin plugin : this.plugins) { try { Optional<? extends Style> style = plugin.parseStyle(configuration, clientHttpRequestFactory, styleString, mapContext); if (style.isPresent()) { if (LOGGER.isDebugEnabled()) { try { final SLDTransformer transformer = new SLDTransformer(); final StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(); final UserLayer userLayer = styleFactory.createUserLayer(); userLayer.addUserStyle(style.get()); final StyledLayerDescriptor sld = styleFactory.createStyledLayerDescriptor(); sld.addStyledLayer(userLayer); LOGGER.debug("Loaded style from: \n\n '" + styleString + "': \n\n" + transformer.transform(sld)); } catch (Exception e) { LOGGER.debug("Loaded style from: \n\n '" + styleString + "' \n\n<Unable to transform it to xml>: " + e, e); } } return style;
<<<<<<< @Override protected final void extraValidation(final List<Throwable> validationErrors) { if (this.directory == null) { validationErrors.add(new IllegalStateException("No jasper template output directory defined in " + getClass().getName())); } } ======= /** * The input parameter object for {@link JasperReportBuilder}. */ public static final class Input { /** * Just to create a dependency with a dynamic report creator. */ public int dependence; } >>>>>>> @Override protected final void extraValidation(final List<Throwable> validationErrors) { if (this.directory == null) { validationErrors.add(new IllegalStateException("No jasper template output directory defined in " + getClass().getName())); } } /** * The input parameter object for {@link JasperReportBuilder}. */ public static final class Input { /** * Just to create a dependency with a dynamic report creator. */ public int dependence; }
<<<<<<< import com.google.common.base.Predicate; import com.google.common.io.Files; ======= import static org.junit.Assert.assertEquals; import java.io.File; import java.io.IOException; import java.net.URI; import java.util.List; >>>>>>> import com.google.common.base.Predicate; import com.google.common.io.Files; import java.io.File;
<<<<<<< ObjectAnimator oa = LauncherAnimUtils.ofViewAlphaAndScale( mFolderIconImageView, 0, 1.5f, 1.5f); if (Utilities.isLmpOrAbove()) { ======= ObjectAnimator oa = LauncherAnimUtils.ofPropertyValuesHolder(mFolderIconImageView, alpha, scaleX, scaleY); if (Utilities.ATLEAST_LOLLIPOP) { >>>>>>> ObjectAnimator oa = LauncherAnimUtils.ofViewAlphaAndScale( mFolderIconImageView, 0, 1.5f, 1.5f); if (Utilities.ATLEAST_LOLLIPOP) {
<<<<<<< void addAppWidgetFromPick(Intent data) { ======= private void manageApps() { startActivity(new Intent(android.provider.Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS)); } void addAppWidget(Intent data) { >>>>>>> private void manageApps() { startActivity(new Intent(android.provider.Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS)); } void addAppWidgetFromPick(Intent data) {
<<<<<<< public boolean canConsoleUseCommand() { return true; } @Override public String getPermissionNode() { return TeleportModule.PERM_BED; } @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) ======= public List<String> addTabCompletionOptions(ICommandSender sender, String[] args) >>>>>>> public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos)
<<<<<<< ItemInfo info = d.dragInfo; ======= >>>>>>> <<<<<<< return getContext().getString(R.string.workspace_scroll_format, page + 1 - delta, getChildCount() - delta); ======= int nScreens = getChildCount() - delta; int extraScreenId = mScreenOrder.indexOf(EXTRA_EMPTY_SCREEN_ID); if (extraScreenId >= 0 && nScreens > 1) { if (page == extraScreenId) { return getContext().getString(R.string.workspace_new_page); } nScreens--; } return String.format(getContext().getString(R.string.workspace_scroll_format), page + 1 - delta, nScreens); >>>>>>> int nScreens = getChildCount() - delta; int extraScreenId = mScreenOrder.indexOf(EXTRA_EMPTY_SCREEN_ID); if (extraScreenId >= 0 && nScreens > 1) { if (page == extraScreenId) { return getContext().getString(R.string.workspace_new_page); } nScreens--; } return String.format(getContext().getString(R.string.workspace_scroll_format), page + 1 - delta, nScreens);
<<<<<<< public Animator setStateWithAnimation(State toState, boolean animated, boolean hasOverlaySearchBar, HashMap<View, Integer> layerViews) { ======= public Animator setStateWithAnimation(State toState, int toPage, boolean animated, HashMap<View, Integer> layerViews) { >>>>>>> public Animator setStateWithAnimation(State toState, boolean animated, HashMap<View, Integer> layerViews) { <<<<<<< toState, animated, hasOverlaySearchBar, layerViews); ======= toState, toPage, animated, layerViews); >>>>>>> toState, animated, layerViews);
<<<<<<< * Starts an animation to the workspace from the apps view. ======= * Returns an Animator that calls {@link #dispatchOnLauncherTransitionStep(View, float)} on * {@param fromView} and {@param toView} as the animation interpolates. * * This is a bit hacky: we create a dummy ValueAnimator just for the AnimatorUpdateListener. */ private Animator dispatchOnLauncherTransitionStepAnim(final View fromView, final View toView) { ValueAnimator updateAnimator = ValueAnimator.ofFloat(0, 1); updateAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { dispatchOnLauncherTransitionStep(fromView, animation.getAnimatedFraction()); dispatchOnLauncherTransitionStep(toView, animation.getAnimatedFraction()); } }); return updateAnimator; } /** * Starts and animation to the workspace from the apps view. >>>>>>> * Returns an Animator that calls {@link #dispatchOnLauncherTransitionStep(View, float)} on * {@param fromView} and {@param toView} as the animation interpolates. * * This is a bit hacky: we create a dummy ValueAnimator just for the AnimatorUpdateListener. */ private Animator dispatchOnLauncherTransitionStepAnim(final View fromView, final View toView) { ValueAnimator updateAnimator = ValueAnimator.ofFloat(0, 1); updateAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { dispatchOnLauncherTransitionStep(fromView, animation.getAnimatedFraction()); dispatchOnLauncherTransitionStep(toView, animation.getAnimatedFraction()); } }); return updateAnimator; } /** * Starts an animation to the workspace from the apps view.
<<<<<<< @Thunk Launcher mLauncher; private LayoutInflater mLayoutInflater; @Thunk AlphabeticalAppsList mApps; private GridLayoutManager mGridLayoutMgr; private GridSpanSizer mGridSizer; private GridItemDecoration mItemDecoration; private View.OnTouchListener mTouchListener; private View.OnClickListener mIconClickListener; private View.OnLongClickListener mIconLongClickListener; ======= private final Launcher mLauncher; private final LayoutInflater mLayoutInflater; private final AlphabeticalAppsList mApps; private final GridLayoutManager mGridLayoutMgr; private final GridSpanSizer mGridSizer; private final GridItemDecoration mItemDecoration; private final View.OnTouchListener mTouchListener; private final View.OnClickListener mIconClickListener; private final View.OnLongClickListener mIconLongClickListener; private final Rect mBackgroundPadding = new Rect(); private final boolean mIsRtl; // Section drawing private final int mSectionNamesMargin; private final int mSectionHeaderOffset; private final Paint mSectionTextPaint; private final Paint mPredictedAppsDividerPaint; private final int mPredictionBarDividerOffset; private int mAppsPerRow; >>>>>>> private final Launcher mLauncher; private final LayoutInflater mLayoutInflater; private final AlphabeticalAppsList mApps; private final GridLayoutManager mGridLayoutMgr; private final GridSpanSizer mGridSizer; private final GridItemDecoration mItemDecoration; private final View.OnTouchListener mTouchListener; private final View.OnClickListener mIconClickListener; private final View.OnLongClickListener mIconLongClickListener; private final Rect mBackgroundPadding = new Rect(); private final boolean mIsRtl; // Section drawing private final int mSectionNamesMargin; private final int mSectionHeaderOffset; private final Paint mSectionTextPaint; private final Paint mPredictedAppsDividerPaint; private final int mPredictionBarDividerOffset; private int mAppsPerRow; <<<<<<< @Thunk Intent mMarketSearchIntent; // The last query that the user entered into the search field @Thunk String mLastSearchQuery; // Section drawing @Thunk int mSectionNamesMargin; @Thunk int mSectionHeaderOffset; @Thunk Paint mSectionTextPaint; @Thunk Paint mPredictedAppsDividerPaint; ======= private Intent mMarketSearchIntent; >>>>>>> private Intent mMarketSearchIntent; <<<<<<< mLastSearchQuery = query; mEmptySearchMessage = res.getString(R.string.all_apps_no_search_results, query); ======= String formatStr = res.getString(R.string.all_apps_no_search_results); mEmptySearchMessage = String.format(formatStr, query); >>>>>>> mEmptySearchMessage = res.getString(R.string.all_apps_no_search_results, query);
<<<<<<< public static Bundle call(ContentResolver cr, String method) { return cr.call(CONTENT_URI, method, null, null); } ======= // Extra for set_boolean method to also notify the backup manager of the change. public static final String NOTIFY_BACKUP = "notify_backup"; >>>>>>> // Extra for set_boolean method to also notify the backup manager of the change. public static final String NOTIFY_BACKUP = "notify_backup"; public static Bundle call(ContentResolver cr, String method) { return cr.call(CONTENT_URI, method, null, null); }
<<<<<<< final Workspace.State toWorkspaceState, final boolean animated, final Runnable onCompleteRunnable) { ======= final Workspace.State fromWorkspaceState, final Workspace.State toWorkspaceState, final int toWorkspacePage, final boolean animated, final Runnable onCompleteRunnable) { >>>>>>> final Workspace.State fromWorkspaceState, final Workspace.State toWorkspaceState, final boolean animated, final Runnable onCompleteRunnable) { <<<<<<< Animator workspaceAnim = mLauncher.startWorkspaceStateChangeAnimation(toWorkspaceState, animated, overlaySearchBarView != null /* hasOverlaySearchBar */, layerViews); ======= Animator workspaceAnim = mLauncher.startWorkspaceStateChangeAnimation(toWorkspaceState, -1, animated, layerViews); >>>>>>> Animator workspaceAnim = mLauncher.startWorkspaceStateChangeAnimation(toWorkspaceState, animated, layerViews); <<<<<<< private void startAnimationToWorkspaceFromAllApps(final Workspace.State toWorkspaceState, final boolean animated, final Runnable onCompleteRunnable) { ======= private void startAnimationToWorkspaceFromAllApps(final Workspace.State fromWorkspaceState, final Workspace.State toWorkspaceState, final int toWorkspacePage, final boolean animated, final Runnable onCompleteRunnable) { >>>>>>> private void startAnimationToWorkspaceFromAllApps(final Workspace.State fromWorkspaceState, final Workspace.State toWorkspaceState, final boolean animated, final Runnable onCompleteRunnable) { <<<<<<< startAnimationToWorkspaceFromOverlay(toWorkspaceState, mLauncher.getAllAppsButton(), appsView, appsView.getContentView(), appsView.getRevealView(), appsView.getSearchBarView(), animated, onCompleteRunnable, cb); ======= mCurrentAnimation = startAnimationToWorkspaceFromOverlay(fromWorkspaceState, toWorkspaceState, toWorkspacePage, mLauncher.getAllAppsButton(), appsView, appsView.getContentView(), appsView.getRevealView(), appsView.getSearchBarView(), animated, onCompleteRunnable, cb); >>>>>>> mCurrentAnimation = startAnimationToWorkspaceFromOverlay(fromWorkspaceState, toWorkspaceState, mLauncher.getAllAppsButton(), appsView, appsView.getContentView(), appsView.getRevealView(), appsView.getSearchBarView(), animated, onCompleteRunnable, cb); <<<<<<< private void startAnimationToWorkspaceFromWidgets(final Workspace.State toWorkspaceState, final boolean animated, final Runnable onCompleteRunnable) { ======= private void startAnimationToWorkspaceFromWidgets(final Workspace.State fromWorkspaceState, final Workspace.State toWorkspaceState, final int toWorkspacePage, final boolean animated, final Runnable onCompleteRunnable) { >>>>>>> private void startAnimationToWorkspaceFromWidgets(final Workspace.State fromWorkspaceState, final Workspace.State toWorkspaceState, final boolean animated, final Runnable onCompleteRunnable) { <<<<<<< startAnimationToWorkspaceFromOverlay(toWorkspaceState, mLauncher.getWidgetsButton(), widgetsView, widgetsView.getContentView(), widgetsView.getRevealView(), null, animated, onCompleteRunnable, cb); } ======= mCurrentAnimation = startAnimationToWorkspaceFromOverlay(fromWorkspaceState, toWorkspaceState, toWorkspacePage, mLauncher.getWidgetsButton(), widgetsView, widgetsView.getContentView(), widgetsView.getRevealView(), null, animated, onCompleteRunnable, cb); } >>>>>>> mCurrentAnimation = startAnimationToWorkspaceFromOverlay(fromWorkspaceState, toWorkspaceState, mLauncher.getWidgetsButton(), widgetsView, widgetsView.getContentView(), widgetsView.getRevealView(), null, animated, onCompleteRunnable, cb); } <<<<<<< private void startAnimationToWorkspaceFromOverlay(final Workspace.State toWorkspaceState, final View buttonView, final View fromView, final View contentView, final View revealView, final View overlaySearchBarView, final boolean animated, final Runnable onCompleteRunnable, final PrivateTransitionCallbacks pCb) { ======= private AnimatorSet startAnimationToWorkspaceFromOverlay(final Workspace.State fromWorkspaceState, final Workspace.State toWorkspaceState, final int toWorkspacePage, final View buttonView, final View fromView, final View contentView, final View revealView, final View overlaySearchBarView, final boolean animated, final Runnable onCompleteRunnable, final PrivateTransitionCallbacks pCb) { final AnimatorSet animation = LauncherAnimUtils.createAnimatorSet(); >>>>>>> private AnimatorSet startAnimationToWorkspaceFromOverlay(final Workspace.State fromWorkspaceState, final Workspace.State toWorkspaceState, final View buttonView, final View fromView, final View contentView, final View revealView, final View overlaySearchBarView, final boolean animated, final Runnable onCompleteRunnable, final PrivateTransitionCallbacks pCb) { final AnimatorSet animation = LauncherAnimUtils.createAnimatorSet(); <<<<<<< animated, overlaySearchBarView != null /* hasOverlaySearchBar */, layerViews); ======= toWorkspacePage, animated, layerViews); >>>>>>> animated, layerViews);
<<<<<<< String send = signText[1].getUnformattedText() + " " + signText[2].getUnformattedText() + " " + signText[3].getUnformattedText(); MinecraftServer.getServer().getCommandManager().executeCommand(event.entityPlayer, send); event.setCanceled(true); ======= String send = StringUtils.join(ServerUtil.dropFirst(signText), " "); if (send != null) { MinecraftServer.getServer().getCommandManager().executeCommand(e.entityPlayer, send); e.setCanceled(true); } >>>>>>> String send = signText[1].getUnformattedText() + " " + signText[2].getUnformattedText() + " " + signText[3].getUnformattedText(); if (send != null) { MinecraftServer.getServer().getCommandManager().executeCommand(event.entityPlayer, send); event.setCanceled(true); }
<<<<<<< loadScripts(FMLCommonHandler.instance().getMinecraftServerInstance()); ======= JsLocalStorage.load(); loadScripts(MinecraftServer.getServer()); >>>>>>> JsLocalStorage.load(); loadScripts(FMLCommonHandler.instance().getMinecraftServerInstance());
<<<<<<< mWorkspace.getCurrentPage(), cellInfo.cellX, cellInfo.cellY, false); mFolders.put(folderInfo.id, folderInfo); ======= mWorkspace.getCurrentScreen(), cellInfo.cellX, cellInfo.cellY, false); sFolders.put(folderInfo.id, folderInfo); >>>>>>> mWorkspace.getCurrentPage(), cellInfo.cellX, cellInfo.cellY, false); sFolders.put(folderInfo.id, folderInfo);
<<<<<<< import rtg.config.agriculturalrevolution.ConfigAR; ======= import rtg.config.betteragriculture.ConfigBA; >>>>>>> import rtg.config.agriculturalrevolution.ConfigAR; import rtg.config.betteragriculture.ConfigBA; <<<<<<< public static File arConfigFile; ======= public static File baConfigFile; >>>>>>> public static File arConfigFile; public static File baConfigFile; <<<<<<< arConfigFile = new File(configpath + "biomes/agriculturalrevolution.cfg"); ======= baConfigFile = new File(configpath + "biomes/betteragriculture.cfg"); >>>>>>> arConfigFile = new File(configpath + "biomes/agriculturalrevolution.cfg"); baConfigFile = new File(configpath + "biomes/betteragriculture.cfg"); <<<<<<< ConfigAR.init(arConfigFile); ======= ConfigBA.init(baConfigFile); >>>>>>> ConfigAR.init(arConfigFile); ConfigBA.init(baConfigFile);
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.HeightEffect; import rtg.world.gen.terrain.HeightVariation; import rtg.world.gen.terrain.JitterEffect; import rtg.world.gen.terrain.TerrainBase; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.heighteffect.HeightEffect; import rtg.api.world.terrain.heighteffect.HeightVariation; import rtg.api.world.terrain.heighteffect.JitterEffect; import rtg.api.world.terrain.TerrainBase; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.api.world.terrain.heighteffect.HeightEffect; import rtg.api.world.terrain.heighteffect.HeightVariation; import rtg.api.world.terrain.heighteffect.JitterEffect; import rtg.world.biome.deco.DecoSingleBiomeDecorations;
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.TerrainBase; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.world.biome.deco.DecoSingleBiomeDecorations;
<<<<<<< import net.minecraftforge.fml.common.FMLCommonHandler; ======= import net.minecraftforge.fe.DimensionManagerHelper; import net.minecraftforge.fe.event.world.WorldPreLoadEvent; >>>>>>> import net.minecraftforge.fe.DimensionManagerHelper; import net.minecraftforge.fe.event.world.WorldPreLoadEvent; import net.minecraftforge.fml.common.FMLCommonHandler; <<<<<<< world.providerId = getWorldProviderId(world.provider); world.worldTypeObj = getWorldTypeByName(world.worldType); // Register dimension with last used id if possible if (DimensionManager.isDimensionRegistered(world.dimensionId)) world.dimensionId = getFreeDimensionId(); // Handle permission-dim changes checkMultiworldPermissions(world); APIRegistry.perms.getServerZone().getWorldZone(world.dimensionId) .setGroupPermissionProperty(Zone.GROUP_DEFAULT, PERM_PROP_MULTIWORLD, world.getName()); // Register the dimension DimensionManager.registerDimension(world.dimensionId, DimensionType.OVERWORLD); worldsByDim.put(world.dimensionId, world); ======= >>>>>>>
<<<<<<< import rtg.world.biome.realistic.vampirism.RealisticBiomeVAMPBase; ======= import rtg.world.biome.realistic.tofucraft.RealisticBiomeTOFUBase; >>>>>>> import rtg.world.biome.realistic.tofucraft.RealisticBiomeTOFUBase; import rtg.world.biome.realistic.vampirism.RealisticBiomeVAMPBase;
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.TerrainBase; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.world.biome.deco.DecoSingleBiomeDecorations;
<<<<<<< import teamrtg.rtg.modules.bop.RTGModuleBOP; ======= import teamrtg.rtg.modules.abyssalcraft.RTGModuleAC; >>>>>>> import teamrtg.rtg.modules.bop.RTGModuleBOP; import teamrtg.rtg.modules.abyssalcraft.RTGModuleAC; <<<<<<< public static final RTGModuleBOP BOP = new RTGModuleBOP(); public static final RTGModule ABYSSALCRAFT = new RTGModule("Abyssalcraft", false, false); ======= public static final RTGModuleAC ABYSSALCRAFT = new RTGModuleAC(); >>>>>>> public static final RTGModuleBOP BOP = new RTGModuleBOP(); public static final RTGModuleAC ABYSSALCRAFT = new RTGModuleAC();
<<<<<<< ======= import java.io.File; import rtg.config.abyssalcraft.ConfigAC; import rtg.config.arsmagica.ConfigAM; import rtg.config.atg.ConfigATG; >>>>>>> import java.io.File; import rtg.config.abyssalcraft.ConfigAC; import rtg.config.arsmagica.ConfigAM; import rtg.config.atg.ConfigATG; <<<<<<< ======= import rtg.config.chromaticraft.ConfigCC; import rtg.config.enhancedbiomes.ConfigEB; import rtg.config.extrabiomes.ConfigEBXL; import rtg.config.growthcraft.ConfigGC; import rtg.config.highlands.ConfigHL; import rtg.config.ridiculousworld.ConfigRW; >>>>>>> import rtg.config.chromaticraft.ConfigCC; import rtg.config.enhancedbiomes.ConfigEB; import rtg.config.extrabiomes.ConfigEBXL; import rtg.config.growthcraft.ConfigGC; import rtg.config.highlands.ConfigHL; import rtg.config.ridiculousworld.ConfigRW; <<<<<<< //amConfigFile = new File(configpath + "biomes/arsmagica.cfg"); //atgConfigFile = new File(configpath + "biomes/atg.cfg"); //ccConfigFile = new File(configpath + "biomes/chromaticraft.cfg"); ======= amConfigFile = new File(configpath + "biomes/arsmagica.cfg"); atgConfigFile = new File(configpath + "biomes/atg.cfg"); ccConfigFile = new File(configpath + "biomes/chromaticraft.cfg"); gcConfigFile = new File(configpath + "biomes/growthcraft.cfg"); vampConfigFile = new File(configpath + "biomes/vampirism.cfg"); acConfigFile = new File(configpath + "biomes/abyssalcraft.cfg"); rwConfigFile = new File(configpath + "biomes/ridiculousworld.cfg"); tofuConfigFile = new File(configpath + "biomes/tofucraft.cfg"); >>>>>>> //amConfigFile = new File(configpath + "biomes/arsmagica.cfg"); //atgConfigFile = new File(configpath + "biomes/atg.cfg"); //ccConfigFile = new File(configpath + "biomes/chromaticraft.cfg"); gcConfigFile = new File(configpath + "biomes/growthcraft.cfg"); vampConfigFile = new File(configpath + "biomes/vampirism.cfg"); acConfigFile = new File(configpath + "biomes/abyssalcraft.cfg"); rwConfigFile = new File(configpath + "biomes/ridiculousworld.cfg"); tofuConfigFile = new File(configpath + "biomes/tofucraft.cfg"); <<<<<<< //ConfigAM.init(amConfigFile); //ConfigATG.init(atgConfigFile); //ConfigCC.init(ccConfigFile); ======= ConfigAM.init(amConfigFile); ConfigATG.init(atgConfigFile); ConfigCC.init(ccConfigFile); ConfigGC.init(gcConfigFile); ConfigVAMP.init(vampConfigFile); ConfigAC.init(acConfigFile); ConfigRW.init(rwConfigFile); ConfigTOFU.init(tofuConfigFile); >>>>>>> //ConfigAM.init(amConfigFile); //ConfigATG.init(atgConfigFile); //ConfigCC.init(ccConfigFile); ConfigGC.init(gcConfigFile); ConfigVAMP.init(vampConfigFile); ConfigAC.init(acConfigFile); ConfigRW.init(rwConfigFile); ConfigTOFU.init(tofuConfigFile);
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.*; ======= import rtg.api.world.terrain.TerrainBase; import rtg.api.world.terrain.heighteffect.*; import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.api.world.terrain.heighteffect.*; import rtg.world.biome.deco.DecoSingleBiomeDecorations;
<<<<<<< RealisticBiomeGCBase.addBiomes(); ======= RealisticBiomeACBase.addBiomes(); RealisticBiomeRWBase.addBiomes(); >>>>>>> RealisticBiomeGCBase.addBiomes(); RealisticBiomeACBase.addBiomes(); RealisticBiomeRWBase.addBiomes();
<<<<<<< if (depth == 0) { int r = (int)((k - (62 + grassRaise)) / 2f); if(rand.nextInt(r + 1) == 0) { primer.setBlockState(x, k, y, topBlock); } else if(rand.nextInt((int)(r / 2f) + 1) == 0) { primer.setBlockState(x, k, y, Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.COARSE_DIRT)); ======= if (depth == 0) { if (rand.nextInt(5) == 0) { primer.setBlockState(x, k, y, Blocks.DIRT.getStateFromMeta(1)); >>>>>>> if (depth == 0) { if (rand.nextInt(5) == 0) { primer.setBlockState(x, k, y, Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.COARSE_DIRT));
<<<<<<< public static File gcConfigFile; ======= public static File vampConfigFile; >>>>>>> public static File gcConfigFile; public static File vampConfigFile; <<<<<<< gcConfigFile = new File(configpath + "biomes/growthcraft.cfg"); ======= vampConfigFile = new File(configpath + "biomes/vampirism.cfg"); >>>>>>> gcConfigFile = new File(configpath + "biomes/growthcraft.cfg"); vampConfigFile = new File(configpath + "biomes/vampirism.cfg"); <<<<<<< ConfigGC.init(gcConfigFile); ======= ConfigVAMP.init(vampConfigFile); >>>>>>> ConfigGC.init(gcConfigFile); ConfigVAMP.init(vampConfigFile);
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoBoulder; import rtg.world.biome.deco.DecoFallenTree; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.TerrainBase; import static rtg.world.biome.deco.DecoFallenTree.LogCondition.RANDOM_CHANCE; import rtg.world.biome.deco.DecoSingleBiomeDecorations; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.deco.DecoBoulder; import rtg.api.world.deco.DecoFallenTree; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import static rtg.api.world.deco.DecoFallenTree.LogCondition.RANDOM_CHANCE; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.deco.DecoBoulder; import rtg.api.world.deco.DecoFallenTree; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import static rtg.api.world.deco.DecoFallenTree.LogCondition.RANDOM_CHANCE;
<<<<<<< import rtg.util.noise.CellNoise; import rtg.util.noise.OpenSimplexNoise; ======= import rtg.util.CellNoise; import rtg.util.OpenSimplexNoise; import rtg.world.gen.terrain.GroundEffect; >>>>>>> import rtg.world.gen.terrain.GroundEffect; import rtg.util.noise.CellNoise; import rtg.util.noise.OpenSimplexNoise; <<<<<<< public TerrainVanillaBirchForest() { ======= public TerrainVanillaBirchForest() { >>>>>>> public TerrainVanillaBirchForest() { <<<<<<< public float generateNoise(OpenSimplexNoise simplex, CellNoise cell, int x, int y, float border, float river) { return terrainPlains(x, y, simplex, river, 160f, 10f, 60f, 80f, 65f); ======= public float generateNoise(OpenSimplexNoise simplex, CellNoise cell, int x, int y, float border, float river) { //return terrainPlains(x, y, simplex, river, 160f, 10f, 60f, 80f, 65f); return riverized(65f + groundEffect.added(simplex, cell, x, y),river); >>>>>>> public float generateNoise(OpenSimplexNoise simplex, CellNoise cell, int x, int y, float border, float river) { //return terrainPlains(x, y, simplex, river, 160f, 10f, 60f, 80f, 65f); return riverized(65f + groundEffect.added(simplex, cell, x, y),river);
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.TerrainBase; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.world.biome.deco.DecoSingleBiomeDecorations;
<<<<<<< import rtg.api.biome.agriculturalrevolution.config.*; ======= import rtg.api.biome.betteragriculture.config.BiomeConfigBA; import rtg.api.biome.betteragriculture.config.BiomeConfigBAFarmlandBiome; >>>>>>> import rtg.api.biome.agriculturalrevolution.config.*; import rtg.api.biome.betteragriculture.config.BiomeConfigBA; import rtg.api.biome.betteragriculture.config.BiomeConfigBAFarmlandBiome; <<<<<<< initBiomeConfigsAR(); ======= initBiomeConfigsBA(); >>>>>>> initBiomeConfigsAR(); initBiomeConfigsBA(); <<<<<<< public static void initBiomeConfigsAR() { BiomeConfigAR.biomeConfigARBambooGrove = new BiomeConfigARBambooGrove(); BiomeConfigAR.biomeConfigARCoralReef = new BiomeConfigARCoralReef(); BiomeConfigAR.biomeConfigARDeepReef = new BiomeConfigARDeepReef(); BiomeConfigAR.biomeConfigARKelpForest = new BiomeConfigARKelpForest(); BiomeConfigAR.biomeConfigAROrchard = new BiomeConfigAROrchard(); BiomeConfigAR.biomeConfigARTropicalHills = new BiomeConfigARTropicalHills(); } ======= public static void initBiomeConfigsBA() { BiomeConfigBA.biomeConfigBAFarmlandBiome = new BiomeConfigBAFarmlandBiome(); } >>>>>>> public static void initBiomeConfigsAR() { BiomeConfigAR.biomeConfigARBambooGrove = new BiomeConfigARBambooGrove(); BiomeConfigAR.biomeConfigARCoralReef = new BiomeConfigARCoralReef(); BiomeConfigAR.biomeConfigARDeepReef = new BiomeConfigARDeepReef(); BiomeConfigAR.biomeConfigARKelpForest = new BiomeConfigARKelpForest(); BiomeConfigAR.biomeConfigAROrchard = new BiomeConfigAROrchard(); BiomeConfigAR.biomeConfigARTropicalHills = new BiomeConfigARTropicalHills(); } public static void initBiomeConfigsBA() { BiomeConfigBA.biomeConfigBAFarmlandBiome = new BiomeConfigBAFarmlandBiome(); }
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.TerrainBase; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.world.biome.deco.DecoSingleBiomeDecorations;
<<<<<<< import rtg.world.biome.deco.collection.DecoCollectionExtremeHillsCommon; import rtg.world.biome.deco.collection.DecoCollectionExtremeHillsM; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.TerrainBase; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; >>>>>>> import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.world.biome.deco.collection.DecoCollectionExtremeHillsCommon; import rtg.world.biome.deco.collection.DecoCollectionExtremeHillsM;
<<<<<<< import net.minecraftforge.fml.common.FMLLog; ======= import rtg.util.Logger; >>>>>>> import rtg.util.Logger; import net.minecraftforge.fml.common.FMLLog;
<<<<<<< GenLayer[] agenlayer = GenLayerUtils.initializeAllBiomeGenerators(seed, worldType, par1World.getWorldInfo().getGeneratorOptions()); ======= GenLayer[] agenlayer = GenLayer.initializeAllBiomeGenerators(seed, worldType, par1World.getWorldInfo().getGeneratorOptions()); >>>>>>> GenLayer[] agenlayer = GenLayer.initializeAllBiomeGenerators(seed, worldType, par1World.getWorldInfo().getGeneratorOptions()); <<<<<<< ======= public RealisticBiomeBase getBiomeDataAt(int par1, int par2) { RealisticBiomeBase output; output = (RealisticBiomeBase) (this.getBiomeGenAt(par1, par2)); if (output == null) output = biomePatcher.getPatchedRealisticBiome("No biome " + par1 + " " + par2); return output; } @Override public void cleanupCache() { this.biomeCache.cleanupCache(); } public float getNoiseAt(int x, int y) { float river = getRiverStrength(x, y) + 1f; if (river < 0.5f) { return 59f; } return getBiomeDataAt(x, y).rNoise(simplex, cell, x, y, 1f, river); } private static int [] incidences = new int[100]; private static int references = 0; private static double cellBorder(double[] results, double width, double depth) { double c = (results[1] - results[0]); /*int slot = (int)Math.floor(c*100.0); incidences[slot] += 1; references ++; if (references>40000) { String result = ""; for (int i = 0; i< 100; i ++) { result += " " + incidences[i]; } throw new RuntimeException(result); }*/ if (c < width) { return ((c / width) - 1f) * depth; } else { return 0; } } public float getRiverStrength(int x, int y) { //New river curve function. No longer creates worldwide curve correlations along cardinal axes. SimplexOctave.Disk jitter = new SimplexOctave.Disk(); simplex.riverJitter().evaluateNoise(x / 240.0, y / 240.0, jitter); double pX = x + jitter.deltax() * 220f; double pY = y + jitter.deltay() * 220f; /*double[] simplexResults = new double[2]; OpenSimplexNoise.noise(x / 240.0, y / 240.0, riverOpenSimplexNoiseInstances, simplexResults); double pX = x + simplexResults[0] * 220f; double pY = y + simplexResults[1] * 220f;*/ //New cellular noise. //TODO move the initialization of the results in a way that's more efficient but still thread safe. double[] results = simplexCell.river().eval(pX / 1875.0, pY / 1875.0); if (x==-200&&y == -750) { //throw new RuntimeException(""+ results[1]+ " " +results[0]); } return (float) cellBorder(results, 30.0 / 600.0, 1.0); } >>>>>>>
<<<<<<< initBiomeConfigsVAMP(); ======= initBiomeConfigsLOM(); >>>>>>> initBiomeConfigsVAMP(); initBiomeConfigsLOM(); <<<<<<< public static void initBiomeConfigsVAMP() { BiomeConfigVAMP.biomeConfigVAMPVampireForest = new BiomeConfigVAMPVampireForest(); } ======= public static void initBiomeConfigsLOM() { BiomeConfigLOM.biomeConfigLOMAntartica = new BiomeConfigLOMAntartica(); BiomeConfigLOM.biomeConfigLOMTropicalBeach = new BiomeConfigLOMTropicalBeach(); } >>>>>>> public static void initBiomeConfigsLOM() { BiomeConfigLOM.biomeConfigLOMAntartica = new BiomeConfigLOMAntartica(); BiomeConfigLOM.biomeConfigLOMTropicalBeach = new BiomeConfigLOMTropicalBeach(); } public static void initBiomeConfigsVAMP() { BiomeConfigVAMP.biomeConfigVAMPVampireForest = new BiomeConfigVAMPVampireForest(); }
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.BumpyHillsEffect; import rtg.world.gen.terrain.TerrainBase; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.heighteffect.BumpyHillsEffect; import rtg.api.world.terrain.TerrainBase; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.api.world.terrain.heighteffect.BumpyHillsEffect; import rtg.world.biome.deco.DecoSingleBiomeDecorations;
<<<<<<< (new WorldGenFlowers(new int[]{9, 9, 9, 9, 3, 3, 3, 3, 3, 2, 2, 2, 11, 11, 11})).generate(world, rand, new BlockPos(j15, j17, j20)); ======= (new WorldGenFlowersRTG(new int[]{9,9,9,9,3,3,3,3,3,2,2,2,11,11,11})).generate(world, rand, j15, j17, j20); >>>>>>> (new WorldGenFlowersRTG(new int[]{9,9,9,9,3,3,3,3,3,2,2,2,11,11,11})).generate(world, rand, new BlockPos(j15, j17, j20));
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoFallenTree; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.TerrainBase; import static rtg.world.biome.deco.DecoFallenTree.LogCondition.RANDOM_CHANCE; import rtg.world.biome.deco.DecoSingleBiomeDecorations; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.deco.DecoFallenTree; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import static rtg.api.world.deco.DecoFallenTree.LogCondition.RANDOM_CHANCE; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.deco.DecoFallenTree; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import static rtg.api.world.deco.DecoFallenTree.LogCondition.RANDOM_CHANCE;
<<<<<<< IBlockState blockState = event.world.getBlockState(event.pos); String permission = ModuleProtection.getBlockPlacePermission(blockState); if (ModuleProtection.isDebugMode(event.player)) ChatOutputHandler.chatNotification(event.player, permission); WorldPoint point = new WorldPoint(event.player.dimension, event.pos); ======= Block block = event.world.getBlock(event.x, event.y, event.z); String permission = ModuleProtection.getBlockPlacePermission(block, event.world, event.x, event.y, event.z); ModuleProtection.debugPermission(event.player, permission); WorldPoint point = new WorldPoint(event.player.dimension, event.x, event.y, event.z); >>>>>>> IBlockState blockState = event.world.getBlockState(event.pos); String permission = ModuleProtection.getBlockPlacePermission(blockState); ModuleProtection.debugPermission(event.player, permission); WorldPoint point = new WorldPoint(event.player.dimension, event.pos); <<<<<<< IBlockState blockState = event.world.getBlockState(b.pos); String permission = ModuleProtection.getBlockPlacePermission(blockState); if (ModuleProtection.isDebugMode(event.player)) ChatOutputHandler.chatNotification(event.player, permission); WorldPoint point = new WorldPoint(event.player.dimension, b.pos); ======= Block block = event.world.getBlock(b.x, b.y, b.z); String permission = ModuleProtection.getBlockPlacePermission(block, event.world, event.x, event.y, event.z); ModuleProtection.debugPermission(event.player, permission); WorldPoint point = new WorldPoint(event.player.dimension, b.x, b.y, b.z); >>>>>>> IBlockState blockState = event.world.getBlockState(b.pos); String permission = ModuleProtection.getBlockPlacePermission(blockState); ModuleProtection.debugPermission(event.player, permission); WorldPoint point = new WorldPoint(event.player.dimension, b.pos); <<<<<<< IBlockState blockState = event.world.getBlockState(event.pos); String permission = ModuleProtection.getBlockInteractPermission(blockState); if (ModuleProtection.isDebugMode(event.entityPlayer)) ChatOutputHandler.chatNotification(event.entityPlayer, permission); ======= Block block = event.world.getBlock(event.x, event.y, event.z); String permission = ModuleProtection.getBlockInteractPermission(block, event.world, event.x, event.y, event.z); ModuleProtection.debugPermission(event.entityPlayer, permission); >>>>>>> IBlockState blockState = event.world.getBlockState(event.pos); String permission = ModuleProtection.getBlockInteractPermission(blockState); ModuleProtection.debugPermission(event.entityPlayer, permission); <<<<<<< public void sendBlockBreakDenyInfo(UserIdent ident, IBlockState blockState) { int blockId = GameData.getBlockRegistry().getId(blockState.getBlock()); Set<Integer> ids = new HashSet<Integer>(); ids.add(blockId); NetworkUtils.netHandler.sendTo(new Packet3PlayerPermissions(false, null, ids), ident.getPlayerMP()); } ======= >>>>>>>
<<<<<<< import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.biome.deco.DecoSingleBiomeDecorations; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.terrain.TerrainBase; ======= import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; >>>>>>> import rtg.api.world.deco.DecoBaseBiomeDecorations; import rtg.api.world.surface.SurfaceBase; import rtg.api.world.terrain.TerrainBase; import rtg.world.biome.deco.DecoSingleBiomeDecorations;
<<<<<<< import com.forgeessentials.api.permissions.FEPermissions; import com.forgeessentials.commands.util.FEcmdModuleCommands; import com.forgeessentials.core.misc.TranslatedCommandException; ======= import com.forgeessentials.commands.ModuleCommands; import com.forgeessentials.commands.util.ContainerCheatyWorkbench; import com.forgeessentials.core.commands.ForgeEssentialsCommandBase; >>>>>>> import com.forgeessentials.api.permissions.FEPermissions; import com.forgeessentials.commands.ModuleCommands; import com.forgeessentials.core.commands.ForgeEssentialsCommandBase; import com.forgeessentials.core.misc.TranslatedCommandException; <<<<<<< ======= @Override public String getPermissionNode() { return ModuleCommands.PERM + "." + getCommandName(); } >>>>>>> @Override public String getPermissionNode() { return ModuleCommands.PERM + "." + getCommandName(); }
<<<<<<< RealisticBiomeVAMPBase.addBiomes(); ======= RealisticBiomeACBase.addBiomes(); RealisticBiomeRWBase.addBiomes(); >>>>>>> RealisticBiomeVAMPBase.addBiomes(); RealisticBiomeACBase.addBiomes(); RealisticBiomeRWBase.addBiomes();
<<<<<<< ======= import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CLAY; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.COAL; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.DIAMOND; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.DIRT; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.GOLD; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.GRAVEL; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.IRON; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.LAPIS; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.REDSTONE; import java.util.ArrayList; import java.util.Random; >>>>>>> <<<<<<< ======= import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.OreGenEvent; >>>>>>> <<<<<<< import rtg.api.biome.BiomeConfig; import rtg.config.rtg.ConfigRTG; import rtg.util.math.RandomUtil; import rtg.util.noise.CellNoise; import rtg.util.noise.OpenSimplexNoise; import rtg.util.noise.SimplexOctave; import rtg.world.biome.BiomeBase; import rtg.world.biome.BiomeProviderRTG; import rtg.world.gen.feature.WorldGenClay; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.surface.SurfaceGeneric; import rtg.world.gen.terrain.TerrainBase; import java.util.Random; import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CLAY; ======= import rtg.api.biome.BiomeConfig; import rtg.config.rtg.ConfigRTG; import rtg.util.CellNoise; import rtg.util.OpenSimplexNoise; import rtg.util.RandomUtil; import rtg.util.SimplexOctave; import rtg.world.biome.BiomeBase; import rtg.world.biome.RTGBiomeProvider; import rtg.world.biome.deco.DecoBase; import rtg.world.biome.deco.DecoBaseBiomeDecorations; import rtg.world.gen.feature.WorldGenClay; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.surface.SurfaceGeneric; import rtg.world.gen.terrain.TerrainBase; >>>>>>> import rtg.api.biome.BiomeConfig; import rtg.config.rtg.ConfigRTG; import rtg.util.math.RandomUtil; import rtg.util.noise.CellNoise; import rtg.util.noise.OpenSimplexNoise; import rtg.util.noise.SimplexOctave; import rtg.world.biome.BiomeBase; import rtg.world.biome.BiomeProviderRTG; import rtg.world.gen.feature.WorldGenClay; import rtg.world.gen.surface.SurfaceBase; import rtg.world.gen.surface.SurfaceGeneric; import rtg.world.gen.terrain.TerrainBase; import java.util.Random; import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.CLAY; <<<<<<< ======= public ArrayList<DecoBase> decos; public boolean useNewDecorationSystem = false; >>>>>>> public ArrayList<DecoBase> decos; public boolean useNewDecorationSystem = false; <<<<<<< emeraldStoneMeta = (byte) 0; ======= emeraldStoneMeta = (byte)0; decos = new ArrayList<DecoBase>(); /** * By default, it is assumed that all realistic biomes will be decorated manually and not by the biome. * This includes ore generation since it's part of the decoration process. * We're adding this deco here in order to avoid having to explicitly add it * in every singe realistic biome. * If it does get added manually to let the base biome handle some or all of the decoration process, * this deco will get replaced with the new one. */ DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations(); decoBaseBiomeDecorations.allowed = false; this.decos.add(decoBaseBiomeDecorations); >>>>>>> emeraldStoneMeta = (byte)0; decos = new ArrayList<DecoBase>(); /** * By default, it is assumed that all realistic biomes will be decorated manually and not by the biome. * This includes ore generation since it's part of the decoration process. * We're adding this deco here in order to avoid having to explicitly add it * in every singe realistic biome. * If it does get added manually to let the base biome handle some or all of the decoration process, * this deco will get replaced with the new one. */ DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations(); decoBaseBiomeDecorations.allowed = false; this.decos.add(decoBaseBiomeDecorations); <<<<<<< ======= private float getRiverStrength(OpenSimplexNoise simplex, CellNoise cell, int x, int y) { // copied from WorldChunkManager for debugging purposes SimplexOctave.Disk jitter = new SimplexOctave.Disk(); simplex.riverJitter().evaluateNoise(x / 240.0, y / 240.0, jitter); double pX = x + jitter.deltax() * 220f; double pY = y + jitter.deltay() * 220f; double[] results = cell.river().eval(pX / 1875.0, pY / 1875.0); return (float) cellBorder(results, 30.0 / 450.0, 1.0); } private static double cellBorder(double[] results, double width, double depth) { double c = (results[1] - results[0]); //int slot = (int)Math.floor(c*100.0); //incidences[slot] += 1; //references ++; if (references>40000) { String result = ""; for (int i = 0; i< 100; i ++) { result += " " + incidences[i]; } throw new RuntimeException(result); } if (c < width) { return ((c / width) - 1f) * depth; } else { return 0; } } private static int [] incidences = new int[200]; private static int references = 0; >>>>>>> private float getRiverStrength(OpenSimplexNoise simplex, CellNoise cell, int x, int y) { // copied from WorldChunkManager for debugging purposes SimplexOctave.Disk jitter = new SimplexOctave.Disk(); simplex.riverJitter().evaluateNoise(x / 240.0, y / 240.0, jitter); double pX = x + jitter.deltax() * 220f; double pY = y + jitter.deltay() * 220f; double[] results = cell.river().eval(pX / 1875.0, pY / 1875.0); return (float) cellBorder(results, 30.0 / 450.0, 1.0); } private static double cellBorder(double[] results, double width, double depth) { double c = (results[1] - results[0]); //int slot = (int)Math.floor(c*100.0); //incidences[slot] += 1; //references ++; if (references>40000) { String result = ""; for (int i = 0; i< 100; i ++) { result += " " + incidences[i]; } throw new RuntimeException(result); } if (c < width) { return ((c / width) - 1f) * depth; } else { return 0; } } private static int [] incidences = new int[200]; private static int references = 0; <<<<<<< double lakeStrength = lakePressure(simplex, cell, x, y); ======= float lakeStrength = lakePressure(simplex,cell,x,y,border); >>>>>>> float lakeStrength = lakePressure(simplex,cell,x,y,border); <<<<<<< if (lakeFlattening < river) river = (float) lakeFlattening; ======= // we add some flattening to the rivers but not to the lakes. This gives the rivers flatter // banks and the lakes steeper ones, which seems to be better aesthetically float riverFlattening = river*1.25f-0.25f; if (riverFlattening <0) riverFlattening = 0; if (lakeFlattening < river) river = (float)lakeFlattening; >>>>>>> // we add some flattening to the rivers but not to the lakes. This gives the rivers flatter // banks and the lakes steeper ones, which seems to be better aesthetically float riverFlattening = river*1.25f-0.25f; if (riverFlattening <0) riverFlattening = 0; if (lakeFlattening < river) river = (float)lakeFlattening; <<<<<<< private static double cellBorder(double[] results, double width, double depth) { double c = results[1] - results[0]; if (c < width) { return ((c / width) - 1) * depth; } else { return 0; } } ======= >>>>>>> <<<<<<< public double lakePressure(OpenSimplexNoise simplex, CellNoise simplexCell, int x, int y) { if (noLakes) return 1.0; SimplexOctave.Derivative jitter = new SimplexOctave.Derivative(); ======= public float lakePressure(OpenSimplexNoise simplex, CellNoise simplexCell,int x, int y, float border) { if (noLakes) return 1f; SimplexOctave.Disk jitter = new SimplexOctave.Disk(); >>>>>>> public float lakePressure(OpenSimplexNoise simplex, CellNoise simplexCell,int x, int y, float border) { if (noLakes) return 1f; SimplexOctave.Disk jitter = new SimplexOctave.Disk(); <<<<<<< pX += jitter.deltax() * 10f; pY += jitter.deltay() * 10f; double results = simplexCell.river().noise(pX / lakeInterval, pY / lakeInterval, 1.0); ======= pX += jitter.deltax() * 7f; pY += jitter.deltay() * 7f; //double results =simplexCell.river().noise(pX / lakeInterval, pY / lakeInterval,1.0); double [] lakeResults = simplexCell.river().eval((float)pX/ lakeInterval, (float)pY/ lakeInterval); float results = 1f-(float)((lakeResults[1]-lakeResults[0])/lakeResults[1]); if (results >1.01) throw new RuntimeException("" + lakeResults[0]+ " , "+lakeResults[1]); if (results<-.01) throw new RuntimeException("" + lakeResults[0]+ " , "+lakeResults[1]); //return simplexCell.river().noise((float)x/ lakeInterval, (float)y/ lakeInterval,1.0); >>>>>>> pX += jitter.deltax() * 7f; pY += jitter.deltay() * 7f; //double results =simplexCell.river().noise(pX / lakeInterval, pY / lakeInterval,1.0); double [] lakeResults = simplexCell.river().eval((float)pX/ lakeInterval, (float)pY/ lakeInterval); float results = 1f-(float)((lakeResults[1]-lakeResults[0])/lakeResults[1]); if (results >1.01) throw new RuntimeException("" + lakeResults[0]+ " , "+lakeResults[1]); if (results<-.01) throw new RuntimeException("" + lakeResults[0]+ " , "+lakeResults[1]); //return simplexCell.river().noise((float)x/ lakeInterval, (float)y/ lakeInterval,1.0); <<<<<<< if (pressure < bottomLevel) return 0; return Math.pow((pressure - bottomLevel) / (topLevel - bottomLevel), 0.333); ======= if (pressure<bottomLevel) return 0; return (pressure-bottomLevel)/(topLevel-bottomLevel); >>>>>>> if (pressure<bottomLevel) return 0; return (pressure-bottomLevel)/(topLevel-bottomLevel); <<<<<<< public static int getIdForBiome(BiomeGenBase biome) { if (biome instanceof RealisticBiomeBase) return BiomeGenBase.getIdForBiome(((RealisticBiomeBase) biome).baseBiome); return BiomeGenBase.getIdForBiome(biome); } ======= public void decorateInAnOrderlyFashion(World world, Random rand, int chunkX, int chunkY, OpenSimplexNoise simplex, CellNoise cell, float strength, float river) { for (int i = 0; i < this.decos.size(); i++) { if (this.decos.get(i).preGenerate(this, world, rand, chunkX, chunkY, simplex, cell, strength, river)) { this.decos.get(i).generate(this, world, rand, chunkX, chunkY, simplex, cell, strength, river); } } } /** * Adds a deco object to the list of biome decos. * The 'allowed' parameter allows us to pass biome config booleans dynamically when configuring the decos in the biome. * * @param deco * @param allowed */ public void addDeco(DecoBase deco, boolean allowed) { if (allowed) { if (deco instanceof DecoBaseBiomeDecorations) { for (int i = 0; i < this.decos.size(); i++) { if (this.decos.get(i) instanceof DecoBaseBiomeDecorations) { this.decos.remove(i); break; } } } this.decos.add(deco); this.useNewDecorationSystem = true; } } /** * Convenience method for addDeco() where 'allowed' is assumed to be true. * * @param deco */ public void addDeco(DecoBase deco) { this.addDeco(deco, true); } >>>>>>> public static int getIdForBiome(BiomeGenBase biome) { if (biome instanceof RealisticBiomeBase) return BiomeGenBase.getIdForBiome(((RealisticBiomeBase) biome).baseBiome); return BiomeGenBase.getIdForBiome(biome); } public void decorateInAnOrderlyFashion(World world, Random rand, int chunkX, int chunkY, OpenSimplexNoise simplex, CellNoise cell, float strength, float river) { for (int i = 0; i < this.decos.size(); i++) { if (this.decos.get(i).preGenerate(this, world, rand, chunkX, chunkY, simplex, cell, strength, river)) { this.decos.get(i).generate(this, world, rand, chunkX, chunkY, simplex, cell, strength, river); } } } /** * Adds a deco object to the list of biome decos. * The 'allowed' parameter allows us to pass biome config booleans dynamically when configuring the decos in the biome. * * @param deco * @param allowed */ public void addDeco(DecoBase deco, boolean allowed) { if (allowed) { if (deco instanceof DecoBaseBiomeDecorations) { for (int i = 0; i < this.decos.size(); i++) { if (this.decos.get(i) instanceof DecoBaseBiomeDecorations) { this.decos.remove(i); break; } } } this.decos.add(deco); this.useNewDecorationSystem = true; } } /** * Convenience method for addDeco() where 'allowed' is assumed to be true. * * @param deco */ public void addDeco(DecoBase deco) { this.addDeco(deco, true); }
<<<<<<< ======= import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; >>>>>>> <<<<<<< import net.minecraft.world.gen.structure.*; ======= import net.minecraft.world.gen.structure.MapGenMineshaft; import net.minecraft.world.gen.structure.MapGenScatteredFeature; import net.minecraft.world.gen.structure.MapGenStronghold; import net.minecraft.world.gen.structure.MapGenVillage; >>>>>>> import net.minecraft.world.gen.structure.*; <<<<<<< import net.minecraftforge.fml.common.eventhandler.Event.Result; import rtg.api.biome.BiomeConfig; import rtg.config.rtg.ConfigRTG; import rtg.util.math.CanyonColour; import rtg.util.math.MathUtils; import rtg.util.noise.CellNoise; import rtg.util.noise.OpenSimplexNoise; import rtg.util.noise.SimplexCellularNoise; import rtg.world.biome.BiomeAnalyzer; import rtg.world.biome.BiomeProviderRTG; import rtg.world.biome.realistic.RealisticBiomeBase; import rtg.world.biome.realistic.RealisticBiomePatcher; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.*; ======= import rtg.api.biome.BiomeConfig; import rtg.config.rtg.ConfigRTG; import rtg.util.AICWrapper; import rtg.util.CanyonColor; import rtg.util.CellNoise; import rtg.util.OpenSimplexNoise; import rtg.util.SimplexCellularNoise; import rtg.world.biome.BiomeAnalyzer; import rtg.world.biome.RTGBiomeProvider; import rtg.world.biome.WorldChunkManagerRTG; import rtg.world.biome.realistic.RealisticBiomeBase; import rtg.world.biome.realistic.RealisticBiomePatcher; import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.registry.GameData; >>>>>>> import net.minecraftforge.fml.common.eventhandler.Event.Result; import rtg.api.biome.BiomeConfig; import rtg.config.rtg.ConfigRTG; import rtg.util.math.CanyonColour; import rtg.util.math.MathUtils; import rtg.util.noise.CellNoise; import rtg.util.noise.OpenSimplexNoise; import rtg.util.noise.SimplexCellularNoise; import rtg.world.biome.BiomeAnalyzer; import rtg.world.biome.BiomeProviderRTG; import rtg.world.biome.realistic.RealisticBiomeBase; import rtg.world.biome.realistic.RealisticBiomePatcher; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.*; <<<<<<< int i, j, depth; float river; for (i = 0; i < 16; i++) { for (j = 0; j < 16; j++) { RealisticBiomeBase biome = biomes[i * 16 + j]; river = -bprv.getRiverStrength(cx * 16 + j, cy * 16 + i); if (river > 0.05f && river + (simplex.noise2((cx * 16 + j) / 10f, (cy * 16 + i) / 10f) * 0.15f) > 0.8f) { //base[j * 16 + i] = biome.riverBiome; } depth = -1; biome.rReplace(primer, cx * 16 + i, cy * 16 + j, i, j, depth, worldObj, rand, simplex, cell, n, river, base); int rough; int flatBedrockLayers = ConfigRTG.flatBedrockLayers; flatBedrockLayers = flatBedrockLayers < 0 ? 0 : (flatBedrockLayers > 5 ? 5 : flatBedrockLayers); if (flatBedrockLayers > 0) { for (int bl = 0; bl < flatBedrockLayers; bl++) { primer.setBlockState(j, bl, i, bedrockBlock.getStateFromMeta(bedrockByte)); } } else { primer.setBlockState(j, 0, i, bedrockBlock.getStateFromMeta(bedrockByte)); ======= int i, j, depth; float river; for(i = 0; i < 16; i++) { for(j = 0; j < 16; j++) { RealisticBiomeBase biome = biomes[j * 16 + i]; river = -cmr.getRiverStrength(cx * 16 + j, cy * 16 + i); depth = -1; biome.rReplace(blocks, metadata, cx * 16 + j, cy * 16 + i, i, j, depth, worldObj, rand, simplex, cell, n, river, base); int rough; int flatBedrockLayers = (int) ConfigRTG.flatBedrockLayers; flatBedrockLayers = flatBedrockLayers < 0 ? 0 : (flatBedrockLayers > 5 ? 5 : flatBedrockLayers); if (flatBedrockLayers > 0) { for (int bl = 0; bl < flatBedrockLayers; bl++) { blocks[(j * 16 + i) * 256 + bl] = bedrockBlock; metadata[(j * 16 + i) * 256 + bl] = bedrockByte; } } else { blocks[(j * 16 + i) * 256] = bedrockBlock; metadata[(j * 16 + i) * 256] = bedrockByte; >>>>>>> int i, j, depth; float river; for (i = 0; i < 16; i++) { for (j = 0; j < 16; j++) { RealisticBiomeBase biome = biomes[i * 16 + j]; river = -bprv.getRiverStrength(cx * 16 + j, cy * 16 + i); depth = -1; biome.rReplace(primer, cx * 16 + i, cy * 16 + j, i, j, depth, worldObj, rand, simplex, cell, n, river, base); int rough; int flatBedrockLayers = ConfigRTG.flatBedrockLayers; flatBedrockLayers = flatBedrockLayers < 0 ? 0 : (flatBedrockLayers > 5 ? 5 : flatBedrockLayers); if (flatBedrockLayers > 0) { for (int bl = 0; bl < flatBedrockLayers; bl++) { primer.setBlockState(j, bl, i, bedrockBlock.getStateFromMeta(bedrockByte)); } } else { primer.setBlockState(j, 0, i, bedrockBlock.getStateFromMeta(bedrockByte));
<<<<<<< import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import rtg.api.biome.BiomeConfig; import rtg.util.noise.CellNoise; import rtg.util.noise.OpenSimplexNoise; import rtg.world.gen.feature.WorldGenBlob; import rtg.world.gen.surface.vanilla.SurfaceVanillaColdBeach; import rtg.world.gen.terrain.vanilla.TerrainVanillaColdBeach; import java.util.Random; public class RealisticBiomeVanillaColdBeach extends RealisticBiomeVanillaBase { public static IBlockState topBlock = Biomes.coldBeach.topBlock; public static IBlockState fillerBlock = Biomes.coldBeach.fillerBlock; public RealisticBiomeVanillaColdBeach(BiomeConfig config) { super(config, Biomes.coldBeach, Biomes.river, new TerrainVanillaColdBeach(), new SurfaceVanillaColdBeach(config, topBlock, fillerBlock, topBlock, fillerBlock, (byte) 0, 1) ); } @Override public void rDecorate(World world, Random rand, int chunkX, int chunkY, OpenSimplexNoise simplex, CellNoise cell, float strength, float river) { /** * Using rDecorateSeedBiome() to partially decorate the biome? If so, then comment out this method. */ rOreGenSeedBiome(world, rand, new BlockPos(chunkX, 0, chunkY), simplex, cell, strength, river, baseBiome); // boulders for (int l = 0; l < 3f * strength; ++l) { int i1 = chunkX + rand.nextInt(16) + 8; int j1 = chunkY + rand.nextInt(16) + 8; int k1 = world.getHeight(new BlockPos(i1, 0, j1)).getY(); if (k1 < 95 && rand.nextInt(16) == 0) { (new WorldGenBlob(Blocks.cobblestone, 0, rand)).generate(world, rand, new BlockPos(i1, k1, j1)); } } } ======= import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.biome.BiomeGenBase; import rtg.api.biome.BiomeConfig; import rtg.world.biome.deco.DecoBoulder; import rtg.world.gen.surface.vanilla.SurfaceVanillaColdBeach; import rtg.world.gen.terrain.vanilla.TerrainVanillaColdBeach; public class RealisticBiomeVanillaColdBeach extends RealisticBiomeVanillaBase { public static Block topBlock = BiomeGenBase.coldBeach.topBlock; public static Block fillerBlock = BiomeGenBase.coldBeach.fillerBlock; public RealisticBiomeVanillaColdBeach(BiomeConfig config) { super(config, BiomeGenBase.coldBeach, BiomeGenBase.river, new TerrainVanillaColdBeach(), new SurfaceVanillaColdBeach(config, topBlock, fillerBlock, topBlock, fillerBlock, (byte)0, 1) ); /** * ################################################## * # DECORATIONS (ORDER MATTERS) * ################################################## */ DecoBoulder decoBoulder = new DecoBoulder(); decoBoulder.boulderBlock = Blocks.cobblestone; decoBoulder.chance = 16; decoBoulder.maxY = 95; decoBoulder.strengthFactor = 3f; this.addDeco(decoBoulder); } >>>>>>> import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import rtg.api.biome.BiomeConfig; import rtg.util.noise.CellNoise; import rtg.util.noise.OpenSimplexNoise; import rtg.world.gen.feature.WorldGenBlob; import rtg.world.gen.surface.vanilla.SurfaceVanillaColdBeach; import rtg.world.gen.terrain.vanilla.TerrainVanillaColdBeach; import java.util.Random; public class RealisticBiomeVanillaColdBeach extends RealisticBiomeVanillaBase { public static Block topBlock = BiomeGenBase.coldBeach.topBlock; public static Block fillerBlock = BiomeGenBase.coldBeach.fillerBlock; public RealisticBiomeVanillaColdBeach(BiomeConfig config) { super(config, BiomeGenBase.coldBeach, BiomeGenBase.river, new TerrainVanillaColdBeach(), new SurfaceVanillaColdBeach(config, topBlock, fillerBlock, topBlock, fillerBlock, (byte)0, 1) ); /** * ################################################## * # DECORATIONS (ORDER MATTERS) * ################################################## */ DecoBoulder decoBoulder = new DecoBoulder(); decoBoulder.boulderBlock = Blocks.cobblestone; decoBoulder.chance = 16; decoBoulder.maxY = 95; decoBoulder.strengthFactor = 3f; this.addDeco(decoBoulder); }
<<<<<<< properties = fs.create(new Path(context.getConfiguration().get("outputDir")+"/social_network/updateStream_"+attempTaskId+"_"+partitionId+"_"+streamType+".properties")); ======= if (conf.getBoolean("updateStreams",false)) { properties = fs.create(new Path(context.getConfiguration().get("outputDir")+"/social_network/updateStream_"+attempTaskId+".properties")); } >>>>>>> if (conf.getBoolean("updateStreams",false)) { properties = fs.create(new Path(context.getConfiguration().get("outputDir")+"/social_network/updateStream_"+attempTaskId+"_"+partitionId+"_"+streamType+".properties")); }
<<<<<<< public void generateKnows(List<Person> persons, int seed, List<Float> percentages, int step_index, Person.PersonSimilarity personSimilarity) { ======= public void generateKnows(List<Person> persons, int blockId, List<Float> percentages, int step_index) { >>>>>>> public void generateKnows(List<Person> persons, int blockId, List<Float> percentages, int step_index, Person.PersonSimilarity personSimilarity) {
<<<<<<< void generateKnows(List<Person> persons, int seed, List<Float> percentages, int step_index, Person.PersonSimilarity personSimilarity); ======= void generateKnows(List<Person> persons, int blockId, List<Float> percentages, int step_index); >>>>>>> void generateKnows(List<Person> persons, int blockId, List<Float> percentages, int step_index, Person.PersonSimilarity personSimilarity);
<<<<<<< currentEvent.eventData = formatData(data); UpdateEvent.writeEvent(hdfsOutput,currentEvent); ======= currentEvent.eventData = gson.toJson(data); writeEvent(currentEvent); >>>>>>> currentEvent.eventData = gson.toJson(data); UpdateEvent.writeEvent(hdfsOutput,currentEvent);
<<<<<<< long accountId; long creationDate; ======= int accountId; int sdpId; long createdDate; >>>>>>> long accountId; int sdpId; long creationDate; <<<<<<< accountId = stream.readLong(); creationDate = stream.readLong(); ======= accountId = stream.readInt(); sdpId = stream.readInt(); createdDate = stream.readLong(); >>>>>>> accountId = stream.readLong(); sdpId = stream.readInt(); creationDate = stream.readLong(); <<<<<<< stream.writeLong(accountId); stream.writeLong(creationDate); ======= stream.writeInt(accountId); stream.writeInt(sdpId); stream.writeLong(createdDate); >>>>>>> stream.writeLong(accountId); stream.writeInt(sdpId); stream.writeLong(creationDate); <<<<<<< accountId = arg0.readLong(); creationDate = arg0.readLong(); ======= accountId = arg0.readInt(); sdpId = arg0.readInt(); createdDate = arg0.readLong(); >>>>>>> accountId = arg0.readLong(); sdpId = arg0.readInt(); creationDate = arg0.readLong(); <<<<<<< creationDate = user.getCreationDate(); ======= sdpId = user.getSdpId(); createdDate = user.getCreatedDate(); >>>>>>> sdpId = user.getSdpId(); creationDate = user.getCreationDate(); <<<<<<< arg0.writeLong(accountId); arg0.writeLong(creationDate); ======= arg0.writeInt(accountId); arg0.writeInt(sdpId); arg0.writeLong(createdDate); >>>>>>> arg0.writeLong(accountId); arg0.writeInt(sdpId); arg0.writeLong(creationDate); <<<<<<< this.setCreationDate(user.getCreationDate()); ======= this.setSdpId(user.getSdpId()); this.setCreatedDate(user.getCreatedDate()); >>>>>>> this.setSdpId(user.getSdpId()); this.setCreationDate(user.getCreationDate()); <<<<<<< ======= public int getSdpId() { return sdpId; } public void setSdpId(int sdpId) { this.sdpId = sdpId; } >>>>>>> public int getSdpId() { return sdpId; } public void setSdpId(int sdpId) { this.sdpId = sdpId; }
<<<<<<< arguments.add(post.getContent()); arguments.add(Integer.toString(post.getContent().length())); arguments.add(Long.toString(post.getAuthorId())); ======= if( exportText ) { arguments.add(post.getContent()); } else { arguments.add(empty); } arguments.add(Integer.toString(post.getTextSize())); arguments.add(Integer.toString(post.getAuthorId())); arguments.add(SN.formId(post.getGroupId())); >>>>>>> if( exportText ) { arguments.add(post.getContent()); } else { arguments.add(empty); } arguments.add(Integer.toString(post.getTextSize())); arguments.add(Long.toString(post.getAuthorId())); arguments.add(SN.formId(post.getGroupId())); <<<<<<< arguments.add(comment.getContent()); arguments.add(Integer.toString(comment.getContent().length())); arguments.add(Long.toString(comment.getAuthorId())); ======= if( exportText ) { arguments.add(comment.getContent()); } else { arguments.add(""); } arguments.add(Integer.toString(comment.getTextSize())); arguments.add(Integer.toString(comment.getAuthorId())); >>>>>>> if( exportText ) { arguments.add(comment.getContent()); } else { arguments.add(""); } arguments.add(Integer.toString(comment.getTextSize())); arguments.add(Long.toString(comment.getAuthorId())); <<<<<<< arguments.add(Long.toString(photo.getCreatorId())); ======= arguments.add(Integer.toString(photo.getCreatorId())); arguments.add(SN.formId(photo.getAlbumId())); >>>>>>> arguments.add(Long.toString(photo.getCreatorId())); arguments.add(SN.formId(photo.getAlbumId()));
<<<<<<< ======= boolean exportText, long seed, long seedTextSize, >>>>>>> boolean exportText, <<<<<<< maxLargeSizeOfPost, largePostRatio, maxNumberOfLikes); ======= maxLargeSizeOfPost, largePostRatio, maxNumberOfLikes,exportText, seed, seedTextSize); >>>>>>> maxLargeSizeOfPost, largePostRatio, maxNumberOfLikes,exportText);
<<<<<<< writers.get(PERSON).writeHeader(ImmutableList.of("creationDate","id","firstName","lastName","gender","birthday","locationIP","browserUsed")); writers.get(PERSON_SPEAKS_LANGUAGE).writeHeader(ImmutableList.of("creationDate","Person.id","language")); writers.get(PERSON_HAS_EMAIL).writeHeader(ImmutableList.of("creationDate","Person.id","email")); writers.get(PERSON_LOCATED_IN_PLACE).writeHeader(ImmutableList.of("creationDate","Person.id","Place.id")); writers.get(PERSON_HAS_INTEREST_TAG).writeHeader(ImmutableList.of("creationDate","Person.id","Tag.id")); writers.get(PERSON_STUDY_AT).writeHeader(ImmutableList.of("creationDate","Person.id","Organisation.id","classYear")); writers.get(PERSON_WORK_AT).writeHeader(ImmutableList.of("creationDate","Person.id","Organisation.id","workFrom")); writers.get(PERSON_KNOWS_PERSON).writeHeader(ImmutableList.of("creationDate","Person.id","Person.id")); ======= writers.get(PERSON).writeHeader(ImmutableList.of("id","firstName","lastName","gender","birthday","creationDate","deletionDate","locationIP","browserUsed")); writers.get(PERSON_SPEAKS_LANGUAGE).writeHeader(ImmutableList.of("Person.id","language")); writers.get(PERSON_HAS_EMAIL).writeHeader(ImmutableList.of("Person.id","email")); writers.get(PERSON_LOCATED_IN_PLACE).writeHeader(ImmutableList.of("Person.id","Place.id")); writers.get(PERSON_HAS_INTEREST_TAG).writeHeader(ImmutableList.of("Person.id","Tag.id")); writers.get(PERSON_WORK_AT).writeHeader(ImmutableList.of("Person.id","Organisation.id","workFrom")); writers.get(PERSON_STUDY_AT).writeHeader(ImmutableList.of("Person.id","Organisation.id","classYear")); writers.get(PERSON_KNOWS_PERSON).writeHeader(ImmutableList.of("Person.id","Person.id","creationDate")); >>>>>>> writers.get(PERSON).writeHeader(ImmutableList.of("creationDate","deletionDate","id","firstName","lastName","gender","birthday","locationIP","browserUsed")); writers.get(PERSON_SPEAKS_LANGUAGE).writeHeader(ImmutableList.of("creationDate","Person.id","language")); writers.get(PERSON_HAS_EMAIL).writeHeader(ImmutableList.of("creationDate","Person.id","email")); writers.get(PERSON_LOCATED_IN_PLACE).writeHeader(ImmutableList.of("creationDate","Person.id","Place.id")); writers.get(PERSON_HAS_INTEREST_TAG).writeHeader(ImmutableList.of("creationDate","Person.id","Tag.id")); writers.get(PERSON_STUDY_AT).writeHeader(ImmutableList.of("creationDate","Person.id","Organisation.id","classYear")); writers.get(PERSON_WORK_AT).writeHeader(ImmutableList.of("creationDate","Person.id","Organisation.id","workFrom")); writers.get(PERSON_KNOWS_PERSON).writeHeader(ImmutableList.of("creationDate","Person.id","Person.id")); <<<<<<< ======= Dictionaries.dates.formatDateTime(p.creationDate()), Dictionaries.dates.formatDateTime(p.deletionDate()), >>>>>>>
<<<<<<< private static final Logger LOG = LoggerFactory.getLogger(Response.class); ======= /** The logger. */ private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Response.class); >>>>>>> /** The logger. */ private static final Logger LOG = LoggerFactory.getLogger(Response.class); <<<<<<< } catch (IOException ioException) { LOG.error("Redirection Error:", ioException); ======= } catch (IOException e) { LOG.warn("Redirect failure", e); >>>>>>> } catch (IOException e) { LOG.warn("Redirect failure", e);
<<<<<<< if (consumeWithFileResourceHandlers(httpRequest, httpResponse)) { return true; } ======= if (consumeWithJarResourceHandler(httpRequest, httpResponse)) { return true; } } catch (DirectoryTraversal.DirectoryTraversalDetection directoryTraversalDetection) { LOG.warn(directoryTraversalDetection.getMessage() + " directory traversal detection for path: " + httpRequest.getPathInfo()); } >>>>>>> } catch (DirectoryTraversal.DirectoryTraversalDetection directoryTraversalDetection) { LOG.warn(directoryTraversalDetection.getMessage() + " directory traversal detection for path: " + httpRequest.getPathInfo()); } <<<<<<< ======= private boolean consumeWithJarResourceHandler(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException { if (jarResourceHandlers != null) { for (JarResourceHandler jarResourceHandler : jarResourceHandlers) { InputStream stream = jarResourceHandler.getResource(httpRequest); if (stream != null) { if (MimeType.shouldGuess()) { httpResponse.setHeader(MimeType.CONTENT_TYPE, MimeType.fromPathInfo(httpRequest.getPathInfo())); } customHeaders.forEach(httpResponse::setHeader); //add all user-defined headers to response OutputStream wrappedOutputStream = GzipUtils.checkAndWrap(httpRequest, httpResponse, false); IOUtils.copy(stream, wrappedOutputStream); wrappedOutputStream.flush(); wrappedOutputStream.close(); return true; } } } return false; } >>>>>>> <<<<<<< staticResourceHandlers.add(new ClassPathResourceHandler(folder, "index.html")); LOG.info("StaticResourceHandler configured with folder = " + folder); ======= StaticFilesFolder.localConfiguredTo(folder); >>>>>>> staticResourceHandlers.add(new ClassPathResourceHandler(folder, "index.html")); LOG.info("StaticResourceHandler configured with folder = " + folder); StaticFilesFolder.localConfiguredTo(folder); <<<<<<< ======= private boolean configureJarCase(String folder, ClassPathResource resource) throws IOException { if (resource.getURL().getProtocol().equals("jar")) { InputStream stream = StaticFilesConfiguration.class.getResourceAsStream(folder); if (stream != null) { if (jarResourceHandlers == null) { jarResourceHandlers = new ArrayList<>(); } // Add jar file resource handler jarResourceHandlers.add(new JarResourceHandler(folder, "index.html")); staticResourcesSet = true; return true; } LOG.error("Static file configuration failed."); } return false; } >>>>>>>
<<<<<<< import java.util.function.Consumer; ======= import java.util.stream.Collectors; >>>>>>> import java.util.function.Consumer; import java.util.stream.Collectors; <<<<<<< } catch (Exception e) { initExceptionHandler.accept(e); } ======= try { latch.countDown(); server.join(); } catch (InterruptedException e) { LOG.error("server interrupted", e); Thread.currentThread().interrupt(); } >>>>>>> } catch (Exception e) { initExceptionHandler.accept(e); } try { latch.countDown(); server.join(); } catch (InterruptedException e) { LOG.error("server interrupted", e); Thread.currentThread().interrupt(); }
<<<<<<< import net.minecraft.command.CommandException; ======= import net.minecraft.command.CommandBase; >>>>>>> import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; <<<<<<< int var8 = parseInt(args[4], 0, Integer.MAX_VALUE); int var9 = parseInt(args[5], 1, GameData.getItemRegistry().getObject(var7).getItemStackLimit()); ItemStack tmpStack; ======= Item item = CommandBase.getItemByText(sender, var7); int var8 = parseIntWithMin(sender, args[4], 0); int var9 = parseIntBounded(sender, args[5], 1, item.getItemStackLimit()); int var11; ItemStack var10000; >>>>>>> Item item = CommandBase.getItemByText(sender, var7); int var8 = parseInt(args[4], 0, Integer.MAX_VALUE); int var9 = parseInt(args[5], 1, GameData.getItemRegistry().getObject(var7).getItemStackLimit()); ItemStack tmpStack; <<<<<<< var10.setInventorySlotContents(slot, new ItemStack(GameData.getItemRegistry().getObject(var7), var9, var8)); ======= var10.setInventorySlotContents(var11, new ItemStack(item, var9, var8)); >>>>>>> var10.setInventorySlotContents(slot, new ItemStack(item, var9, var8)); <<<<<<< var13.setInventorySlotContents(slot, new ItemStack(GameData.getItemRegistry().getObject(var7), var9, var8)); ======= var13.setInventorySlotContents(var11, new ItemStack(item, var9, var8)); >>>>>>> var13.setInventorySlotContents(slot, new ItemStack(item, var9, var8)); <<<<<<< var14.setInventorySlotContents(slot, new ItemStack(GameData.getItemRegistry().getObject(var7), var9, var8)); ======= var14.setInventorySlotContents(var11, new ItemStack(item, var9, var8)); >>>>>>> var14.setInventorySlotContents(slot, new ItemStack(item, var9, var8)); <<<<<<< var12.setInventorySlotContents(slot, new ItemStack(GameData.getItemRegistry().getObject(var7), var9, var8)); ======= var12.setInventorySlotContents(var11, new ItemStack(item, var9, var8)); >>>>>>> var12.setInventorySlotContents(slot, new ItemStack(item, var9, var8));
<<<<<<< void ignite(String host, int port, SslStores sslStores, CountDownLatch latch, int maxThreads, int minThreads, int threadIdleTimeoutMillis) throws Exception; ======= int ignite(String host, int port, SslStores sslStores, int maxThreads, int minThreads, int threadIdleTimeoutMillis); >>>>>>> int ignite(String host, int port, SslStores sslStores, int maxThreads, int minThreads, int threadIdleTimeoutMillis) throws Exception;
<<<<<<< import java.util.function.Consumer; ======= import java.util.Map; >>>>>>> import java.util.function.Consumer; import java.util.Map; <<<<<<< * Overrides default exception handler during initialization phase * * @param initExceptionHandler * The custom init exception handler */ public static void setInitExceptionHandler( Consumer<Exception> igniteExceptionHandler) { getInstance().setInitExceptionHandler(igniteExceptionHandler); } /** ======= * Set the connection to be secure, using the specified keystore and * truststore. This has to be called before any route mapping is done. You * have to supply a keystore file, truststore file is optional (keystore * will be reused). * This method is only relevant when using embedded Jetty servers. It should * not be used if you are using Servlets, where you will need to secure the * connection in the servlet container * * @param keystoreFile The keystore file location as string * @param keystorePassword the password for the keystore * @param truststoreFile the truststore file location as string, leave null to reuse * keystore * @param needsClientCert Whether to require client certificate to be supplied in * request * @param truststorePassword the trust store password */ public static void secure(String keystoreFile, String keystorePassword, String truststoreFile, String truststorePassword, boolean needsClientCert) { getInstance().secure(keystoreFile, keystorePassword, truststoreFile, truststorePassword, needsClientCert); } /** >>>>>>> * Overrides default exception handler during initialization phase * * @param initExceptionHandler * The custom init exception handler */ public static void setInitExceptionHandler( Consumer<Exception> igniteExceptionHandler) { getInstance().setInitExceptionHandler(igniteExceptionHandler); } /** * Set the connection to be secure, using the specified keystore and * truststore. This has to be called before any route mapping is done. You * have to supply a keystore file, truststore file is optional (keystore * will be reused). * This method is only relevant when using embedded Jetty servers. It should * not be used if you are using Servlets, where you will need to secure the * connection in the servlet container * * @param keystoreFile The keystore file location as string * @param keystorePassword the password for the keystore * @param truststoreFile the truststore file location as string, leave null to reuse * keystore * @param needsClientCert Whether to require client certificate to be supplied in * request * @param truststorePassword the trust store password */ public static void secure(String keystoreFile, String keystorePassword, String truststoreFile, String truststorePassword, boolean needsClientCert) { getInstance().secure(keystoreFile, keystorePassword, truststoreFile, truststorePassword, needsClientCert); } /**
<<<<<<< import com.alibaba.jvm.sandbox.api.event.BeforeEvent; ======= >>>>>>> import com.alibaba.jvm.sandbox.api.event.BeforeEvent; <<<<<<< import org.junit.Ignore; ======= import org.junit.BeforeClass; >>>>>>> import org.junit.BeforeClass; import org.junit.Ignore;
<<<<<<< import static org.powermock.api.mockito.PowerMockito.doReturn; import static org.powermock.api.mockito.PowerMockito.mockStatic; ======= >>>>>>> import static org.powermock.api.mockito.PowerMockito.doReturn;
<<<<<<< import com.google.common.collect.Lists; ======= @SuppressWarnings({ "serial"}) >>>>>>> import com.google.common.collect.Lists; @SuppressWarnings({ "serial"})
<<<<<<< import org.telegram.telegrambots.meta.TelegramBotsApi; import org.telegram.telegrambots.meta.exceptions.TelegramApiException; import org.telegram.telegrambots.meta.generics.LongPollingBot; import org.telegram.telegrambots.meta.generics.WebhookBot; ======= import org.telegram.telegrambots.TelegramBotsApi; import org.telegram.telegrambots.generics.LongPollingBot; import org.telegram.telegrambots.generics.WebhookBot; >>>>>>> import org.telegram.telegrambots.meta.TelegramBotsApi; import org.telegram.telegrambots.meta.generics.LongPollingBot; import org.telegram.telegrambots.meta.generics.WebhookBot;
<<<<<<< public Boolean getDisableNotification() { return disableNotification; } public void enableNotification() { this.disableNotification = false; } public void disableNotification() { this.disableNotification = true; } public String getChatId() { return chatId; } public void setChatId(String chatId) { this.chatId = chatId; } public String getAudio() { return audio; } public void setAudio(String audio) { this.audio = audio; this.isNewVoice = false; } public void setNewAudio(String audio, String audioName) { this.audio = audio; this.isNewVoice = false; this.voiceName = audioName; } public Integer getReplayToMessageId() { return replayToMessageId; } public void setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } public void setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; } public Integer getDuration() { return duration; } public void setDuration(Integer duration) { this.duration = duration; } public boolean isNewVoice() { return isNewVoice; } public String getVoiceName() { return voiceName; } ======= @Override public String toString() { return "SendVoice{" + "chatId='" + chatId + '\'' + ", audio='" + audio + '\'' + ", replayToMessageId=" + replayToMessageId + ", replayMarkup=" + replayMarkup + ", duration=" + duration + '}'; } >>>>>>> @Override public String toString() { return "SendVoice{" + "chatId='" + chatId + '\'' + ", audio='" + audio + '\'' + ", replayToMessageId=" + replayToMessageId + ", replayMarkup=" + replayMarkup + ", duration=" + duration + '}'; } public Boolean getDisableNotification() { return disableNotification; } public void enableNotification() { this.disableNotification = false; } public void disableNotification() { this.disableNotification = true; } public String getChatId() { return chatId; } public void setChatId(String chatId) { this.chatId = chatId; } public String getAudio() { return audio; } public void setAudio(String audio) { this.audio = audio; this.isNewVoice = false; } public void setNewAudio(String audio, String audioName) { this.audio = audio; this.isNewVoice = false; this.voiceName = audioName; } public Integer getReplayToMessageId() { return replayToMessageId; } public void setReplayToMessageId(Integer replayToMessageId) { this.replayToMessageId = replayToMessageId; } public ReplyKeyboard getReplayMarkup() { return replayMarkup; } public void setReplayMarkup(ReplyKeyboard replayMarkup) { this.replayMarkup = replayMarkup; } public Integer getDuration() { return duration; } public void setDuration(Integer duration) { this.duration = duration; } public boolean isNewVoice() { return isNewVoice; } public String getVoiceName() { return voiceName; }
<<<<<<< import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; ======= import net.minecraftforge.common.util.Constants.NBT; >>>>>>> import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.common.util.Constants.NBT;
<<<<<<< public void parse(CommandParserArgs arguments) throws CommandException ======= public void parse(final CommandParserArgs arguments) >>>>>>> public void parse(final CommandParserArgs arguments) throws CommandException
<<<<<<< public static final String INDEX_SERVICE = "index_service"; public static final String DEFAULT_INDEX_SERVICE = "internal"; public static final String SPHINX_SERVERS_SHARDS = "sphinx_servers_shards"; public static final String DEFAULT_SPHINX_SERVERS_SHARDS = "localhost:1"; ======= public static final String INDEX_ALL_FIELDS = "index_all_fields"; public static final String DEFAULT_INDEX_ALL_FIELDS = "content,filename,filenamereverse,path,interesting"; >>>>>>> public static final String INDEX_SERVICE = "index_service"; public static final String DEFAULT_INDEX_SERVICE = "internal"; public static final String SPHINX_SERVERS_SHARDS = "sphinx_servers_shards"; public static final String DEFAULT_SPHINX_SERVERS_SHARDS = "localhost:1"; public static final String INDEX_ALL_FIELDS = "index_all_fields"; public static final String DEFAULT_INDEX_ALL_FIELDS = "content,filename,filenamereverse,path,interesting";
<<<<<<< server.getServerStatusResponse().setServerDescription(new ChatComponentText(ChatOutputHandler.formatColors(motd))); ======= if (arguments.isTabCompletion) return; server.func_147134_at().func_151315_a(new ChatComponentText(ChatOutputHandler.formatColors(motd))); >>>>>>> server.getServerStatusResponse().setServerDescription(new ChatComponentText(ChatOutputHandler.formatColors(motd))); <<<<<<< EnumDifficulty difficulty = EnumDifficulty.getDifficultyEnum(arguments.parseInt()); server.setDifficultyForAllWorlds(difficulty); ======= int difficultyId = arguments.parseInt(); if (arguments.isTabCompletion) return; EnumDifficulty difficulty = EnumDifficulty.getDifficultyEnum(difficultyId); server.func_147139_a(difficulty); >>>>>>> EnumDifficulty difficulty = EnumDifficulty.getDifficultyEnum(arguments.parseInt()); server.setDifficultyForAllWorlds(difficulty); <<<<<<< @Override public boolean canConsoleUseCommand() { return true; } @Override public PermissionLevel getPermissionLevel() { return PermissionLevel.OP; } ======= >>>>>>>
<<<<<<< Map<?, ?> commandMap = ((CommandHandler) FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager()).getCommands(); ======= if (MinecraftServer.getServer() == null) return; Map<?, ?> commandMap = ((CommandHandler) MinecraftServer.getServer().getCommandManager()).getCommands(); >>>>>>> if (MinecraftServer.getServer() == null) return; Map<?, ?> commandMap = ((CommandHandler) FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager()).getCommands(); <<<<<<< CommandHandler cmdHandler = (CommandHandler) FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager(); ======= if (MinecraftServer.getServer() == null) return; CommandHandler cmdHandler = (CommandHandler) MinecraftServer.getServer().getCommandManager(); >>>>>>> if (MinecraftServer.getServer() == null) return; CommandHandler cmdHandler = (CommandHandler) MinecraftServer.getServer().getCommandManager();
<<<<<<< import io.sarl.lang.sarl.SarlAction; import io.sarl.lang.sarl.SarlFormalParameter; ======= import io.sarl.lang.actionprototype.ActionParameterTypes; import io.sarl.lang.actionprototype.ActionPrototype; import io.sarl.lang.actionprototype.ActionPrototypeProvider; import io.sarl.lang.sarl.ActionSignature; import io.sarl.lang.sarl.FormalParameter; >>>>>>> import io.sarl.lang.actionprototype.ActionParameterTypes; import io.sarl.lang.actionprototype.ActionPrototype; import io.sarl.lang.actionprototype.ActionPrototypeProvider; import io.sarl.lang.sarl.SarlAction; import io.sarl.lang.sarl.SarlFormalParameter; <<<<<<< import io.sarl.lang.services.SARLGrammarAccess.ParameterElements; import io.sarl.lang.services.SARLGrammarAccess.ActionElements; import io.sarl.lang.signature.ActionKey; import io.sarl.lang.signature.ActionSignatureProvider; import io.sarl.lang.signature.SignatureKey; ======= import io.sarl.lang.services.SARLGrammarAccess.ActionSignatureElements; import io.sarl.lang.services.SARLGrammarAccess.FormalParameterElements; >>>>>>> import io.sarl.lang.services.SARLGrammarAccess.ActionElements; import io.sarl.lang.services.SARLGrammarAccess.ParameterElements;
<<<<<<< import io.sarl.lang.sarl.SarlAgent; import io.sarl.lang.signature.ActionKey; ======= >>>>>>>
<<<<<<< import io.sarl.lang.core.Skill.UninstallationStage; ======= import io.sarl.lang.util.ClearableReference; >>>>>>> import io.sarl.lang.core.Skill.UninstallationStage; import io.sarl.lang.util.ClearableReference;
<<<<<<< " @Inline(value = \"(T)null\", constantExpression = true)", " @Pure", ======= >>>>>>> " @Pure", <<<<<<< " @Inline(value = \"(T)null\", constantExpression = true)", " @Pure", ======= >>>>>>> " @Pure", <<<<<<< " @Inline(value = \"(T)null\", constantExpression = true)", " @Pure", ======= >>>>>>> " @Pure",
<<<<<<< import java.util.ArrayList; import java.util.Collection; import java.util.List; ======= >>>>>>> import java.util.Collection;
<<<<<<< when(this.spawnService.spawn( ArgumentMatchers.anyInt(), ArgumentMatchers.any(), ArgumentMatchers.any(), ArgumentMatchers.any(), ArgumentMatchers.any())).thenReturn(Collections.singletonList(this.uuid)); ======= >>>>>>> when(this.spawnService.spawn( ArgumentMatchers.anyInt(), ArgumentMatchers.any(), ArgumentMatchers.any(), ArgumentMatchers.any(), ArgumentMatchers.any())).thenReturn(Collections.singletonList(this.uuid));
<<<<<<< import io.sarl.lang.sarl.SarlFormalParameter; import io.sarl.lang.sarl.SarlSkill; import io.sarl.lang.services.SARLGrammarAccess; import io.sarl.lang.signature.ActionSignatureProvider; ======= import io.sarl.lang.sarl.SarlScript; import io.sarl.lang.sarl.Skill; >>>>>>> import io.sarl.lang.sarl.SarlFormalParameter; import io.sarl.lang.sarl.SarlSkill; import io.sarl.lang.services.SARLGrammarAccess; <<<<<<< private void createExecutableFeatureExceptions(JvmExecutable operation, List<JvmTypeReference> exceptions, ImportManager importManager) { List<JvmTypeReference> jvmExceptions = operation.getExceptions(); if (!jvmExceptions.isEmpty()) { for (JvmTypeReference type : jvmExceptions) { JvmTypeReference clone = cloneType(type); updateImports(clone, importManager); exceptions.add(clone); } } } private static String findDefaultValue(JvmDeclaredType container, String name) { ======= private String findDefaultValue(JvmDeclaredType container, String typeName, String dfName) { JvmType type = this.typeReferences.findDeclaredType(typeName, container); if (type instanceof JvmDeclaredType) { for (JvmField field : ((JvmDeclaredType) type).getDeclaredFields()) { if (field.getSimpleName().equals(dfName)) { return ModelUtil.annotationString(field, Generated.class); } } } return null; } private String findDefaultValue(JvmDeclaredType container, String name) { >>>>>>> private void createExecutableFeatureExceptions(JvmExecutable operation, List<JvmTypeReference> exceptions, ImportManager importManager) { List<JvmTypeReference> jvmExceptions = operation.getExceptions(); if (!jvmExceptions.isEmpty()) { for (JvmTypeReference type : jvmExceptions) { JvmTypeReference clone = cloneType(type); updateImports(clone, importManager); exceptions.add(clone); } } } private String findDefaultValue(JvmDeclaredType container, String typeName, String dfName) { JvmType type = this.typeReferences.findDeclaredType(typeName, container); if (type instanceof JvmDeclaredType) { for (JvmField field : ((JvmDeclaredType) type).getDeclaredFields()) { if (field.getSimpleName().equals(dfName)) { return ModelUtil.annotationString(field, Generated.class); } } } return null; } private String findDefaultValue(JvmDeclaredType container, String name) {
<<<<<<< import static org.junit.Assert.*; import static org.junit.Assert.assertNull; ======= import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; >>>>>>> import static org.junit.Assert.*; import static org.junit.Assert.assertNull; <<<<<<< ======= import org.eclipse.xtext.xbase.lib.Functions.Function1; >>>>>>> import org.eclipse.xtext.xbase.lib.Functions.Function1; <<<<<<< import io.sarl.lang.core.Scope; ======= import io.sarl.lang.core.Skill; >>>>>>> import io.sarl.lang.core.Scope; import io.sarl.lang.core.Skill;
<<<<<<< import org.junit.Ignore; import org.junit.Test; ======= import org.junit.runner.RunWith; >>>>>>> import org.junit.Ignore; <<<<<<< @Ignore public class CompilerTest extends AbstractMassiveCompilationTest { ======= public class CompilerTest extends AbstractSarlTest { >>>>>>> @Ignore public class CompilerTest extends AbstractMassiveCompilationTest {
<<<<<<< import io.sarl.lang.sarl.SarlAction; import io.sarl.lang.sarl.SarlFormalParameter; import io.sarl.lang.signature.ActionKey; import io.sarl.lang.signature.ActionSignatureProvider; import io.sarl.lang.signature.ActionSignatureProvider.FormalParameterProvider; import io.sarl.lang.signature.SignatureKey; ======= import io.sarl.lang.sarl.Action; import io.sarl.lang.sarl.Constructor; import io.sarl.lang.sarl.FeatureContainer; import io.sarl.lang.sarl.ParameterizedFeature; >>>>>>> import io.sarl.lang.sarl.SarlAction; import io.sarl.lang.sarl.SarlFormalParameter;
<<<<<<< import com.ForgeEssentials.permission.ForgeEssentialsPermissionRegistrationEvent; import com.ForgeEssentials.permission.PermissionsAPI; ======= import com.ForgeEssentials.permission.PermissionRegistrationEvent; >>>>>>> import com.ForgeEssentials.permission.PermissionRegistrationEvent; import com.ForgeEssentials.permission.PermissionsAPI;
<<<<<<< import org.eclipse.xtext.xbase.scoping.batch.IFeatureNames; ======= import org.eclipse.xtext.xbase.featurecalls.IdentifiableSimpleNameProvider; import org.eclipse.xtext.xbase.lib.util.ReflectExtensions; >>>>>>> import org.eclipse.xtext.xbase.featurecalls.IdentifiableSimpleNameProvider; import org.eclipse.xtext.xbase.lib.util.ReflectExtensions; import org.eclipse.xtext.xbase.scoping.batch.IFeatureNames; <<<<<<< ======= @Inject private IdentifiableSimpleNameProvider featureNameProvider; //FIXME: Remove according to https://github.com/eclipse/xtext-extras/pull/331 @Inject private ReflectExtensions reflect; >>>>>>> @Inject private IdentifiableSimpleNameProvider featureNameProvider; <<<<<<< /** Replies if the given feature call has an implicit reference to the {@code it} variable. * * @param featureCall the feature call to test. * @return {@code true} if the given feature call has an implicit reference to the * {@code it} variable. * @since 0.9 */ @SuppressWarnings("static-method") protected boolean isReferenceToIt(XFeatureCall featureCall) { assert featureCall != null; if (!featureCall.isTypeLiteral() && !featureCall.isPackageFragment()) { final String itKeyword = IFeatureNames.IT.getFirstSegment(); XFeatureCall theFeatureCall = featureCall; do { final String name = theFeatureCall.getFeature().getSimpleName(); if (Strings.equal(itKeyword, name)) { return true; } final XExpression expr = theFeatureCall.getImplicitReceiver(); if (expr instanceof XFeatureCall) { theFeatureCall = (XFeatureCall) expr; } else { theFeatureCall = null; } } while (theFeatureCall != null); } return false; } ======= @Override protected void featureCalltoJavaExpression(final XAbstractFeatureCall call, ITreeAppendable appendable, boolean isExpressionContext) { // FIXME: Remove when Issue is fixed (https://github.com/eclipse/xtext-extras/pull/324) if (call instanceof XAssignment) { assignmentToJavaExpression((XAssignment) call, appendable, isExpressionContext); } else { if (needMultiAssignment(call)) { appendLeftOperand(call, appendable, isExpressionContext).append(" = "); //$NON-NLS-1$ } final JvmAnnotationReference annotationRef = this.expressionHelper.findInlineAnnotation(call); ITreeAppendable app = appendable; if (annotationRef == null || !isConstantExpression(annotationRef)) { final boolean hasReceiver = appendReceiver(call, app, isExpressionContext); if (hasReceiver) { app.append("."); //$NON-NLS-1$ app = appendTypeArguments(call, app); } } appendFeatureCall(call, app); } } >>>>>>> /** Replies if the given feature call has an implicit reference to the {@code it} variable. * * @param featureCall the feature call to test. * @return {@code true} if the given feature call has an implicit reference to the * {@code it} variable. * @since 0.9 */ @SuppressWarnings("static-method") protected boolean isReferenceToIt(XFeatureCall featureCall) { assert featureCall != null; if (!featureCall.isTypeLiteral() && !featureCall.isPackageFragment()) { final String itKeyword = IFeatureNames.IT.getFirstSegment(); XFeatureCall theFeatureCall = featureCall; do { final String name = theFeatureCall.getFeature().getSimpleName(); if (Strings.equal(itKeyword, name)) { return true; } final XExpression expr = theFeatureCall.getImplicitReceiver(); if (expr instanceof XFeatureCall) { theFeatureCall = (XFeatureCall) expr; } else { theFeatureCall = null; } } while (theFeatureCall != null); } return false; }
<<<<<<< import org.eclipse.xtext.junit4.XtextRunner; import org.eclipse.xtext.junit4.validation.ValidationTestHelper; import org.eclipse.xtext.xbase.XExpression; ======= >>>>>>> import org.eclipse.xtext.xbase.XExpression; <<<<<<< this.validator.assertNoErrors(agent); EList<JvmParameterizedTypeReference> superTypes = agent.getExtends(); ======= this.helper.getValidator().assertNoErrors(agent); EList<JvmParameterizedTypeReference> superTypes = agent.getSuperTypes(); >>>>>>> this.helper.getValidator().assertNoErrors(agent); EList<JvmParameterizedTypeReference> superTypes = agent.getExtends(); <<<<<<< this.validator.assertNoErrors(event); EList<XtendMember> features = event.getMembers(); ======= this.helper.getValidator().assertNoErrors(event); EList<EObject> features = event.getFeatures(); >>>>>>> this.helper.getValidator().assertNoErrors(event); EList<XtendMember> features = event.getMembers(); <<<<<<< this.validator.assertNoErrors(agent); EList<JvmParameterizedTypeReference> superTypes = agent.getExtends(); ======= this.helper.getValidator().assertNoErrors(agent); EList<JvmParameterizedTypeReference> superTypes = agent.getSuperTypes(); >>>>>>> this.helper.getValidator().assertNoErrors(agent); EList<JvmParameterizedTypeReference> superTypes = agent.getExtends(); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(event); Object feature = event.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(event); Object feature = event.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(event); Object feature = event.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(capacity); Object feature = capacity.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(capacity); Object feature = capacity.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(capacity); Object feature = capacity.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(capacity); Object feature = capacity.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(capacity); Object feature = capacity.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(capacity); Object feature = capacity.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(capacity); Object feature = capacity.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(capacity); Object feature = capacity.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(capacity); Object feature = capacity.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(capacity); Object feature = capacity.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(capacity); Object feature = capacity.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(capacity); Object feature = capacity.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0); <<<<<<< this.validator.assertNoErrors(agent); Object feature = agent.getMembers().get(0); ======= this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getFeatures().get(0); >>>>>>> this.helper.getValidator().assertNoErrors(agent); Object feature = agent.getMembers().get(0);
<<<<<<< /** Replies the initialization parameters of the agents. * * @return the initialization parameters. */ protected Object[] getAgentInitializationParameters() { return this.initializationParameters; } ======= >>>>>>> /** Replies the initialization parameters of the agents. * * @return the initialization parameters. */ protected Object[] getAgentInitializationParameters() { return this.initializationParameters; } <<<<<<< getSkill(Lifecycle.class).killMe(); ======= getSkill(Schedules.class).in(1000, (it) -> forceKillMe()); >>>>>>> getSkill(Schedules.class).in(1000, (it) -> forceKillMe());
<<<<<<< public void parseCenter(CommandParserArgs arguments, WorldBorder border) throws CommandException ======= public static void parseCenter(CommandParserArgs arguments, WorldBorder border) >>>>>>> public static void parseCenter(CommandParserArgs arguments, WorldBorder border) throws CommandException <<<<<<< private void parseRadius(CommandParserArgs arguments, WorldBorder border) throws CommandException ======= public static void parseRadius(CommandParserArgs arguments, WorldBorder border) >>>>>>> public static void parseRadius(CommandParserArgs arguments, WorldBorder border) throws CommandException
<<<<<<< import org.junit.Ignore; import org.junit.Test; ======= import org.junit.runner.RunWith; >>>>>>> import org.junit.Ignore; <<<<<<< @Ignore public class CompilerTest extends AbstractMassiveCompilationTest { ======= public class CompilerTest extends AbstractSarlTest { >>>>>>> @Ignore public class CompilerTest extends AbstractMassiveCompilationTest {
<<<<<<< import io.sarl.lang.sarl.SarlAction; import io.sarl.lang.sarl.SarlAgent; import io.sarl.lang.sarl.SarlBehavior; import io.sarl.lang.sarl.SarlBehaviorUnit; import io.sarl.lang.sarl.SarlCapacity; import io.sarl.lang.sarl.SarlCapacityUses; import io.sarl.lang.sarl.SarlEvent; import io.sarl.lang.sarl.SarlFormalParameter; import io.sarl.lang.sarl.SarlRequiredCapacity; import io.sarl.lang.sarl.SarlSkill; import io.sarl.lang.signature.ActionKey; import io.sarl.lang.signature.ActionNameKey; import io.sarl.lang.signature.ActionSignatureProvider; import io.sarl.lang.signature.InferredActionSignature; import io.sarl.lang.signature.InferredStandardParameter; import io.sarl.lang.signature.SignatureKey; import io.sarl.lang.util.JvmIdentifiableComparator; ======= import io.sarl.lang.jvmmodel.JvmModelInferrerProber.Step; import io.sarl.lang.sarl.Action; import io.sarl.lang.sarl.ActionSignature; import io.sarl.lang.sarl.Agent; import io.sarl.lang.sarl.Attribute; import io.sarl.lang.sarl.Behavior; import io.sarl.lang.sarl.BehaviorUnit; import io.sarl.lang.sarl.Capacity; import io.sarl.lang.sarl.CapacityUses; import io.sarl.lang.sarl.Constructor; import io.sarl.lang.sarl.Event; import io.sarl.lang.sarl.FeatureContainer; import io.sarl.lang.sarl.FormalParameter; import io.sarl.lang.sarl.ImplementingElement; import io.sarl.lang.sarl.InheritingElement; import io.sarl.lang.sarl.ParameterizedFeature; import io.sarl.lang.sarl.Skill; import io.sarl.lang.sarl.TopElement; >>>>>>> import io.sarl.lang.core.Skill; import io.sarl.lang.jvmmodel.JvmModelInferrerProber.Step; import io.sarl.lang.sarl.SarlAction; import io.sarl.lang.sarl.SarlAgent; import io.sarl.lang.sarl.SarlBehavior; import io.sarl.lang.sarl.SarlBehaviorUnit; import io.sarl.lang.sarl.SarlCapacity; import io.sarl.lang.sarl.SarlCapacityUses; import io.sarl.lang.sarl.SarlEvent; import io.sarl.lang.sarl.SarlFormalParameter; import io.sarl.lang.sarl.SarlRequiredCapacity; import io.sarl.lang.sarl.SarlSkill; <<<<<<< import org.eclipse.xtend.core.jvmmodel.SyntheticNameClashResolver; import org.eclipse.xtend.core.jvmmodel.XtendJvmModelInferrer; import org.eclipse.xtend.core.xtend.CreateExtensionInfo; import org.eclipse.xtend.core.xtend.XtendAnnotationType; import org.eclipse.xtend.core.xtend.XtendClass; import org.eclipse.xtend.core.xtend.XtendConstructor; import org.eclipse.xtend.core.xtend.XtendEnum; import org.eclipse.xtend.core.xtend.XtendField; import org.eclipse.xtend.core.xtend.XtendFile; import org.eclipse.xtend.core.xtend.XtendFunction; import org.eclipse.xtend.core.xtend.XtendInterface; import org.eclipse.xtend.core.xtend.XtendMember; import org.eclipse.xtend.core.xtend.XtendParameter; import org.eclipse.xtend.core.xtend.XtendTypeDeclaration; import org.eclipse.xtend.lib.macro.declaration.Modifier; ======= import org.eclipse.emf.ecore.EObject; >>>>>>> import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.jvmmodel.SyntheticNameClashResolver; import org.eclipse.xtend.core.jvmmodel.XtendJvmModelInferrer; import org.eclipse.xtend.core.xtend.CreateExtensionInfo; import org.eclipse.xtend.core.xtend.XtendConstructor; import org.eclipse.xtend.core.xtend.XtendField; import org.eclipse.xtend.core.xtend.XtendFile; import org.eclipse.xtend.core.xtend.XtendFunction; import org.eclipse.xtend.core.xtend.XtendMember; import org.eclipse.xtend.core.xtend.XtendParameter; import org.eclipse.xtend.core.xtend.XtendTypeDeclaration; <<<<<<< import org.eclipse.xtext.xbase.jvmmodel.IJvmModelAssociator; import org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder; ======= import org.eclipse.xtext.xbase.jvmmodel.ILogicalContainerProvider; import org.eclipse.xtext.xbase.jvmmodel.JvmModelAssociator; >>>>>>> import org.eclipse.xtext.xbase.jvmmodel.IJvmModelAssociator; import org.eclipse.xtext.xbase.jvmmodel.JvmModelAssociator; <<<<<<< ======= /** Tool for exploring the parse tree. */ @Inject protected ILogicalContainerProvider logicalContainerProvider; /** Generator of JVM elements. */ >>>>>>> /** Generator of JVM elements. */ @Inject private JvmTypesBuilder typeBuilder; /** On-fly Xbase compiler. */ @Inject private XbaseCompiler xbaseCompiler; /** Associator of the JVM elements and the SARL elements. */ @Inject private JvmModelAssociator jvmModelAssociator; /** Generator's logger. */ <<<<<<< protected void addCapacityDeletatorOperationsTo( XtendMember source, JvmTypeReference capacityType, JvmGenericType inferredJvmType) { GenerationContext context = this.generationContexts.get(inferredJvmType); assert (context != null); ======= protected int generateCapacityDelegatorMethods( JvmGenericType owner, final InheritingElement context, final JvmParameterizedTypeReference capacityType, int index, Map<ActionPrototype, JvmOperation> operationsToImplement, Map<ActionPrototype, JvmOperation> implementedOperations) { >>>>>>> protected void transform(SarlCapacityUses source, JvmGenericType container) { final GenerationContext context = this.contexts.get(container.getQualifiedName()); if (context == null) { return; } for (JvmTypeReference capacityType : source.getCapacities()) {
<<<<<<< " @Pure", " public boolean fct() {", ======= " public static boolean fct() {", >>>>>>> " @Pure", " public static boolean fct() {", <<<<<<< " @Pure", " public boolean fct() {", ======= " public static boolean fct() {", >>>>>>> " @Pure", " public static boolean fct() {", <<<<<<< " @Pure", " public Object fct() {", ======= " public static Object fct() {", >>>>>>> " @Pure", " public static Object fct() {", <<<<<<< " @Pure", " public double fct() {", ======= " public static double fct() {", >>>>>>> " @Pure", " public static double fct() {", <<<<<<< " @Pure", " public double fct() {", ======= " public static double fct() {", >>>>>>> " @Pure", " public static double fct() {", <<<<<<< " @Pure", " public String fct() {", ======= " public static String fct() {", >>>>>>> " @Pure", " public static String fct() {", <<<<<<< " @Pure", ======= " public final String fct() {", " return (\"abc\" + \"xyz\");", " }", " ", " @SyntheticMember", " public C1() {", " super();", " }", "}", "" ); this.compiler.compile(source, (r) -> { assertEquals(expectedC1, r.getGeneratedCode("C1")); }); } @Test public void stringExpression03() throws Exception { String source = multilineString( "final class C1 {", " def fct { return \"abc\" + \"xyz\" }", "}", ""); final String expectedC1 = multilineString( "import io.sarl.lang.annotation.SarlElementType;", "import io.sarl.lang.annotation.SarlSpecification;", "import io.sarl.lang.annotation.SyntheticMember;", "import org.eclipse.xtext.xbase.lib.Inline;", "", "@SarlSpecification(\"" + SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING + "\")", "@SarlElementType(" + SarlPackage.SARL_CLASS + ")", "@SuppressWarnings(\"all\")", "public final class C1 {", " @Inline(value = \"\\\"abcxyz\\\"\", constantExpression = true)", >>>>>>> " @Pure", " public final String fct() {", " return (\"abc\" + \"xyz\");", " }", " ", " @SyntheticMember", " public C1() {", " super();", " }", "}", "" ); this.compiler.compile(source, (r) -> { assertEquals(expectedC1, r.getGeneratedCode("C1")); }); } @Test public void stringExpression03() throws Exception { String source = multilineString( "final class C1 {", " def fct { return \"abc\" + \"xyz\" }", "}", ""); final String expectedC1 = multilineString( "import io.sarl.lang.annotation.SarlElementType;", "import io.sarl.lang.annotation.SarlSpecification;", "import io.sarl.lang.annotation.SyntheticMember;", "import org.eclipse.xtext.xbase.lib.Inline;", "import org.eclipse.xtext.xbase.lib.Pure;", "", "@SarlSpecification(\"" + SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING + "\")", "@SarlElementType(" + SarlPackage.SARL_CLASS + ")", "@SuppressWarnings(\"all\")", "public final class C1 {", " @Inline(value = \"\\\"abcxyz\\\"\", constantExpression = true)", " @Pure", <<<<<<< " @Pure", " public Class<Integer> fct() {", ======= " public static Class<Integer> fct() {", >>>>>>> " @Pure", " public static Class<Integer> fct() {", <<<<<<< " @Pure", " public Class<Integer> fct() {", ======= " public static Class<Integer> fct() {", >>>>>>> " @Pure", " public static Class<Integer> fct() {", <<<<<<< " @Pure", " public Integer fct() {", ======= " public static Integer fct() {", >>>>>>> " @Pure", " public static Integer fct() {", <<<<<<< " @Pure", " public boolean fct() {", ======= " public static boolean fct() {", >>>>>>> " @Pure", " public static boolean fct() {",
<<<<<<< if (event instanceof Initialize) { // Immediate synchronous dispatching of Initialize event try { this.eventDispatcher.immediateDispatch(event); this.state.set(OwnerState.RUNNING); } catch (Exception e) { final Throwable cause = Throwables.getRootCause(e); if (!(cause instanceof ChuckNorrisException)) { // Log the exception final Logging loggingCapacity = getSkill(Logging.class); if (loggingCapacity != null) { loggingCapacity.error(Messages.InternalEventBusSkill_3, cause); } else { final LogRecord record = new LogRecord(Level.SEVERE, Messages.InternalEventBusSkill_3); record.setThrown(cause); this.logger.log(record); } } // If we have an exception within the agent's initialization, we kill the agent. this.state.set(OwnerState.RUNNING); // Asynchronous kill of the event. this.agentAsEventListener.killOrMarkAsKilled(); } } else if (event instanceof Destroy) { // Immediate synchronous dispatching of Destroy event synchronized (this.state) { this.state.set(OwnerState.DESTROYED); } this.eventDispatcher.immediateDispatch(event); } else if (event instanceof AsynchronousAgentKillingEvent) { ======= final Class<? extends Event> eventType = event.getClass(); if (Initialize.class.equals(eventType)) { runInitializationStage(event); } else if (Destroy.class.equals(eventType)) { runDestructionStage(event); } else if (AsynchronousAgentKillingEvent.class.equals(eventType)) { >>>>>>> final Class<? extends Event> eventType = event.getClass(); if (Initialize.class.equals(eventType)) { runInitializationStage(event); } else if (Destroy.class.equals(eventType)) { runDestructionStage(event); } else if (AsynchronousAgentKillingEvent.class.equals(eventType)) { <<<<<<< assert (!(event instanceof Initialize)) && (!(event instanceof Destroy)) && (!(event instanceof AsynchronousAgentKillingEvent)) : "Unsupported type of event: " + event; //$NON-NLS-1$ if (event instanceof AgentSpawned && ((AgentSpawned) event).agentIdentifiers.contains(this.aid)) { ======= final Class<? extends Event> eventType = event.getClass(); assert (!Initialize.class.equals(eventType)) && !Destroy.class.equals(eventType) && !AsynchronousAgentKillingEvent.class.equals(eventType) : "Unsupported type of event: " + event; //$NON-NLS-1$ if (AgentSpawned.class.equals(eventType) && this.aid.equals(((AgentSpawned) event).agentID)) { >>>>>>> final Class<? extends Event> eventType = event.getClass(); assert (!Initialize.class.equals(eventType)) && !Destroy.class.equals(eventType) && !AsynchronousAgentKillingEvent.class.equals(eventType) : "Unsupported type of event: " + event; //$NON-NLS-1$ if (AgentSpawned.class.equals(eventType) && ((AgentSpawned) event).agentIdentifiers.contains(this.aid)) {